mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
arch, hypervisor: Report KVM IMSIC interrupt IDs
The RISC-V AIA FDT node currently advertises a fixed riscv,num-ids value. That can diverge from the interrupt identity count configured by KVM, which matters for guests running with an emulated IMSIC. Record the NR_IDS value reported by KVM and expose that value through the generated device tree. Read back the KVM-selected AIA mode without forcing an emulation mode. Assisted-by: OpenAI-Codex:GPT-5 Signed-off-by: wangyf0611 <wangyufeng@iscas.ac.cn>
This commit is contained in:
@@ -46,6 +46,9 @@ pub trait Vaia: Send + Sync {
|
||||
/// Returns an array with IMSIC device properties
|
||||
fn imsic_properties(&self) -> [u32; 4];
|
||||
|
||||
/// Returns the number of IMSIC interrupt identities exposed to the guest
|
||||
fn imsic_num_ids(&self) -> u32;
|
||||
|
||||
/// Returns the number of vCPUs this AIA handles
|
||||
fn vcpu_count(&self) -> u32;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user