Re: [Xen-devel] [PATCH] Avoid needless flush cache when guest change MTRR

2015-02-04 Thread Jan Beulich
>>> On 04.02.15 at 04:28, wrote: > --- a/xen/arch/x86/hvm/mtrr.c > +++ b/xen/arch/x86/hvm/mtrr.c > @@ -791,7 +791,7 @@ HVM_REGISTER_SAVE_RESTORE(MTRR, hvm_save_mtrr_msr, > hvm_load_mtrr_msr, > > void memory_type_changed(struct domain *d) > { > -if ( iommu_enabled && d->vcpu && d->vcpu[0]

Re: [Xen-devel] [PATCH] Avoid needless flush cache when guest change MTRR

2015-02-03 Thread Tian, Kevin
> From: Zhang, Yang Z > Sent: Wednesday, February 04, 2015 1:54 PM > > Tian, Kevin wrote on 2015-02-04: > >> From: Li, Liang Z > >> Sent: Wednesday, February 04, 2015 11:28 AM > >> > >> Flushing cache is needed only when guest has IOMMU device, using > >> need_iommu(d) can minimize the impact to g

Re: [Xen-devel] [PATCH] Avoid needless flush cache when guest change MTRR

2015-02-03 Thread Zhang, Yang Z
Tian, Kevin wrote on 2015-02-04: >> From: Li, Liang Z >> Sent: Wednesday, February 04, 2015 11:28 AM >> >> Flushing cache is needed only when guest has IOMMU device, using >> need_iommu(d) can minimize the impact to guest with device assigned, >> since a guest may be hot plugged with a device thus

Re: [Xen-devel] [PATCH] Avoid needless flush cache when guest change MTRR

2015-02-03 Thread Tian, Kevin
> From: Li, Liang Z > Sent: Wednesday, February 04, 2015 11:28 AM > > Flushing cache is needed only when guest has IOMMU device, using > need_iommu(d) can minimize the impact to guest with device assigned, > since a guest may be hot plugged with a device thus there may be dirty > cache lines befor

[Xen-devel] [PATCH] Avoid needless flush cache when guest change MTRR

2015-02-03 Thread Liang Li
Flushing cache is needed only when guest has IOMMU device, using need_iommu(d) can minimize the impact to guest with device assigned, since a guest may be hot plugged with a device thus there may be dirty cache lines before need_iommu(d) becoming true, force the flush_all when the first device is a