Skip to content
Commit af406bdb authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta Committed by Greg Kroah-Hartman
Browse files

KVM: arm64: Fix hardware enable/disable flows for pKVM

commit c718ca0e upstream.

When running in protected mode, the hyp stub is disabled after pKVM is
initialized, meaning the host cannot enable/disable the hyp at
runtime. As such, kvm_arm_hardware_enabled is always 1 after
initialization, and kvm_arch_hardware_enable() never enables the vgic
maintenance irq or timer irqs.

Unconditionally enable/disable the vgic + timer irqs in the respective
calls, instead relying on the percpu bookkeeping in the generic code
to keep track of which cpus have the interrupts unmasked.

Fixes: 466d27e4

 ("KVM: arm64: Simplify the CPUHP logic")
Reported-by: default avatarOliver Upton <oliver.upton@linux.dev>
Suggested-by: default avatarOliver Upton <oliver.upton@linux.dev>
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@google.com>
Link: https://lore.kernel.org/r/20230719175400.647154-1-rananta@google.com
Acked-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4d3fd2be
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment