mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 12:41:37 +00:00
kvm tools: Add kvm__trigger_irq()
Add a helper function to trigger an IRQ. This function is usefull when an IRQ line has to be raised and lowered such as when using MSI-X. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
@@ -63,6 +63,7 @@ void kvm__setup_bios(struct kvm *kvm);
|
||||
void kvm__start_timer(struct kvm *kvm);
|
||||
void kvm__stop_timer(struct kvm *kvm);
|
||||
void kvm__irq_line(struct kvm *kvm, int irq, int level);
|
||||
void kvm__irq_trigger(struct kvm *kvm, int irq);
|
||||
bool kvm__emulate_io(struct kvm *kvm, u16 port, void *data, int direction, int size, u32 count);
|
||||
bool kvm__emulate_mmio(struct kvm *kvm, u64 phys_addr, u8 *data, u32 len, u8 is_write);
|
||||
void kvm__register_mem(struct kvm *kvm, u64 guest_phys, u64 size, void *userspace_addr);
|
||||
|
||||
@@ -676,6 +676,12 @@ void kvm__irq_line(struct kvm *kvm, int irq, int level)
|
||||
die_perror("KVM_IRQ_LINE failed");
|
||||
}
|
||||
|
||||
void kvm__irq_trigger(struct kvm *kvm, int irq)
|
||||
{
|
||||
kvm__irq_line(kvm, irq, 1);
|
||||
kvm__irq_line(kvm, irq, 0);
|
||||
}
|
||||
|
||||
void kvm__dump_mem(struct kvm *kvm, unsigned long addr, unsigned long size)
|
||||
{
|
||||
unsigned char *p;
|
||||
|
||||
Reference in New Issue
Block a user