mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-21 20:15:21 +00:00
arch: return the correct size for SMBIOS occupied space
The original value didn't include the size of the entry point structure. The caused the last entry to be corrupted by other code. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
05e0daa411
commit
cb18edb535
@ -250,7 +250,7 @@ pub fn setup_smbios(
|
||||
.map_err(|_| Error::WriteSmbiosEp)?;
|
||||
}
|
||||
|
||||
Ok(curptr.unchecked_offset_from(physptr))
|
||||
Ok(curptr.unchecked_offset_from(physptr) + std::mem::size_of::<Smbios30Entrypoint>() as u64)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user