From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: [PATCH 1/5] xen: improve changes to xen_add_to_physmap Date: Mon, 6 Aug 2012 15:12:01 +0100 Message-ID: <1344262325-26598-1-git-send-email-stefano.stabellini@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: Tim.Deegan@citrix.com, Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- 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; #define XENMAPIDX_grant_table_status 0x80000000 -- 1.7.2.5