board/qemu/aarch64-virt/linux.config: regenerate after kernel version bump
PATCH 1/8 board/qemu/aarch64-virt/linux.config: regenerate after kernel version bump
Regenerate the with savedefconfig.
--- board/qemu/aarch64-virt/linux.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
board/qemu/aarch64-virt/linux.config +3 -3
@@ -5,13 +5,13 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_TASKSTATS=y CONFIG_SCHED_AUTOGROUP=y CONFIG_PROFILING=y +CONFIG_ARCH_VEXPRESS=y +CONFIG_COMPAT=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_BLK_DEV_BSGLIB=y -CONFIG_ARCH_VEXPRESS=y -CONFIG_TRANSPARENT_HUGEPAGE=y CONFIG_BINFMT_MISC=y -CONFIG_COMPAT=y +CONFIG_TRANSPARENT_HUGEPAGE=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_PACKET_DIAG=y
Signature · 1 line
2.25.4
PATCH 2/8 board/qemu/aarch64-virt/linux.config: add RTC PL031 driver
Qemu for the aarch64 virt emulate an RTC PL031 device. Enable the kernel support to allow setting the system time.
"date" now return the current time:
Sun Jul 5 20:38:50 UTC 2020
--- board/qemu/aarch64-virt/linux.config | 1 + 1 file changed, 1 insertion(+)
board/qemu/aarch64-virt/linux.config +1 -0
@@ -45,6 +45,7 @@ CONFIG_VIRTIO_CONSOLE=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_PL031=y CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y CONFIG_MAILBOX=y
Signature · 1 line
2.25.4
PATCH 3/8 board/qemu/aarch64-virt/linux.config: enable PCIe and PCI host generic driver
In reply to Romain NaourAdd the CONFIG_PCI symbol due a change in kernel 5.0 [1]. The option was previously enabled by default (default y).
"PCI: consolidate PCI config entry in drivers/pci
There is no good reason to duplicate the PCI menu in every architecture. Instead provide a selectable HAVE_PCI symbol that indicates availability of PCI support, and a FORCE_PCI symbol to for PCI on and the handle the rest in drivers/pci."
Qemu aarch64 provide a PCIe Host bridge but it require CONFIG_PCI_HOST_GENERIC enabled in the kernel.
With CONFIG_PCI_HOST_GENERIC enabled PCIe host bridge is detected:
$ dmesg pci-host-generic 4010000000.pcie: host bridge /pcie at 10000000 ranges: pci-host-generic 4010000000.pcie: IO 0x3eff0000..0x3effffff -> 0x00000000 pci-host-generic 4010000000.pcie: MEM 0x10000000..0x3efeffff -> 0x10000000 pci-host-generic 4010000000.pcie: MEM 0x8000000000..0xffffffffff -> 0x8000000000 pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff] pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [bus 00-ff] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
$ lspci 00:00.0 Host bridge: Red Hat, Inc. QEMU PCIe Host bridge
--- board/qemu/aarch64-virt/linux.config | 2 ++ 1 file changed, 2 insertions(+)
board/qemu/aarch64-virt/linux.config +2 -0
@@ -23,6 +23,8 @@ CONFIG_IP_ADVANCED_ROUTER=y CONFIG_BRIDGE=m CONFIG_NET_SCHED=y CONFIG_VSOCKETS=y +CONFIG_PCI=y +CONFIG_PCI_HOST_GENERIC=y CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y CONFIG_VIRTIO_BLK=y
Signature · 1 line
2.25.4
PATCH 4/8 board/qemu/aarch64-virt/linux.config: enable VIRTIO_GPU driver
In reply to Romain NaourThis driver is intended to be used by mesa virgl Gallium on the guest. virtio-gpu is enabled by adding "-device virtio-gpu-pci" on the qemu command line.
It's detected by lspci and dmesg log:
$ lspci 00:01.0 Display controller: Red Hat, Inc. Virtio GPU (rev 01)
$ dmesg virtio-pci 0000:00:01.0: enabling device (0000 -> 0002) [drm] pci: virtio-gpu-pci detected at 0000:00:01.0 [drm] virgl 3d acceleration not supported by host [drm] EDID support available. [TTM] Zone kernel: Available graphics memory: 51876 KiB [TTM] Initializing pool allocator [TTM] Initializing DMA pool allocator [drm] number of scanouts: 1 [drm] number of cap sets: 0 [drm] Initialized virtio_gpu 0.1.0 0 for virtio2 on minor 0
The framebuffer interface fb0 is now present in /dev
$ ls /dev/fb* /dev/fb0
See:
https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
https://at.projects.genivi.org/wiki/display/WIK4/GENIVI+Technical+Summit+Session+Content+2018?preview=%2F28412356%2F28412481%2F2018-10-11_GeniviBangalorTechSummit_Virtio_GPU.pdf
--- board/qemu/aarch64-virt/linux.config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
board/qemu/aarch64-virt/linux.config +3 -1
@@ -40,14 +40,16 @@ CONFIG_DUMMY=y CONFIG_MACVLAN=y CONFIG_VIRTIO_NET=y CONFIG_NLMON=y -CONFIG_VT_HW_CONSOLE_BINDING=y CONFIG_SERIAL_AMBA_PL011=y CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_VIRTIO_CONSOLE=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_DRM=y +CONFIG_DRM_VIRTIO_GPU=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_PL031=y +CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y CONFIG_MAILBOX=y
Signature · 1 line
2.25.4
PATCH 5/8 board/qemu/aarch64-virt/linux.config: enable QEMU firmware configuration (fw_cfg)
In reply to Romain NaourFrom [1]:
This kernel option allow exporting of the QEMU firmware configuration (fw_cfg) file entries via sysfs. Entries are found under /sys/firmware/fw_cfg when this option is enabled and loaded.
Enable the suboption to allow the qemu_fw_cfg device to be initialized via the kernel command line or using a module parameter.
--- board/qemu/aarch64-virt/linux.config | 2 ++ 1 file changed, 2 insertions(+)
board/qemu/aarch64-virt/linux.config +2 -0
@@ -7,6 +7,8 @@ CONFIG_SCHED_AUTOGROUP=y CONFIG_PROFILING=y CONFIG_ARCH_VEXPRESS=y CONFIG_COMPAT=y +CONFIG_FW_CFG_SYSFS=y +CONFIG_FW_CFG_SYSFS_CMDLINE=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_BLK_DEV_BSGLIB=y
Signature · 1 line
2.25.4
PATCH 6/8 board/qemu/aarch64-virt/linux.config: enable ARM_SMMU_V3
In reply to Romain NaourFrom [1]:
Support for implementations of the ARM System MMU architecture version 3 providing translation support to a PCIe root complex.
ARM SMMU is supported since Qemu v3.0.0 [2].
ARM_SMMU_V3 can be enabled with: -M virt,iommu=smmuv3
dmesg:
arm-smmu-v3 9050000.smmuv3: ias 44-bit, oas 44-bit (features 0x00000305) arm-smmu-v3 9050000.smmuv3: allocated 262144 entries for cmdq arm-smmu-v3 9050000.smmuv3: allocated 131072 entries for evtq
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/iommu/Kconfig?h=v5.4.42#n390
[2] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=527773eeef9f2225370f9c17c35074b2ed0ced92
--- board/qemu/aarch64-virt/linux.config | 1 + 1 file changed, 1 insertion(+)
board/qemu/aarch64-virt/linux.config +1 -0
@@ -56,6 +56,7 @@ CONFIG_VIRTIO_MMIO=y CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y CONFIG_MAILBOX=y CONFIG_PL320_MBOX=y +CONFIG_ARM_SMMU_V3=y CONFIG_EXT4_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y
Signature · 1 line
2.25.4
PATCH 7/8 board/qemu/aarch64-virt/linux.config: enable TPM tis support
In reply to Romain NaourQemu aarch64 virt machine support TPM using a swtmp [1] TPM emulator provided on the qemu command line [2].
[1] https://github.com/stefanberger/swtpm/wiki
[2] https://git.qemu.org/?p=qemu.git;a=commitdiff;h=c294ac327ca99342b90bd3a83d2cef9b447afaa7
--- board/qemu/aarch64-virt/linux.config | 2 ++ 1 file changed, 2 insertions(+)
board/qemu/aarch64-virt/linux.config +2 -0
@@ -47,6 +47,8 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_VIRTIO_CONSOLE=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_TCG_TPM=y +CONFIG_TCG_TIS=y CONFIG_DRM=y CONFIG_DRM_VIRTIO_GPU=y CONFIG_RTC_CLASS=y
Signature · 1 line
2.25.4
PATCH 8/8 board/qemu/aarch64-virt/linux.config: enable VIRTIO_FS driver
In reply to Romain Naourvirtio-fs allow sharing a directory between the host and the guest. It require virtiofsd daemon running before starting Qemu.
The wiki [1] recommand to enable the following kernel options:
CONFIG_VIRTIO
CONFIG_VIRTIO_FS
CONFIG_DAX
CONFIG_FS_DAX
CONFIG_DAX_DRIVER
CONFIG_ZONE_DEVICE
But virtio-fs works fine with only VIRTIO_FS.
Note: ZONE_DEVICE can only be enabled on aarch64 since kernel >= 5.7. ARCH_ENABLE_MEMORY_HOTREMOVE support is missing for previous kernel [2].
[1] https://virtio-fs.gitlab.io/howto-qemu.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bbd6ec605c0fc286c3f8ce60b4ed44635361d58b
--- board/qemu/aarch64-virt/linux.config | 2 ++ 1 file changed, 2 insertions(+)
board/qemu/aarch64-virt/linux.config +2 -0
@@ -60,5 +60,7 @@ CONFIG_MAILBOX=y CONFIG_PL320_MBOX=y CONFIG_ARM_SMMU_V3=y CONFIG_EXT4_FS=y +CONFIG_FUSE_FS=y +CONFIG_VIRTIO_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y
Signature · 1 line
2.25.4
PATCH 8/8 board/qemu/aarch64-virt/linux.config: enable VIRTIO_FS driver
Le 07/07/2020 ? 01:41, Romain Naour a ?crit?:
Quoted 12 lines
virtio-fs allow sharing a directory between the host and the guest. It require virtiofsd daemon running before starting Qemu.
The wiki [1] recommand to enable the following kernel options:
CONFIG_VIRTIO
CONFIG_VIRTIO_FS
CONFIG_DAX
CONFIG_FS_DAX
CONFIG_DAX_DRIVER
CONFIG_ZONE_DEVICE
Quoted 4 lines
But virtio-fs works fine with only
VIRTIO_FS.Note:
ZONE_DEVICEcan only be enabled on aarch64 since kernel >= 5.7.ARCH_ENABLE_MEMORY_HOTREMOVEsupport is missing for previous kernel [2].
Another note: The system hang while accessing the shared directory content from the guest, this is a qemu 5.0 bug. I'm using qemu master to get a working qemu/virtiofsd.
Best regards,
Romain
Quoted 22 lines
[1] https://virtio-fs.gitlab.io/howto-qemu.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bbd6ec605c0fc286c3f8ce60b4ed44635361d58bSigned-off-by Romain Naour <[email protected]>--- board/qemu/aarch64-virt/linux.config | 2 ++ 1 file changed, 2 insertions(+)board/qemu/aarch64-virt/linux.config +2
-0@@ -60,5 +60,7 @@ CONFIG_MAILBOX=y CONFIG_PL320_MBOX=y CONFIG_ARM_SMMU_V3=y CONFIG_EXT4_FS=y +CONFIG_FUSE_FS=y +CONFIG_VIRTIO_FS=y CONFIG_TMPFS=y CONFIG_TMPFS_POSIX_ACL=y
PATCH 1/8 board/qemu/aarch64-virt/linux.config: regenerate after kernel version bump
In reply to Romain NaourQuoted 6 lines · On Tue, 7 Jul 2020 01:41:44 +0200 Romain Naour <[email protected]> wrote:
Regenerate the with savedefconfig.
Signed-off-by Romain Naour <[email protected]>--- board/qemu/aarch64-virt/linux.config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Series applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com