mbox series

[v2,0/5] kvm: selftests: aarch64: some fixes for vgic_irq

Message ID 20220127030858.3269036-1-ricarkol@google.com (mailing list archive)
Headers show
Series kvm: selftests: aarch64: some fixes for vgic_irq | expand

Message

Ricardo Koller Jan. 27, 2022, 3:08 a.m. UTC
Reiji discovered multiple issues with the vgic_irq series [0]:
1. there's an assert that needs fixing.
2. some guest arguments are not set correctly.
3. the failure test in kvm_set_gsi_routing_irqchip_check is wrong.
4. there are lots of comments that use the wrong formatting.
5. vgic_poke_irq() could use a tighter assert check.

The first 3 issues above are critical, the last 2 would be nice to have.  I
haven't hit the failed assert (1.), but just by chance: my compiler is
initializing the respective local variable to 0. The second issue (2.) leads to
not testing one of the injection methods (irqfd). The third issue could be hit
if we tested more intids.

v1 -> v2:
- adding 3 more fixes: 2, 3, 5 above. (Reiji)
- corrected the comments in 4 above. (Andrew)
- dded drjones@ reviewed-by tag.

[0] https://lore.kernel.org/kvmarm/164072141023.1027791.3183483860602648119.b4-ty@kernel.org/

Ricardo Koller (5):
  kvm: selftests: aarch64: fix assert in gicv3_access_reg
  kvm: selftests: aarch64: pass vgic_irq guest args as a pointer
  kvm: selftests: aarch64: fix the failure check in
    kvm_set_gsi_routing_irqchip_check
  kvm: selftests: aarch64: fix some vgic related comments
  kvm: selftests: aarch64: use a tighter assert in vgic_poke_irq()

 .../testing/selftests/kvm/aarch64/vgic_irq.c  | 45 +++++++++++--------
 .../selftests/kvm/lib/aarch64/gic_v3.c        | 12 ++---
 .../testing/selftests/kvm/lib/aarch64/vgic.c  |  9 ++--
 3 files changed, 38 insertions(+), 28 deletions(-)

Comments

Marc Zyngier Feb. 8, 2022, 5:37 p.m. UTC | #1
On Wed, 26 Jan 2022 19:08:53 -0800, Ricardo Koller wrote:
> Reiji discovered multiple issues with the vgic_irq series [0]:
> 1. there's an assert that needs fixing.
> 2. some guest arguments are not set correctly.
> 3. the failure test in kvm_set_gsi_routing_irqchip_check is wrong.
> 4. there are lots of comments that use the wrong formatting.
> 5. vgic_poke_irq() could use a tighter assert check.
> 
> [...]

Applied to next, thanks!

[1/5] kvm: selftests: aarch64: fix assert in gicv3_access_reg
      commit: cc94d47ce16d4147d546e47c8248e8bd12ba5fe5
[2/5] kvm: selftests: aarch64: pass vgic_irq guest args as a pointer
      commit: 11024a7a0ac26dd31ddfa0f6590e158bdf9ab858
[3/5] kvm: selftests: aarch64: fix the failure check in kvm_set_gsi_routing_irqchip_check
      commit: 5b7898648f02083012900e48d063e51ccbdad165
[4/5] kvm: selftests: aarch64: fix some vgic related comments
      commit: a5cd38fd9c47b23abc6df08d6ee6a71b39038185
[5/5] kvm: selftests: aarch64: use a tighter assert in vgic_poke_irq()
      commit: b53de63a89244c196d8a2ea76b6754e3fdb4b626

Cheers,

	M.