vmm: refactor alignment
Context [0]. [0] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7256#discussion_r2298538384 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
parent
c995b72384
commit
1179a1a1c9
1 changed files with 2 additions and 2 deletions
|
|
@ -1177,8 +1177,8 @@ impl Vm {
|
|||
let guest_memory = memory_manager.lock().as_ref().unwrap().guest_memory();
|
||||
let mem = guest_memory.memory();
|
||||
let alignment = 0x20_0000;
|
||||
let aligned_kernel_addr =
|
||||
(arch::layout::KERNEL_START.0 + (alignment - 1)) & !(alignment - 1);
|
||||
// round up
|
||||
let aligned_kernel_addr = arch::layout::KERNEL_START.0.div_ceil(alignment) * alignment;
|
||||
let entry_addr = {
|
||||
match linux_loader::loader::pe::PE::load(
|
||||
mem.deref(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue