From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nx2ca-0000Oi-0E for qemu-devel@nongnu.org; Wed, 31 Mar 2010 14:26:32 -0400 Received: from [140.186.70.92] (port=48924 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nx2cY-0000Ml-EW for qemu-devel@nongnu.org; Wed, 31 Mar 2010 14:26:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nx2cW-000145-GY for qemu-devel@nongnu.org; Wed, 31 Mar 2010 14:26:30 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:41457) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nx2cW-00013x-8x for qemu-devel@nongnu.org; Wed, 31 Mar 2010 14:26:28 -0400 Received: by pwi6 with SMTP id 6so392567pwi.4 for ; Wed, 31 Mar 2010 11:26:27 -0700 (PDT) Message-ID: <4BB393CF.1040700@codemonkey.ws> Date: Wed, 31 Mar 2010 13:26:23 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20100331182031.GA5200@redhat.com> In-Reply-To: <20100331182031.GA5200@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] vhost: fix features ack List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On 03/31/2010 01:20 PM, Michael S. Tsirkin wrote: > From: David L Stevens > > vhost driver in qemu didn't ack features, and this happens > to work because we don't really require any features. However, > it's better not to rely on this. This patch passes features to > vhost as guest acks them. > > Signed-off-by: David L Stevens > Signed-off-by: Michael S. Tsirkin > --- > > Anthony, here's a fixup patch to address an issue in vhost > patches. Incidentially, what's the status of the vhost patchset? > http://repo.or.cz/w/qemu/aliguori-queue.git vhost Is what I'm currently testing. With vhost disabled, the following seg faults: qemu-system-x86_64 -hda ~/images/linux.img -net tap -net nic,model=virtio -enable-kvm But not when using TCG. I'm not sure that it's your patches at fault and I'm attempting to bisect now to figure that out. Regards, Anthony Liguori > hw/virtio-net.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/hw/virtio-net.c b/hw/virtio-net.c > index 9ddd58c..4c7c46e 100644 > --- a/hw/virtio-net.c > +++ b/hw/virtio-net.c > @@ -218,6 +218,14 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features) > (features>> VIRTIO_NET_F_GUEST_ECN)& 1, > (features>> VIRTIO_NET_F_GUEST_UFO)& 1); > } > + if (!n->nic->nc.peer || > + n->nic->nc.peer->info->type != NET_CLIENT_TYPE_TAP) { > + return; > + } > + if (!tap_get_vhost_net(n->nic->nc.peer)) { > + return; > + } > + return vhost_net_ack_features(tap_get_vhost_net(n->nic->nc.peer), features); > } > > static int virtio_net_handle_rx_mode(VirtIONet *n, uint8_t cmd, >