Skip to contentSkip to conversation

Is there a way to get the current PV domain's UUID?

PATCH In review Razvan Cojocaru 5 participants 12 messages Feb 19, 2016 – Feb 24, 2016

lore
Share & tools
lore
#0 lore raw

Hello,

Is there a way to get the UUID of a currently running PV domain, from within that domain?

Thanks,
Razvan

#2 lore raw
In reply to Razvan Cojocaru
Quoted 4 lines · Razvan Cojocaru

Hello,

Is there a way to get the UUID of a currently running PV domain, from within that domain?

The type associated with the UUID in the xen public headers is "xen_domain_handle_t" which is presumably why grepping didn't find it for you.

Look for XENVER_guest_handle.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 11 lines · Ian Campbell
Quoted 4 lines · Razvan Cojocaru

Hello,

Is there a way to get the UUID of a currently running PV domain, from within that domain?

The type associated with the UUID in the xen public headers is "xen_domain_handle_t" which is presumably why grepping didn't find it for you.

Look for XENVER_guest_handle.

Much appreciated, that's much better than the XenStore hack.

Thanks,
Razvan

#4 lore raw
Quoted 7 lines · Razvan Cojocaru
Quoted 6 lines · Ian Campbell
Quoted 4 lines · Razvan Cojocaru

Hello,

Is there a way to get the UUID of a currently running PV domain, from within that domain?

Quoted 8 lines
Quoted 6 lines

The type associated with the UUID in the xen public headers is "xen_domain_handle_t" which is presumably why grepping didn't find it for
you.

Look for XENVER_guest_handle.

Much appreciated, that's much better than the XenStore hack.

BTW, under Linux this is also exposed to userspace via /sys/hypervisor/uuid

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw

PATCH 1/1 version: Document guest_handle

In reply to Ian Campbell

And what it is usually used for.

---
 xen/include/public/version.h | 4 ++++
 1 file changed, 4 insertions(+)
xen/include/public/version.h +4 -0
index adca602..b97fc68 100644
@@ -79,6 +79,10 @@ typedef struct xen_feature_info xen_feature_info_t;
 #define XENVER_pagesize 7
 
 /* arg == xen_domain_handle_t. */
+/*
+ * The toolstack fills it out for the guest consumption. Usually it is
+ * the UUID of the guest but can be anything.
+ */
 #define XENVER_guest_handle 8
 
 #define XENVER_commandline 9
Signature · 1 line
2.5.0
#6 lore raw

Re: [PATCH] version: Document guest_handle

Quoted 12 lines · Konrad Rzeszutek Wilk

And what it is usually used for.

---
 xen/include/public/version.h | 4 ++++
 1 file changed, 4 insertions(+)
xen/include/public/version.h +0 -0
index adca602..b97fc68 100644

xen/include/public/version.h typedef struct xen_feature_info xen_feature_info_t; · line 88

Quoted 10 lines
xen/include/public/version.h +4 -0
@@ -79,6 +79,10 @@ typedef struct xen_feature_info xen_feature_info_t;
 #define XENVER_pagesize 7
 
 /* arg == xen_domain_handle_t. */
+/*
+ * The toolstack fills it out for the guest consumption. Usually it is
+ * the UUID of the guest but can be anything.
+ */
 #define XENVER_guest_handle 8
 
 #define XENVER_commandline 9

I'm not a maintainer for this code, so an Ack would be meaningless, but I just wanted to say thanks for documenting this. :)

Thanks,
Razvan

#7 lore raw

Re: [PATCH] version: Document guest_handle

Quoted 22 lines · Razvan Cojocaru
Quoted 21 lines · Konrad Rzeszutek Wilk

And what it is usually used for.

---
 xen/include/public/version.h | 4 ++++
 1 file changed, 4 insertions(+)
xen/include/public/version.h +4 -0
index adca602..b97fc68 100644
@@ -79,6 +79,10 @@ typedef struct xen_feature_info xen_feature_info_t;
 #define XENVER_pagesize 7
 
 /* arg == xen_domain_handle_t. */
+/*
+ * The toolstack fills it out for the guest consumption. Usually it is
+ * the UUID of the guest but can be anything.
+ */
 #define XENVER_guest_handle 8
 
Quoted 4 lines

xen/include/public/version.h typedef struct xen_feature_info xen_feature_info_t; · line 88

Quoted 1 line
xen/include/public/version.h +0 -0
 #define XENVER_commandline 9

I'm not a maintainer for this code, so an Ack would be meaningless, but I just wanted to say thanks for documenting this. :)

You can always do: Reviewed-by: :-)

Quoted 4 lines

Thanks,
Razvan

author Reviewed-by on v1 1/1
#8 lore raw

Re: [PATCH] version: Document guest_handle

In reply to Konrad Rzeszutek Wilk
Quoted 12 lines · Konrad Rzeszutek Wilk

And what it is usually used for.

---
 xen/include/public/version.h | 4 ++++
 1 file changed, 4 insertions(+)
xen/include/public/version.h +0 -0
index adca602..b97fc68 100644

xen/include/public/version.h typedef struct xen_feature_info xen_feature_info_t; · line 88

Quoted 10 lines
xen/include/public/version.h +4 -0
@@ -79,6 +79,10 @@ typedef struct xen_feature_info xen_feature_info_t;
 #define XENVER_pagesize 7
 
 /* arg == xen_domain_handle_t. */
+/*
+ * The toolstack fills it out for the guest consumption. Usually it is
+ * the UUID of the guest but can be anything.
+ */
 #define XENVER_guest_handle 8
 
 #define XENVER_commandline 9

Thanks,
Razvan

#9 lore raw

Re: [PATCH] version: Document guest_handle

In reply to Konrad Rzeszutek Wilk

xen/include/public/version.h typedef struct xen_feature_info xen_feature_info_t; · line 86

Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 19.02.16 at 15:32, <[email protected]> wrote:
xen/include/public/version.h +4 -0
@@ -79,6 +79,10 @@ typedef struct xen_feature_info xen_feature_info_t;
 #define XENVER_pagesize 7
 
 /* arg == xen_domain_handle_t. */
+/*
+ * The toolstack fills it out for the guest consumption. Usually it is
+ * the UUID of the guest but can be anything.
+ */
 #define XENVER_guest_handle 8

Generally fine, but I'm not overly happy with the wording. I'd prefer if it was made slightly less vague this is meant to be the UUID. Maybe "The toolstack fills it out for guest consumption. It is intended to hold the UUID of the guest"?

Jan

Reviewed-by Razvan Cojocaru Reviewed-by Razvan Cojocaru
#10 lore raw

Re: [PATCH] version: Document guest_handle

Quoted 18 lines · Jan Beulich

xen/include/public/version.h typedef struct xen_feature_info xen_feature_info_t; · line 86

Quoted 12 lines
Quoted 1 line
Quoted 1 line · On 19.02.16 at 15:32, <[email protected]> wrote:
xen/include/public/version.h +4 -0
@@ -79,6 +79,10 @@ typedef struct xen_feature_info xen_feature_info_t;
 #define XENVER_pagesize 7
 
 /* arg == xen_domain_handle_t. */
+/*
+ * The toolstack fills it out for the guest consumption. Usually it is
+ * the UUID of the guest but can be anything.
+ */
 #define XENVER_guest_handle 8

Generally fine, but I'm not overly happy with the wording. I'd prefer if it was made slightly less vague this is meant to be the UUID. Maybe "The toolstack fills it out for guest consumption. It is intended to hold the UUID of the guest"?

Quoted 2 lines

Jan

Attached as well:

Quoted 1 line

From 7da6d169835acb4aa93bfa48b1ae6b8e198f8e5f Mon Sep 17 00:00:00 2001

From: Konrad Rzeszutek Wilk <[email protected]>
Date: Fri, 19 Feb 2016 09:26:02 -0500
Subject: [PATCH] version: Document guest_handle

And what it is usually used for.

---
v2: Reword per Jan's suggestion.

---
 xen/include/public/version.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
xen/include/public/version.h +5 -1
index adca602..5e6a7ea 100644
@@ -78,7 +78,11 @@ typedef struct xen_feature_info xen_feature_info_t;
 /* arg == NULL; returns host memory page size. */
 #define XENVER_pagesize 7
 
-/* arg == xen_domain_handle_t. */
+/* arg == xen_domain_handle_t.
+ *
+ * The toolstack fills it out for guest consumption. It is intended to hold
+ * the UUID of the guest.
+ */
 #define XENVER_guest_handle 8
 
 #define XENVER_commandline 9
Signature · 1 line
2.1.0
Quoted 1 line

From 7da6d169835acb4aa93bfa48b1ae6b8e198f8e5f Mon Sep 17 00:00:00 2001

From: Konrad Rzeszutek Wilk <[email protected]>
Date: Fri, 19 Feb 2016 09:26:02 -0500
Subject: [PATCH] version: Document guest_handle

And what it is usually used for.

---
v2: Reword per Jan's suggestion.

---
 xen/include/public/version.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
xen/include/public/version.h +5 -1
index adca602..5e6a7ea 100644
@@ -78,7 +78,11 @@ typedef struct xen_feature_info xen_feature_info_t;
 /* arg == NULL; returns host memory page size. */
 #define XENVER_pagesize 7
 
-/* arg == xen_domain_handle_t. */
+/* arg == xen_domain_handle_t.
+ *
+ * The toolstack fills it out for guest consumption. It is intended to hold
+ * the UUID of the guest.
+ */
 #define XENVER_guest_handle 8
 
 #define XENVER_commandline 9
Signature · 1 line
2.1.0

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by
#11 lore raw

Re: [PATCH] version: Document guest_handle

Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 23.02.16 at 20:04, <[email protected]> wrote:

From 7da6d169835acb4aa93bfa48b1ae6b8e198f8e5f Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <[email protected]>
Date: Fri, 19 Feb 2016 09:26:02 -0500
Subject: [PATCH] version: Document guest_handle

Quoted 7 lines

And what it is usually used for.

---
v2: Reword per Jan's suggestion.