HomeFreeBSD

x86/xen: fix HVM guest hypercall page setup

Description

x86/xen: fix HVM guest hypercall page setup

c7368ccb6801 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: c7368ccb6801 ('xen: remove xen_domain_type enum/variable')
Sponsored by: Cloud Software Group

Details

Provenance
roygerAuthored on Jan 16 2024, 3:32 PM
Parents
rG81ea920435b4: pflowclt: fix gcc build error
Branches
Unknown
Tags
Unknown