[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-discuss] Add PCI Passthrough for multiple devices on same bus?
From: |
Andrew Martin |
Subject: |
[Qemu-discuss] Add PCI Passthrough for multiple devices on same bus? |
Date: |
Thu, 05 Sep 2013 17:15:24 -0500 (CDT) |
Hello,
I have a 4-port PCIe serial card that I would like to pass through to a VM. The
serial card has 4 serial ports on it, and I would like to pass all 4 ports
through. Here are the ports, as seen on the host:
# lspci
02:00.0 Serial controller: MosChip Semiconductor Technology Ltd. 4-Port PCIe
Serial Adapter
02:00.1 Serial controller: MosChip Semiconductor Technology Ltd. 4-Port PCIe
Serial Adapter
02:00.2 Serial controller: MosChip Semiconductor Technology Ltd. 4-Port PCIe
Serial Adapter
02:00.3 Serial controller: MosChip Semiconductor Technology Ltd. 4-Port PCIe
Serial Adapter
# virsh nodedev-list
pci_0000_02_00_0
pci_0000_02_00_1
pci_0000_02_00_2
pci_0000_02_00_3
I have configured the first port, 02:00.0 , in my VM configuration file as
follows:
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</hostdev>
If I attempt to start the VM, I get the following error:
error: internal error Unable to reset PCI device 0000:02:00.1: internal error
Active 0000:02:00.0 devices on bus with 0000:02:00.1, not doing bus reset
Running the following commands to detach the other 3 ports then allows me to
successfully start the VM, and I can see the serial port in it:
# virsh nodedev-detach pci_0000_02_00_1
# virsh nodedev-detach pci_0000_02_00_2
# virsh nodedev-detach pci_0000_02_00_3
However, when I attempt to add more than 1 of the ports to the VM config, I
keep getting this error:
error: internal error Unable to reset PCI device 0000:02:00.1: internal error
Active 0000:02:00.0 devices on bus with 0000:02:00.1, not doing bus reset
The second port I added (0000:02:00.1) is configured as follows in the VM
config:
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</hostdev>
How can I add all 4 of these devices (which share the same bus) as PCI
passthrough to the VM?
Thanks,
Andrew
- [Qemu-discuss] Add PCI Passthrough for multiple devices on same bus?,
Andrew Martin <=