mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Julien Grall <julien.grall@linaro.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Cc: keir@xen.org