[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230315191128.1407655-2-seanjc@google.com>
Date: Wed, 15 Mar 2023 12:11:27 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
Emanuele Giuseppe Esposito <eesposit@...hat.com>
Subject: [PATCH 1/2] KVM: VMX: Drop unprotected-by-braces variable declaration
in case-statement
Remove the intermediate "guest_flush_l1d" boolean to fix a build error on
clang due to the variable being declared inside a case-statement without
curly braces to create a proper code block.
Fixes: c7ed946b95cb ("kvm: vmx: Add IA32_FLUSH_CMD guest support")
Reported-by: kernel test robot <lkp@...el.com>
Link: https://lore.kernel.org/oe-kbuild-all/202303151912.oZ6SGd90-lkp@intel.com
Cc: Emanuele Giuseppe Esposito <eesposit@...hat.com>
Signed-off-by: Sean Christopherson <seanjc@...gle.com>
---
arch/x86/kvm/vmx/vmx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c63f6c786eb1..d7bf14abdba1 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2325,10 +2325,8 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
X86_FEATURE_IBPB);
break;
case MSR_IA32_FLUSH_CMD:
- bool guest_flush_l1d = guest_cpuid_has(vcpu,
- X86_FEATURE_FLUSH_L1D);
ret = vmx_set_msr_ia32_cmd(vcpu, msr_info,
- guest_flush_l1d,
+ guest_cpuid_has(vcpu, X86_FEATURE_FLUSH_L1D),
L1D_FLUSH,
X86_FEATURE_FLUSH_L1D);
break;
--
2.40.0.rc2.332.ga46443480c-goog
Powered by blists - more mailing lists