freebsd-src/sys/x86/xen
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
..
hvm.c x86/xen: fix HVM guest hypercall page setup 2024-01-16 18:50:54 +01:00
pv.c xen: remove xen_domain_type enum/variable 2023-11-28 13:40:19 +01:00
xen_apic.c xen/apic: remove passing trapframe as argument 2023-11-28 13:22:30 +01:00
xen_arch_intr.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00