<div dir="ltr">Thank you very much..<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 4, 2021 at 10:39 PM Laine Stump <<a href="mailto:laine@redhat.com">laine@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 8/4/21 3:21 AM, Jiatong Shen wrote:<br>
> Hello community,<br>
> <br>
> I am working on plugging a xilinx fpga card as a hostdev.  This fpga <br>
> card has 2 functions, each has a different role, for some reason, I <br>
> would like to attach both of them but do not want to attach them <br>
> separately, so I have tried to attach a pci bridge where fpga cards <br>
> connect to. but got the following  error,<br>
> <br>
> error: Failed to attach device from bridge.xml<br>
> error: internal error: Non-endpoint PCI devices cannot be assigned to guests <br>
> <br>
> <br>
> so, my question is is it possible to attach a pci-bridge as hostdev? <br>
> thank you.<br>
<br>
No, it isn't possible. VFIO only supports attaching endpoint devices.<br>
<br>
You will need to attach each of your endpoint devices separately. (If <br>
the issue is that you want both devices to show up on the same root port <br>
in the guest, that is easily accomplished by manually setting the <br>
guest-side pci address of the devices to have the same same bus/slot, <br>
but different function; this does mean that you can't hotplug, but will <br>
deliver the desired topology. Note that although I've heard of people <br>
who thought that they needed devices to be on the same slot, I've never <br>
seen any evidence that this was actually required by any OS or driver)<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><br><div>Best Regards,</div><div><br></div><div>Jiatong Shen</div></div></div>