From mboxrd@z Thu Jan 1 00:00:00 1970 From: ewheeler Subject: PCIe VGA Passthrough works---almost Date: Fri, 23 Jul 2010 15:40:56 -0700 Message-ID: <1279924856.26431.88.camel@geektop> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from caiajhbdcbef.dreamhost.com ([208.97.132.145]:49040 "EHLO homiemail-a60.g.dreamhost.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757360Ab0GWWk6 (ORCPT ); Fri, 23 Jul 2010 18:40:58 -0400 Received: from homiemail-a60.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a60.g.dreamhost.com (Postfix) with ESMTP id 0FA053BC065 for ; Fri, 23 Jul 2010 15:40:58 -0700 (PDT) Received: from [192.168.102.51] (c-98-246-187-64.hsd1.or.comcast.net [98.246.187.64]) (Authenticated sender: ewheeler@ewheeler.org) by homiemail-a60.g.dreamhost.com (Postfix) with ESMTPA id DF4A03BC063 for ; Fri, 23 Jul 2010 15:40:57 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: Hello all, I have DMAR working for a couple PCI devices (USB and Digium FXS/FXO card) and thought, why not try to pass the nVidia PCIe card into the guest OS. As I understand, KVM is not ready to boot a DMAR video device as the primary display---and I wondered if I could load the card as a non-primary fbconsole using the 'nouveau' module with "-vga none" set. To my surprise, it initialized the card and displayed console messages on the DMAR-passed nVidia card's nouveau fbconsole. However, I get a stream of KVM internal errors on the tty that KVM is launched from: KVM internal error. Suberror: 1 RAX=0000000002659360 RBX=0000000002659360 RCX=0000000000000000 RDX=9393939393939393 RSI=00000000ffffff93 RDI=0000000002659fe0 RBP=0000000000000fe0 RSP=00007fff7133b708 R8 =00000000000002e0 R9 =0000000000200000 R10=0000000000000000 R11=00007f744d8aabf0 R12=0000000000000000 R13=0000000002658240 R14=00000000026591f0 R15=0000000000000003 RIP=00007f744d8ab284 RFL=00010206 [-----P-] CPL=3 II=0 A20=1 SMM=0 HLT=0 ES =0000 0000000000000000 ffffffff 00000000 CS =0033 0000000000000000 ffffffff 00a0fb00 DPL=3 CS64 [-RA] SS =002b 0000000000000000 ffffffff 00c0f300 DPL=3 DS [-WA] DS =0000 0000000000000000 ffffffff 00000000 FS =0000 00007f744ddb5700 ffffffff 00000000 GS =0000 0000000000000000 ffffffff 00000000 LDT=0000 0000000000000000 ffffffff 00000000 TR =0040 ffff880001c13780 00002087 00008b00 DPL=0 TSS64-busy GDT= ffff880001c04000 0000007f IDT= ffffffff81941000 00000fff CR0=80050033 CR2=000000000265a348 CR3=000000001d116000 CR4=000006f0 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000d01 emulation failure [ ... repeated identically, thousands of times ] I am happy to test patches---please let me know if you have any questions. It looks like VGA DMAR passthrough as a non-primary display almost works. I'm using today's git of kvm with the vmlinuz and initrd from the Ubuntu 10.04 x64 live cd: qemu-system-x86_64 -m 512 \ -pcidevice host=01:00.0,name=n01000 \ -pcidevice host=01:00.1,name=n01001 \ -kernel vmlinuz -initrd initrd.lz \ -append '1 video=map:0 boot=casper' \ -cdrom /dev/sr0 \ -vga none -Eric