Received: from eggs.gnu.org ([2001:4830:134:3::10]:33515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8USL-0006KP-SV for qemu-devel@nongnu.org; Wed, 29 Jan 2014 07:41:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8USF-0006SY-Ki for qemu-devel@nongnu.org; Wed, 29 Jan 2014 07:41:25 -0500 Received: from indium.canonical.com ([91.189.90.7]:32808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8USF-0006SJ-Bv for qemu-devel@nongnu.org; Wed, 29 Jan 2014 07:41:19 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1W8USD-0007QZ-Kh for ; Wed, 29 Jan 2014 12:41:17 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 2CE212E8277 for ; Wed, 29 Jan 2014 12:40:54 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 29 Jan 2014 12:34:06 -0000 From: =?utf-8?b?TWljaGHFgiBXxJlncnp5bmVr?= Sender: bounces@canonical.com References: <20140104102937.20742.93661.malonedeb@wampee.canonical.com> Message-Id: <20140129123406.12054.11178.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1265998] Re: vfio-pci passed Radeon 7870XT is unstable on first boot of a Windows 8.1 guest Reply-To: Bug 1265998 <1265998@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Success! I was finally able to make the qemu runnig with any additional magic. All I need was to load the vfio_iommu_type1 module with disable_hugepages=3D1 option. Thanks for pointing me in the right direction! ** Changed in: qemu Status: New =3D> Fix Released -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1265998 Title: vfio-pci passed Radeon 7870XT is unstable on first boot of a Windows 8.1 guest Status in QEMU: Fix Released Bug description: I'm passing a Radeon 7870XT to a Windows 8.1 guest. It works flawlessly (I tested it by a 12 hour Furmark run), but only on second lauch of the guest. On first launch after I get screen corruption on any 3D operation in guest (even showing a search box in Chrome) and the guest becomes unusable with constant driver resets to a point, when it grinds to a halt. At that moment I get about ~1K of log entries similar to sty 04 11:12:57 miner kernel: AMD-Vi: Event logged [IO_PAGE_FAULT device= =3D01:00.0 domain=3D0x0002 address=3D0x000000007bc4c100 flags=3D0x0010] sty 04 11:12:57 miner kernel: AMD-Vi: Event logged [IO_PAGE_FAULT device= =3D01:00.0 domain=3D0x0002 = When I abort first launch of the quest with a monitor quit command during during guest BIOS initialisation, on a second launch I get the following errors in Qemu monitor: qemu-system-x86_64: vfio_dma_map(0x7f4b93fbbd40, 0x0, 0xb0000000, 0x2aaac= 0000000) =3D -16 (Device or resource busy) = = qemu-system-x86_64: vfio_dma_map(0x7f4b93fbbd40, 0xc0000, 0xaff40000, 0x2= aaac00c0000) =3D -16 (Device or resource busy) = = qemu-system-x86_64: vfio_dma_map(0x7f4b93fbbd40, 0xc8000, 0xaff38000, 0x2= aaac00c8000) =3D -16 (Device or resource busy) = = qemu-system-x86_64: vfio_dma_map(0x7f4b93fbbd40, 0xd0000, 0xaff30000, 0x2= aaac00d0000) =3D -16 (Device or resource busy) = and the following entries in the kernel log sty 01 22:04:53 miner kernel: vfio_ecap_init: 0000:01:00.0 hiding ecap 0x= 1b@0x2d0 = = sty 01 22:04:55 miner kernel: ------------[ cut here ]------------ = = = sty 01 22:04:55 miner kernel: WARNING: CPU: 3 PID: 1012 at drivers/vfio/v= fio_iommu_type1.c:685 vfio_dma_do_map+0x43c/0x838 [vfio_iommu_type1]() = = sty 01 22:04:55 miner kernel: Modules linked in: tun bridge stp llc bnep = vfio_pci vfio_iommu_type1 vfio fuse ts2020 ds3000 dvb_usb_dw2102 kvm_amd kv= m crc32_pclmul c...luetooth rc_ sty 01 22:04:55 miner kernel: CPU: 3 PID: 1012 Comm: qemu-system-x86 Not = tainted 3.13.0-2-mainline #1 = = sty 01 22:04:55 miner kernel: Hardware name: To Be Filled By O.E.M. To Be= Filled By O.E.M./FM2A85X Extreme6, BIOS P2.30 07/11/2013 = = sty 01 22:04:55 miner kernel: 0000000000000009 ffff8804311b9d20 ffffffff= 814ddc72 0000000000000000 = = sty 01 22:04:55 miner kernel: ffff8804311b9d58 ffffffff8105f2ed 00000000= fffffff0 00000000b0000000 = = sty 01 22:04:55 miner kernel: 00000000000b0000 00000000b0000000 00000000= 00000000 ffff8804311b9d68 = = sty 01 22:04:55 miner kernel: Call Trace: = = = sty 01 22:04:55 miner kernel: [] dump_stack+0x4d/0x6f = = = sty 01 22:04:55 miner kernel: [] warn_slowpath_common+= 0x7d/0xa0 = = sty 01 22:04:55 miner kernel: [] warn_slowpath_null+0x= 1a/0x20 = = sty 01 22:04:55 miner kernel: [] vfio_dma_do_map+0x43c= /0x838 [vfio_iommu_type1] = = sty 01 22:04:55 miner kernel: [] vfio_iommu_type1_ioct= l+0x211/0x288 [vfio_iommu_type1] = = sty 01 22:04:55 miner kernel: [] vfio_fops_unl_ioctl+0= x78/0x340 [vfio] = = sty 01 22:04:55 miner kernel: [] do_vfs_ioctl+0x2d8/0x= 4b0 = = sty 01 22:04:55 miner kernel: [] SyS_ioctl+0x81/0xa0 = = = sty 01 22:04:55 miner kernel: [] system_call_fastpath+= 0x1a/0x1f = = sty 01 22:04:55 miner kernel: ---[ end trace 53ac540a2e8783dc ]--- = = = sty 01 22:04:56 miner kernel: ------------[ cut here ]------------ = = but the guest works flawlessly (even with reboots). qemu --version QEMU emulator version 1.7.50, Copyright (c) 2003-2008 Fabrice Bellard (a build of Arch qemu-git package from 2013-12-24, but the errors is the = same on stock 1.7.0 Qemu) uname -a: Linux miner 3.13.0-2-mainline #1 SMP PREEMPT Wed Jan 1 14:37:23 CET 2014 = x86_64 GNU/Linux (Arch linux-mainline package with 3.13-rc5, but errors are exactly the sa= me on stock 3.12.6-1) kernel command line: Command line: BOOT_IMAGE=3D/vmlinuz-linux-mainline root=3DUUID=3D4598b2bf= -a2a9-46f8-bddd-e010f0af617a rw quiet elevator=3Ddeadline rootflags=3Ddata= =3Dwriteback nohz=3Doff iommu=3Dpt pci-stub.ids=3D1002:679e,1002:aaa0 radeo= n.dpm=3D1 radeon.fastfb=3D1 transparent_hugepage=3Dnever hugepagesz=3D1G hu= gepages=3D6 default_hugepagesz=3D1G qemu command line: /usr/bin/qemu-system-x86_64 -bios /usr/share/qemu/bios.bin \ -cpu Opteron_G4 -smp 2,sockets=3D1,cores=3D2,threads=3D1 \ -m 4096 -mem-prealloc -mem-path /dev/hugepages \ -nodefaults -M q35 -enable-kvm \ -monitor stdio -device ioh3420,bus=3Dpcie.0,addr=3D1c.0,multifunction= =3Don,port=3D1,chassis=3D1,id=3Droot.1 \ -device vfio-pci,host=3D01:00.0,x-vga=3Don,addr=3D0.0,multifunction=3Do= n,bus=3Droot.1,romfile=3D/usr/share/qemu/Tahiti.rom \ -device vfio-pci,host=3D01:00.1,bus=3Dpcie.0 -device ahci,bus=3Dpcie.0,= id=3Dahci \ -usb -usbdevice host:072f:9000 \ -netdev bridge,br=3Dbr0,id=3Dhostnet0 \ -device virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0 \ -drive file=3D/home/mwegrzynek/VM/vmwin801.qcow2,if=3Dvirtio,cache=3Dwr= iteback,aio=3Dnative \ -drive file=3D/home/mwegrzynek/Pobrane/Windows/Windows8.iso,id=3Disocd = -device ide-cd,bus=3Dahci.1,drive=3Disocd = -drive file=3D/home/mwegrzynek/Pobrane/Windows/virtio-win-0.1-74.iso,id= =3Disocd2 -device ide-cd,bus=3Dahci.2,drive=3Disocd2 \ -boot c \ -serial none \ -parallel none \ = -vga none \ -nographic lspci: 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Model= s 10h-1fh) Processor Root Complex 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 10h-= 1fh) I/O Memory Management Unit 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]= Trinity [Radeon HD 7660D] 00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models= 10h-1fh) Processor Root Port 00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI C= ontroller (rev 03) 00:10.1 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI C= ontroller (rev 03) 00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Cont= roller [AHCI mode] (rev 40) 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI C= ontroller (rev 11) 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI C= ontroller (rev 11) 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI C= ontroller (rev 11) 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI C= ontroller (rev 11) 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (r= ev 14) 00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD] FCH IDE Control= ler 00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Contr= oller (rev 01) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (re= v 11) 00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge (re= v 40) 00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI C= ontroller (rev 11) 00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI = bridge (PCIE port 0) 00:15.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI = bridge (PCIE port 2) 00:15.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI = bridge (PCIE port 3) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Model= s 10h-1fh) Processor Function 0 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Model= s 10h-1fh) Processor Function 1 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Model= s 10h-1fh) Processor Function 2 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Model= s 10h-1fh) Processor Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Model= s 10h-1fh) Processor Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Model= s 10h-1fh) Processor Function 5 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]= Tahiti LE [Radeon HD 7870 XT] 01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT HD= MI Audio [Radeon HD 7970 Series] 03:00.0 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 03:00.1 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 03:00.2 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 03:00.3 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 03:00.4 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 03:00.5 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 03:00.6 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 03:00.7 USB controller: MosChip Semiconductor Technology Ltd. MCS9990 PCI= e to 4=E2=80=90Port USB 2.0 Host Controller 04:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Ho= st Controller 05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168= /8411 PCI Express Gigabit Ethernet Controller (rev 06) Please let me now, if any other information is needed. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1265998/+subscriptions