I am having issues to do a successful PCI passthrough on a HVM VM i tried a lot of combinations of:
- host computers ( three different notebook PCs )
- host OS ( Windows 7 , Ubuntu )
- qubes versions ( Qubes R2 , Qubes R3.0 installation ISO with and without latest updates, Qubes R3.1 live USB )
- xen versions ( from R2 xen 4.1, from R3 4.4.2 and 4.4.3 )
- pci devices ( eSATA PCI, wifi pci, ethernet pci, usb hubs pci, audio pci )
I am sure i had IOMMU/VT-d enabled on all my computers that i tried.
I tried to do xl pci-attach/pci-detach
I followed any disscussions that had place on qubes forum regarding PCI passthrough and tried every thing that i could try in any of the discussions that i've seen,i tried rd.qubes.hide_pci, or different parameters on GRUB for xen.
I also checked dmesg logs, dm logs, libxl logs for any errors that would indicate this problem.
Sadly i couldn't find any errors related to any problem regarding ACPI, IOMMU, or PCI passthrough.
Also for any PCI passthrough that i tried it looks that for any PV VM works fine for any of the combinations that i tried. So no issues on PV VM.
I concluded that this problem is not OS related because i get the same issues on Windows or on Ubuntu installation so i continued to do extensive tests with a live Ubuntu USB memory stick.
To check if pci passthrough was successful i typed lspci inside ubuntu HVM, i also checked dmesg of ubuntu for any errors(found nothing)
One thing that i noticed on any combinations that i tried is that when i do a passthrough of USB bus of any of my notebooks tried i can see them with lspci inside Ubuntu. Any other devices that i tried does not show on lspci on any versions/computers that i tried.
The USB looks like is passing through however it does not work. When i tried lsusb, it hangs and no usb devices are displayed ever.
So logs are not complaining about everything, but pci devices are not seen or not working after passthrough.
Now i wonder if am i missing something? Are there any things that could be checked to find where the problem is and why the device won't reach the HVM VM?
Are there any tests that i can do?
Can you confirm that you got running pci passthrough on any HVM VM by simply using "qvm-pci (or "Devices" tab in Qubes Manager)" on any of your machines?
Can anyone report a successfull PCI passthrough of any device on HVM VM in Qubes?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Tue, Nov 17, 2015 at 03:26:12AM -0800, mkru...@gmail.com wrote:
> >
> > Have you tried to use qvm-pci (or "Devices" tab in Qubes Manager),
> > _before_ starting the VM?
> >
> I tried that. Same behaviour.
>
> Can you confirm that you got running pci passthrough on any HVM VM by simply using "qvm-pci (or "Devices" tab in Qubes Manager)" on any of your machines?
I'll try later today. I think I had it working on R3, but not so sure
now...
Hi everyone
I don't know if this has something to do or not with the issue but it might help.
What i noticed is that when running Ubuntu HVM on Qubes VM Manager with USB device attached is that when i do "xl list" i notice two domains "ubuntu" and "ubuntu-dm"(stub domain). Searching through the ubuntu-dm.log i couldn't find any IRQ error messages.
Also calling lsusb inside VM hangs.
In one of the another test that i did to find a trace of this problem was running my Ubuntu HVM installation from xl running the following commands:
xl pci-assignable-add 0000:00:14.0
xl mem-set dom0 1024
xl create ubuntu2.hvm
Here is the .hvm file i used:
builder = "hvm"
name = "ubuntu2"
memory = 1024
acpi = 1
apic = 1
on_xend_stop = 'shutdown'
on_poweroff = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
vif = [ 'mac=00:16:3e:5e:6d:11,ip=10.137.2.22,script=vif-route-qubes,backend=sys-firewall' ]
disk = [ '/var/lib/qubes/appvms/ubuntu/root.img,raw,hda,rw' ]
pci = [ '00:14.0' ]
device_model_version = 'qemu-xen-traditional'
boot = 'dc'
sdl = 1
keymap = 'en-us'
stdvga = 0
serial='pty'
tsc_mode = 'default'
usb = 1
usbdevice = 'tablet'
localtime = 1
xen_platform_pci = 1
pci_power_mgmt = 1
pci_msitranslate = 1
monitor = 1
hpet = 1
In my ubuntu2.hvm file as you see i put "device_model_version = 'qemu-xen-traditional'" which yields on "xl list" only one domain called ubuntu2.
Which tells me that in this way, stubdomain doesn't run as a separate VM as it did on Qubes VM Manager (i know it's not safe to run it like this but this is just for test purposes only)
It also didn't create any ubuntu2-dm.log file this way.
Running this way all my tests where the same: USB could be seen but not working, the other devices simply doesn't show at all in HVM VM
So this test might tell that this is not a stubdomain problem. I might be right or wrong because i don't know how these things works.
I looked around for possible fixes for pci passthrough but none of them seem to work. The best I could do for external media was attach a block device but this doesn't give any access to the license stored on the USB dongle.
Qubes R3.0 seems to have some issues with this.
When attempting to add Devices:
qvm-prefs -s HVM-name pci_strictreset true
1.) Crashes the VM Manager
2.) Crashes the entire system
3.) Error messages
"Error starting VM: internal error: Unable to reset PCI device XXXXXXXXX: no FLR, PM reset or bus reset available"
4.) Can attach block devices
qvm-prefs -s HVM-name pci_strictreset false
1.) Able to boot HVM but no access to device
2.) Lost ability to attach block devices
Qubes R3.1, Xen 4.6
I can assign a PCI device (USB controller) to an AppVM just fine, but it does not show up when I do it to a debian-based HVM. No errors starting up the VMs.