From: Rusty Russell Date: Mon, 15 Jul 2013 01:20:13 +0000 (+0930) Subject: tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=927cfb9788475abd5cf5e6566bb1cf46d29b0694;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git tools/lguest: offer VIRTIO_F_ANY_LAYOUT for net device. We don't care about layout, so advertise that fact. Signed-off-by: Rusty Russell --- diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index 68f67cf3d318..32cf2ce15d69 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c @@ -42,6 +42,10 @@ #include #include +#ifndef VIRTIO_F_ANY_LAYOUT +#define VIRTIO_F_ANY_LAYOUT 27 +#endif + /*L:110 * We can ignore the 43 include files we need for this program, but I do want * to draw attention to the use of kernel-style types. @@ -1544,6 +1548,8 @@ static void setup_tun_net(char *arg) add_feature(dev, VIRTIO_NET_F_HOST_ECN); /* We handle indirect ring entries */ add_feature(dev, VIRTIO_RING_F_INDIRECT_DESC); + /* We're compliant with the damn spec. */ + add_feature(dev, VIRTIO_F_ANY_LAYOUT); set_config(dev, sizeof(conf), &conf); /* We don't need the socket any more; setup is done. */