From: Ian Campbell Subject: Re: [PATCH v2 3/4] xen/arm: clean and invalidate all guest caches by VMID after domain build. Date: Thu, 6 Feb 2014 10:28:01 +0000 Message-ID: <1391682481.23098.42.camel@kazak.uk.xensource.com> References: <1391616214.23098.9.camel@kazak.uk.xensource.com> <1391616235-22703-3-git-send-email-ian.campbell@citrix.com> <52F3699E0200007800119AE3@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52F3699E0200007800119AE3@nat28.tlf.novell.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: Jan Beulich Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, tim@xen.org, julien.grall@linaro.org, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, 2014-02-06 at 09:53 +0000, Jan Beulich wrote: > >>> On 05.02.14 at 17:03, Ian Campbell wrote: > > --- a/tools/libxc/xc_domain.c > > +++ b/tools/libxc/xc_domain.c > > @@ -48,6 +48,16 @@ int xc_domain_create(xc_interface *xch, > > return 0; > > } > > > > +int xc_domain_cacheflush(xc_interface *xch, uint32_t domid, > > + xen_pfn_t start_pfn, xen_pfn_t nr_pfns) > > +{ > > + DECLARE_DOMCTL; > > + domctl.cmd = XEN_DOMCTL_cacheflush; > > + domctl.domain = (domid_t)domid; > > + domctl.u.cacheflush.start_pfn = start_pfn; > > + domctl.u.cacheflush.end_pfn = start_pfn + nr_pfns; > > + return do_domctl(xch, &domctl); > > +} > > I'm confused - both in the overview mail and in domctl.h below > you state the range to now be inclusive, yet neither here nor > in the hypervisor changes this seems to actually be the case > (unless the earlier "rename ..." patches now did more than just > renaming - I didn't look at them). Yes, I think I got myself confused. I've actually now concluded that the start + nr interface should be pushed down into the domctl layer too -- that seems to be the common idiom and is less prone to confusion... > > > --- a/tools/libxc/xenctrl.h > > +++ b/tools/libxc/xenctrl.h > > @@ -454,7 +454,6 @@ int xc_domain_create(xc_interface *xch, > > uint32_t flags, > > uint32_t *pdomid); > > > > - > > /* Functions to produce a dump of a given domain > > * xc_domain_dumpcore - produces a dump to a specified file > > * xc_domain_dumpcore_via_callback - produces a dump, using a specified > > Stray leftover change? Yes, will remove. Ian