[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 Everyone!

Thanks a million for an extremely quick turnaround. I am in my lab
again next to the box in question.

Should I go ahead and test the latest patch or wait for the official
one to be submitted?

Thanks,
Roman.

On Mon, Jul 22, 2019 at 8:22 AM Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
>
> On Mon, Jul 22, 2019 at 05:02:35PM +0200, Paul Durrant wrote:
> > > -----Original Message-----
> > > From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> > > Sent: 22 July 2019 15:40
> > > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> > > Cc: 'Roman Shaposhnik' <roman@xxxxxxxxxx>; 
> > > xen-devel@xxxxxxxxxxxxxxxxxxxx; jgross@xxxxxxxx; Andrew
> > > Cooper <Andrew.Cooper3@xxxxxxxxxx>; boris.ostrovsky@xxxxxxxxxx; 
> > > jbeulich@xxxxxxxx
> > > Subject: Re: [Xen-devel] [BUG] After upgrade to Xen 4.12.0 iommu=no-igfx
> > > diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
> > > index fef97c82f6..88a2430c8c 100644
> > > --- a/xen/arch/x86/mm/p2m.c
> > > +++ b/xen/arch/x86/mm/p2m.c
> > > @@ -836,7 +836,7 @@ guest_physmap_add_page(struct domain *d, gfn_t gfn, 
> > > mfn_t mfn,
> > >           */
> > >          for ( i = 0; i < (1UL << page_order); ++i, ++page )
> > >          {
> > > -            if ( !need_iommu_pt_sync(d) )
> > > +            if ( !has_iommu_pt(d) )
> > >                  /* nothing */;
> > >              else if ( get_page_and_type(page, d, PGT_writable_page) )
> > >                  put_page_and_type(page);
> > > @@ -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);
> > >      }
> >
> > Yes, this all looks ok to me... although I still find it counterintuitive 
> > that we make p2m calls for PV domains.
>
> I agree, albeit I'm not sure of how to get rid of those, will need to
> look at the callers. For iommu callers we could likely just call
> iommu_legacy_{map/unmap} for PV.
>
> I'm going to formally submit this patch then.
>
> Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.