From: "Jan Beulich" Subject: Re: [PATCH v2] x86/HVM: Avoid cache flush operations during hvm_load Date: Tue, 02 Jun 2015 14:02:53 +0100 Message-ID: <556DC59D020000780008041A@mail.emea.novell.com> References: <1433249220-23845-1-git-send-email-ross.lagerwall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1433249220-23845-1-git-send-email-ross.lagerwall@citrix.com> 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: Ross Lagerwall Cc: Andrew Cooper , Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 02.06.15 at 14:47, wrote: > +void arch_hvm_load_post(struct domain *d) > +{ > + /* Re-enable cache flushes and flush the cache. */ > + this_cpu(memory_type_changed_ignore) = 0; > + memory_type_changed(d); > +} Does this really need to be done unconditionally? I.e. couldn't this be a tristate, with memory_type_changed() e.g. flipping its sign when it gets actually called? Also, are we certain that memory_type_changed() will never be called from asynchronous code (i.e. this doesn't introduce a latent, hard to debug issue)? Jan