[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH resend] PVH Dom0 RMRR IOMMU mapping regression fix
>>> On 25.09.15 at 01:53, <elena.ufimtseva@xxxxxxxxxx> wrote: > Permissions for p2m entry of read-only > mmio regions are left unchanged as leaving only 'r' cause page faults. I am > not sure what the reason of it yet, will try to dig it further. Yes please - imo this absolutely should be changed to just r along with the rwx -> rw conversion. Since you saw page faults, could you at least point out which address(es) they occurred for? After all the set of r/o MMIO pages should be relatively small... > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -971,7 +971,17 @@ int set_identity_p2m_entry(struct domain *d, unsigned > long gfn, > ret = p2m_set_entry(p2m, gfn, _mfn(gfn), PAGE_ORDER_4K, > p2m_mmio_direct, p2ma); > else if ( mfn_x(mfn) == gfn && p2mt == p2m_mmio_direct && a == p2ma ) > - ret = 0; > + { > + /* > + * PVH fixme: during Dom0 PVH construction, p2m entries are being set > + * but iomem regions are not mapped with IOMMU. This makes sure that > + * RMRRs are correctly mapped with IOMMU. > + */ > + if ( is_hardware_domain(d) && !iommu_use_hap_pt(d) ) > + ret = iommu_map_page(d, gfn, gfn, > IOMMUF_readable|IOMMUF_writable); This should use p2m_get_iommu_flags() (which eventually needs to also honor the passed in p2m_access_t, i.e. its use here for now only serves documentation purposes as well as a means to spot the location when making said adjustment). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |