mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
devices: gic: Introduce VgicConfig and Gic::create_default_config()
VgicConfig structure will be used for initializing the Vgic. Gic::create_default_config will be used everywhere we currently compute redist/msi registers. Signed-off-by: Nuno Das Neves <nudasnev@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
3a19573c69
commit
a832033531
@@ -16,6 +16,18 @@ pub enum Error {
|
||||
}
|
||||
pub type Result<T> = result::Result<T, Error>;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct VgicConfig {
|
||||
pub vcpu_count: u64,
|
||||
pub dist_addr: u64,
|
||||
pub dist_size: u64,
|
||||
pub redists_addr: u64,
|
||||
pub redists_size: u64,
|
||||
pub msi_addr: u64,
|
||||
pub msi_size: u64,
|
||||
pub nr_irqs: u32,
|
||||
}
|
||||
|
||||
/// Hypervisor agnostic interface for a virtualized GIC
|
||||
pub trait Vgic: Send + Sync {
|
||||
/// Returns the fdt compatibility property of the device
|
||||
|
||||
Reference in New Issue
Block a user