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

[Xen-devel] [PATCH 4/4] x86: move viridian_guest_os_id_msr to hyperv-tlfs.h



Suggested-by: Paul Durrant <pdurrant@xxxxxxxxxx>
Signed-off-by: Wei Liu <liuwe@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/viridian/viridian.c    |  2 +-
 xen/include/asm-x86/guest/hyperv-tlfs.h | 13 +++++++++++++
 xen/include/asm-x86/hvm/viridian.h      | 18 +++---------------
 3 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/hvm/viridian/viridian.c 
b/xen/arch/x86/hvm/viridian/viridian.c
index 341592f054..44c8e6cac6 100644
--- a/xen/arch/x86/hvm/viridian/viridian.c
+++ b/xen/arch/x86/hvm/viridian/viridian.c
@@ -218,7 +218,7 @@ void cpuid_viridian_leaves(const struct vcpu *v, uint32_t 
leaf,
 
 static void dump_guest_os_id(const struct domain *d)
 {
-    const union viridian_guest_os_id_msr *goi;
+    const union hv_guest_os_id *goi;
 
     goi = &d->arch.hvm.viridian->guest_os_id;
 
diff --git a/xen/include/asm-x86/guest/hyperv-tlfs.h 
b/xen/include/asm-x86/guest/hyperv-tlfs.h
index b128807b2c..4402854c80 100644
--- a/xen/include/asm-x86/guest/hyperv-tlfs.h
+++ b/xen/include/asm-x86/guest/hyperv-tlfs.h
@@ -327,6 +327,19 @@ struct ms_hyperv_tsc_page {
  */
 
 #define HV_LINUX_VENDOR_ID              0x8100
+union hv_guest_os_id
+{
+    uint64_t raw;
+    struct
+    {
+        uint64_t build_number:16;
+        uint64_t service_pack:8;
+        uint64_t minor:8;
+        uint64_t major:8;
+        uint64_t os:8;
+        uint64_t vendor:16;
+    };
+};
 
 struct hv_reenlightenment_control {
        __u64 vector:8;
diff --git a/xen/include/asm-x86/hvm/viridian.h 
b/xen/include/asm-x86/hvm/viridian.h
index 010c8b58d4..cfbaede158 100644
--- a/xen/include/asm-x86/hvm/viridian.h
+++ b/xen/include/asm-x86/hvm/viridian.h
@@ -9,6 +9,8 @@
 #ifndef __ASM_X86_HVM_VIRIDIAN_H__
 #define __ASM_X86_HVM_VIRIDIAN_H__
 
+#include <asm/guest/hyperv-tlfs.h>
+
 union viridian_page_msr
 {
     uint64_t raw;
@@ -83,20 +85,6 @@ struct viridian_vcpu
     uint64_t crash_param[5];
 };
 
-union viridian_guest_os_id_msr
-{
-    uint64_t raw;
-    struct
-    {
-        uint64_t build_number:16;
-        uint64_t service_pack:8;
-        uint64_t minor:8;
-        uint64_t major:8;
-        uint64_t os:8;
-        uint64_t vendor:16;
-    };
-};
-
 struct viridian_time_ref_count
 {
     unsigned long flags;
@@ -112,7 +100,7 @@ struct viridian_time_ref_count
 
 struct viridian_domain
 {
-    union viridian_guest_os_id_msr guest_os_id;
+    union hv_guest_os_id guest_os_id;
     union viridian_page_msr hypercall_gpa;
     struct viridian_time_ref_count time_ref_count;
     struct viridian_page reference_tsc;
-- 
2.20.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.