From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/18 V2]: PVH xen: add XENMEM_add_to_physmap_range Date: Thu, 21 Mar 2013 14:39:51 -0400 Message-ID: <20130321183951.GB27178@phenom.dumpdata.com> References: <20130315172018.395bbbe3@mantra.us.oracle.com> <51470ACC02000078000C64CB@nat28.tlf.novell.com> <20130320180139.7d65354b@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20130320180139.7d65354b@mantra.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor Cc: Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, Mar 20, 2013 at 06:01:39PM -0700, Mukesh Rathor wrote: > On Mon, 18 Mar 2013 11:38:35 +0000 > "Jan Beulich" wrote: > > > >>> On 16.03.13 at 01:20, Mukesh Rathor > > >>> 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? Yes. 5caed269ea867f36225376a6546411ed7c106226 xen: implement updated XENMEM_add_to_physmap_range ABI Allows for more fine grained error reporting. Only used by PVH and ARM both of which are marked EXPERIMENTAL precisely because the ABI is not yet stable > > thanks, > Mukesh > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >