|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86: Conditionalise PV-only fallback branches on CONFIG_PV
commit d6d76a493984307c3d4b6ff7742448761f711e1a
Author: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
AuthorDate: Thu Nov 20 11:23:56 2025 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Nov 20 11:23:56 2025 +0100
x86: Conditionalise PV-only fallback branches on CONFIG_PV
A couple of branches rely on PV being the "else" branch, making it
be compiled even when PV support is not itself compiled-in.
Add a explicit conditional on CONFIG_PV in those cases to remove the
code in !CONFIG_PV builds.
Not a functional change.
Signed-off-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
Reviewed-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/arch/x86/cpuid.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index b63a82dd38..5decfad8cd 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -297,6 +297,8 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
if ( v->arch.hvm.guest_cr[4] & X86_CR4_OSXSAVE )
res->c |= cpufeat_mask(X86_FEATURE_OSXSAVE);
}
+ else if ( !IS_ENABLED(CONFIG_PV) )
+ ASSERT_UNREACHABLE();
else /* PV domain */
{
regs = guest_cpu_user_regs();
@@ -509,6 +511,8 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
if ( !hap_enabled(d) && !hvm_pae_enabled(v) )
res->d &= ~cpufeat_mask(X86_FEATURE_PSE36);
}
+ else if ( !IS_ENABLED(CONFIG_PV) )
+ ASSERT_UNREACHABLE();
else /* PV domain */
{
/*
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |