qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Add PCI Passthrough for multiple devices on same bus?


From: Tony Su
Subject: Re: [Qemu-discuss] Add PCI Passthrough for multiple devices on same bus?
Date: Sun, 8 Sep 2013 16:42:14 -0700

Since you're using virsh commands, have you also considered just
running vm manager if you're running a graphical environment? It's
pretty straightforward when you use vm manager if there isn't a
conflict of some sort...

Also, just wondering if you really need to access the hardware
directly, it's more typical to let the Host access the hardware
directly and create virtual storage on the hardware for VM use
instead. If you don't have a specific need, there are many benefits
doing it the more usual virtualized storage way.

Tony

On Thu, Sep 5, 2013 at 3:15 PM, Andrew Martin <address@hidden> wrote:
> 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
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]