Date: Thu, 22 Feb 2024 10:31:26 GMT From: Roger Pau =?utf-8?Q?Monn=C3=A9?= <royger@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f0cf86c075cd - main - x86/xen: replace xen_cpuid_base with hv_base Message-ID: <202402221031.41MAVQ1h018221@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=f0cf86c075cda435c1481fe59440d6c4bbf855dd commit f0cf86c075cda435c1481fe59440d6c4bbf855dd Author: Roger Pau Monné <royger@FreeBSD.org> AuthorDate: 2024-02-02 11:04:50 +0000 Commit: Roger Pau Monné <royger@FreeBSD.org> 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402221031.41MAVQ1h018221>