Skip to content

Commit

Permalink
x86/xen: ignore error to fetch memory map in xen_arch_init_physmem()
Browse files Browse the repository at this point in the history
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:	69c4748 ('x86/xen: use UNUSABLE e820 regions for external mappings')
Sponsored by:	Cloud Software Group
Differential revision:	https://reviews.freebsd.org/D46205
  • Loading branch information
Roger Pau Monné authored and bsdjhb committed Nov 14, 2024
2 parents 8f18382 + c1287a3 commit d2254f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/x86/xen/hvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2254f8

Please sign in to comment.