mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
KVM: arm64: selftests: vgic_irq: Remove LR-bound limitation
Good news: our GIC emulation is not completely broken, and we can activate as many interrupts as we want. Bump the test to cover all the SGIs, all the allowed PPIs, and 31 SPIs. Yes, 31, because we have 31 available priorities, and the test is not happy with having two interrupts with the same priority. Tested-by: Fuad Tabba <tabba@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Tested-by: Mark Brown <broonie@kernel.org> Link: https://msgid.link/20251120172540.2267180-46-maz@kernel.org Signed-off-by: Oliver Upton <oupton@kernel.org>
This commit is contained in:
committed by
Oliver Upton
parent
5053c2ab92
commit
fd5fa1c8d0
@@ -449,12 +449,6 @@ static void test_injection_failure(struct test_args *args,
|
||||
|
||||
static void test_preemption(struct test_args *args, struct kvm_inject_desc *f)
|
||||
{
|
||||
/*
|
||||
* Test up to 4 levels of preemption. The reason is that KVM doesn't
|
||||
* currently implement the ability to have more than the number-of-LRs
|
||||
* number of concurrently active IRQs. The number of LRs implemented is
|
||||
* IMPLEMENTATION DEFINED, however, it seems that most implement 4.
|
||||
*/
|
||||
/* Timer PPIs cannot be injected from userspace */
|
||||
static const unsigned long ppi_exclude = (BIT(27 - MIN_PPI) |
|
||||
BIT(30 - MIN_PPI) |
|
||||
@@ -462,26 +456,25 @@ static void test_preemption(struct test_args *args, struct kvm_inject_desc *f)
|
||||
BIT(26 - MIN_PPI));
|
||||
|
||||
if (f->sgi)
|
||||
test_inject_preemption(args, MIN_SGI, 4, NULL, f->cmd);
|
||||
test_inject_preemption(args, MIN_SGI, 16, NULL, f->cmd);
|
||||
|
||||
if (f->ppi)
|
||||
test_inject_preemption(args, MIN_PPI, 4, &ppi_exclude, f->cmd);
|
||||
test_inject_preemption(args, MIN_PPI, 16, &ppi_exclude, f->cmd);
|
||||
|
||||
if (f->spi)
|
||||
test_inject_preemption(args, MIN_SPI, 4, NULL, f->cmd);
|
||||
test_inject_preemption(args, MIN_SPI, 31, NULL, f->cmd);
|
||||
}
|
||||
|
||||
static void test_restore_active(struct test_args *args, struct kvm_inject_desc *f)
|
||||
{
|
||||
/* Test up to 4 active IRQs. Same reason as in test_preemption. */
|
||||
if (f->sgi)
|
||||
guest_restore_active(args, MIN_SGI, 4, f->cmd);
|
||||
guest_restore_active(args, MIN_SGI, 16, f->cmd);
|
||||
|
||||
if (f->ppi)
|
||||
guest_restore_active(args, MIN_PPI, 4, f->cmd);
|
||||
guest_restore_active(args, MIN_PPI, 16, f->cmd);
|
||||
|
||||
if (f->spi)
|
||||
guest_restore_active(args, MIN_SPI, 4, f->cmd);
|
||||
guest_restore_active(args, MIN_SPI, 31, f->cmd);
|
||||
}
|
||||
|
||||
static void guest_code(struct test_args *args)
|
||||
|
||||
Reference in New Issue
Block a user