From: Ian Jackson Subject: Re: [PATCH v2] tools: libxc: flush data cache after loading images into guest memory Date: Thu, 12 Dec 2013 17:52:21 +0000 Message-ID: <21161.63445.82446.927215@mariner.uk.xensource.com> References: <1386850863-16373-1-git-send-email-ian.campbell@citrix.com> <1386858199-18882-1-git-send-email-ian.campbell@citrix.com> <1386869495.20076.22.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386869495.20076.22.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Andre Przywara , stefano.stabellini@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, xen-devel@lists.xen.org, Anup Patel , Pranavkumar Sawargaonkar List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [PATCH v2] tools: libxc: flush data cache after loading images into guest memory"): > Since this is a tool patch more than and ARM one I should have CCd you, > sorry. NP. I haven't really any comment on whether your cache flushes are good or not, but two things occur to me: * Are there other situations where the toolstack (or device model) maps domain memory, which also need to be treated ? * This: > > +static void minios_privcmd_cache_flush(xc_interface *xch, > > + const void *ptr, size_t nr) > > +{ > > +#if defined(__i386__) || defined(__x86_64__) > > + /* No need for cache maintenance on x86 */ > > +#else > > + PERROR("No cache flush operation defined for architecture"); > > +#endif > > +} That appears to just print a warning message to a file no-one will read. I think it should crash. You may save some code by having a single unimplemented_cache_flush function to put in all these structs. Ian.