On Thu, Oct 07, 2021 at 05:11:47PM +0100, Ian Jackson wrote:
> Rahul Singh writes ("Re: [PATCH v5 10/11] arm/libxl: Emulated PCI device tree 
> node in libxl"):
> > As Stefano suggested in another email that we can remove the vpci
> > option, if we reach to conclusion that we need vpci option I will
> > move it to internal structure.
> ...
> > Yes I agree with you VPCI is necessary for hot plugged PCI device
> > and once we implement the hotplug in future we will use the
> > passthrough= option to enable VPCI.
> 
> So, to summarise, I think the situation is:
> 
>  * VCPI is necessry for passthrough on ARM, whether coldplug or
>    hotplug.  It's part of the way that PCI-PT works on ARM.
> 
>  * Hotplug is not yet implemented.
> 
>  * VPCI is not necessary on x86 (evidently, since we don't have it
>    there but we do have passthrough).
> 
> So when hotplug is added, vpci will need to be turned on when
> passthrough=yes is selected.  I don't fully understand the other
> possible values for passthrough= but maybe we can defer the question
> of whether they apply to ARM ?
> 
> I think that means that yes, this should be an internal variable.
> Probably in libxl__domain_create_state.  We don't currently arrange to
> elide arch-specific state in there, so perhaps it's fine just to
> invent a member called `arm_vpci`.

Seeing as we might want to also use this on x86, I wonder whether we
should allow to specify a backend to use for each passthrough device,
ie:

pci = [ '36:00.0,backend=vpci',
        '36:01.0,backend=qemu',
        ... ]

In principle we should support different backends on a per-device
basis, albeit if not currently possible.

Iff we have to introduce a new struct member for vPCI it should be
shared between all arches, as it's likely x86 will also want to at
least have the option to use vPCI for passthrough.

Thanks, Roger.

Reply via email to