From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TamIx-00073K-H6 for qemu-devel@nongnu.org; Tue, 20 Nov 2012 06:47:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TamIs-0001iJ-Lp for qemu-devel@nongnu.org; Tue, 20 Nov 2012 06:47:51 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:55110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TamIs-0001hE-BQ for qemu-devel@nongnu.org; Tue, 20 Nov 2012 06:47:46 -0500 Received: by mail-pa0-f45.google.com with SMTP id bg2so1655679pad.4 for ; Tue, 20 Nov 2012 03:47:43 -0800 (PST) Message-ID: <50AB6DDC.8030200@gmail.com> Date: Tue, 20 Nov 2012 19:47:40 +0800 From: ching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] VFIO VGA passthrough List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org My PC is gentoo x64, kernel 3.6.6, intel sandy bridge i7 2600 + asrock Z77 exterme 4 MB I download qemu from git and try to pass through secondary VGA card to Windows 7 x64 SP1 VM: 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Cayman PRO [Radeon HD 6950] (prog-if 00 [VGA controller]) Subsystem: XFX Pine Group Inc. Device 3125 Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Capabilities: [150 v1] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn- Kernel driver in use: vfio-pci 01:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Cayman/Antilles HDMI Audio [Radeon HD 6900 Series] Subsystem: XFX Pine Group Inc. Device aa80 Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- Capabilities: [150 v1] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+ AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn- Kernel driver in use: vfio-pci i google related threads and carried out preparation: 1. set module parameter "vfio_iommu_type1.allow_unsafe_interrupts"=1 2. raise ulimit: ulimit -l unlimited 3. compile kernel without swap memory support, ATI KMS, alsa for ATI if any 4. compile xorg without ati, vesa driver But the guest boots with BSOD and qemu shows the following messages, can anyone helps? for dev in $(ls /sys/bus/pci/devices/0000:01:00.0/iommu_group/devices); do vendor=$(cat /sys/bus/pci/devices/$dev/vendor) device=$(cat /sys/bus/pci/devices/$dev/device) if [ -e /sys/bus/pci/devices/$dev/driver ]; then echo $dev > /sys/bus/pci/devices/$dev/driver/unbind fi echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id done # qemu-system-x86_64 \ > -runas zvm \ > -name Windows -M pc-1.3 -enable-kvm \ > -cpu SandyBridge,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme \ > -m 8192 -smp 2,sockets=2,cores=1,threads=1 \ > -rtc base=utc,driftfix=slew \ > -net nic,model=virtio -net user \ > -drive file=/custom/vm/image/Temp.raw_image,if=virtio,format=raw,cache=unsafe,aio=native \ > -device vfio-pci,host=0000:01:00.0 \ > -device vfio-pci,host=0000:01:00.1 \ > -vga cirrus qemu-system-x86_64: -device vfio-pci,host=0000:01:00.0: Warning, device 0000:01:00.0 does not support reset qemu-system-x86_64: -device vfio-pci,host=0000:01:00.1: Warning, device 0000:01:00.1 does not support reset