diff options
author | Marc Zyngier <maz@kernel.org> | 2023-12-07 18:11:59 +0300 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2023-12-12 10:11:38 +0300 |
commit | 02e3858f08faabab9503ae2911cf7c7e27702257 (patch) | |
tree | f314b7f0b0b0785531c9ed54cdd3f59b7b7bb4e7 /arch/arm64/kvm/vgic/vgic.h | |
parent | d26b9cb33c2d1ba68d1f26bb06c40300f16a3799 (diff) | |
download | linux-02e3858f08faabab9503ae2911cf7c7e27702257.tar.xz |
KVM: arm64: vgic: Force vcpu vgic teardown on vcpu destroy
When failing to create a vcpu because (for example) it has a
duplicate vcpu_id, we destroy the vcpu. Amusingly, this leaves
the redistributor registered with the KVM_MMIO bus.
This is no good, and we should properly clean the mess. Force
a teardown of the vgic vcpu interface, including the RD device
before returning to the caller.
Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231207151201.3028710-4-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/kvm/vgic/vgic.h')
-rw-r--r-- | arch/arm64/kvm/vgic/vgic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kvm/vgic/vgic.h b/arch/arm64/kvm/vgic/vgic.h index 0ab09b0d4440..8d134569d0a1 100644 --- a/arch/arm64/kvm/vgic/vgic.h +++ b/arch/arm64/kvm/vgic/vgic.h @@ -241,6 +241,7 @@ int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq); int vgic_v3_save_pending_tables(struct kvm *kvm); int vgic_v3_set_redist_base(struct kvm *kvm, u32 index, u64 addr, u32 count); int vgic_register_redist_iodev(struct kvm_vcpu *vcpu); +void vgic_unregister_redist_iodev(struct kvm_vcpu *vcpu); bool vgic_v3_check_base(struct kvm *kvm); void vgic_v3_load(struct kvm_vcpu *vcpu); |