From: "Jan Beulich" Subject: Re: [PATCH] x86: don't use VA for cache flush when also flushing TLB Date: Wed, 28 May 2014 07:56:03 +0100 Message-ID: <5385A4A30200007800016340@mail.emea.novell.com> References: <538330EF0200007800015B4B@mail.emea.novell.com> <53836DCA.8090907@citrix.com> <538474A10200007800015EBD@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WpXmP-0002QH-5q for xen-devel@lists.xenproject.org; Wed, 28 May 2014 06:56:05 +0000 In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Yang Z Zhang Cc: Andrew Cooper , Keir Fraser , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 28.05.14 at 06:35, wrote: > Besides, I am thinking should we flush cache unconditionally, e.g., if all > agents that able to access memory have the snooping capability, then software > is not required to flush cache always.(If I am wrong, please correct me and > ignore the following changes). So is there any problem with this change? > @@ -145,7 +145,7 @@ void flush_area_local(const void *va, unsigned int flags) > } > } > > - if ( flags & FLUSH_CACHE ) > + if ( flags & FLUSH_CACHE && !(iommu_enable && iommu_snoop)) > { > unsigned long i, sz = 0; At least the iommu_snoop part was discussed at length a couple of weeks back: I don't see how this relates to cache flushing requirements. I also don't see how IOMMU presence/absence would matter here - the behavior should clearly be identical between systems with and without IOMMU. Jan