diff options
author | Marc Zyngier <maz@kernel.org> | 2024-11-17 19:57:55 +0300 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2024-11-21 04:21:08 +0300 |
commit | add570b39f9fc4b830e7f4b487bbc16d74c388ad (patch) | |
tree | e9d7d3c48e0f76b4a4385e8e526f51ed18a4297d /tools/perf/scripts/python/arm-cs-trace-disasm.py | |
parent | d561491ba927cb5634094ff311795e9d618e9b86 (diff) | |
download | linux-add570b39f9fc4b830e7f4b487bbc16d74c388ad.tar.xz |
KVM: arm64: vgic: Make vgic_get_irq() more robust
vgic_get_irq() has an awkward signature, as it takes both a kvm
*and* a vcpu, where the vcpu is allowed to be NULL if the INTID
being looked up is a global interrupt (SPI or LPI).
This leads to potentially problematic situations where the INTID
passed is a private interrupt, but that there is no vcpu.
In order to make things less ambiguous, let have *two* helpers
instead:
- vgic_get_irq(struct kvm *kvm, u32 intid), which is only concerned
with *global* interrupts, as indicated by the lack of vcpu.
- vgic_get_vcpu_irq(struct kvm_vcpu *vcpu, u32 intid), which can
return *any* interrupt class, but must have of course a non-NULL
vcpu.
Most of the code nicely falls under one or the other situations,
except for a couple of cases (close to the UABI or in the debug code)
where we have to distinguish between the two cases.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241117165757.247686-3-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
0 files changed, 0 insertions, 0 deletions