Project steamed-windows

From www.evillabs.net
Jump to navigation Jump to search

Steamed Windows

Running Windows XP under SteamOS in a VM, with IOMMU access to a physical video card.

Hardware

  • AMD 6 core CPU (AMD FX 6300)
  • AMD 970 chipset motherboard (which IOMMU enabled in BIOS)
  • SATA drive (500GB+)


Oracle VirtualBox [FAILED] Notes

  • Log in as 'desktop', password of 'desktop'
  • Execute sudo bash to become root.
  • Create a /etc/apt/sources.list.d/virtualbox.list file:
# cat <<EOF >/etc/apt/sources.list.d/virtualbox.list
deb http://download.virtualbox.org/virtualbox/debian precise contrib
deb http://us.archive.ubuntu.com/ubuntu/ precise main
EOF
# apt-get update
  • Install VirtualBox 4.3
# apt-get install virtualbox-4.3
# wget http://download.virtualbox.org/virtualbox/4.3.6/Oracle_VM_VirtualBox_Extension_Pack-4.3.6-91406.vbox-extpack
# VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.3.6-91406.vbox-extpack
  • Run 'virtualbox' as desktop:
# exit
$ virtualbox
  • In virtualbox, create a new VM:
    • Name 'steamed-windows'
    • Type 'Microsoft Windows'
    • Version 'Windows XP'
    • Assign the virtual machine some ram (minimum 2G)
    • Create a virtual hard driver
      • Hard drive type of VMDK - allows us to migrate to VMWare or QEMU later.
      • Select 'Dynamically allocated'
      • Minimum 10G - we will be using a shared filesystem for the actual Steam games
    • Adjust the VM settings:
      • System
        • Motherboard
          • Chipset: ICH9
          • Enable I/O APIC
      • Display
        • Set graphics memory to 128M
        • Enable 3D acceleration
        • Enable 2D acceleration
      • Storage
        • Controller
          • Type: ICH6
        • CDROM
          • Point to your Windows XP install CD or ISO
  • Start virtualbox, and install Windows XP (do all your updates, blah blah)
    • In Windows:
      • Control Panel -> System -> Remote
        • Check: Allow users to connect remotely to this computer
    • Install the VirtualBox Guest Additions
  • Exit virtualbox, and run the following from the command line:
$ lspci | grep NVIDIA | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 640] (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce 9800 GT] (rev a2)
  • Select the higher bus number - that should be your secondary display (02:00.0 is this example)
  • Verify that the display has MSI support
$ lspci -v -s 02:00.0 | grep MSI | grep Enable+
	Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
  • Attach the secondary display to the VirtualBox
$ VBoxManage modifyvm steamed-windows --pciattach 02:00.0@01:05.0
$ sudo sh -c 'echo 0000:02:00.0 >/sys/bus/pci/devices/0000\:02\:00.0/driver/unbind'

STATUS: FAILED

Kernel panics when VirtualBox tried to use the 2nd adapter. Seems to be an MSI issue..

[10892.867955] WARNING: at /usr/src/packages/BUILD/linux-3.10.11/lib/kobject.c:196 kobject_add_internal+0x13c/0x1c4()
[10892.867957] kobject_add_internal failed for msi_irqs with -EEXIST, don't try to register things with the same name in the same directory.
[10892.867958] Modules linked in: bnep rfcomm bluetooth pci_stub vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) nls_utf8 nls_cp437 vfat fat snd_hda_codec_hdmi arc4 snd_hda_codec_realtek acpi_cpufreq mperf kvm_amd snd_hda_intel kvm nvidia(PO) snd_hda_codec snd_hwdep crc32c_intel snd_pcm ath5k snd_page_alloc snd_timer processor ghash_clmulni_intel aesni_intel aes_x86_64 ablk_helper ath mac80211 snd cryptd xpad joydev ff_memless cfg80211 sp5100_tco lrw k10temp fam15h_power soundcore thermal_sys i2c_piix4 edac_mce_amd efi_pstore edac_core i2c_core rfkill gf128mul glue_helper efivars psmouse pcspkr serio_raw microcode evdev ext4 crc16 jbd2 mbcache hid_logitech_dj usbhid hid sg sd_mod crc_t10dif xhci_hcd ahci libahci ehci_pci r8169 mii ohci_hcd ehci_hcd button libata scsi_mod usbcore usb_common
[10892.867984] CPU: 2 PID: 5570 Comm: EMT Tainted: P        W  O 3.10-3-amd64 #1 Debian 3.10.11-1st1
[10892.867986] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./970 Pro3 R2.0, BIOS P1.50 10/02/2013
[10892.867987]  ffffffff8138c153 0000000000000000 ffffffff8103be31 ffff88024d3a4828
[10892.867989]  ffff8801507b1a98 0000000000000000 ffff88024c8f9bd8 00000000ffffffef
[10892.867991]  ffff88025587a0a8 ffffffff8151b5be ffffffff8103bee1 ffffffff81515600
[10892.867993] Call Trace:
[10892.867995]  [<ffffffff8138c153>] ? dump_stack+0xd/0x17
[10892.867997]  [<ffffffff8103be31>] ? warn_slowpath_common+0x5f/0x77
[10892.867999]  [<ffffffff8103bee1>] ? warn_slowpath_fmt+0x45/0x4a
[10892.868001]  [<ffffffff81160f86>] ? sysfs_create_dir+0x8f/0xac
[10892.868003]  [<ffffffff811c7c1f>] ? kobject_add_internal+0x13c/0x1c4
[10892.868005]  [<ffffffff811c7e5c>] ? kobject_set_name+0x3e/0x43
[10892.868007]  [<ffffffff811c80de>] ? kset_register+0x1c/0x39
[10892.868010]  [<ffffffff811c8157>] ? kset_create_and_add+0x5c/0x75
[10892.868017]  [<ffffffff811f772b>] ? populate_msi_sysfs+0x22/0xeb
[10892.868027]  [<ffffffff811f7ad4>] ? pci_enable_msi_block+0x19f/0x207
[10892.868036]  [<ffffffffa03be899>] ? vboxPciOsDevInit+0x8e/0xa9 [vboxpci]
[10892.868044]  [<ffffffffa03bf2aa>] ? vboxPciDevInit+0x21/0x37 [vboxpci]
[10892.868052]  [<ffffffffa03bf400>] ? vboxPciFactoryCreateAndConnect+0x140/0x1be [vboxpci]
[10892.868059]  [<ffffffff811084d9>] ? lookup_page_cgroup+0x31/0x3a
[10892.868068]  [<ffffffffa0e35f09>] ? supdrvIOCtl+0x1274/0x277b [vboxdrv]
[10892.868072]  [<ffffffffa0e3136f>] ? VBoxDrvLinuxIOCtl_4_3_6+0x124/0x1b9 [vboxdrv]
[10892.868075]  [<ffffffff810601dd>] ? should_resched+0x5/0x23
[10892.868078]  [<ffffffff81118d36>] ? vfs_ioctl+0x1e/0x31
[10892.868080]  [<ffffffff81119566>] ? do_vfs_ioctl+0x3ea/0x42c
[10892.868083]  [<ffffffff81110016>] ? SYSC_newstat+0x25/0x2d
[10892.868085]  [<ffffffff811195f6>] ? SyS_ioctl+0x4e/0x7c
[10892.868088]  [<ffffffff81394a69>] ? system_call_fastpath+0x16/0x1b
[10892.868089] ---[ end trace ee90562754540d9f ]---
[10892.868142] 200: linux vboxPciOsDevGetRegionInfo: reg=0
[10892.868144] got mmio region: fa000000:16777216
[10892.868147] 200: linux vboxPciOsDevGetRegionInfo: reg=1
[10892.868149] got mmio region: c0000000:268435456
[10892.868151] 200: linux vboxPciOsDevGetRegionInfo: reg=3
[10892.868153] got mmio region: f8000000:33554432
[10892.868155] 200: linux vboxPciOsDevGetRegionInfo: reg=5
[10892.868156] got pio region: d000:128
[10892.868159] 200: linux vboxPciOsDevGetRegionInfo: reg=6
[10892.868160] got mmio region: fb000000:131072
[10892.868167] genirq: Flags mismatch irq 76. 00000020 (vboxpci) vs. 00000080 (nvidia)
[10892.868169] could not request IRQ 76: err=-16


NEXT STEPS:

Will try the following tomorrow, to hopefully work around this issue. If not, I'll move on to QEMU or VMWare.

$ sudo sh -c 'echo options nvidia-current NVreg_EnablePCIeGen3=1 NVreg_EnableMSI=1 >>/etc/modprobe.d/nvidia.conf'

Hmm. That didn't work... Next...

$ lspci -n -s 02:00.0
02:00.0 0300: 10de:0614 (rev a2)
$ sudo sh -c 'echo options pci-stub ids=10de:0614 >/etc/modprobe.d/pci-stub.conf'
$ sudo sh -c 'echo pci-stub >>/etc/modules'