qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 12/13] intel_iommu: do replay when context i


From: Liu, Yi L
Subject: Re: [Qemu-devel] [RFC PATCH 12/13] intel_iommu: do replay when context invalidate
Date: Thu, 29 Dec 2016 10:37:01 +0000

> -----Original Message-----
> From: Peter Xu [mailto:address@hidden
> Sent: Thursday, December 29, 2016 6:00 PM
> To: Liu, Yi L <address@hidden>
> Cc: Tian, Kevin <address@hidden>; Lan, Tianyu <address@hidden>; 'qemu-
> address@hidden' <address@hidden>; 'address@hidden'
> <address@hidden>
> Subject: Re: [Qemu-devel] [RFC PATCH 12/13] intel_iommu: do replay when 
> context
> invalidate
> 
> On Thu, Dec 29, 2016 at 07:38:38AM +0000, Liu, Yi L wrote:
> > > Before this one we only invalidate context cache when we receive context
> > > entry invalidations. However it's possible that the invalidation also
> > > contains a domain switch (only if cache-mode is enabled for vIOMMU). In
> > > that case we need to notify all the registered components about the new
> > > mapping.
> > >
> > > Signed-off-by: Peter Xu <address@hidden>
> > > ---
> > >  hw/i386/intel_iommu.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> > > index 2fcd7af..0220e63 100644
> > > --- a/hw/i386/intel_iommu.c
> > > +++ b/hw/i386/intel_iommu.c
> > > @@ -1188,6 +1188,7 @@ static void
> vtd_context_device_invalidate(IntelIOMMUState
> > > *s,
> > >                  trace_vtd_inv_desc_cc_device(bus_n, (devfn_it >> 3) & 
> > > 0x1f,
> > >                                               devfn_it & 3);
> > >                  vtd_as->context_cache_entry.context_cache_gen = 0;
> > > +                memory_region_iommu_replay_all(&vtd_as->iommu);
> >
> > Hi Peter,
> >
> > It looks like all the device context invalidation would result in replay 
> > even the
> > device is not an assigned device. Is it necessary to do replay for a 
> > virtual device?
> 
> Normal emulated devices won't register for IOMMU notifier. For these
> devices, MemoryRegion.iommu_notify will be empty. So replay on those
> memory regions should not affect them at all.
> 
Cool, sounds good. thx!

Regards,
Yi L

reply via email to

[Prev in Thread] Current Thread [Next in Thread]