[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/5] xen: improve changes to xen_add_to_physmap



On Mon, 6 Aug 2012, Konrad Rzeszutek Wilk wrote:
> On Mon, Aug 06, 2012 at 03:12:01PM +0100, Stefano Stabellini wrote:
> > This is an incremental patch on top of
> > c0bc926083b5987a3e9944eec2c12ad0580100e2: in order to retain binary
> > compatibility, it is better to introduce foreign_domid as part of a
> > union containing both size and foreign_domid.
> > 
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> > ---
> >  xen/include/public/memory.h |   11 +++++++----
> >  1 files changed, 7 insertions(+), 4 deletions(-)
> > 
> > diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
> > index b2adfbe..b0af2fd 100644
> > --- a/xen/include/public/memory.h
> > +++ b/xen/include/public/memory.h
> > @@ -208,8 +208,12 @@ struct xen_add_to_physmap {
> >      /* Which domain to change the mapping for. */
> >      domid_t domid;
> >  
> > -    /* Number of pages to go through for gmfn_range */
> > -    uint16_t    size;
> > +    union {
> > +        /* Number of pages to go through for gmfn_range */
> > +        uint16_t    size;
> > +        /* IFF gmfn_foreign */
> > +        domid_t foreign_domid;
> > +    };
> >  
> >      /* Source mapping space. */
> >  #define XENMAPSPACE_shared_info  0 /* shared info page */
> > @@ -217,8 +221,7 @@ struct xen_add_to_physmap {
> >  #define XENMAPSPACE_gmfn         2 /* GMFN */
> >  #define XENMAPSPACE_gmfn_range   3 /* GMFN range */
> >  #define XENMAPSPACE_gmfn_foreign 4 /* GMFN from another guest */
> > -    uint16_t space;
> > -    domid_t foreign_domid; /* IFF gmfn_foreign */
> > +    unsigned int space;
> 
> Should this be of uint32... ?

Nope: this patch is a fix for:

diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index 86d02c8..b2adfbe 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -212,11 +212,13 @@ struct xen_add_to_physmap {
     uint16_t    size;
 
     /* Source mapping space. */
-#define XENMAPSPACE_shared_info 0 /* shared info page */
-#define XENMAPSPACE_grant_table 1 /* grant table page */
-#define XENMAPSPACE_gmfn        2 /* GMFN */
-#define XENMAPSPACE_gmfn_range  3 /* GMFN range */
-    unsigned int space;
+#define XENMAPSPACE_shared_info  0 /* shared info page */
+#define XENMAPSPACE_grant_table  1 /* grant table page */
+#define XENMAPSPACE_gmfn         2 /* GMFN */
+#define XENMAPSPACE_gmfn_range   3 /* GMFN range */
+#define XENMAPSPACE_gmfn_foreign 4 /* GMFN from another guest */
+    uint16_t space;
+    domid_t foreign_domid; /* IFF gmfn_foreign */
 
 #define XENMAPIDX_grant_table_status 0x80000000

---

this is not upstream yet. So it brings space back to its original self.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.