From nobody Tue Nov 11 08:47:04 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.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 (zoho.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=1569233462; cv=none; d=zoho.com; s=zohoarc; b=ojiT2LtGEh2LY8l/UsfMPSIuG1sTRBLh5lyM7fKcxpl752t3TBpsdkd1Q4hTroWooBcqW3VZ+oSNwWl3dBnmfVbDHdkas7Zk6zjS4Qbl17mGXHcReda5kVCSg82OtBelTEBbb8d0iBzVFeIPDT9R+zv891IcP+T5LCdnrkmLTd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569233462; 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:ARC-Authentication-Results; bh=ER6xXvRE8bTJ6XurhXDGBUEPAdG9NfK2YoRjEWWAMt4=; b=ZNOwmXlI/Ca5WB5ebCMOmb3D86IrZFjk0irSK7zhzlnPIKbi+ouZyPmh1ONFeiCekj7uVnhlgg9y/sTCvLcOwNESS1R/oMSc0C1Hb+5t7tBIPc/skdShQozW4/Iq92/6zwoTO7vvcNoHt7edXEQKDQQE+w41Kki4OAn6KfovaCw= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.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 1569233462782403.88766167641495; Mon, 23 Sep 2019 03:11:02 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCLI3-0006rK-5L; Mon, 23 Sep 2019 10:09:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCLI1-0006qr-9f for xen-devel@lists.xenproject.org; Mon, 23 Sep 2019 10:09:53 +0000 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 40facc62-ddea-11e9-a337-bc764e2007e4; Mon, 23 Sep 2019 10:09:39 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id y21so8621697wmi.0 for ; Mon, 23 Sep 2019 03:09:39 -0700 (PDT) Received: from debian.mshome.net (207.148.159.143.dyn.plus.net. [143.159.148.207]) by smtp.gmail.com with ESMTPSA id s10sm18241662wmf.48.2019.09.23.03.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 03:09:38 -0700 (PDT) X-Inumbo-ID: 40facc62-ddea-11e9-a337-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=qOnvgxTYDq1RQTeNxzoSrcZSvYUJJofuL+Y7imyRsBI=; b=XY2tDeIpfAvkFQx8RaGzo+iVyMmjmvXl9fW/7EsS2TKQEe5+W4FJvsK5uFqCU2Vh4p fnm35QH83HqiHJyc49LzyuBVW66t8HFGUtQzoZfxtcKDrnldKFqrwL9LBXsrLyolCTcx excyCe720WLnb+F8jTQ+cej7gIZtpyGHbjECnV1PpHXlZUOdc2XbRYZ8gzumiHOqTUu1 BsjBGj1u+RHBe4+w2YCmNkjPlJf8aBN8HNtKI5EDyol2DiYqWNjYzOX9P0dSO/Js+2lW Bj1FDc8Hk3Nr953IPKKnMEkKTDZDNpVBDDSGUYeMVSUoSUr6T3HpJeiGQ/csN3vI/jV/ YkVA== 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=qOnvgxTYDq1RQTeNxzoSrcZSvYUJJofuL+Y7imyRsBI=; b=Lt4sX7bZPQfOKu+Ha3fkfaRmbHGOQr/IH+2UqoMh6wwcHEayH7kWdsAGQC51Yo4qQk MlUfJrpBFRl4FHiWNICq4pLRpnRLBXR1W5CtTN5KOXseRmw8ieUmxqqvqDG1kBAh7cJ5 nkT8uiE4FB4pY1RniG8py0WfJIY/vc6E3rm32tpbAUk/x9E4G5MLTaYfRi9uczfA4jP4 kpYfp1OLgCj63FjYHu5v4WiFtwQFDgWS97Pdr8HuRtTFaw+HtboLzXy57JxHkUIb3fWF 5wStrUV3Iihh1w2HaZnGbUvTgSkJRnkfkGRLALGGxDTS7nGcAFtAk0j0VgO6G1pFt5GX nf+Q== X-Gm-Message-State: APjAAAX92WK9iaAE8tGmrcpSx0rhcJuub45/o6zVqPMkioK1ignjZ/cL Evq9NmAS6zrOUSN0xja2ST5SA0kq X-Google-Smtp-Source: APXvYqxP5XgaxhG1fhSiuV5+Hw+0TvnZxKbGApNAIrK1/bqxkw2Qt/sRHIOZBBUqNWAJj7J2CdQHsQ== X-Received: by 2002:a1c:3904:: with SMTP id g4mr13797846wma.116.1569233378852; Mon, 23 Sep 2019 03:09:38 -0700 (PDT) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Mon, 23 Sep 2019 11:09:26 +0100 Message-Id: <20190923100931.29670-4-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190923100931.29670-1-liuwe@microsoft.com> References: <20190923100931.29670-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-next RFC 3/8] x86: drop hypervisor_cpuid_base 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 , Andrew Cooper , 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) The only user is Xen specific code in PV shim. We can therefore export the variable directly. Signed-off-by: Wei Liu Reviewed-by: Roger Pau Monn=C3=A9 --- xen/arch/x86/guest/xen/xen.c | 7 +------ xen/arch/x86/pv/shim.c | 2 +- xen/include/asm-x86/guest/xen.h | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/guest/xen/xen.c b/xen/arch/x86/guest/xen/xen.c index 7b7a5badab..78fc603996 100644 --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -37,7 +37,7 @@ =20 bool __read_mostly xen_guest; =20 -static __read_mostly uint32_t xen_cpuid_base; +__read_mostly uint32_t xen_cpuid_base; extern char hypercall_page[]; static struct rangeset *mem; =20 @@ -301,11 +301,6 @@ int hypervisor_free_unused_page(mfn_t mfn) return rangeset_remove_range(mem, mfn_x(mfn), mfn_x(mfn)); } =20 -uint32_t hypervisor_cpuid_base(void) -{ - return xen_cpuid_base; -} - static void ap_resume(void *unused) { map_vcpuinfo(); diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c index 324ca27f93..1b174c24df 100644 --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -992,7 +992,7 @@ domid_t get_initial_domain_id(void) if ( !pv_shim ) return 0; =20 - cpuid(hypervisor_cpuid_base() + 4, &eax, &ebx, &ecx, &edx); + cpuid(xen_cpuid_base + 4, &eax, &ebx, &ecx, &edx); =20 return (eax & XEN_HVM_CPUID_DOMID_PRESENT) ? ecx : 1; } diff --git a/xen/include/asm-x86/guest/xen.h b/xen/include/asm-x86/guest/xe= n.h index 7e04e4a7ab..b015ed1883 100644 --- a/xen/include/asm-x86/guest/xen.h +++ b/xen/include/asm-x86/guest/xen.h @@ -30,13 +30,13 @@ =20 extern bool xen_guest; extern bool pv_console; +extern uint32_t xen_cpuid_base; =20 void probe_hypervisor(void); void hypervisor_setup(void); void hypervisor_ap_setup(void); int hypervisor_alloc_unused_page(mfn_t *mfn); int hypervisor_free_unused_page(mfn_t mfn); -uint32_t hypervisor_cpuid_base(void); void hypervisor_resume(void); =20 DECLARE_PER_CPU(unsigned int, vcpu_id); --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel