Jump to content
jude

KVM working with GA-990FXA-UD5 AMD motherboard GPU and USB pass through working

3 posts in this topic Last Reply

Recommended Posts

Finally have a stable working Win8.1 VM! Very happy to have achieved this milestone. It didn't seem quite as easy to achieve with an AMD motherboard, but it does work amazingly well once its up and running. I have to admit for a while I was considering changing to an Intel board.

 

Motherboard GA-990FXA-UD5 Rev 3.0 Beta Bios

GPU HIS 1GB Radeon 6450

 

 

Lots of thanks to all of the KVM gurus. Special mention Dmacias, JonP, Peter_SM, Archedraft, JustinChase and lots of others who have been documenting there Plugins, systems, issues and successes.

 

I am sure that there is lots to tweak in my system and I still have one major issue with my microsoft wireless keyboard crashing but I am sure this can be fixed. I thought I would post what I have working  just in case it helps anyone else.

 

Working Win8.1 XML (Thanks to Peter and JonP)

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>windows81</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9c</uuid>
  <memory unit='KiB'>3906250</memory>
  <currentMemory unit='KiB'>3906250</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <loader>/usr/share/qemu/bios-256k.bin</loader>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
    <timer name='hypervclock' present='yes'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='/mnt/cache/Image Media/Win8.1ProN.qcow2'/>
      <target dev='hda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/en_windows_8_1_n_x64_dvd_2707896.iso'/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/Images/virtio-win-0.1-94.iso'/>
      <target dev='hdd' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:46:29:be'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </interface>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x0800'/>
        <address bus='4' device='3'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=04:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=04:00.1,bus=pcie.0'/>
  </qemu:commandline>
</domain>

 

relevant part of Go script

 

/usr/local/sbin/vfio-bind 0000:04:00.0 0000:04:00.1

 

Syslinux.cfg

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append amd_iommu=on iommu=pt iommu=1 vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

 

I was having some trouble with getting the VM to run and GPU passthrough to work with a HIS 1GB Radeon 6450. I added the following code to syslinux.cfg

 

"iommu=pt iommu=1"

 

prior to adding the above code when I did a

 

dmesg | grep AMD-Vi

 

I would get:

 

AMD-Vi: Enabling IOMMU at 0000:00:00.2 cap 0x40
AMD-Vi: Lazy IO/TLB flushing enabled

 

but nothing about passthrough. With the updated syslinux.cfg

 

dmesg | grep AMD-VI

 

gets:

root@Tower:~# dmesg | grep AMD-Vi
AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
AMD-Vi: Interrupt remapping enabled
AMD-Vi: Initialized for Passthrough Mode

 

I made this change based on the October 17th,2012 post on this forum

http://ubuntuforums.org/archive/index.php/t-1818433.html (not sure if its ok to include this link)

 

Seemed to make a difference.

 

With a corded USB keyboard and mouse attached and passed through everything works great. High bitrate movies in Plex play perfectly. Have not tried games yet.

 

 

 

Passing through my Microsoft wireless keyboard and trackpad is not so great. The VM starts and GPU passthrough works as expected. The keyboard trackpad works for a short time (30 seconds to a minute or two and then the keyboard and trackpad stop functioning all together. I am forced to shutdown the VM from VM Manager.

 

[sOLVED] http://lime-technology.com/forum/index.php?topic=36768.msg344544#msg344544

 

 

 

Thanks again.

Share this post


Link to post

I had the same problem the Microsoft All-in-One keyboard.  I ended up returning it for a Logitech and haven't had any issues since.  I believe the issue stems from the device going into sleep mode after a short period (10 seconds?) of inactivity to save power. 

 

I got frustrated and just returned the unit since it was a new purchase.  Perhaps you could look into some of the nitty gritty driver details on the device going to sleep or passing through the USB controller, instead of individual USB devices. 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.