x86/pvh: Support relocating dom0 kernel
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest2 patches 6 repliesIn review
- v64 patches 11 repliesSuperseded
- v56 patches 7 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 5 patches | 8 replies | Superseded | |
| v3 | 3 patches | 7 replies | Superseded | |
| v2 | 3 patches | 27 replies | Superseded | |
| v1 | 3 patches | 16 replies | Superseded |
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libelf: Store maximum PHDR p_alignxen/ xen/ | +6 | 1 reply | |
| 2/2 | x86/PVH: Support relocatable dom0 kernelsxen/ xen/ xen/ +2 more | +167 | 5 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Jan Beulich |
|---|---|
| 1/2 | A-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v7 0/2] x86/pvh: Support relocating dom0 kernel
Xen tries to load a PVH dom0 kernel at the fixed guest physical address from the elf headers. For Linux, this defaults to 0x1000000 (16MB), but it can be configured.
Unfortunately there exist firmwares that have reserved regions at this address, so Xen fails to load the dom0 kernel since it's not RAM.
The other issue is that the Linux PVH entry point is not position-independent. It expects to run at the compiled CONFIG_PHYSICAL_ADDRESS.
This patch set expands the PVH dom0 builder to try to relocate the kernel if needed and possible. XEN_ELFNOTE_PHYS32_RELOC is added for kernels to indicate they are relocatable and their acceptable address range and alignment.
Choose the alignment from the Note if specified, or the Maximum PHDR p_align value if greater than PAGE_SIZE. Otherwise, it falls back to the default 2MB.
Patches from v6 commited:
tools/init-xenstore-domain: Replace variable MB() usage
tools: Move MB/GB() to common-macros.h
The first patch stores the maximum p_align value from the ELF PHDRs.
The second patch expands the pvh dom0 kernel placement code.
I'll post an additional patch showing the Linux changes to make PVH relocatable.
Jason Andryuk (2):
libelf: Store maximum PHDR p_align
x86/PVH: Support relocatable dom0 kernels
xen/arch/x86/hvm/dom0_build.c | 108 +++++++++++++++++++++++++++++ xen/common/libelf/libelf-dominfo.c | 35 ++++++++++ xen/common/libelf/libelf-loader.c | 5 ++ xen/common/libelf/libelf-private.h | 1 + xen/include/public/elfnote.h | 20 +++++- xen/include/xen/libelf.h | 5 ++ 6 files changed, 173 insertions(+), 1 deletion(-)
Signature · 1 line
2.44.0