From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58022) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK29J-0003GV-9v for qemu-devel@nongnu.org; Thu, 12 Sep 2013 04:21:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VK29D-0004Kq-Av for qemu-devel@nongnu.org; Thu, 12 Sep 2013 04:21:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK29D-0004KW-2t for qemu-devel@nongnu.org; Thu, 12 Sep 2013 04:21:07 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8C8L5Gd031166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 12 Sep 2013 04:21:05 -0400 Message-ID: <52317A12.10206@redhat.com> Date: Thu, 12 Sep 2013 11:23:46 +0300 From: Gal Hammer MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] MSI-X doesn't work when running Windows as guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Hi, I've notice that the virtio-serial Windows' driver doesn't use MSI-X vectors when running using upstream qemu or qemu-kvm-1.2.2-13.fc18.x86_64. The same VM works with MSI-X when using qemu-kvm-0.12.1.2-2.355.el6.x86_64. From what I saw, Windows is trying to enable MSI-X by writing a 2 bytes value to device's PCI-config address 66h. So when everything works well the flow goes like this: pci_default_write_config value: 8000 len: 2 pci_default_write_config value: 1 len: 2 msix_enabled 0 (67) pci_default_write_config value: e107 len: 2 pci_default_write_config value: 1 len: 2 msix_enabled 0 (67) pci_default_write_config value: 8001 len: 2 msix_enabled 1 (67) But on upstream it goes: pci_default_write_config addr: 66 value: 8000 size: 2 pci_default_write_config addr: 66 value: 1 size: 2 msix_enabled 0 (67) pci_default_write_config addr: 66 value: e307 size: 2 (NOTE: Value is diffrent!). pci_default_write_config addr: 66 value: 1 size: 2 msix_enabled 0 (67) (NOTE: Missing the write of 8001). My qemu's command line: ---< snip >--- /usr/bin/qemu-kvm -m 1G -smp 2 -enable-kvm -usb -device usb-tablet \ -device ide-drive,drive=drive-virtio0-0-0,id=virtio0-0-0,bootindex=1 \ -drive file=win7_32_viorng.qcow2,if=none,id=drive-virtio0-0-0,format=qcow2,werror=stop,rerror=stop,cache=none \ -monitor stdio \ -vga qxl -spice id=on,disable-ticketing,port=5903 \ -device virtio-serial-pci,id=virtio-serial0,vectors=2 \ -chardev spicevmc,id=spicechannel0,name=vdagent ---< snip >--- Thanks, Gal.