qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] hw/virtio-net.c: set config size using host


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH 2/3] hw/virtio-net.c: set config size using host features
Date: Tue, 05 Mar 2013 17:48:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120306 Thunderbird/10.0.3

On 02/06/2013 12:47 AM, Jesse Larrew wrote:
Currently, the config size for virtio devices is hard coded. When a new
feature is added that changes the config size, drivers that assume a static
config size will break. For purposes of backward compatibility, there needs
to be a way to inform drivers of the config size needed to accommodate the
set of features enabled.

Signed-off-by: Jesse Larrew<address@hidden>

The following patch gets my s390 virtio guest working again, but I doubt it's the right fix.

What is the expected dependency chain of feature calls?


Alex

diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 089ed92..81be971 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -154,7 +154,7 @@ static int s390_virtio_net_init(VirtIOS390Device *dev)
     VirtIODevice *vdev;

     vdev = virtio_net_init((DeviceState *)dev, &dev->nic, &dev->net,
-                           dev->host_features);
+                           dev->host_features | (1 << VIRTIO_NET_F_MAC));
     if (!vdev) {
         return -1;
     }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]