freebsd-src/sys/x86
Roger Pau Monné b0165dc453 x86/xen: fix HVM guest hypercall page setup
c7368ccb68 didn't take into account that vm_guest will also get setup by
generic identify CPU code, and hence by the time xen_hvm_init() gets called
vm_guest will always be set if running as a Xen guest, either by the PVH entry
point code, or by generic CPU identification.

xen_hvm_init() and xen_hvm_init_hypercall_stubs() were relying on xen_domain()
returning false when running as an HVM guest, and used that into order to
figure out whether hypercall page needed to be populated.

Get rid of such assumptions and simplify the code since legacy PVH is no
longer supported.

This fixes booting FreeBSD as a Xen HVM guest.

Fixes: c7368ccb68 ('xen: remove xen_domain_type enum/variable')
Sponsored by: Cloud Software Group
2024-01-16 18:50:54 +01:00
..
acpica acpi/apm: Improve APM ioctl interface emulation 2024-01-10 17:05:00 -07:00
bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
conf sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
cpufreq sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
include x86: Make cpu_model[] public 2024-01-04 08:39:53 -05:00
iommu DMAR: add knob to disable RMRR entries installation into domains 2023-12-26 03:28:22 +02:00
isa atrtc: Add a required include 2023-12-28 15:17:32 -05:00
linux linux(4): Remove sys/cdefs.h inclusion under x86/linux due to 685dc743 2023-08-18 15:58:32 +03:00
pci pci_cfgreg: Add a PCI domain argument to the low-level register API 2023-11-29 10:31:47 -08:00
x86 sysctl: Don't pass CTLFLAG_MPSAFE to SYSCTL_STRING 2024-01-04 08:39:53 -05:00
xen x86/xen: fix HVM guest hypercall page setup 2024-01-16 18:50:54 +01:00