From patchwork Fri Dec 20 19:51:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11306265 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A030A14E3 for ; Fri, 20 Dec 2019 19:53:28 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 739B72072B for ; Fri, 20 Dec 2019 19:53:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U8P866uO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 739B72072B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iiOJd-0005Iq-K8; Fri, 20 Dec 2019 19:52:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iiOJc-0005I9-Cx for xen-devel@lists.xenproject.org; Fri, 20 Dec 2019 19:52:00 +0000 X-Inumbo-ID: 2577aca4-2362-11ea-a1e1-bc764e2007e4 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2577aca4-2362-11ea-a1e1-bc764e2007e4; Fri, 20 Dec 2019 19:51:43 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id d139so10215512wmd.0 for ; Fri, 20 Dec 2019 11:51:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ENSa39ODblgiZaftP8Kk0EjckN+kVjfxs00LYiEa0zA=; b=U8P866uOz7wW6yMjmX+KQO4Cbs2YsHrD/rKMTWN2CAssIxCTFvmnA1g64FJiyjoyGh Tacyf3/OCvRrqYuXip6BWu0v4NSQoiJ+u6CK9kDueWOA/O4NKDQkWlXzEQw3gsweZvY8 r9exl1Syw7/UFVd6IOeltC6u/jTF917M36y/xdqXVMW+UQIqm//tcXG5cjj/jrCsYT7Y axT3Fy0bfKf/N1LZ60s3Qyb5pFGqiPRDGF7uZOBWQAl8HR5rpInzRvF8vRdU5//qSQdi UDxROdtf7fWXf3svctOY7pHWGEg+fnbYdNrmThBaOYDldOn1mEBUf/cacB2ULxiOhaVt UHpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ENSa39ODblgiZaftP8Kk0EjckN+kVjfxs00LYiEa0zA=; b=QkBnQSw9tujjvnmg2SjPB5R81KD7C3qgT0qr1hTc1KppkH71soV++HD8mHm4nl5x5x xWUORljF8NRBkKX0/e7IOIMDdcILk976lMHSCRxd0cfmuxIsDnv1yG9xjjKC6yguUQvb M5awJ5ll3jW6MY0ErmUPPtIMgL/uybttw67X2i+Q+lYsVmKMZLoZRzlO3Qw2F3InDSDj WshtYm8hmeUkytUeCgu9dVFzscO70dQKs7TkHf4eRSeLBI0VOrhDmoN5PY1maRhSjwGy lcZGLbQKl/qsW+iwnf/dNcdky6K/VJ8Q0LnmHziAEpTa4bWOdDvVOEZpsw0VnI51Nq7r hPxA== X-Gm-Message-State: APjAAAVa+6L6yxMv8RvEDyUgmVfLIOmbRzHz+tvfYSHuq77aVSeudv1P 4cRqOpKoRiNz1AI2LUyvk3zrAfJQ X-Google-Smtp-Source: APXvYqyhTOshxtscHAnLQKLSBEE7LGzhnvOTkOx32FfoyDXPy/XviJahrWjyuTex90Ckma9YejH66w== X-Received: by 2002:a7b:cc98:: with SMTP id p24mr17624019wma.139.1576871502578; Fri, 20 Dec 2019 11:51:42 -0800 (PST) Received: from debian.mshome.net (38.163.200.146.dyn.plus.net. [146.200.163.38]) by smtp.gmail.com with ESMTPSA id a184sm11006287wmf.29.2019.12.20.11.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 11:51:42 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Fri, 20 Dec 2019 19:51:35 +0000 Message-Id: <20191220195135.20130-5-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191220195135.20130-1-liuwe@microsoft.com> References: <20191220195135.20130-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 4/4] x86: move viridian_guest_os_id_msr to hyperv-tlfs.h X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Paul Durrant , Andrew Cooper , Paul Durrant , Michael Kelley , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Suggested-by: Paul Durrant Signed-off-by: Wei Liu Reviewed-by: Paul Durrant --- 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 + 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;