FreeBSD Bugzilla – Attachment 247769 Details for
Bug 276421
Commit b0165dc4539fdfc84351a719b58850e4e7a6cbb6 inhibits initialization of Xen front and backends
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-x86-cpu-improve-hypervisor-detection.patch (text/plain), 2.09 KB, created by
Roger Pau Monné
on 2024-01-19 09:27:44 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Roger Pau Monné
Created:
2024-01-19 09:27:44 UTC
Size:
2.09 KB
patch
obsolete
>From 87ad76a2501bbc3f4b5b8bf26a0b39f51fc1f447 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= <royger@FreeBSD.org> >Date: Fri, 19 Jan 2024 10:15:17 +0100 >Subject: [PATCH] x86/cpu: improve hypervisor detection > >Some hypervisors can expose multiple signatures, for example Xen will expose >both the Xen and the HyperV signatures if Viridian extensions are enabled for >the guest. Presence of multiple signatures is currently not handled by >FreeBSD, that will exit once a known signature is found in cpuid output. > >Exposing the HyperV signature on hypervisors different than HyperV is not >uncommon, this is done so that such hypervisor can expose a (subset) of the >Viridian extensions to Windows guests for performance reasons. > >Fix the specific case of HyperV by not exiting from the scan if the HperV >signature is found, and prefer a second signature if one is found. > >Note that long term we might wish to convert vm_guest into a bitmap, so that it >can signal detection of multiple hypervisor interfaces. > >This allows to boot a FreeBSD guest using the Xen PV interfaces when the >Viridian extensions are enabled in Xen. > >Fixes: b0165dc4539f ('x86/xen: fix HVM guest hypercall page setup') >PR: 276421 >Sponsored by: Cloud Software Group >--- > sys/x86/x86/identcpu.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > >diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c >index 9c82f9f8a882..71ef7f648e14 100644 >--- a/sys/x86/x86/identcpu.c >+++ b/sys/x86/x86/identcpu.c >@@ -1409,7 +1409,18 @@ identify_hypervisor_cpuid_base(void) > * If we found a specific hypervisor, then > * we are finished. > */ >- if (vm_guest != VM_GUEST_VM) >+ if (vm_guest != VM_GUEST_VM && >+ /* >+ * Xen and other hypervisors can expose the >+ * HyperV signature in addition to the >+ * native one in order to support Viridian >+ * extensions for Windows guests. >+ * >+ * Do the full cpuid scan if HyperV is >+ * detected, as the native hypervisor is >+ * preferred. >+ */ >+ vm_guest != VM_GUEST_HV) > return; > } > } >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276421
:
247741
|
247748
|
247749
|
247750
|
247769
|
247784
|
247874