From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2] tools: libxc: flush data cache after loading images into guest memory Date: Mon, 16 Dec 2013 00:49:30 +0000 Message-ID: <52AE4E1A.6070007@linaro.org> References: <1386850863-16373-1-git-send-email-ian.campbell@citrix.com> <1386858199-18882-1-git-send-email-ian.campbell@citrix.com> <52AA59A8.9090103@linaro.org> <1386923172.20787.65.camel@dagon.hellion.org.uk> <1386939215.20787.87.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386939215.20787.87.camel@dagon.hellion.org.uk> 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 , Stefano Stabellini Cc: Anup Patel , Andre Przywara , Tim Deegan , Pranavkumar Sawargaonkar , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 12/13/2013 12:53 PM, Ian Campbell wrote: >>> >>>> Unfortunately Linux doesn't provide any syscall to call this function >>>> for ARMv7 and it's not possible to call cache instruction from >>>> userspace. What we could do is: >>>> - Use the "flags" parameters of cacheflush syscall and call a >>>> function which DCCMVAC (for instance __cpuc_flush_dcache_area) >>>> - Extend privcmd to have a flush cache ioctl >>> >>> Personally I think the first is nicer, but ultimately we need input from >>> l-a-k on this one and would be happy with either. >> >> I agree. Can you try to come up with such a patch? There is 2 functions in kernel space to flush cache PoC: - flush_kern_dcache_area - dma_flush_range I'm not sure if one of these are suitable to expose to user space. > I think Julien was going to investigate, but if says not I'll take a > stab at it. I will try to do and send a patch tomorrow. -- Julien Grall