gem5  v22.1.0.0
Functions
KVM Interrupt handling.

These methods control interrupt delivery to the guest system. More...

Functions

void gem5::BaseKvmCPU::kvmNonMaskableInterrupt ()
 Send a non-maskable interrupt to the guest. More...
 
void gem5::BaseKvmCPU::kvmInterrupt (const struct kvm_interrupt &interrupt)
 Send a normal interrupt to the guest. More...
 
void gem5::KvmVM::createIRQChip ()
 Create an in-kernel interrupt controller. More...
 
void gem5::KvmVM::setIRQLine (uint32_t irq, bool high)
 Set the status of an IRQ line using KVM_IRQ_LINE. More...
 
bool gem5::KvmVM::hasKernelIRQChip () const
 Is in-kernel IRQ chip emulation enabled? More...
 
void gem5::KvmVM::enableKernelIRQChip ()
 Tell the VM and VCPUs to use an in-kernel IRQ chip for interrupt delivery. More...
 

Detailed Description

These methods control interrupt delivery to the guest system.

Function Documentation

◆ createIRQChip()

void gem5::KvmVM::createIRQChip ( )

Create an in-kernel interrupt controller.

Note
This functionality depends on Kvm::capIRQChip().

Definition at line 510 of file vm.cc.

References gem5::KvmVM::_hasKernelIRQChip, gem5::KvmVM::ioctl(), panic, and warn.

◆ enableKernelIRQChip()

void gem5::KvmVM::enableKernelIRQChip ( )
inline

Tell the VM and VCPUs to use an in-kernel IRQ chip for interrupt delivery.

Note
This is set automatically if the IRQ chip is created using the KvmVM::createIRQChip() API.

Definition at line 372 of file vm.hh.

References gem5::KvmVM::_hasKernelIRQChip.

Referenced by gem5::KvmKernelGic::KvmKernelGic().

◆ hasKernelIRQChip()

bool gem5::KvmVM::hasKernelIRQChip ( ) const
inline

Is in-kernel IRQ chip emulation enabled?

Definition at line 363 of file vm.hh.

References gem5::KvmVM::_hasKernelIRQChip.

Referenced by gem5::BaseArmKvmCPU::kvmRun(), and gem5::BaseArmKvmCPU::startup().

◆ kvmInterrupt()

void gem5::BaseKvmCPU::kvmInterrupt ( const struct kvm_interrupt &  interrupt)
protected

Send a normal interrupt to the guest.

Note
Make sure that ready_for_interrupt_injection in kvm_run is set prior to calling this function. If not, an interrupt window must be requested by setting request_interrupt_window in kvm_run to 1 and restarting the guest.
Parameters
interruptStructure describing the interrupt to send

Definition at line 804 of file base.cc.

References gem5::BaseKvmCPU::ioctl(), gem5::BaseKvmCPU::StatGroup::numInterrupts, panic, and gem5::BaseKvmCPU::stats.

Referenced by gem5::X86KvmCPU::deliverInterrupts().

◆ kvmNonMaskableInterrupt()

void gem5::BaseKvmCPU::kvmNonMaskableInterrupt ( )
protected

Send a non-maskable interrupt to the guest.

Note
The presence of this call depends on Kvm::capUserNMI().

Definition at line 796 of file base.cc.

References gem5::BaseKvmCPU::ioctl(), gem5::BaseKvmCPU::StatGroup::numInterrupts, panic, and gem5::BaseKvmCPU::stats.

Referenced by gem5::X86KvmCPU::deliverInterrupts().

◆ setIRQLine()

void gem5::KvmVM::setIRQLine ( uint32_t  irq,
bool  high 
)

Set the status of an IRQ line using KVM_IRQ_LINE.

Note
This ioctl is usually only used if the interrupt controller is emulated by the kernel (i.e., after calling createIRQChip()). Some architectures (e.g., ARM) use it instead of BaseKvmCPU::kvmInterrupt().
Parameters
irqInterrupt number
highLine level (true for high, false for low)

Definition at line 525 of file vm.cc.

References gem5::high, gem5::KvmVM::ioctl(), gem5::ArmISA::irq, and panic.

Referenced by gem5::ArmKvmCPU::kvmRun(), gem5::BaseArmKvmCPU::kvmRun(), and gem5::KvmKernelGic::setIntState().


Generated on Wed Dec 21 2022 10:23:05 for gem5 by doxygen 1.9.1