From 488f069bd1f3aeb6ee748acb02b7581831bcb3f8 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Thu, 11 Jul 2013 16:06:46 +0300 Subject: virtio-net: add feature bit for any header s/g Old qemu versions required that 1st s/g entry is the header. Since QEMU 1.5, patchset titled "virtio-net: iovec handling cleanup" removed this limitation but a feature bit is needed so guests know it's safe to lay out header differently. This patch applies on top and adds such a feature bit to QEMU. It is set by default for virtio-net. virtio net header inline with the data is beneficial for latency and small packet bandwidth - guest driver code utilizing this feature has been acked but missed 3.11 by a narrow margin, it's pending for 3.12. This feature bit is cleared by default when compatibility with old machine types is requested. Other performance-sensitive devices (blk and scsi) don't yet support arbitrary s/g layouts, so we only set this bit for virtio-net for now. There are plans to allow arbitrary layouts there, but no code has been posted yet. Cc: Rusty Russell Reviewed-by: Laszlo Ersek Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/hw/i386') diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 5949e7e..751592a 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -229,6 +229,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t); .driver = "Nehalem-" TYPE_X86_CPU,\ .property = "level",\ .value = stringify(2),\ + },{\ + .driver = "virtio-net-pci",\ + .property = "any_layout",\ + .value = "off",\ } #define PC_COMPAT_1_4 \ -- cgit v1.1