Re: kvm PCI assignment & VFIO ramblings

Alex Williamson
2011-08-01T20:27:36Z

On Sun, 2011-07-31 at 17:09 +0300, Avi Kivity wrote:
> On 07/30/2011 02:58 AM, Benjamin Herrenschmidt wrote:
> > Due to our paravirt nature, we don't need to masquerade the MSI-X table
> > for example. At all. If the guest configures crap into it, too bad, it
> > can only shoot itself in the foot since the host bridge enforce
> > validation anyways as I explained earlier. Because it's all paravirt, we
> > don't need to "translate" the interrupt vectors& addresses, the guest
> > will call hyercalls to configure things anyways.
>
> So, you have interrupt redirection? That is, MSI-x table values encode
> the vcpu, not pcpu?
>
> Alex, with interrupt redirection, we can skip this as well? Perhaps
> only if the guest enables interrupt redirection?

It's not clear to me how we could skip it. With VT-d, we'd have to
implement an emulated interrupt remapper and hope that the guest picks
unused indexes in the host interrupt remapping table before it could do
anything useful with direct access to the MSI-X table. Maybe AMD IOMMU
makes this easier? Thanks,

Alex