All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Anup Patel <apatel@apm.com>,
	Andre Przywara <andre.przywara@calxeda.com>,
	Tim Deegan <tim@xen.org>,
	Pranavkumar Sawargaonkar <psawargaonkar@apm.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2] tools: libxc: flush data cache after loading images into guest memory
Date: Mon, 16 Dec 2013 00:49:30 +0000	[thread overview]
Message-ID: <52AE4E1A.6070007@linaro.org> (raw)
In-Reply-To: <1386939215.20787.87.camel@dagon.hellion.org.uk>



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

  reply	other threads:[~2013-12-16  0:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 12:21 [PATCH] tools: libxc: flush data cache after loading images into guest memory Ian Campbell
2013-12-12 14:11 ` Julien Grall
2013-12-12 14:23 ` [PATCH v2] " Ian Campbell
2013-12-12 14:30   ` Stefano Stabellini
2013-12-12 14:37     ` Ian Campbell
2013-12-12 14:45       ` Stefano Stabellini
2013-12-12 14:49         ` Ian Campbell
2013-12-12 17:31   ` Ian Campbell
2013-12-12 17:52     ` Ian Jackson
2013-12-12 19:32       ` Ian Campbell
2013-12-12 19:43         ` Ian Jackson
2013-12-12 17:33   ` Ian Campbell
2013-12-13  0:49   ` Julien Grall
2013-12-13  8:26     ` Ian Campbell
2013-12-13 12:01       ` Stefano Stabellini
2013-12-13 12:53         ` Ian Campbell
2013-12-16  0:49           ` Julien Grall [this message]
2013-12-16 11:05             ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52AE4E1A.6070007@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=andre.przywara@calxeda.com \
    --cc=apatel@apm.com \
    --cc=psawargaonkar@apm.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.