From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 3/4] xen/arm: clean and invalidate all guest caches by VMID after domain build. Date: Thu, 06 Feb 2014 14:26:03 +0000 Message-ID: <52F39B7B.3090208@linaro.org> References: <1391616214.23098.9.camel@kazak.uk.xensource.com> <1391616235-22703-3-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1391616235-22703-3-git-send-email-ian.campbell@citrix.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 , xen-devel@lists.xen.org Cc: keir@xen.org, tim@xen.org, ian.jackson@eu.citrix.com, jbeulich@suse.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 05/02/14 16:03, Ian Campbell wrote: > Guests are initially started with caches disabled and so we need to make sure > they see consistent data in RAM (requiring a cache clean) but also that they > do not have old stale data suddenly appear in the caches when they enable > their caches (requiring the invalidate). > > This can be split into two halves. First we must flush each page as it is > allocated to the guest. It is not sufficient to do the flush at scrub time > since this will miss pages which are ballooned out by the guest (where the > guest must scrub if it cares about not leaking the pagecontent). We need to > clean as well as invalidate to make sure that any scrubbing which has occured > gets committed to real RAM. To achieve this add a new cacheflush_page function, > which is a stub on x86. > > Secondly we need to flush anything which the domain builder touches, which we > do via a new domctl. As I understand, there is no hypercall continuation so if a domain give a big range Xen will get stuck for a long time (no softirq will be handled on the current processor ...). Shall we at least use hypercall_create_continuation? -- Julien Grall