From nobody Tue Feb 10 02:50:07 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1576680199; cv=none; d=zohomail.com; s=zohoarc; b=DLMzVAcaSSAV+uSKXn61qTRWshMnWOr/U13ZepoD+ZxpHac/8yrH4TlY4UOzN72rnHmVu6wd2qcUJ9l9OEKXN417K5VxSDg3lptRXyGWW+jD0BwPTVvNTSoquI33Wz6hVOGekvY6Nt2F5hub93YdHFB4OaIrf+aPhdsVMBYgm6k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576680199; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BWmOkRCxwU5C1ImuOds49djmPKmc4CU6RGC1GOBjU/4=; b=hX22ECjApf1i5jM70IFb1WhET08OIgLVc+xWcVpaxGfqENc6gWE39pQUEz5b4E0ykfzPtn3GU8yU+U5/l2Fy5dSHhOTRS7+JtZe/3zX9KxobWiICzxpupL2czMP0efdi31bxQz/z0k+7mxXa+Cy/+SYlOCdj/CWVLEb/wwUsSn4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1576680199251708.2438618664505; Wed, 18 Dec 2019 06:43:19 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihaXI-0004Po-Tn; Wed, 18 Dec 2019 14:42:48 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ihaXH-0004PX-Q6 for xen-devel@lists.xenproject.org; Wed, 18 Dec 2019 14:42:47 +0000 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a34c0964-21a4-11ea-a1e1-bc764e2007e4; Wed, 18 Dec 2019 14:42:39 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id p9so2106480wmc.2 for ; Wed, 18 Dec 2019 06:42:39 -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 p17sm2724894wmk.30.2019.12.18.06.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 06:42:37 -0800 (PST) X-Inumbo-ID: a34c0964-21a4-11ea-a1e1-bc764e2007e4 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=j87wxBvutLav22Xff605ALETwgHBzuQQLUwqkEfkg20=; b=WMBfjEA7/EnYq7HJhd4a4J58eV6GqREkefzkIFUnpyksorMUgAruVaKr6tiji/lsGT 1nJFviZXmQUEa+qI/hVZ2sbBQ5c4sI8RGnRDVggQIY5BAlvORzJFV5iSB9o/8L0hqYxM 0niXkyQy9+WpOOCQbQu8exSGVl+kJ2vSr4qlv6ASWvHG4Igk3HFlu7mIvF6zINm8b1x/ Ot3blASb/tQgjvPtyocHOSm+PuflaqFtWetoXRLG7wFu8W4Mp/0+NVvJqESrHIdVkac4 97bFzAfCjCOXEBxUtxDdNdB9VGU1pVtKRV+K4rCdh16z9EoPSJmXjztTiflTwOe9ZCxd 70/A== 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=j87wxBvutLav22Xff605ALETwgHBzuQQLUwqkEfkg20=; b=BECpWwyqjnz3HmEInH2RaPs5MC1o9utQv1Jr84Cj1kFtweZzrZJwCsFYM/R+Afvmvv 5t5G++fE5kjeuDyTCKGRDgQJdit0ZUvw7ODasB8dO1Pbq724Qd7QEqttsuaUQsKZ4fk5 4WVPD6uE5N7v0B2e35npr6haxFOeF76/9ZMo6drr2cPyV/emRyreVC1u3uT7y1apqCXN wDgbRUfu/YDTOSRRhWeKRs7Y7xlqwVRpJ9pF7beYxSd+Apn3YxtGt8I+z8A1QkVk4buB AJ/GxzadL8yc0k6dSa5eLQgIpiVvaFHWgmpYV5K9OpOXnPb6Hyqj5CKBXEj1GZuDuJy7 SBzA== X-Gm-Message-State: APjAAAVuuG+G8ZE8IXABvuNawaEaCq7X9FXqwOi6JtBLn415GVGfiXtD FW39uipLYIYSnjI9aEl/RSpa7yDx X-Google-Smtp-Source: APXvYqwbwnuiQDip6vYE1p+LCmmpuf3JSvlmavSWp1SZxdGZs69UCJQZQk/MRY5yiKqfOR+gv6VlCQ== X-Received: by 2002:a1c:2dcd:: with SMTP id t196mr3655457wmt.22.1576680158116; Wed, 18 Dec 2019 06:42:38 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Wed, 18 Dec 2019 14:42:29 +0000 Message-Id: <20191218144233.15372-3-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218144233.15372-1-liuwe@microsoft.com> References: <20191218144233.15372-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 2/6] x86/viridian: drop duplicate defines from private.h and viridian.c 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=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) No functional change intended. Signed-off-by: Wei Liu --- xen/arch/x86/hvm/viridian/private.h | 66 ---------------------------- xen/arch/x86/hvm/viridian/viridian.c | 23 +++------- 2 files changed, 6 insertions(+), 83 deletions(-) diff --git a/xen/arch/x86/hvm/viridian/private.h b/xen/arch/x86/hvm/viridia= n/private.h index c272c34cda..958a2814c2 100644 --- a/xen/arch/x86/hvm/viridian/private.h +++ b/xen/arch/x86/hvm/viridian/private.h @@ -5,72 +5,6 @@ =20 #include =20 -/* Viridian MSR numbers. */ -#define HV_X64_MSR_GUEST_OS_ID 0x40000000 -#define HV_X64_MSR_HYPERCALL 0x40000001 -#define HV_X64_MSR_VP_INDEX 0x40000002 -#define HV_X64_MSR_RESET 0x40000003 -#define HV_X64_MSR_VP_RUNTIME 0x40000010 -#define HV_X64_MSR_TIME_REF_COUNT 0x40000020 -#define HV_X64_MSR_REFERENCE_TSC 0x40000021 -#define HV_X64_MSR_TSC_FREQUENCY 0x40000022 -#define HV_X64_MSR_APIC_FREQUENCY 0x40000023 -#define HV_X64_MSR_EOI 0x40000070 -#define HV_X64_MSR_ICR 0x40000071 -#define HV_X64_MSR_TPR 0x40000072 -#define HV_X64_MSR_VP_ASSIST_PAGE 0x40000073 -#define HV_X64_MSR_SCONTROL 0x40000080 -#define HV_X64_MSR_SVERSION 0x40000081 -#define HV_X64_MSR_SIEFP 0x40000082 -#define HV_X64_MSR_SIMP 0x40000083 -#define HV_X64_MSR_EOM 0x40000084 -#define HV_X64_MSR_SINT0 0x40000090 -#define HV_X64_MSR_SINT1 0x40000091 -#define HV_X64_MSR_SINT2 0x40000092 -#define HV_X64_MSR_SINT3 0x40000093 -#define HV_X64_MSR_SINT4 0x40000094 -#define HV_X64_MSR_SINT5 0x40000095 -#define HV_X64_MSR_SINT6 0x40000096 -#define HV_X64_MSR_SINT7 0x40000097 -#define HV_X64_MSR_SINT8 0x40000098 -#define HV_X64_MSR_SINT9 0x40000099 -#define HV_X64_MSR_SINT10 0x4000009A -#define HV_X64_MSR_SINT11 0x4000009B -#define HV_X64_MSR_SINT12 0x4000009C -#define HV_X64_MSR_SINT13 0x4000009D -#define HV_X64_MSR_SINT14 0x4000009E -#define HV_X64_MSR_SINT15 0x4000009F -#define HV_X64_MSR_STIMER0_CONFIG 0x400000B0 -#define HV_X64_MSR_STIMER0_COUNT 0x400000B1 -#define HV_X64_MSR_STIMER1_CONFIG 0x400000B2 -#define HV_X64_MSR_STIMER1_COUNT 0x400000B3 -#define HV_X64_MSR_STIMER2_CONFIG 0x400000B4 -#define HV_X64_MSR_STIMER2_COUNT 0x400000B5 -#define HV_X64_MSR_STIMER3_CONFIG 0x400000B6 -#define HV_X64_MSR_STIMER3_COUNT 0x400000B7 -#define HV_X64_MSR_POWER_STATE_TRIGGER_C1 0x400000C1 -#define HV_X64_MSR_POWER_STATE_TRIGGER_C2 0x400000C2 -#define HV_X64_MSR_POWER_STATE_TRIGGER_C3 0x400000C3 -#define HV_X64_MSR_POWER_STATE_CONFIG_C1 0x400000D1 -#define HV_X64_MSR_POWER_STATE_CONFIG_C2 0x400000D2 -#define HV_X64_MSR_POWER_STATE_CONFIG_C3 0x400000D3 -#define HV_X64_MSR_STATS_PARTITION_RETAIL_PAGE 0x400000E0 -#define HV_X64_MSR_STATS_PARTITION_INTERNAL_PAGE 0x400000E1 -#define HV_X64_MSR_STATS_VP_RETAIL_PAGE 0x400000E2 -#define HV_X64_MSR_STATS_VP_INTERNAL_PAGE 0x400000E3 -#define HV_X64_MSR_GUEST_IDLE 0x400000F0 -#define HV_X64_MSR_SYNTH_DEBUG_CONTROL 0x400000F1 -#define HV_X64_MSR_SYNTH_DEBUG_STATUS 0x400000F2 -#define HV_X64_MSR_SYNTH_DEBUG_SEND_BUFFER 0x400000F3 -#define HV_X64_MSR_SYNTH_DEBUG_RECEIVE_BUFFER 0x400000F4 -#define HV_X64_MSR_SYNTH_DEBUG_PENDING_BUFFER 0x400000F5 -#define HV_X64_MSR_CRASH_P0 0x40000100 -#define HV_X64_MSR_CRASH_P1 0x40000101 -#define HV_X64_MSR_CRASH_P2 0x40000102 -#define HV_X64_MSR_CRASH_P3 0x40000103 -#define HV_X64_MSR_CRASH_P4 0x40000104 -#define HV_X64_MSR_CRASH_CTL 0x40000105 - int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val); int viridian_synic_rdmsr(const struct vcpu *v, uint32_t idx, uint64_t *val= ); =20 diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridi= an/viridian.c index 4b06b78a27..76f6b6510b 100644 --- a/xen/arch/x86/hvm/viridian/viridian.c +++ b/xen/arch/x86/hvm/viridian/viridian.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -19,22 +20,10 @@ =20 #include "private.h" =20 -/* Viridian Hypercall Status Codes. */ -#define HV_STATUS_SUCCESS 0x0000 -#define HV_STATUS_INVALID_HYPERCALL_CODE 0x0002 -#define HV_STATUS_INVALID_PARAMETER 0x0005 - /* Viridian Hypercall Codes. */ -#define HvFlushVirtualAddressSpace 0x0002 -#define HvFlushVirtualAddressList 0x0003 -#define HvNotifyLongSpinWait 0x0008 -#define HvSendSyntheticClusterIpi 0x000b #define HvGetPartitionId 0x0046 #define HvExtCallQueryCapabilities 0x8001 =20 -/* Viridian Hypercall Flags. */ -#define HV_FLUSH_ALL_PROCESSORS 1 - /* Viridian Partition Privilege Flags */ typedef struct { /* Access to virtual MSRs */ @@ -214,7 +203,7 @@ void cpuid_viridian_leaves(const struct vcpu *v, uint32= _t leaf, /* * This value is the recommended number of attempts to try to * acquire a spinlock before notifying the hypervisor via the - * HvNotifyLongSpinWait hypercall. + * HVCALL_NOTIFY_LONG_SPIN_WAIT hypercall. */ res->b =3D viridian_spinlock_retry_count; break; @@ -583,7 +572,7 @@ int viridian_hypercall(struct cpu_user_regs *regs) =20 switch ( input.call_code ) { - case HvNotifyLongSpinWait: + case HVCALL_NOTIFY_LONG_SPIN_WAIT: /* * See section 14.5.1 of the specification. */ @@ -591,8 +580,8 @@ int viridian_hypercall(struct cpu_user_regs *regs) status =3D HV_STATUS_SUCCESS; break; =20 - case HvFlushVirtualAddressSpace: - case HvFlushVirtualAddressList: + case HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE: + case HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST: { struct { uint64_t address_space; @@ -632,7 +621,7 @@ int viridian_hypercall(struct cpu_user_regs *regs) break; } =20 - case HvSendSyntheticClusterIpi: + case HVCALL_SEND_IPI: { struct vcpu *v; uint32_t vector; --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel