|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/PVH: don't open-code elf_round_up()
commit d7ef23954c1ccdb99f4107ca26278950ab0bbfe8
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Mar 24 12:54:27 2025 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Mar 24 12:54:27 2025 +0100
x86/PVH: don't open-code elf_round_up()
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/hvm/dom0_build.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index 6591949984..6e287a81e7 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -718,8 +718,7 @@ static int __init pvh_load_kernel(
extra_space += sizeof(mod) + ROUNDUP(initrd_len, PAGE_SIZE);
if ( cmdline )
- extra_space += ROUNDUP(strlen(cmdline) + 1,
- elf_64bit(&elf) ? 8 : 4);
+ extra_space += elf_round_up(&elf, strlen(cmdline) + 1);
last_addr = find_memory(d, &elf, extra_space);
if ( last_addr == INVALID_PADDR )
@@ -740,7 +739,7 @@ static int __init pvh_load_kernel(
mod.paddr = last_addr;
mod.size = initrd_len;
- last_addr += ROUNDUP(initrd_len, elf_64bit(&elf) ? 8 : 4);
+ last_addr += elf_round_up(&elf, initrd_len);
if ( initrd->cmdline_pa )
{
char *str = __va(initrd->cmdline_pa);
@@ -774,7 +773,7 @@ static int __init pvh_load_kernel(
* Round up to 32/64 bits (depending on the guest kernel bitness) so
* the modlist/start_info is aligned.
*/
- last_addr += ROUNDUP(strlen(cmdline) + 1, elf_64bit(&elf) ? 8 : 4);
+ last_addr += elf_round_up(&elf, strlen(cmdline) + 1);
}
if ( initrd != NULL )
{
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |