On Fri, Mar 02, 2018 at 04:08:47PM +0100, Paolo Bonzini wrote:
> On 01/03/2018 11:33, Liu, Yi L wrote:
> >
> > +struct IntelIOMMUAssignedDeviceNode {
> > + VTDAddressSpace *vtd_as;
> > + QLIST_ENTRY(IntelIOMMUAssignedDeviceNode) next;
> > +};
> > +
>
> This QLIST_ENTRY can also be placed directly in VTDAddressSpace (e.g.
> next_assigned_dev), so that the notify function can simply do a
> QLIST_REMOVE when an assigned device is hot-unplugged.
Thanks for this idea, would try to do consolidation together with
another comments from you.
> Does the notify_func need an "unbind from PASID address space" step,
> that does the opposite of vtd_bind_device_to_pasid_as?
yes, it is possible that a device is un-tied from a PASID tagged
address space. And this should be emulated in Qemu. Thanks for
the remind.
Regards,
Yi Liu