All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, tim@xen.org,
	stefano.stabellini@citrix.com
Subject: Re: [PATCH] xen/arm: create_p2m_entries has to flush TLBs on every CPU
Date: Wed, 23 Apr 2014 12:22:48 +0100	[thread overview]
Message-ID: <5357A288.8070803@linaro.org> (raw)
In-Reply-To: <1398251165.18537.34.camel@kazak.uk.xensource.com>

Hi Ian,

On 04/23/2014 12:06 PM, Ian Campbell wrote:
> On Fri, 2014-04-18 at 17:12 +0100, Julien Grall wrote:
>> The function create_p2m_entries creates mappings in second-level page tables
>> which is shared between every CPU.
> 
> You say create_p2m_entries twice but then patch create_xen_entries. Is
> it the patch or the description which is wrong?

The description is wrong, sorry. I will send a new version of this patch.

> 
>> Only flushing TLBs on local processor may result to wrong behaviour
>> when io{re,un}map is used.
> 
> From this sounds like it's the desription?
> 
>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>> ---
>>
>> This patch is candidate to be backported to Xen 4.4.
>>
>> create_p2m_entries is only used by vmap ( iore{,un}map functions.
>>
>> Upstream Xen 4.4 calls these functions only when 1 CPU is online so it's
>> "safe". People might want to use them when multiple CPUs are online.
>>
>> Ian: Do you plan to backport your tlb series? If not, this patch will have
>> to slighty change because Xen 4.4 doesn't have TLBs helper to flush xen
>> data on every cpus.
> 
> I wasn't planning to backport the tlb series, but I could look at
> backporting the required bits I suppose.
> 
> However, is it needed? Does 4.4 make any ioremap calls where this would
> actually hurt? I think all the uses in xen/arch/arm/platforms/*.c are
> short lived and only accessed from the current cpu. The one in
> xen/drivers/video/arm_hdlcd.c is done before we go SMP anyway.

There is some in serials drivers. I was thinking about people making
product based Xen 4.4. They might use io{re,un}map in their own code
with all CPUs up.

Regards,

-- 
Julien Grall

      reply	other threads:[~2014-04-23 11:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18 16:12 [PATCH] xen/arm: create_p2m_entries has to flush TLBs on every CPU Julien Grall
2014-04-23 11:06 ` Ian Campbell
2014-04-23 11:22   ` Julien Grall [this message]

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=5357A288.8070803@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.