[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [BUG] After upgrade to Xen 4.12.0 iommu=no-igfx
Hi Roger! With your patch (and build as a debug build) Xen crashes on boot (which I guess was the point of your BUG_ON statement). The log is attached Thanks, Roman. On Wed, Jul 24, 2019 at 7:11 AM Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote: > > On Tue, Jul 23, 2019 at 10:32:26AM -0700, Roman Shaposhnik wrote: > > Hi Roger! > > > > I applied your patch, removed no-igfx and I still see the original > > problem. Please let me know what other logs/debugs would you need at > > this point. > > I'm not sure why you don't get the rmrrs added to the iommu page > tables, AFAICT it works on my test box. > > I have a patch with extra debug messages and checks, could you give it > a test, I'm attaching it below. Note that you don't need the previous > patch, since it's already contained in the debug patch below. > > Please paste the Xen bootlog with the patch applied when your reply. > > Thank, Roger. > ---8<--- > diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c > index fef97c82f6..3605614aaf 100644 > --- a/xen/arch/x86/mm/p2m.c > +++ b/xen/arch/x86/mm/p2m.c > @@ -1341,7 +1341,7 @@ int set_identity_p2m_entry(struct domain *d, unsigned > long gfn_l, > > if ( !paging_mode_translate(p2m->domain) ) > { > - if ( !need_iommu_pt_sync(d) ) > + if ( !has_iommu_pt(d) ) > return 0; > return iommu_legacy_map(d, _dfn(gfn_l), _mfn(gfn_l), PAGE_ORDER_4K, > IOMMUF_readable | IOMMUF_writable); > @@ -1432,7 +1432,7 @@ int clear_identity_p2m_entry(struct domain *d, unsigned > long gfn_l) > > if ( !paging_mode_translate(d) ) > { > - if ( !need_iommu_pt_sync(d) ) > + if ( !has_iommu_pt(d) ) > return 0; > return iommu_legacy_unmap(d, _dfn(gfn_l), PAGE_ORDER_4K); > } > diff --git a/xen/drivers/passthrough/vtd/iommu.c > b/xen/drivers/passthrough/vtd/iommu.c > index 8b27d7e775..ea303b5d45 100644 > --- a/xen/drivers/passthrough/vtd/iommu.c > +++ b/xen/drivers/passthrough/vtd/iommu.c > @@ -2009,12 +2009,19 @@ static int rmrr_identity_mapping(struct domain *d, > bool_t map, > if ( !map ) > return -ENOENT; > > +printk("<RMRR> mapping %#lx - %#lx\n", base_pfn, end_pfn); > while ( base_pfn < end_pfn ) > { > int err = set_identity_p2m_entry(d, base_pfn, p2m_access_rw, flag); > + mfn_t mfn; > + unsigned int f; > > if ( err ) > return err; > +BUG_ON(intel_iommu_lookup_page(d, _dfn(base_pfn), &mfn, &f)); > +BUG_ON(base_pfn != mfn_x(mfn)); > +BUG_ON(f != (IOMMUF_readable | IOMMUF_writable)); > + > base_pfn++; > } > > @@ -2263,6 +2270,7 @@ static void __hwdom_init setup_hwdom_rmrr(struct domain > *d) > u16 bdf; > int ret, i; > > +printk("<RMRR> setting up regions\n"); > pcidevs_lock(); > for_each_rmrr_device ( rmrr, bdf, i ) > { > Attachment:
xen-crash.txt _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |