From nobody Thu Feb 22 10:31:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TgTvg1Q5rz5CMM0; Thu, 22 Feb 2024 10:31:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TgTvf4Fm5z4krx; Thu, 22 Feb 2024 10:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708597886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VrjEDvD+ZTQg0+1FKa9dlUKcjDlG+tLEycs1zeQ5BmQ=; b=YI9PjQ0ALolknl9zUSXkhCqwClRg2yxhFnQ5/2acnAnUp7rpsXaYg4qm9sJ8pkoBijee9c aDGFuzuL/nnLwX3R0Eev3TkR+/7QhWTijGaaqaj25k6h4dZS34KXqZawiw4nG2Qfryjrf5 VurtQWtpWuAGK3VYQio9wrlArFGnBHfi7UD4c3B523r6NgaCaBqxBJZJdArxmI/X+xKSbh MHSJus2l26YpdWnHUNuEXwC8kWD1YiC7p0Bau8Uku4Ky2GpnmjOT6PSBVanUWRa0sq6ndI 4FWcdxJH8UIWNMekR+M6sCyYguGzkHWvgJE66BgsnmBXFdaiOv3enW0LveYI1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708597886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VrjEDvD+ZTQg0+1FKa9dlUKcjDlG+tLEycs1zeQ5BmQ=; b=wd4b0cYbilMpZuHr48FAP0hK2KFOrtGrtnYw6hDqvExnQ/LGOVGGFu/elSw8NgkdnvEddE oBN1dKVn5W1on3/7KRQAVtPPyqwwsasSVDOT7sO9WoNbNAvAnpfoCBKRtOrgsafvtTF0RJ AMiD2Zxt0msWr3o7mIms3vpfqAKBAf3K1IYE8mTIrxjYOfizW5lX1nO0WV0iV0Jnpa0ecF RryXf2VdQYCACn7j8HBdjWLIMhKiRDP9vqmkQ9JRcQKvNTP8aCU7rmDKTaYZXGLvxsTniJ P+VOnM9rw+nWhbRxcb+babzcHLWu28xifLfgMUFy8ihBHhmJwwvtOVVXEqp6YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708597886; a=rsa-sha256; cv=none; b=V08GRxsRXbV+Kr889YbL/tRYxS1GtyfeFwCXNUv1svkikY0pyLUrzyLYDyO+jNyysrRLXH VH6BBIY6stwXj2sDMIrtocjVSDF1P59VZLnSRvKKWGp9f4/utLTPcLTNWtlBOb8U3N4xDB PhOcSIBVeNvj/VKY5kCH9+ueBubtvON9pfmQvtA/JmOYidtggsneNFQE34HvBBhT2+jPyr I80k9PTXoRgrTDGg8GvRkSRwiKH9P8tH/FzvOpeXMoSd7IXgzZS7h0tKD3TY6+9xHWBXdL xVYonT5MvdzuBqNGafLKRfLypyvULnlYhGHGINGph6aE4cOV0JwAiiW93vAPuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TgTvf3Bm0zSKH; Thu, 22 Feb 2024 10:31:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41MAVQQQ018224; Thu, 22 Feb 2024 10:31:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41MAVQ1h018221; Thu, 22 Feb 2024 10:31:26 GMT (envelope-from git) Date: Thu, 22 Feb 2024 10:31:26 GMT Message-Id: <202402221031.41MAVQ1h018221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: f0cf86c075cd - main - x86/xen: replace xen_cpuid_base with hv_base List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0cf86c075cda435c1481fe59440d6c4bbf855dd Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=f0cf86c075cda435c1481fe59440d6c4bbf855dd commit f0cf86c075cda435c1481fe59440d6c4bbf855dd Author: Roger Pau Monné AuthorDate: 2024-02-02 11:04:50 +0000 Commit: Roger Pau Monné CommitDate: 2024-02-22 10:08:05 +0000 x86/xen: replace xen_cpuid_base with hv_base Where possible, replace the usage of xen_cpuid_base for hv_base in preparation for removing xen_cpuid_base. No functional change intended. Sponsored by: Cloud Software Group Reviewed by: markj Differential revision: https://reviews.freebsd.org/D43935 --- sys/x86/xen/hvm.c | 10 +++++----- sys/x86/xen/xen_apic.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/x86/xen/hvm.c b/sys/x86/xen/hvm.c index 85f274175ac6..6336602c8bc4 100644 --- a/sys/x86/xen/hvm.c +++ b/sys/x86/xen/hvm.c @@ -147,7 +147,7 @@ hypervisor_version(void) uint32_t regs[4]; int major, minor; - do_cpuid(xen_cpuid_base + 1, regs); + do_cpuid(hv_base + 1, regs); major = regs[0] >> 16; minor = regs[0] & 0xffff; @@ -595,8 +595,8 @@ xen_hvm_cpu_init(void) * Set vCPU ID. If available fetch the ID from CPUID, if not just use * the ACPI ID. */ - KASSERT(xen_cpuid_base != 0, ("Invalid base Xen CPUID leaf")); - cpuid_count(xen_cpuid_base + 4, 0, regs); + KASSERT(hv_base != 0, ("Invalid base Xen CPUID leaf")); + cpuid_count(hv_base + 4, 0, regs); KASSERT((regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) || !xen_pv_domain(), ("Xen PV domain without vcpu_id in cpuid")); @@ -626,8 +626,8 @@ xen_has_iommu_maps(void) { uint32_t regs[4]; - KASSERT(xen_cpuid_base != 0, ("Invalid base Xen CPUID leaf")); - cpuid_count(xen_cpuid_base + 4, 0, regs); + KASSERT(hv_base != 0, ("Invalid base Xen CPUID leaf")); + cpuid_count(hv_base + 4, 0, regs); return (regs[0] & XEN_HVM_CPUID_IOMMU_MAPPINGS); } diff --git a/sys/x86/xen/xen_apic.c b/sys/x86/xen/xen_apic.c index 4f2b03879227..994dc3e0804c 100644 --- a/sys/x86/xen/xen_apic.c +++ b/sys/x86/xen/xen_apic.c @@ -343,8 +343,8 @@ xen_setup_cpus(void) * that's faster than using event channels because it avoids the VM * exit. */ - KASSERT(xen_cpuid_base != 0, ("Invalid base Xen CPUID leaf")); - cpuid_count(xen_cpuid_base + 4, 0, regs); + KASSERT(hv_base != 0, ("Invalid base Xen CPUID leaf")); + cpuid_count(hv_base + 4, 0, regs); if ((x2apic_mode && (regs[0] & XEN_HVM_CPUID_X2APIC_VIRT)) || (!x2apic_mode && (regs[0] & XEN_HVM_CPUID_APIC_ACCESS_VIRT))) return;