Hi, I have got VGA passthrough to work in my computer with Windows7 HVM guest. Motherboard: ASUS Crosshair IV Formula (890fx chipset) Video card: HIS Radeon HD 6850 Xen: 4.0.2-pre2 from xen-4.0-testing.hg Kernel: pvops dom0 kernel 2.6.32 from Jeremy''s xen.git In order to compile Xen 4.0 in Ubuntu 10.10 I changed the default python directory in Makefile as describe in the guide. I downloaded the bios from my videocard and I patched Xen to load the vgabios. ( I don''t know if this is necessary) I compiled the kernel with EXT4 support and the driver for my network card. In the Grub configuration file I added: iommu=1 xen-pciback.hide=(05:00.0) text 05:00.0 is a SATA controller, it is not the videocard. If I hide the videocard with pciback, I cannot see the console and I have to use SSH. I wrote a script that disconnects the videocard and the USB controller (where mouse and keyboard are connected) from dom0, and then start the HVM guest. I pass the 3 available pci controllers to the HVM guest and the system boots Windows 7 without problems. I don''t see the BIOS messages and the Windows 7 loading screen, but I see only the login screen (there is a patch for this, but I will test it later) I can see the Windows 7 loading screen, if I have use SSH+VNC from another computer. The HVM guest has full 3D acceleration and it uses Catalyst 11.1 drivers. I hope this info will help someone else. It is working but I have some questions for the experts: I don''t use: gfx_passthru=1 , if I enable it, VGA passthrough doesn''t work and VNC will connect to the QEMU console. Why does it work without gfx_passthru=1? I used GPU-Z to detect the video card in Windows 7 HVM, and it reported that it is using boch vgabios. Is there a way to know if the real BIOS is loaded? I cannot pass the keyboard as USB device, I had to pass the USB controller. How can I pass the keyboard as usb device? Is there a way to pass the video card back to dom0? Thanks, Leonardo _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> ------------------------------ > > Message: 12 > Date: Mon, 14 Feb 2011 20:22:09 -0800 > From: Leonardo Prosperi <leo.prosperi@gmail.com> > Subject: [Xen-users] VGA passthrough success (with doubts) > To: xen-users@lists.xensource.com > Message-ID: > <AANLkTim5kezXp65NTCm0Ppxk6vR837hdXFrv7gd=OkK-@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > I have got VGA passthrough to work in my computer with Windows7 HVM guest. > > I pass the 3 available pci controllers to the HVM guest and the system > boots > Windows 7 without problems. > I don''t see the BIOS messages and the Windows 7 loading screen, but I see > only the login screen (there is a patch for this, but I will test it later) > I can see the Windows 7 loading screen, if I have use SSH+VNC from another > computer. > > It is working but I have some questions for the experts: > I don''t use: gfx_passthru=1 , if I enable it, VGA passthrough doesn''t work > and VNC will connect to the QEMU console. > Why does it work without gfx_passthru=1? >That''s not VGA passthrough. You''re doing PCI passthrough of a VGA controller, and when the operating system detects and recognizes the card on the PCI bus, it starts using it. Specifying gfx_passthru=1 in the guest configuration file causes QEMU to (1) disable the emulated VGA adapter and (2) copy the VGA BIOS for the physical VGA controller from host memory into guest memory. If this flag is not set, the VGA BIOS for the emulated graphics adapter is used, not the VGA BIOS from the card. This is why you can see the BIOS messages and early boot messages using VNC, but they don''t appear on the display attached to the physical VGA controller. I too have had success passing through VGA adapters that don''t work with true VGA passthrough by using gfx_passthru=0. However, this solution is only semi-functional because the emulated graphics adapter will be used until the OS detects and loads a driver for the adapter, and the response of the OS to the presence of the card is very OS-dependent (some OSes automatically detect and load a driver, others have to be coerced). I used GPU-Z to detect the video card in Windows 7 HVM, and it reported that> it is using boch vgabios. > Is there a way to know if the real BIOS is loaded? >One way would be to look at 0xc00000 in guest memory and see if the VGA BIOS image that''s loaded there matches the VGA BIOS image that you think should be loaded. As I said above, if gfx_passthru=0, we would expect to see QEMU/BOCHS VGA BIOS, not the bios of the card. I cannot pass the keyboard as USB device, I had to pass the USB controller.> How can I pass the keyboard as usb device? >Xen supports USB passthrough as well as PCI passthrough. See http://wiki.xensource.com/xenwiki/XenUSBPassthrough. I''ve never had much luck with it, YMMV. Hope this helps, Jason _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sorry if this is a duplicate, just realized I trounced the [Xen-users] tag in the subject line in my previous attempt so I''m not sure it will go through.> ------------------------------ > > Message: 12 > Date: Mon, 14 Feb 2011 20:22:09 -0800 > From: Leonardo Prosperi <leo.prosperi@gmail.com> > Subject: [Xen-users] VGA passthrough success (with doubts) > To: xen-users@lists.xensource.com > Message-ID: > <AANLkTim5kezXp65NTCm0Ppxk6vR837hdXFrv7gd=OkK-@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > I have got VGA passthrough to work in my computer with Windows7 HVM guest. > > I pass the 3 available pci controllers to the HVM guest and the system boots > Windows 7 without problems. > I don''t see the BIOS messages and the Windows 7 loading screen, but I see > only the login screen (there is a patch for this, but I will test it later) > I can see the Windows 7 loading screen, if I have use SSH+VNC from another > computer. > > It is working but I have some questions for the experts: > I don''t use: gfx_passthru=1 , if I enable it, VGA passthrough doesn''t work > and VNC will connect to the QEMU console. > Why does it work without gfx_passthru=1?That''s not VGA passthrough. You''re doing PCI passthrough of a VGA controller, and when the operating system detects and recognizes the card on the PCI bus, it starts using it. Specifying gfx_passthru=1 in the guest configuration file causes QEMU to (1) disable the emulated VGA adapter and (2) copy the VGA BIOS for the physical VGA controller from host memory into guest memory. If this flag is not set, the VGA BIOS for the emulated graphics adapter is used, not the VGA BIOS from the card. This is why you can see the BIOS messages and early boot messages using VNC, but they don''t appear on the display attached to the physical VGA controller. I too have had success passing through VGA adapters that don''t work with true VGA passthrough by using gfx_passthru=0. However, this solution is only semi-functional because the emulated graphics adapter will be used until the OS detects and loads a driver for the adapter, and the response of the OS to the presence of the card is very OS-dependent (some OSes automatically detect and load a driver, others have to be coerced).> I used GPU-Z to detect the video card in Windows 7 HVM, and it reported that > it is using boch vgabios. > Is there a way to know if the real BIOS is loaded?One way would be to look at 0xc00000 in guest memory and see if the VGA BIOS image that''s loaded there matches the VGA BIOS image that you think should be loaded. As I said above, if gfx_passthru=0, we would expect to see QEMU/BOCHS VGA BIOS, not the bios of the card.> I cannot pass the keyboard as USB device, I had to pass the USB controller. > How can I pass the keyboard as usb device?Xen supports USB passthrough as well as PCI passthrough. See http://wiki.xensource.com/xenwiki/XenUSBPassthrough. I''ve never had much luck with it, YMMV. Hope this helps, Jason _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2011-Feb-21 10:09 UTC
Re: [Xen-users] VGA passthrough success (with doubts)
On Mon, Feb 14, 2011 at 08:22:09PM -0800, Leonardo Prosperi wrote:> Hi, > I have got VGA passthrough to work in my computer with Windows7 HVM guest. >Nice!> Motherboard: ASUS Crosshair IV Formula (890fx chipset) > Video card: HIS Radeon HD 6850 > > Xen: 4.0.2-pre2 from xen-4.0-testing.hg > Kernel: pvops dom0 kernel 2.6.32 from Jeremy''s xen.git > > In order to compile Xen 4.0 in Ubuntu 10.10 I changed the default python > directory in Makefile as describe in the guide. > I downloaded the bios from my videocard and I patched Xen to load the > vgabios. ( I don''t know if this is necessary) >Did you try without?> I compiled the kernel with EXT4 support and the driver for my network > card. > > In the Grub configuration file I added: > iommu=1 > xen-pciback.hide=(05:00.0) > text > > 05:00.0 is a SATA controller, it is not the videocard. >So I take it you''re passing SATA controller to Windows aswell?> If I hide the videocard with pciback, I cannot see the console and I have > to use SSH. >Yep.> I wrote a script that disconnects the videocard and the USB controller > (where mouse and keyboard are connected) from dom0, and then start the HVM > guest. > > I pass the 3 available pci controllers to the HVM guest and the system > boots Windows 7 without problems.Good.> I don''t see the BIOS messages and the Windows 7 loading screen, but I see > only the login screen (there is a patch for this, but I will test it > later) > I can see the Windows 7 loading screen, if I have use SSH+VNC from another > computer. > The HVM guest has full 3D acceleration and it uses Catalyst 11.1 drivers. >Nice!> I hope this info will help someone else. >It should!> It is working but I have some questions for the experts: > I don''t use: gfx_passthru=1 , if I enable it, VGA passthrough doesn''t work > and VNC will connect to the QEMU console. > Why does it work without gfx_passthru=1? >That''s interesting. Any ideas? Any errors in the logs? "xm log" and also /var/log/xen/*> I used GPU-Z to detect the video card in Windows 7 HVM, and it reported > that it is using boch vgabios. > Is there a way to know if the real BIOS is loaded? >Hmm.. weird. Oh, it''s probably the primary qemu vga adapter, I bet you have two vga controllers in the VM because you don''t have gfx_passthru=1 enabled?> I cannot pass the keyboard as USB device, I had to pass the USB > controller. > How can I pass the keyboard as usb device? >There are some prelimiary patches for this, but no final ''clean'' solution.. Some XCI guys were working on this earlier, but I don''t know the current status..> Is there a way to pass the video card back to dom0? >Not sure. -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users