Overclock.net › Forums › Software, Programming and Coding › Operating Systems › {Guide} Create a Gaming Virtual Machine
New Posts  All Forums:Forum Nav:

{Guide} Create a Gaming Virtual Machine - Page 58

post #571 of 824
I am quite confused: which revision of xen I should download and which patches I should apply(there are a lot of different version of patches)?
post #572 of 824
Quote:
Originally Posted by nbhusain View Post

Does the host crash in your case?

Yes my PC crash when rester VM.
post #573 of 824
Quote:
Originally Posted by Dh0mp5eur View Post

I loaded the pci-stub in the initramfs.
I blacklisted radeon module.
But I still can't restart my VM.
Code:
dmesg |grep pci-stub
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.8-trunk-amd64 root=UUID=4e436466-36c9-45a9-a455-2ad879c7baaf ro intel_iommu=on pci-stub.ids=1002:6798,1002:aaa0 quiet
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.8-trunk-amd64 root=UUID=4e436466-36c9-45a9-a455-2ad879c7baaf ro intel_iommu=on pci-stub.ids=1002:6798,1002:aaa0 quiet
[    1.031665] pci-stub: add 1002:6798 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[    1.031671] pci-stub 0000:01:00.0: claimed by stub
[    1.031675] pci-stub: add 1002:AAA0 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[    1.031680] pci-stub 0000:01:00.1: claimed by stub

How did you blacklist the radeon module?

There are two ways to blacklist:

1. Create or edit blacklist-radeon.conf in /etc/modprobe.d and enter
Code:
blacklist radeon

2. Edit the /etc/default/grub.cfg file (in Ubuntu, can't remember where Fedora puts it) and add "radeon.blacklist=1" as shown here:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="radeon.blacklist=1 quiet splash nomodeset"
Update grub.

Some people report that the first option didn't work for them whereas the second one using the kernel boot option did the trick.
post #574 of 824
Quote:
Originally Posted by Dh0mp5eur View Post

Yes my PC crash when rester VM.

How many cards you've got in your system? are you passing thru your primary card or secondary card?
post #575 of 824
Quote:
Originally Posted by nbhusain View Post

How many cards you've got in your system? are you passing thru your primary card or secondary card?

I use the Intel IGP for the host and HD7970 on the Windows 7 VM.
Code:
How did you blacklist the radeon module?

There are two ways to blacklist:

1. Create or edit blacklist-radeon.conf in /etc/modprobe.d and enter
Code:
blacklist radeon


2. Edit the /etc/default/grub.cfg file (in Ubuntu, can't remember where Fedora puts it) and add "radeon.blacklist=1" as shown here:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="radeon.blacklist=1 quiet splash nomodeset"

Update grub.

Some people report that the first option didn't work for them whereas the second one using the kernel boot option did the trick.

I use the first option.
I will test the second
Thx
post #576 of 824
No, I still can't restart my VM.
Code:
dmesg |grep pci-stub
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.8-trunk-amd64 root=UUID=4e436466-36c9-45a9-a455-2ad879c7baaf ro intel_iommu=on radeon.blacklist=1 pci-stub.ids=1002:6798,1002:aaa0 radeon.blacklist=1 quiet
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.8-trunk-amd64 root=UUID=4e436466-36c9-45a9-a455-2ad879c7baaf ro intel_iommu=on radeon.blacklist=1 pci-stub.ids=1002:6798,1002:aaa0 radeon.blacklist=1 quiet
[    1.022224] pci-stub: add 1002:6798 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[    1.022231] pci-stub 0000:01:00.0: claimed by stub
[    1.022236] pci-stub: add 1002:AAA0 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[    1.022239] pci-stub 0000:01:00.1: claimed by stub

/etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="intel_iommu=on radeon.blacklist=1 pci-stub.ids=1002:6798,1002:aaa0"
post #577 of 824
Quote:
Originally Posted by myweb View Post

I am quite confused: which revision of xen I should download and which patches I should apply(there are a lot of different version of patches)?

Perhaps this link describes it better. It's the same David Techer website, just a different place.
post #578 of 824
Yeah, the 7000 series cards have an issue where they wont reset properly, the 6000 series cards do not have this problem. I believe I read that in this thread somewhere: http://thread.gmane.org/gmane.comp.emulators.kvm.devel/94524 or maybe it was here: http://tavi-tech.blogspot.com/2012/03/vga-passthrough-with-kvm-on-fedora-16.html


I am also back to using KVM, I could make a very long winded post out of this, but XEN just isn't a good fit for me. For one thing the block performance is in the dumps. I followed all the guides and did everything right, and KVM overall out performs it by a good bit. The stability wasn't perfect either, the word "sometimes" can be used a lot ... I think these pictures sum it up for me:







I think all of the performance problems can be attributed to the fact that dom0 is involved like that, plus XEN has to write their own CPU scheduler etc etc etc, none of which can possibly be as good as what's been invested in and hacked at in the main kernel tree for 15 years.

With KVM the only problem I have is that I can't reset the guest. This is the same behavior as the XEN XL toolstack. The XEN XM toolstack did work, which tells me the hardware does support it, it's just a matter of getting the right code in place to make everything happy. I need to get the source for XM and take a good look at what it is doing vs what XL / KVM is not doing. I expect this to be fixed by someone possibly myself in the next 3-6 months.

Also the latest stable amd64 versions of libvirt / qemu in portage had an IRQ issue with this usb controller, the latest testing ~amd64 versions fixed this problem. So upgrade upgrade, latest and greatest is probably what you want if you're on the KVM side.

There also is the VFIO module and qemu patches, which I will be looking at shortly. It seems like a much more well thought out approach to passthrough. The modules are already in the main kernel tree, the qemu patches should be merged soon I think, and then libvirt support to follow.
Edited by lloyd mcclendon - 4/7/13 at 11:31am
stable again
(25 items)
 
  
CPUCPUMotherboardGraphics
E5-2687W E5-2687W ASUS Z9PED8-WS EVGA GTX 570 (Linux host) 
GraphicsRAMHard DriveHard Drive
EVGA GTX 970 FTW (win7 guest) 64GB G.SKILL 2133 2x Crucial M4 256GB raid1 4x 3TB raid 10 
CoolingCoolingCoolingCooling
2x Apogee HD  2x RX 480 2x MCP 655 RP-452x2 rev2 (new) 
CoolingCoolingOSOS
16x Cougar Turbine CFT12SB4 (new) EK FC 580 Gentoo (host) Gentoo (x23 guests) 
OSMonitorMonitorPower
windows 7 (guest w/ vfio-pci) Viewsonic 23" 1080P Viewsonic 19" Antec HCP Platinum 1000 (new) 
CaseOtherOther
Case Labs TH10 (still the best ever) 2x Lamptron FC-5 IOGEAR 2 way DVI KVM Switch 
  hide details  
Reply
stable again
(25 items)
 
  
CPUCPUMotherboardGraphics
E5-2687W E5-2687W ASUS Z9PED8-WS EVGA GTX 570 (Linux host) 
GraphicsRAMHard DriveHard Drive
EVGA GTX 970 FTW (win7 guest) 64GB G.SKILL 2133 2x Crucial M4 256GB raid1 4x 3TB raid 10 
CoolingCoolingCoolingCooling
2x Apogee HD  2x RX 480 2x MCP 655 RP-452x2 rev2 (new) 
CoolingCoolingOSOS
16x Cougar Turbine CFT12SB4 (new) EK FC 580 Gentoo (host) Gentoo (x23 guests) 
OSMonitorMonitorPower
windows 7 (guest w/ vfio-pci) Viewsonic 23" 1080P Viewsonic 19" Antec HCP Platinum 1000 (new) 
CaseOtherOther
Case Labs TH10 (still the best ever) 2x Lamptron FC-5 IOGEAR 2 way DVI KVM Switch 
  hide details  
Reply
post #579 of 824
Quote:
Originally Posted by Dh0mp5eur View Post

No, I still can't restart my VM.
Code:
dmesg |grep pci-stub
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.8-trunk-amd64 root=UUID=4e436466-36c9-45a9-a455-2ad879c7baaf ro intel_iommu=on radeon.blacklist=1 pci-stub.ids=1002:6798,1002:aaa0 radeon.blacklist=1 quiet
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.8-trunk-amd64 root=UUID=4e436466-36c9-45a9-a455-2ad879c7baaf ro intel_iommu=on radeon.blacklist=1 pci-stub.ids=1002:6798,1002:aaa0 radeon.blacklist=1 quiet
[    1.022224] pci-stub: add 1002:6798 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[    1.022231] pci-stub 0000:01:00.0: claimed by stub
[    1.022236] pci-stub: add 1002:AAA0 sub=FFFFFFFF:FFFFFFFF cls=00000000/00000000
[    1.022239] pci-stub 0000:01:00.1: claimed by stub

/etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="intel_iommu=on radeon.blacklist=1 pci-stub.ids=1002:6798,1002:aaa0"

Just to make sure: After you edited the grub file under /etc/default, did you run update-grub2 (or whatever your Linux distro needs to actually update the grub file)? Without that your changes won't be applied.

By the way, I put my radeon.blacklist here:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="radeon.blacklist=1 quiet"

Edited by powerhouse - 4/7/13 at 11:30am
post #580 of 824
Quote:
Originally Posted by lloyd mcclendon View Post

Yeah, the 7000 series cards have an issue where they wont reset properly, the 6000 series cards do not have this problem. I believe I read that in this thread somewhere: http://thread.gmane.org/gmane.comp.emulators.kvm.devel/94524 or maybe it was here: http://tavi-tech.blogspot.com/2012/03/vga-passthrough-with-kvm-on-fedora-16.html


I am also back to using KVM, I could make a very long winded post out of this, but XEN just isn't a good fit for me. For one thing the block performance is in the dumps. I followed all the guides and did everything right, and KVM overall out performs it by a good bit. The stability wasn't perfect either, the word "sometimes" can be used a lot ... I think these pictures sum it up for me:







I think all of the performance problems can be attributed to the fact that dom0 is involved like that, plus XEN has to write their own CPU scheduler etc etc etc, none of which can possibly be as good as what's been invested in and hacked at in the main kernel tree for 15 years.

With KVM the only problem I have is that I can't reset the guest. This is the same behavior as the XEN XL toolstack. The XEN XM toolstack did work, which tells me the hardware does support it, it's just a matter of getting the right code in place to make everything happy. I need to get the source for XM and take a good look at what it is doing vs what XL / KVM is not doing. I expect this to be fixed by someone possibly myself in the next 3-6 months.

Also the latest stable amd64 versions of libvirt / qemu in portage had an IRQ issue with this usb controller, the latest testing ~amd64 versions fixed this problem. So upgrade upgrade, latest and greatest is probably what you want if you're on the KVM side.

There also is the VFIO module and qemu patches, which I will be looking at shortly. It seems like a much more well thought out approach to passthrough. The modules are already in the main kernel tree, the qemu patches should be merged soon I think, and then libvirt support to follow.

Im using those patches atm with my radeon 6950 and they seem to work just fine, i can do a primary passthrough of the card (with -vga none), you'll need to use kernel ver > 3.9 (im using 3.9rc5) and you need to enable vfio
Code:
                                                   --- VFIO Non-Privileged userspace driver framework                                                                       
                                                   <*>   VFIO support for PCI devices                                                                                       
                                                   [*]     VFIO PCI support for VGA devices                                                                                 
                                                                                                                                                                            
  

To pass it through ex:
Code:
qemu-system-x86_64 -device vfio-pci,host=07:00.0,x-vga=on

EDIT: you can build qemu from this tree https://github.com/awilliam/qemu-vfio, it contains those patches
EDIT2: have you tried ejecting the gpu before restarting?, i remember i had some performance isssues with xen after i rebooted the guest os, but ejecting it from windows seems to reset the card properly
Edited by nbhusain - 4/7/13 at 11:53am
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Operating Systems
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › {Guide} Create a Gaming Virtual Machine