git: c1287a3bb1b7 - main - x86/xen: ignore error to fetch memory map in xen_arch_init_physmem()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 03 Aug 2024 03:14:12 UTC
The branch main has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=c1287a3bb1b7b7ccc494d6718db52cb443bd0d38
commit c1287a3bb1b7b7ccc494d6718db52cb443bd0d38
Author: Roger Pau Monné <royger@FreeBSD.org>
AuthorDate: 2024-08-03 03:10:38 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-08-03 03:12:55 +0000
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: 69c47485b5f9 ('x86/xen: use UNUSABLE e820 regions for external mappings')
Sponsored by: Cloud Software Group
Differential revision: https://reviews.freebsd.org/D46205
---
sys/x86/xen/hvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/x86/xen/hvm.c b/sys/x86/xen/hvm.c
index d2ab1c32b0a2..02e41fda1d98 100644
--- a/sys/x86/xen/hvm.c
+++ b/sys/x86/xen/hvm.c
@@ -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