summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/reset.c
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2023-09-20 22:50:30 +0300
committerOliver Upton <oliver.upton@linux.dev>2023-09-21 21:13:28 +0300
commit9116db11feb521d9eaa850d3a6a8b713f59c6971 (patch)
tree1a04dfc7d9fbbe4399a9dbcbf29cd99b0f51a90b /arch/arm64/kvm/reset.c
parentef150908b6bd80a54126dbec324bd63a24a5628a (diff)
downloadlinux-9116db11feb521d9eaa850d3a6a8b713f59c6971.tar.xz
KVM: arm64: Hoist PMUv3 check into KVM_ARM_VCPU_INIT ioctl handler
Test that the system supports PMUv3 before ever getting to kvm_reset_vcpu(). Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/r/20230920195036.1169791-3-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/kvm/reset.c')
-rw-r--r--arch/arm64/kvm/reset.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index 7a65a35ee4ac..5b5c74cb901d 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -255,11 +255,6 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
else
pstate = VCPU_RESET_PSTATE_EL1;
- if (kvm_vcpu_has_pmu(vcpu) && !kvm_arm_support_pmu_v3()) {
- ret = -EINVAL;
- goto out;
- }
-
/* Reset core registers */
memset(vcpu_gp_regs(vcpu), 0, sizeof(*vcpu_gp_regs(vcpu)));
memset(&vcpu->arch.ctxt.fp_regs, 0, sizeof(vcpu->arch.ctxt.fp_regs));