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

[Xen-devel] [PATCH v1 2/4] xen-version: Add third parameter (len) to the do_version hypercall.



All existing commands ignore the parameter so this does
not break the ABI. This paves the way for expanding the XENVER_
hypercall with variable size structures, such as
"XENVER_build_id: Provide ld-embedded build-ids"

Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 xen/arch/arm/traps.c        | 2 +-
 xen/common/kernel.c         | 3 ++-
 xen/include/xen/hypercall.h | 6 ++++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index 9d2bd6a..9d687c4 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1223,7 +1223,7 @@ static arm_hypercall_t arm_hypercall_table[] = {
     HYPERCALL(sched_op, 2),
     HYPERCALL_DEPRECATED(sched_op_compat, 2),
     HYPERCALL(console_io, 3),
-    HYPERCALL(xen_version, 2),
+    HYPERCALL(xen_version, 3),
     HYPERCALL(xsm_op, 1),
     HYPERCALL(event_channel_op, 2),
     HYPERCALL_DEPRECATED(event_channel_op_compat, 1),
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 210ec99..7bab8de 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -230,7 +230,8 @@ void __init do_initcalls(void)
 #define XENVER_CMD_XSM_CHECK    ( (1U << XENVER_compile_info) | \
                                   (1U << XENVER_changeset) | \
                                   (1U << XENVER_commandline) )
-DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
+DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg,
+                unsigned int len)
 {
     if ( ( 1 << cmd ) & XENVER_CMD_XSM_CHECK )
     {
diff --git a/xen/include/xen/hypercall.h b/xen/include/xen/hypercall.h
index 26cb615..59b63ee 100644
--- a/xen/include/xen/hypercall.h
+++ b/xen/include/xen/hypercall.h
@@ -83,7 +83,8 @@ do_event_channel_op(
 extern long
 do_xen_version(
     int cmd,
-    XEN_GUEST_HANDLE_PARAM(void) arg);
+    XEN_GUEST_HANDLE_PARAM(void) arg,
+    unsigned int len);
 
 extern long
 do_console_io(
@@ -168,7 +169,8 @@ compat_xenoprof_op(int op, XEN_GUEST_HANDLE_PARAM(void) 
arg);
 extern int
 compat_xen_version(
     int cmd,
-    XEN_GUEST_HANDLE_PARAM(void) arg);
+    XEN_GUEST_HANDLE_PARAM(void) arg,
+    unsigned int len);
 
 extern int
 compat_sched_op(
-- 
2.1.0


_______________________________________________
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®.