[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V1 PATCH 4/5] PVH xen tools: xenstored changes
On Wed, 2013-09-04 at 18:32 -0700, Mukesh Rathor wrote: > Allow map_interface in xenstored to revert to the old > xc_map_foreign_range if xc_gnttab_map_grant_ref is unable > to map the mfn because the guest is auto translate. Please can you describe here when/why this might be the case. Also you change is messing up the indentation. xenstored uses hard tabs. > Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> > --- > tools/xenstore/xenstored_domain.c | 12 +++++++----- > 1 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/tools/xenstore/xenstored_domain.c > b/tools/xenstore/xenstored_domain.c > index bf83d58..10c23a1 100644 > --- a/tools/xenstore/xenstored_domain.c > +++ b/tools/xenstore/xenstored_domain.c > @@ -168,13 +168,15 @@ static int readchn(struct connection *conn, void *data, > unsigned int len) > static void *map_interface(domid_t domid, unsigned long mfn) > { > if (*xcg_handle != NULL) { > - /* this is the preferred method */ > - return xc_gnttab_map_grant_ref(*xcg_handle, domid, > + void *addr; > + /* this is the preferred method */ > + addr = xc_gnttab_map_grant_ref(*xcg_handle, domid, > GNTTAB_RESERVED_XENSTORE, PROT_READ|PROT_WRITE); > - } else { > - return xc_map_foreign_range(*xc_handle, domid, > - getpagesize(), PROT_READ|PROT_WRITE, mfn); > + if (addr) > + return addr; > } > + return xc_map_foreign_range(*xc_handle, domid, > + getpagesize(), PROT_READ|PROT_WRITE, mfn); > } > > static void unmap_interface(void *interface) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |