From: Tim Deegan <tim@xen.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
jaeyong.yoo@samsung.com,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] ARM: cache coherence problem in guestcopy.c
Date: Thu, 20 Jun 2013 13:19:52 +0100 [thread overview]
Message-ID: <20130620121952.GD44917@ocelot.phlegethon.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1306201252170.4548@kaball.uk.xensource.com>
At 12:55 +0100 on 20 Jun (1371732938), Stefano Stabellini wrote:
> On Tue, 18 Jun 2013, Ian Campbell wrote:
> > On Tue, 2013-06-18 at 12:05 +0000, Jaeyong Yoo wrote:
> > > > We were also speculating that we probably want some DMBs in
> > > > context_switch_{from,to} as well as at return_to_guest.
> > >
> > > Actually, I just learned ReOrder Buffer, and it looks like so.
> >
> > Right. Tim and I were speculating about where and why the barriers were
> > needed:
> >
> > In unmap_domain_page: This ensures any writes to domain memory via the
> > Xen mapping are seen by subsequent accesses via the guest mapping.
> > Likewise map_domain_page needs one to ensure that previous accesses via
> > the guest mapping will be observed (this is the issue you observed).
>
> What if the guest doesn't have caching enabled?
Erk! I think we can mandate that the guest use caching for memory it
shares with the hypervisor (i.e. hypercall args & responses, shared
pages, granted pages). Otherwise we end up flushing the dcache before
and after every copy.
In any case, this is something that should get documented. :)
> > In context_switch_from: To ensure any writes done on a VCPU are seen
> > before it is rescheduled, potentially on another PCPU. It seems likely
> > that you'd want one in context_switch_to for the complementary reasons,
>
> Is the cache shared across multiple pcpus? Because if it isn't then we
> need to flush the dcache in this case.
AIUI this is what marking accesses 'shareable' is for: to tell the caches
to keep them coherent. If not, we're equally in trouble for all Xen's
internal data structures.
Tim.
next prev parent reply other threads:[~2013-06-20 12:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 12:05 [PATCH] ARM: cache coherence problem in guestcopy.c Jaeyong Yoo
2013-06-18 12:18 ` Ian Campbell
2013-06-19 15:12 ` Ian Campbell
2013-06-20 11:55 ` Stefano Stabellini
2013-06-20 12:19 ` Tim Deegan [this message]
2013-06-25 9:43 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2013-06-20 8:34 Jaeyong Yoo
2013-06-25 9:22 ` Ian Campbell
2013-07-02 9:38 ` Ian Campbell
2013-07-02 12:14 ` Sengul Thomas
2013-07-02 12:24 ` Sengul Thomas
2013-07-02 12:33 ` Ian Campbell
2013-07-02 12:39 ` Sengul Thomas
2013-06-18 11:22 Jaeyong Yoo
2013-06-18 11:45 ` Ian Campbell
2013-06-18 5:03 Jaeyong Yoo
2013-06-18 9:20 ` 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=20130620121952.GD44917@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=Ian.Campbell@citrix.com \
--cc=jaeyong.yoo@samsung.com \
--cc=stefano.stabellini@eu.citrix.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).