]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xen/x86: report domain id on cpuid
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 30 Nov 2017 09:53:26 +0000 (09:53 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 7 Dec 2017 16:55:05 +0000 (16:55 +0000)
Use the ebx register of the hypervisor leaf 1. The eax register on
this leaf is already used to report the Xen major and minor versions.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/traps.c
xen/include/public/arch-x86/cpuid.h

index c9a849ce843a5d22ad7b6b949fe7613293870028..57f72c30148b858e3439a0e72f69e429073f7509 100644 (file)
@@ -853,6 +853,7 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, uint32_t leaf,
 
     case 1:
         res->a = (xen_major_version() << 16) | xen_minor_version();
+        res->b = d->domain_id;
         break;
 
     case 2:
index eb76875d0e3897ea96bf190d8274252e61d5abd4..a17c8682a00bef7ec1d4f3474c5d61b8717e8680 100644 (file)
@@ -57,7 +57,8 @@
  * Leaf 2 (0x40000x01)
  * EAX[31:16]: Xen major version.
  * EAX[15: 0]: Xen minor version.
- * EBX-EDX: Reserved (currently all zeroes).
+ * EBX: Domain id.
+ * ECX-EDX: Reserved (currently all zeroes).
  */
 
 /*