diff options
author | Ricardo Koller <ricarkol@google.com> | 2021-11-08 18:39:01 -0800 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-12-28 19:24:35 +0000 |
commit | 6830fa915912587a7aa304bade01b366cf0b9214 (patch) | |
tree | 5ebd6c0d17a721cc49b575551bb359076d4383e8 | |
parent | 92f2cc4aa7964d4d13681eeb38582bb989b01b98 (diff) | |
download | linux-6830fa915912587a7aa304bade01b366cf0b9214.tar.bz2 |
KVM: selftests: aarch64: Add tests for LEVEL_INFO in vgic_irq
Add injection tests for the LEVEL_INFO ioctl (level-sensitive specific)
into vgic_irq.
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Acked-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211109023906.1091208-13-ricarkol@google.com
-rw-r--r-- | tools/testing/selftests/kvm/aarch64/vgic_irq.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/vgic_irq.c b/tools/testing/selftests/kvm/aarch64/vgic_irq.c index a20d225367a1..bc1b6fd684fc 100644 --- a/tools/testing/selftests/kvm/aarch64/vgic_irq.c +++ b/tools/testing/selftests/kvm/aarch64/vgic_irq.c @@ -60,6 +60,7 @@ typedef enum { KVM_INJECT_EDGE_IRQ_LINE = 1, KVM_SET_IRQ_LINE, KVM_SET_IRQ_LINE_HIGH, + KVM_SET_LEVEL_INFO_HIGH, } kvm_inject_cmd; struct kvm_inject_args { @@ -98,6 +99,7 @@ static struct kvm_inject_desc inject_edge_fns[] = { static struct kvm_inject_desc inject_level_fns[] = { /* sgi ppi spi */ { KVM_SET_IRQ_LINE_HIGH, false, true, true }, + { KVM_SET_LEVEL_INFO_HIGH, false, true, true }, { 0, }, }; @@ -406,6 +408,10 @@ static void run_guest_cmd(struct kvm_vm *vm, int gic_fd, for (i = intid; i < intid + num; i++) kvm_arm_irq_line(vm, i, 1); break; + case KVM_SET_LEVEL_INFO_HIGH: + for (i = intid; i < intid + num; i++) + kvm_irq_set_level_info(gic_fd, i, 1); + break; default: break; } |