mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
vmm: tdx: Correctly populate the 64-bit MMIO region
The MMIO structure contains the length rather than the maximum address so it is necessary to subtract the starting address from the end address to calculate the length. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
4e307788b7
commit
66ffaceffc
@ -1652,8 +1652,12 @@ impl Vm {
|
||||
.unwrap()
|
||||
.end_of_device_area()
|
||||
.raw_value();
|
||||
hob.add_mmio_resource(&mem, start_of_device_area, end_of_device_area)
|
||||
.map_err(Error::PopulateHob)?;
|
||||
hob.add_mmio_resource(
|
||||
&mem,
|
||||
start_of_device_area,
|
||||
end_of_device_area - start_of_device_area,
|
||||
)
|
||||
.map_err(Error::PopulateHob)?;
|
||||
|
||||
hob.finish(&mem).map_err(Error::PopulateHob)?;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user