From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Aq7-0008Ta-10 for qemu-devel@nongnu.org; Wed, 24 Jul 2013 21:59:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2Aq5-0002y9-75 for qemu-devel@nongnu.org; Wed, 24 Jul 2013 21:59:34 -0400 Received: from ozlabs.org ([2402:b800:7003:1:1::1]:56966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Aq4-0002xK-Rd for qemu-devel@nongnu.org; Wed, 24 Jul 2013 21:59:33 -0400 From: Rusty Russell Date: Thu, 25 Jul 2013 11:25:20 +0930 Message-ID: <87li4v8ktz.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] vhost acceleration broken? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , mst@redhat.com Hi all, Using latest kernel and master qemu, the following doesn't use vhost acceleration: sudo qemu-system-x86_64 -machine pc,accel=kvm $ARGS -m 1024 -net tap,script=/home/rusty/bin/kvm-ifup,downscript=no,vhost=on -net nic,model=virtio -drive file=$QEMUIMAGE,index=0,media=disk,if=virtio -kernel arch/x86/boot/bzImage -append "root=/dev/vda1 $KARGS $*" Culprit is here: hw/net/virtio-net.c:virtio_net_vhost_status(): if (nc->peer->info->type != NET_CLIENT_OPTIONS_KIND_TAP) { return; } info->type is NET_CLIENT_OPTIONS_KIND_HUBPORT. At a glance, it seems like vlan is always enabled, and that means a hub, so that change silently disabled vhost acceleration. It's quite possible that I've screwed up qemu's impenetrable command line (-net or -netdev, who knows what's better?). Frustrated, Rusty.