mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
aarch64: Fix IRQ number setting for ACPI
On FDT, VMM can allocate IRQ from 0 for devices. But on ACPI, the lowest range below 32 has to be avoided. Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
efc583c13e
commit
ff46fb69d0
@@ -456,7 +456,7 @@ mod tests {
|
||||
let res = get_dist_regs(gic.device());
|
||||
assert!(res.is_ok());
|
||||
let state = res.unwrap();
|
||||
assert_eq!(state.len(), 649);
|
||||
assert_eq!(state.len(), 568);
|
||||
|
||||
let res = set_dist_regs(gic.device(), &state);
|
||||
assert!(res.is_ok());
|
||||
|
||||
@@ -2425,20 +2425,23 @@ mod tests {
|
||||
let dev_info: HashMap<(DeviceType, std::string::String), MmioDeviceInfo> = [
|
||||
(
|
||||
(DeviceType::Serial, DeviceType::Serial.to_string()),
|
||||
MmioDeviceInfo { addr: 0x00, irq: 1 },
|
||||
MmioDeviceInfo {
|
||||
addr: 0x00,
|
||||
irq: 33,
|
||||
},
|
||||
),
|
||||
(
|
||||
(DeviceType::Virtio(1), "virtio".to_string()),
|
||||
MmioDeviceInfo {
|
||||
addr: 0x00 + LEN,
|
||||
irq: 2,
|
||||
irq: 34,
|
||||
},
|
||||
),
|
||||
(
|
||||
(DeviceType::Rtc, "rtc".to_string()),
|
||||
MmioDeviceInfo {
|
||||
addr: 0x00 + 2 * LEN,
|
||||
irq: 3,
|
||||
irq: 35,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user