2022-04-20 23:45:14

by Ben Gardon

[permalink] [raw]
Subject: [PATCH v6 07/10] KVM: x86: Fix errant brace in KVM capability handling

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 <[email protected]>
Signed-off-by: Ben Gardon <[email protected]>
---
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ab336f7c82e4..665c1fa8bb57 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4382,10 +4382,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;
--
2.36.0.rc0.470.gd361397f0d-goog


2022-04-21 23:06:22

by Peter Xu

[permalink] [raw]
Subject: Re: [PATCH v6 07/10] KVM: x86: Fix errant brace in KVM capability handling

On Wed, Apr 20, 2022 at 10:35:10AM -0700, Ben Gardon wrote:
> 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 <[email protected]>
> Signed-off-by: Ben Gardon <[email protected]>

Reviewed-by: Peter Xu <[email protected]>

--
Peter Xu