Skip to contentSkip to conversation

qemu/x86: use symlinked kernel config

PATCH New Gustavo Zacarias 2 participants 4 messages Apr 29, 2016 – Apr 30, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 qemu/x86: use symlinked kernel config

It's exactly the same as the x86_64 variant so just create a symlink.

---
 board/qemu/x86/linux-4.5.config | 32 +-------------------------------
 1 file changed, 1 insertion(+), 31 deletions(-)
 mode change 100644 => 120000 board/qemu/x86/linux-4.5.config
board/qemu/x86/linux-4.5.config deleted +0 -31
deleted file mode 100644
index c630f02..0000000
@@ -1,31 +0,0 @@
-CONFIG_SYSVIPC=y
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_SMP=y
-CONFIG_NET=y
-CONFIG_PACKET=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_ATA=y
-CONFIG_ATA_PIIX=y
-CONFIG_NETDEVICES=y
-CONFIG_NE2K_PCI=y
-CONFIG_8139CP=y
-CONFIG_INPUT_EVDEV=y
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_DRM=y
-CONFIG_DRM_QXL=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_HDA_INTEL=y
-CONFIG_SND_HDA_GENERIC=y
-CONFIG_USB=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_UHCI_HCD=y
-CONFIG_USB_STORAGE=y
-CONFIG_EXT4_FS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
board/qemu/x86/linux-4.5.config new file +1 -0
new file mode 120000
index 0000000..735bcf7
@@ -0,0 +1 @@
+../x86_64/linux-4.5.config
\ No newline at end of file
Signature · 1 line
2.7.3
#1 lore raw

PATCH 2/3 qemu/x86*: enable virtio for kernel config

It has better performance for block and net. Enable virgl (DRM_VIRTIO_GPU) support for 3D acceleration. And also DRM_BOCHS for better stdvga acceleration.

---
 board/qemu/x86_64/linux-4.5.config | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
board/qemu/x86_64/linux-4.5.config +14 -0
index c630f02..e3bd145 100644
@@ -2,21 +2,30 @@ CONFIG_SYSVIPC=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_SMP=y
+CONFIG_HYPERVISOR_GUEST=y
+CONFIG_PARAVIRT=y
 CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_UNIX=y
 CONFIG_INET=y
+CONFIG_VIRTIO_BLK=y
 CONFIG_BLK_DEV_SD=y
+CONFIG_SCSI_VIRTIO=y
 CONFIG_ATA=y
 CONFIG_ATA_PIIX=y
 CONFIG_NETDEVICES=y
+CONFIG_VIRTIO_NET=y
 CONFIG_NE2K_PCI=y
 CONFIG_8139CP=y
 CONFIG_INPUT_EVDEV=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_HW_RANDOM_VIRTIO=m
 CONFIG_DRM=y
+CONFIG_DRM_BOCHS=y
 CONFIG_DRM_QXL=y
+CONFIG_DRM_VIRTIO_GPU=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_HDA_INTEL=y
@@ -26,6 +35,11 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_UHCI_HCD=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_INPUT=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
 CONFIG_EXT4_FS=y
 CONFIG_TMPFS=y
 CONFIG_TMPFS_POSIX_ACL=y
Signature · 1 line
2.7.3
#2 lore raw

PATCH 3/3 qemu/x86*: update instructions to use virtio

In reply to Gustavo Zacarias

Switch the invocation command to use virtio-blk and virtio-net for better performance.

---
 board/qemu/x86/readme.txt    | 4 ++--
 board/qemu/x86_64/readme.txt | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
board/qemu/x86/readme.txt +2 -2
index 62c51b0..4f2e4c7 100644
@@ -1,9 +1,9 @@
 Run the emulation with:
 
-  qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append root=/dev/sda -net nic,model=rtl8139 -net user
+  qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
 
 Optionally add -smp N to emulate a SMP system with N CPUs.
 
 The login prompt will appear in the graphical window.
 
-Tested with QEMU 2.3.0
+Tested with QEMU 2.5.0
board/qemu/x86_64/readme.txt +2 -2
index e2be574..6ea28d3 100644
@@ -1,9 +1,9 @@
 Run the emulation with:
 
-  qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=ide,format=raw -append root=/dev/sda -net nic,model=rtl8139 -net user
+  qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user
 
 Optionally add -smp N to emulate a SMP system with N CPUs.
 
 The login prompt will appear in the graphical window.
 
-Tested with QEMU 2.3.0
+Tested with QEMU 2.5.0
Signature · 1 line
2.7.3
#3 lore raw

PATCH 1/3 qemu/x86: use symlinked kernel config

In reply to Gustavo Zacarias

Hello,

Quoted 7 lines · Gustavo Zacarias

It's exactly the same as the x86_64 variant so just create a symlink.

---
 board/qemu/x86/linux-4.5.config | 32 +-------------------------------
 1 file changed, 1 insertion(+), 31 deletions(-)
 mode change 100644 => 120000 board/qemu/x86/linux-4.5.config

All three patches applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com