mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user