From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "Tim (Xen.org)" <tim@xen.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"Keir (Xen.org)" <keir@xen.org>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH 09/10] xen: remove XEN_GUEST_HANDLE(ulong)
Date: Thu, 18 Oct 2012 08:32:28 +0100 [thread overview]
Message-ID: <1350545548.28188.13.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <507FC2BF02000078000A2351@nat28.tlf.novell.com>
On Thu, 2012-10-18 at 07:50 +0100, Jan Beulich wrote:
> >>> On 15.10.12 at 17:20, Ian Campbell <ian.campbell@citrix.com> wrote:
> > --- a/xen/include/public/grant_table.h
> > +++ b/xen/include/public/grant_table.h
> > @@ -385,7 +385,7 @@ struct gnttab_setup_table {
> > uint32_t nr_frames;
> > /* OUT parameters. */
> > int16_t status; /* => enum grant_status */
> > - XEN_GUEST_HANDLE(ulong) frame_list;
> > + XEN_GUEST_HANDLE(xen_pfn_t) frame_list;
> > };
> > typedef struct gnttab_setup_table gnttab_setup_table_t;
> > DEFINE_XEN_GUEST_HANDLE(gnttab_setup_table_t);
> > --- a/xen/include/public/xen.h
> > +++ b/xen/include/public/xen.h
> > @@ -43,8 +43,6 @@ DEFINE_XEN_GUEST_HANDLE(char);
> > __DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
> > DEFINE_XEN_GUEST_HANDLE(int);
> > __DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
> > -DEFINE_XEN_GUEST_HANDLE(long);
> > -__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
> > DEFINE_XEN_GUEST_HANDLE(void);
> >
> > DEFINE_XEN_GUEST_HANDLE(uint64_t);
>
> These two must be wrapped in __XEN_INTERFACE_VERSION__
> conditionals (and __XEN_LATEST_INTERFACE_VERSION__ needs
> to be bumped accordingly), since the various guest handles are
> distinct types (i.e. consumers will fail to build if not updated).
Are there external consumers of gnttab_setup_table?
Nevertheless, here is the fix.
8<-----------------------------------------------------
# HG changeset patch
# User Ian Campbell <ijc@hellion.org.uk>
# Date 1350544609 -3600
# Node ID 68f0f7ed3e7b3b7b4b9dbc692a448421ebc31035
# Parent 5c402b905e00fb0871c3f439c8391dd3cfb3bc10
xen: retain ulong guest handle for older consumers.
26072:5529b91bd2e4 removed this but we need to keep it around for
older consumers. Bump __XEN_LATEST_INTERFACE_VERSION__ accordingly.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
diff -r 5c402b905e00 -r 68f0f7ed3e7b xen/include/public/grant_table.h
--- a/xen/include/public/grant_table.h Wed Oct 17 16:43:55 2012 +0100
+++ b/xen/include/public/grant_table.h Thu Oct 18 08:16:49 2012 +0100
@@ -385,7 +385,11 @@ struct gnttab_setup_table {
uint32_t nr_frames;
/* OUT parameters. */
int16_t status; /* => enum grant_status */
+#if __XEN_INTERFACE_VERSION__ < 0x00040300
+ XEN_GUEST_HANDLE(ulong) frame_list;
+#else
XEN_GUEST_HANDLE(xen_pfn_t) frame_list;
+#endif
};
typedef struct gnttab_setup_table gnttab_setup_table_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_setup_table_t);
diff -r 5c402b905e00 -r 68f0f7ed3e7b xen/include/public/xen-compat.h
--- a/xen/include/public/xen-compat.h Wed Oct 17 16:43:55 2012 +0100
+++ b/xen/include/public/xen-compat.h Thu Oct 18 08:16:49 2012 +0100
@@ -27,7 +27,7 @@
#ifndef __XEN_PUBLIC_XEN_COMPAT_H__
#define __XEN_PUBLIC_XEN_COMPAT_H__
-#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040200
+#define __XEN_LATEST_INTERFACE_VERSION__ 0x00040300
#if defined(__XEN__) || defined(__XEN_TOOLS__)
/* Xen is built with matching headers and implements the latest interface. */
diff -r 5c402b905e00 -r 68f0f7ed3e7b xen/include/public/xen.h
--- a/xen/include/public/xen.h Wed Oct 17 16:43:55 2012 +0100
+++ b/xen/include/public/xen.h Thu Oct 18 08:16:49 2012 +0100
@@ -43,6 +43,10 @@ DEFINE_XEN_GUEST_HANDLE(char);
__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
DEFINE_XEN_GUEST_HANDLE(int);
__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
+#if __XEN_INTERFACE_VERSION__ < 0x00040300
+DEFINE_XEN_GUEST_HANDLE(long);
+__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
+#endif
DEFINE_XEN_GUEST_HANDLE(void);
DEFINE_XEN_GUEST_HANDLE(uint64_t);
next prev parent reply other threads:[~2012-10-18 7:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-15 15:20 [PATCH v2 00/10] 64 bit ARM ABI, map foreign gmfn API, ARM grant tables Ian Campbell
2012-10-15 15:20 ` [PATCH 01/10] xen: arm: implement XENMEM_add_to_physmap_range Ian Campbell
2012-10-17 15:31 ` Stefano Stabellini
2012-10-17 15:38 ` Ian Campbell
2012-10-15 15:20 ` [PATCH 02/10] xen/arm: grant table Ian Campbell
2012-10-15 15:20 ` [PATCH 03/10] arm: tools: add arm to foreign structs checking Ian Campbell
2012-10-15 15:20 ` [PATCH 04/10] xen: xen_ulong_t substitution Ian Campbell
2012-10-15 15:20 ` [PATCH 05/10] xen: change the limit of nr_extents to UINT_MAX >> MEMOP_EXTENT_SHIFT Ian Campbell
2012-10-15 15:20 ` [PATCH 06/10] xen: introduce XEN_GUEST_HANDLE_PARAM Ian Campbell
2012-10-15 15:20 ` [PATCH 07/10] xen: replace XEN_GUEST_HANDLE with XEN_GUEST_HANDLE_PARAM when appropriate Ian Campbell
2012-10-15 15:20 ` [PATCH 08/10] xen: more XEN_GUEST_HANDLE_PARAM substitutions Ian Campbell
2012-10-15 15:20 ` [PATCH 09/10] xen: remove XEN_GUEST_HANDLE(ulong) Ian Campbell
2012-10-17 13:54 ` Stefano Stabellini
2012-10-18 6:50 ` Jan Beulich
2012-10-18 7:32 ` Ian Campbell [this message]
2012-10-18 7:50 ` Jan Beulich
2012-10-18 8:35 ` Ian Campbell
2012-10-15 15:20 ` [PATCH 10/10] arm: parameter guest handles are 32 bit on 32 bit hypervisor Ian Campbell
2012-10-17 13:50 ` Stefano Stabellini
2012-10-17 13:53 ` Ian Campbell
2012-10-17 15:25 ` Stefano Stabellini
2012-10-15 15:48 ` [PATCH v2 00/10] 64 bit ARM ABI, map foreign gmfn API, ARM grant tables Keir Fraser
2012-10-16 14:45 ` Ian Campbell
2012-10-17 15:44 ` Ian Campbell
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=1350545548.28188.13.camel@dagon.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--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).