38 #ifndef __ARCH_ARM_KVM_GIC_HH__ 39 #define __ARCH_ARM_KVM_GIC_HH__ 102 void setPPI(
unsigned vcpu,
unsigned ppi);
110 void clearPPI(
unsigned vcpu,
unsigned ppi);
122 uint32_t
data)
override;
166 struct MuxingKvmGicParams;
174 void startup()
override;
176 void drainResume()
override;
183 void sendInt(uint32_t num)
override;
184 void clearInt(uint32_t num)
override;
186 void sendPPInt(uint32_t num, uint32_t cpu)
override;
187 void clearPPInt(uint32_t num, uint32_t cpu)
override;
190 void updateIntState(
int hint)
override;
203 void fromGicV2ToKvm();
204 void fromKvmToGicV2();
214 Addr daddr,
size_t size);
216 Addr daddr,
size_t size);
218 Addr daddr,
size_t size);
220 Addr daddr,
size_t size);
223 #endif // __ARCH_ARM_KVM_GIC_HH__ void writeDistributor(ContextID ctx, Addr daddr, uint32_t data) override
uint32_t getGicReg(unsigned group, unsigned vcpu, unsigned offset)
Get value of GIC register "from" a cpu.
System & system
System this interrupt controller belongs to.
void setPPI(unsigned vcpu, unsigned ppi)
Raise a private peripheral interrupt.
void setIntState(unsigned type, unsigned vcpu, unsigned irq, bool high)
Update the kernel's VGIC interrupt state.
DrainState
Object drain/handover states.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
KvmKernelGicV2 & operator=(const KvmKernelGicV2 &&rhs)=delete
uint64_t Tick
Tick count type.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void clearPPI(unsigned vcpu, unsigned ppi)
Clear a private peripheral interrupt.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
const AddrRange cpuRange
Address range for the CPU interfaces.
KvmKernelGicV2 * kernelGic
Kernel GIC device.
const AddrRange distRange
Address range for the distributor interface.
void writeCpu(ContextID ctx, Addr daddr, uint32_t data) override
KVM in-kernel GIC abstraction.
KvmVM & vm
KVM VM in the parent system.
virtual ~KvmKernelGicV2()
Implementation of a GICv2.
KvmDevice kdev
Kernel interface to the GIC.
KvmKernelGicV2(KvmVM &vm, Addr cpu_addr, Addr dist_addr, unsigned it_lines)
Instantiate a KVM in-kernel GIC model.
void setSPI(unsigned spi)
Raise a shared peripheral interrupt.
void setGicReg(unsigned group, unsigned vcpu, unsigned offset, unsigned value)
Set value of GIC register "from" a cpu.
void clearSPI(unsigned spi)
Clear a shared peripheral interrupt.
int ContextID
Globally unique thread context ID.
uint32_t readDistributor(ContextID ctx, Addr daddr) override
BaseGicRegisters interface.
uint32_t readCpu(ContextID ctx, Addr daddr) override