xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 2/18 V2]: PVH xen: add XENMEM_add_to_physmap_range
Date: Wed, 20 Mar 2013 18:01:39 -0700	[thread overview]
Message-ID: <20130320180139.7d65354b@mantra.us.oracle.com> (raw)
In-Reply-To: <51470ACC02000078000C64CB@nat28.tlf.novell.com>

On Mon, 18 Mar 2013 11:38:35 +0000
"Jan Beulich" <JBeulich@suse.com> wrote:

> >>> On 16.03.13 at 01:20, Mukesh Rathor <mukesh.rathor@oracle.com>
> >>> wrote:
> > +        struct xen_add_to_physmap_range xatpr;
> > +        struct domain *d;
> > +
> > +        if ( copy_from_guest(&xatpr, arg, 1) )
> > +            return -EFAULT;
> > +
> > +        rc = rcu_lock_target_domain_by_id(xatpr.domid, &d);
> > +        if ( rc != 0 )
> > +            return rc;
> > +
> > +        rc = xenmem_add_to_physmap_range(d, &xatpr);
> > +
> > +        rcu_unlock_domain(d);
> > +
> > +        if ( rc && copy_to_guest(arg, &xatpr, 1) )
> 
> For one, shouldn't this be "!rc"?
> 
> And then you update ->size, but that one is specified to be only
> and IN field. And considering that "errs" is the only OUT one, yet
> that isn't even formally correct (because the field itself is an IN,
> its what it points to where the output goes), I don't see why you
> would need to copy back any part of the structure.

Ah, I see the struct got updated. Konrad, do you have updated version
of the struct with following added to the end:

struct xen_add_to_physmap_range {
....
    /* OUT */
        
    /* Per index error code. */
    XEN_GUEST_HANDLE(int) errs;

in the latest linux tree?

thanks,
Mukesh

  parent reply	other threads:[~2013-03-21  1:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-16  0:20 [PATCH 2/18 V2]: PVH xen: add XENMEM_add_to_physmap_range Mukesh Rathor
2013-03-18 11:38 ` Jan Beulich
2013-03-18 20:15   ` Konrad Rzeszutek Wilk
2013-03-19  8:40     ` Jan Beulich
2013-03-19 13:40       ` Konrad Rzeszutek Wilk
2013-03-19 14:06         ` Jan Beulich
2013-03-21  1:01   ` Mukesh Rathor [this message]
2013-03-21 18:39     ` Konrad Rzeszutek Wilk
2013-03-18 13:59 ` Konrad Rzeszutek Wilk
2013-03-18 14:28 ` Konrad Rzeszutek Wilk
2013-03-18 15:25   ` Jan Beulich
2013-03-18 16:38     ` Konrad Rzeszutek Wilk
2013-03-21 14:53 ` Tim Deegan

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=20130320180139.7d65354b@mantra.us.oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=konrad.wilk@oracle.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).