All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wl@xen.org>
To: Xen Development List <xen-devel@lists.xenproject.org>
Cc: "Wei Liu" <liuwe@microsoft.com>, "Wei Liu" <wl@xen.org>,
	"Paul Durrant" <paul@xen.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Paul Durrant" <pdurrant@amazon.com>,
	"Michael Kelley" <mikelley@microsoft.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH 4/4] x86: move viridian_guest_os_id_msr to hyperv-tlfs.h
Date: Fri, 20 Dec 2019 19:51:35 +0000	[thread overview]
Message-ID: <20191220195135.20130-5-liuwe@microsoft.com> (raw)
In-Reply-To: <20191220195135.20130-1-liuwe@microsoft.com>

Suggested-by: Paul Durrant <pdurrant@amazon.com>
Signed-off-by: Wei Liu <liuwe@microsoft.com>
---
 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-12-20 19:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 19:51 [Xen-devel] [PATCH 0/4] Clean up viridian code Wei Liu
2019-12-20 19:51 ` [Xen-devel] [PATCH 1/4] x86/viridian: drop duplicate defines from private.h and viridian.c Wei Liu
2019-12-21 12:19   ` Durrant, Paul
2019-12-20 19:51 ` [Xen-devel] [PATCH 2/4] x86/viridian: drop private copy of HV_REFERENCE_TSC_PAGE in time.c Wei Liu
2019-12-21 12:20   ` Durrant, Paul
2019-12-20 19:51 ` [Xen-devel] [PATCH 3/4] x86: provide and use hv_tsc_scale Wei Liu
2019-12-21 12:27   ` Durrant, Paul
2019-12-20 19:51 ` Wei Liu [this message]
2019-12-21 12:28   ` [Xen-devel] [PATCH 4/4] x86: move viridian_guest_os_id_msr to hyperv-tlfs.h Durrant, Paul
2019-12-20 21:21 ` [Xen-devel] [PATCH 5/4] x86/viridian: drop a wrong invalid value from reference TSC implementation Wei Liu
2019-12-21 12:06   ` Durrant, Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191220195135.20130-5-liuwe@microsoft.com \
    --to=wl@xen.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=liuwe@microsoft.com \
    --cc=mikelley@microsoft.com \
    --cc=paul@xen.org \
    --cc=pdurrant@amazon.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.