Hi Paolo,
On 26.09.20 02:40, kernel test robot wrote:
tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
head: 8a0eda195bff0e494deadd0b2795b914a74c2650
commit: a804ea48d4536bdc01b201564cd24da89c51d36a [145/149] KVM: x86: Prepare MSR bitmaps for userspace tracked MSRs
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?id=a804ea48d4536bdc01b201564cd24da89c51d36a
git remote add kvm https://git.kernel.org/pub/scm/virt/kvm/kvm.git
git fetch --no-tags kvm queue
git checkout a804ea48d4536bdc01b201564cd24da89c51d36a
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
arch/x86/kvm/vmx/vmx.c: In function 'vmx_create_vcpu':
arch/x86/kvm/vmx/vmx.c:6696:17: warning: variable 'msr_bitmap' set but not used [-Wunused-but-set-variable]
6696 | unsigned long *msr_bitmap;
| ^~~~~~~~~~
Can you please squash the following (probably completely mangled) patch
in with the commit "KVM: x86: Prepare MSR bitmaps for userspace tracked
MSRs"?
Sorry I didn't catch this in my compile tests, my gcc didn't warn :(.
Thanks!
Alex
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 4551a7e80ebc..3570ce9bda4b 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6809,7 +6809,6 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
static int vmx_create_vcpu(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx;
- unsigned long *msr_bitmap;
int i, cpu, err;
BUILD_BUG_ON(offsetof(struct vcpu_vmx, vcpu) != 0);
@@ -6869,7 +6868,6 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu)
bitmap_fill(vmx->shadow_msr_intercept.read,
MAX_POSSIBLE_PASSTHROUGH_MSRS);
bitmap_fill(vmx->shadow_msr_intercept.write,
MAX_POSSIBLE_PASSTHROUGH_MSRS);
- msr_bitmap = vmx->vmcs01.msr_bitmap;
vmx_disable_intercept_for_msr(vcpu, MSR_IA32_TSC, MSR_TYPE_R);
vmx_disable_intercept_for_msr(vcpu, MSR_FS_BASE, MSR_TYPE_RW);
vmx_disable_intercept_for_msr(vcpu, MSR_GS_BASE, MSR_TYPE_RW);
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879