x86/xen: ignore error to fetch memory map in xen_arch_init_physmem()

Some implementations of Xen don't expose the XENMEM_memory_map hypercall.
Shallow the error from XENMEM_memory_map in xen_arch_init_physmem() and just
return 0. This will fallback to using the non-arch specific mechanism for
allocating scratch space.

Reported by:	cperciva
Reviewed by:	Elliott Mitchell
Fixes:	69c47485b5 ('x86/xen: use UNUSABLE e820 regions for external mappings')
Sponsored by:	Cloud Software Group
Differential revision:	https://reviews.freebsd.org/D46205
This commit is contained in:
Roger Pau Monné
2024-08-02 20:10:38 -07:00
committed by Colin Percival
parent b45d64fd0c
commit c1287a3bb1
+1 -1
View File
@@ -563,7 +563,7 @@ xen_arch_init_physmem(device_t dev, struct rman *mem)
set_xen_guest_handle(memmap.buffer, smap);
error = HYPERVISOR_memory_op(XENMEM_memory_map, &memmap);
if (error != 0)
return (error);
return (0);
/*
* Fill with UNUSABLE regions, as it's always fine to use those for