[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] FIXME question
> -----Original Message----- > From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx] > Sent: Monday, June 27, 2016 5:51 PM > To: Jan Beulich <JBeulich@xxxxxxxx>; Xu, Quan <quan.xu@xxxxxxxxx> > Cc: Tian, Kevin <kevin.tian@xxxxxxxxx>; Wu, Feng <feng.wu@xxxxxxxxx>; xen- > devel@xxxxxxxxxxxxx > Subject: Re: [Xen-devel] FIXME question > > On 27/06/16 10:32, Jan Beulich wrote: > >>>> On 27.06.16 at 11:23, <quan.xu@xxxxxxxxx> wrote: > >> Hi, > >> > >> When I read IOMMU code, > >> In xen/drivers/passthrough/vtd/intremap.c : pi_update_irte().. > >> There are a FIXME -- > >> '' > >> * FIXME: For performance reasons we should store the 'iommu' pointer in > >> * 'struct msi_desc' in some other place, so we don't need to waste > >> * time searching it here. > >> " > >> > >> IMO, we are better to store the 'iommu' pointer in pci_dev, then > >> could I fix it as: > > Sounds reasonable. > > I agree. > > > > > Jan > > > >> 1. save a void *iommu in pci_dev structure: > >> > >> --- a/xen/include/xen/pci.h > >> +++ b/xen/include/xen/pci.h > >> @@ -83,6 +83,8 @@ struct pci_dev { > >> #define PT_FAULT_THRESHOLD 10 > >> } fault; > >> u64 vf_rlen[6]; > >> + > >> + void *iommu; /* No common IOMMU struct so use void pointer */ > > Longer term, it would be nice to have concrete IOMMU type with > implementation specific fields hidden in a union, but void * will work > for now. Agree, I think something like below should be the case: struct arch_pci_dev { vmask_t used_vectors; + union { + struct acpi_drhd_unit *drhd; + /* AMD can add its counterpart here if needed */ + }; }; Thanks, Feng > > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |