mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
devices: fix pv_panic alignment
Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
This commit is contained in:
parent
0299bec152
commit
5f3ff3c44a
@ -26,6 +26,7 @@ const PVPANIC_VENDOR_ID: u16 = 0x1b36;
|
|||||||
const PVPANIC_DEVICE_ID: u16 = 0x0011;
|
const PVPANIC_DEVICE_ID: u16 = 0x0011;
|
||||||
|
|
||||||
pub const PVPANIC_DEVICE_MMIO_SIZE: u64 = 0x2;
|
pub const PVPANIC_DEVICE_MMIO_SIZE: u64 = 0x2;
|
||||||
|
pub const PVPANIC_DEVICE_MMIO_ALIGNMENT: u64 = 0x10;
|
||||||
|
|
||||||
const PVPANIC_PANICKED: u8 = 1 << 0;
|
const PVPANIC_PANICKED: u8 = 1 << 0;
|
||||||
const PVPANIC_CRASH_LOADED: u8 = 1 << 1;
|
const PVPANIC_CRASH_LOADED: u8 = 1 << 1;
|
||||||
@ -192,7 +193,7 @@ impl PciDevice for PvPanicDevice {
|
|||||||
let bar_addr = allocator
|
let bar_addr = allocator
|
||||||
.lock()
|
.lock()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.allocate_mmio_hole_addresses(None, region_size, None)
|
.allocate_mmio_hole_addresses(None, region_size, Some(PVPANIC_DEVICE_MMIO_ALIGNMENT))
|
||||||
.ok_or(PciDeviceError::IoAllocationFailed(region_size))?;
|
.ok_or(PciDeviceError::IoAllocationFailed(region_size))?;
|
||||||
|
|
||||||
let bar = PciBarConfiguration::default()
|
let bar = PciBarConfiguration::default()
|
||||||
|
Loading…
Reference in New Issue
Block a user