]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: x86: Fix errant brace in KVM capability handling
authorBen Gardon <bgardon@google.com>
Mon, 13 Jun 2022 21:25:20 +0000 (21:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:41:38 +0000 (14:41 +0200)
[ Upstream commit 1c4dc57328bf218e999951824dce75c6125c4f3c ]

The braces around the KVM_CAP_XSAVE2 block also surround the
KVM_CAP_PMU_CAPABILITY block, likely the result of a merge issue. Simply
move the curly brace back to where it belongs.

Fixes: ba7bb663f5547 ("KVM: x86: Provide per VM capability for disabling PMU virtualization")
Reviewed-by: David Matlack <dmatlack@google.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20220613212523.3436117-8-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/x86.c

index cc2c89c08d85f3ea7ef30a481717e9015ab3d5fa..767a61e29f5111f6849ab8d1b6ed3da432ce8036 100644 (file)
@@ -4377,10 +4377,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
                if (r < sizeof(struct kvm_xsave))
                        r = sizeof(struct kvm_xsave);
                break;
+       }
        case KVM_CAP_PMU_CAPABILITY:
                r = enable_pmu ? KVM_CAP_PMU_VALID_MASK : 0;
                break;
-       }
        case KVM_CAP_DISABLE_QUIRKS2:
                r = KVM_X86_VALID_QUIRKS;
                break;