Skip to contentSkip to conversation

xen/public: Clarify xen_arch_domainconfig ABI statement

PATCH In review Andrew Cooper 5 participants 6 messages May 20, 2015 – May 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/public: Clarify xen_arch_domainconfig ABI statement

This structure is used by XEN_DOMCTL_createdomain, and is liable to be modified going forwards. Explicitly state that it falls under the XEN_DOMCTL_INTERFACE_VERSION.

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Ian Campbell <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Tim Deegan <[email protected]>
CC Julien Grall <[email protected]>
CC Don Slutz <[email protected]>
---
 xen/include/public/arch-arm.h     |    4 ++++
 xen/include/public/arch-x86/xen.h |    4 ++++
 2 files changed, 8 insertions(+)
xen/include/public/arch-arm.h +4 -0
index c029e0f..6e38638 100644
@@ -309,6 +309,10 @@ struct arch_shared_info {
 typedef struct arch_shared_info arch_shared_info_t;
 typedef uint64_t xen_callback_t;
 
+/*
+ * struct xen_arch_domainconfig's ABI is covered by the
+ * XEN_DOMCTL_INTERFACE_VERSION.
+ */
 #define XEN_DOMCTL_CONFIG_GIC_DEFAULT   0
 #define XEN_DOMCTL_CONFIG_GIC_V2        1
 #define XEN_DOMCTL_CONFIG_GIC_V3        2
xen/include/public/arch-x86/xen.h +4 -0
index cea3fe7..b4ba233 100644
@@ -262,6 +262,10 @@ struct arch_shared_info {
 };
 typedef struct arch_shared_info arch_shared_info_t;
 
+/*
+ * struct xen_arch_domainconfig's ABI is covered by the
+ * XEN_DOMCTL_INTERFACE_VERSION.
+ */
 struct xen_arch_domainconfig {
     char dummy;
 };
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw

Hi Andrew,

Quoted 4 lines · Andrew Cooper

This structure is used by XEN_DOMCTL_createdomain, and is liable to be modified going forwards. Explicitly state that it falls under the XEN_DOMCTL_INTERFACE_VERSION.

Quoted 8 lines
CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Ian Campbell <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Tim Deegan <[email protected]>
CC Julien Grall <[email protected]>
CC Don Slutz <[email protected]>

Regards,

Signature · 1 line
Julien Grall
Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrew Cooper
Quoted 4 lines · Andrew Cooper

This structure is used by XEN_DOMCTL_createdomain, and is liable to be modified going forwards. Explicitly state that it falls under the XEN_DOMCTL_INTERFACE_VERSION.

Looks good to me.

-Don Slutz

Quoted 44 lines
CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Ian Campbell <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Tim Deegan <[email protected]>
CC Julien Grall <[email protected]>
CC Don Slutz <[email protected]>
---
 xen/include/public/arch-arm.h     |    4 ++++
 xen/include/public/arch-x86/xen.h |    4 ++++
 2 files changed, 8 insertions(+)
xen/include/public/arch-arm.h +4 -0
index c029e0f..6e38638 100644
@@ -309,6 +309,10 @@ struct arch_shared_info {
 typedef struct arch_shared_info arch_shared_info_t;
 typedef uint64_t xen_callback_t;
 
+/*
+ * struct xen_arch_domainconfig's ABI is covered by the
+ * XEN_DOMCTL_INTERFACE_VERSION.
+ */
 #define XEN_DOMCTL_CONFIG_GIC_DEFAULT   0
 #define XEN_DOMCTL_CONFIG_GIC_V2        1
 #define XEN_DOMCTL_CONFIG_GIC_V3        2
xen/include/public/arch-x86/xen.h +4 -0
index cea3fe7..b4ba233 100644
@@ -262,6 +262,10 @@ struct arch_shared_info {
 };
 typedef struct arch_shared_info arch_shared_info_t;
 
+/*
+ * struct xen_arch_domainconfig's ABI is covered by the
+ * XEN_DOMCTL_INTERFACE_VERSION.
+ */
 struct xen_arch_domainconfig {
     char dummy;
 };
#3 lore raw

PATCH 1/1 public: restrict xen_arch_domainconfig visibility

In reply to Andrew Cooper
Quoted 1 line
Quoted 1 line
Quoted 1 line · On 20.05.15 at 15:10, <[email protected]> wrote:

As an extension to 931f5777c7 ("public: clarify xen_arch_domainconfig ABI statement") limit the respective definitions' visibility to hypervisor and tools.

xen/include/public/arch-arm.h +15 -15
@@ -298,7 +298,21 @@ struct vcpu_guest_context {
 };
 typedef struct vcpu_guest_context vcpu_guest_context_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
-#endif
+
+/*
+ * struct xen_arch_domainconfig's ABI is covered by
+ * XEN_DOMCTL_INTERFACE_VERSION.
+ */
+#define XEN_DOMCTL_CONFIG_GIC_DEFAULT   0
+#define XEN_DOMCTL_CONFIG_GIC_V2        1
+#define XEN_DOMCTL_CONFIG_GIC_V3        2
+struct xen_arch_domainconfig {
+    /* IN/OUT */
+    uint8_t gic_version;
+    /* IN */
+    uint32_t nr_spis;
+};
+#endif /* __XEN__ || __XEN_TOOLS__ */
 
 struct arch_vcpu_info {
 };
@@ -309,20 +323,6 @@ struct arch_shared_info {
 typedef struct arch_shared_info arch_shared_info_t;
 typedef uint64_t xen_callback_t;
 
-/*
- * struct xen_arch_domainconfig's ABI is covered by
- * XEN_DOMCTL_INTERFACE_VERSION.
- */
-#define XEN_DOMCTL_CONFIG_GIC_DEFAULT   0
-#define XEN_DOMCTL_CONFIG_GIC_V2        1
-#define XEN_DOMCTL_CONFIG_GIC_V3        2
-struct xen_arch_domainconfig {
-    /* IN/OUT */
-    uint8_t gic_version;
-    /* IN */
-    uint32_t nr_spis;
-};
-
 #endif
 
 #if defined(__XEN__) || defined(__XEN_TOOLS__)
xen/include/public/arch-x86/xen.h +2 -0
@@ -262,6 +262,7 @@ struct arch_shared_info {
 };
 typedef struct arch_shared_info arch_shared_info_t;
 
+#if defined(__XEN__) || defined(__XEN_TOOLS__)
 /*
  * struct xen_arch_domainconfig's ABI is covered by
  * XEN_DOMCTL_INTERFACE_VERSION.
@@ -269,6 +270,7 @@ typedef struct arch_shared_
 struct xen_arch_domainconfig {
     char dummy;
 };
+#endif
 
 #endif /* !__ASSEMBLY__ */
#5 lore raw

Re: [PATCH] public: restrict xen_arch_domainconfig visibility

In reply to Jan Beulich
Quoted 6 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line · On 20.05.15 at 15:10, <[email protected]> wrote:

As an extension to 931f5777c7 ("public: clarify xen_arch_domainconfig ABI statement") limit the respective definitions' visibility to hypervisor and tools.

Ah yes - I should have considered this when doing my patch. Sorry.

~Andrew