[meta-intel] [PATCH] meta-intel: enable qemu and select more suitable virtual machine options

Patrick Ohly patrick.ohly at intel.com
Mon Jan 16 03:05:16 PST 2017


On Mon, 2017-01-16 at 09:45 +0100, Patrick Ohly wrote:
> On Fri, 2017-01-13 at 16:11 -0800, Cal Sullivan wrote:
> > Our kernel's .config has the following, will this cause any issues?
> > 
> > #
> > # Virtio drivers
> > #
> > # CONFIG_VIRTIO_PCI is not set
> > # CONFIG_VIRTIO_MMIO is not set
> 
> Hmm, I'm getting something different (poky 81021bc0, meta-intel 368673ea
> + patch, i.e. current master, MACHINE = intel-corei7-64):
> 
> $ grep VIRTIO tmp/work/corei7-64-intel-common-poky-linux/linux-yocto/4.8.12+gitAUTOINC+b22e477396_021b4aef55-r0/linux-corei7-64-intel-common-standard-build/.config
> CONFIG_VIRTIO_BLK=y
> CONFIG_SCSI_VIRTIO=y
> CONFIG_VIRTIO_NET=y
> CONFIG_VIRTIO_CONSOLE=y
> CONFIG_HW_RANDOM_VIRTIO=y
> # CONFIG_DRM_VIRTIO_GPU is not set
> CONFIG_VIRTIO=y
> CONFIG_VIRTIO_PCI=y
> CONFIG_VIRTIO_PCI_LEGACY=y
> CONFIG_VIRTIO_BALLOON=y
> CONFIG_VIRTIO_INPUT=m
> CONFIG_VIRTIO_MMIO=y
> # CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
> 
> "runqemu core-image-minimal ext4 intel-corei7-64" works, and the virtual
> machine finds /dev/boot = /dev/vda. eth0 is also found. I've not seen a
> kernel message for the virtio-rng-pci device, but I am not sure whether
> there should be one.
> 
> But yes, this hinges on having virtio support in the kernel, because
> runqemu sets up the virtual machine to use virtio as much as possible.

I was wondering where virtio in Poky came from and thus had a second
look. It's from OE-core's meta/recipes-kernel/linux/linux-yocto_4.8.bb:
KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"

It's a bit surprising that the "qemuall" override is active. That comes
from meta/conf/machine/include/qemu.inc, which got added as include in
this patch primarily because it enables building qemu.

That it also makes the resulting machine work better under qemu was not
intended, but arguably is useful - if you guys agree that the kernel
should be configured to also work on virtual machines.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





More information about the meta-intel mailing list