xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xen.org>
To: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Mats Petersson <mats.petersson@citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range.
Date: Wed, 16 Jan 2013 15:03:17 +0000	[thread overview]
Message-ID: <CD1C71B5.58B57%keir@xen.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1301161439320.4978@kaball.uk.xensource.com>

Acked-by: Keir Fraser <keir@xen.org>

On 16/01/2013 14:39, "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>
wrote:

> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> On Wed, 16 Jan 2013, Ian Campbell wrote:
>> Any Acks/Nacks?
>> 
>> This touches both ARM and x86 (although x86 only notionally until the
>> PVH stuff is merged).
>> 
>> On Fri, 2013-01-04 at 14:03 +0000, Ian Campbell wrote:
>>> Since ARM and PVH dom0 kernel use this to map foreign domain pages
>>> they could in the future hit paged out or shared pages etc and
>>> therefore need to propagate which frames are -ENOENT and which failed
>>> for some other reason.
>>> 
>>> We have not yet released a version of Xen with this particular
>>> hypercall subop so we can change the interface without worrying about
>>> compatibility (I think/hope).
>>> 
>>> This would be used by the privcmd driver, in particular it relates to
>>> Mats' patch "improve performance of MMAPBATCH_V2."
>>> 
>>> NB I have only implemented the ARM side since the PVH side isn't in
>>> tree yet.
>>> 
>>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>>> Cc: Mats Petersson <mats.petersson@citrix.com>
>>> Cc: Mukesh Rathor <mukesh.rathor@oracle.com>
>>> Cc: Jan Beulich <JBeulich@suse.com>
>>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>>> Cc: tim@xen.org
>>> Cc: stefano.stabellini@citrix.com
>>> Cc: keir@xen.org
>>> ---
>>>  xen/arch/arm/mm.c           |    4 ++++
>>>  xen/include/public/memory.h |    8 +++++++-
>>>  2 files changed, 11 insertions(+), 1 deletions(-)
>>> 
>>> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
>>> index d97b3ea..945e7ac 100644
>>> --- a/xen/arch/arm/mm.c
>>> +++ b/xen/arch/arm/mm.c
>>> @@ -612,6 +612,10 @@ static int xenmem_add_to_physmap_range(struct domain
>>> *d,
>>>                                         xatpr->foreign_domid,
>>>                                         idx, gpfn);
>>>  
>>> +        rc = copy_to_guest_offset(xatpr->errs, xatpr->size-1, &rc, 1);
>>> +        if ( rc < 0 )
>>> +            goto out;
>>> +
>>>          xatpr->size--;
>>>  
>>>          /* Check for continuation if it's not the last interation */
>>> diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
>>> index 3ee2902..62acabd 100644
>>> --- a/xen/include/public/memory.h
>>> +++ b/xen/include/public/memory.h
>>> @@ -236,6 +236,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
>>>  /* A batched version of add_to_physmap. */
>>>  #define XENMEM_add_to_physmap_range 23
>>>  struct xen_add_to_physmap_range {
>>> +    /* IN */
>>>      /* Which domain to change the mapping for. */
>>>      domid_t domid;
>>>      uint16_t space; /* => enum phys_map_space */
>>> @@ -247,8 +248,13 @@ struct xen_add_to_physmap_range {
>>>      /* Indexes into space being mapped. */
>>>      XEN_GUEST_HANDLE(xen_ulong_t) idxs;
>>>  
>>> -    /* GPFN in domdwhere the source mapping page should appear. */
>>> +    /* GPFN in domid where the source mapping page should appear. */
>>>      XEN_GUEST_HANDLE(xen_pfn_t) gpfns;
>>> +
>>> +    /* OUT */
>>> +
>>> +    /* Per index error code. */
>>> +    XEN_GUEST_HANDLE(int) errs;
>>>  };
>>>  typedef struct xen_add_to_physmap_range xen_add_to_physmap_range_t;
>>>  DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_range_t);
>> 
>> 
>> 

  reply	other threads:[~2013-01-16 15:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 14:03 [PATCH] xen: return a per-mapping error from XENMEM_add_to_physmap_range Ian Campbell
2013-01-04 14:04 ` Ian Campbell
2013-01-16 14:28 ` Ian Campbell
2013-01-16 14:39   ` Stefano Stabellini
2013-01-16 15:03     ` Keir Fraser [this message]
2013-01-16 15:07   ` Mats Petersson
2013-01-16 17:22   ` Konrad Rzeszutek Wilk
2013-01-17 16:49     ` 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=CD1C71B5.58B57%keir@xen.org \
    --to=keir@xen.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=mats.petersson@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 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).