From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
<xen-devel@lists.xensource.com>, <linux-kernel@vger.kernel.org>,
<dcrisan@flexiant.com>, <alex@alex.org.uk>,
<ian.campbell@citrix.com>
Subject: Re: [PATCH v4 2/2] xen/m2p: use GNTTABOP_unmap_and_replace to reinstate the original mapping
Date: Tue, 13 Aug 2013 16:38:51 +0100 [thread overview]
Message-ID: <alpine.DEB.2.02.1308131638460.4893@kaball.uk.xensource.com> (raw)
In-Reply-To: <20130813131131.GA6359@phenom.dumpdata.com>
On Tue, 13 Aug 2013, Konrad Rzeszutek Wilk wrote:
> On Tue, Aug 13, 2013 at 12:17:18PM +0100, Stefano Stabellini wrote:
> > On Fri, 9 Aug 2013, Konrad Rzeszutek Wilk wrote:
> > > On Sun, Aug 04, 2013 at 03:39:41PM +0100, Stefano Stabellini wrote:
> > > > GNTTABOP_unmap_grant_ref unmaps a grant and replaces it with a 0
> > > > mapping instead of reinstating the original mapping.
> > > > Doing so separately would be racy.
> > > >
> > > > To unmap a grant and reinstate the original mapping atomically we use
> > > > GNTTABOP_unmap_and_replace.
> > > > GNTTABOP_unmap_and_replace doesn't work with GNTMAP_contains_pte, so
> > > > don't use it for kmaps. GNTTABOP_unmap_and_replace zeroes the mapping
> > > > passed in new_addr so we have to reinstate it, however that is a
> > > > per-cpu mapping only used for balloon scratch pages, so we can be sure that
> > > > it's not going to be accessed while the mapping is not valid.
> > >
> > > This looks to be depend on a new structure, which is not in Linux kernel?
> > > Are you missing a dependency patch?
> >
> > Nope, GNTTABOP_unmap_and_replace and struct gnttab_unmap_and_replace are
> > already present in include/xen/interface/grant_table.h.
> >
> >
> > > Shouldn't we use some logic to figure out which hypercall to use if the
> > > hypervisor does not support it?
> >
> > GNTTABOP_unmap_and_replace is not a new hypercall, it has been supported
> > by Xen for a very long time.
> >
> > In a previous iteration of this patch series, I did introduce a new
> > hypercall, but then I dropped it because I figured out that I could
> > achieve the same thing with the existing hypercall.
>
> OK, Please tack on:
>
> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> P.S.
> If you could stick it on devel/for-linus-3.12 that would be super. Thanks!
done!
prev parent reply other threads:[~2013-08-13 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.02.1308041531220.4893@kaball.uk.xensource.com>
2013-08-04 14:39 ` [PATCH v4 1/2] xen/balloon: set a mapping for ballooned out pages Stefano Stabellini
2013-08-04 14:39 ` [PATCH v4 2/2] xen/m2p: use GNTTABOP_unmap_and_replace to reinstate the original mapping Stefano Stabellini
2013-08-09 15:26 ` Konrad Rzeszutek Wilk
2013-08-13 11:17 ` Stefano Stabellini
2013-08-13 13:11 ` Konrad Rzeszutek Wilk
2013-08-13 15:38 ` Stefano Stabellini [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=alpine.DEB.2.02.1308131638460.4893@kaball.uk.xensource.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=alex@alex.org.uk \
--cc=dcrisan@flexiant.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/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
all inboxes | Powered by JetHome®