All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm:queue 145/149] arch/x86/kvm/vmx/vmx.c:6696:17: warning: variable 'msr_bitmap' set but not used
@ 2020-09-26  0:40 kernel test robot
  2020-09-26 11:04 ` Alexander Graf
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-09-26  0:40 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 14726 bytes --]

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@intel.com>

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;
         |                 ^~~~~~~~~~

vim +/msr_bitmap +6696 arch/x86/kvm/vmx/vmx.c

cb61de2f4819b2 arch/x86/kvm/vmx.c     Sean Christopherson 2018-09-26  6692  
987b2594ed5d12 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6693  static int vmx_create_vcpu(struct kvm_vcpu *vcpu)
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6694  {
4183683918efc3 arch/x86/kvm/vmx/vmx.c Ben Gardon          2019-02-11  6695  	struct vcpu_vmx *vmx;
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03 @6696  	unsigned long *msr_bitmap;
34109c0476f10c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6697  	int i, cpu, err;
12b58f4ed2a1b9 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-08-15  6698  
a9dd6f09d7e54d arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6699  	BUILD_BUG_ON(offsetof(struct vcpu_vmx, vcpu) != 0);
a9dd6f09d7e54d arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6700  	vmx = to_vmx(vcpu);
d9a710e5fc4941 arch/x86/kvm/vmx/vmx.c Wanpeng Li          2019-07-22  6701  
b666a4b697397f arch/x86/kvm/vmx/vmx.c Marc Orr            2018-11-06  6702  	err = -ENOMEM;
b666a4b697397f arch/x86/kvm/vmx/vmx.c Marc Orr            2018-11-06  6703  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6704  	vmx->vpid = allocate_vpid();
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6705  
4704d0befb0721 arch/x86/kvm/vmx.c     Nadav Har'El        2011-05-25  6706  	/*
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6707  	 * If PML is turned on, failure on enabling PML just results in failure
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6708  	 * of creating the vcpu, therefore we can simplify PML logic (by
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6709  	 * avoiding dealing with cases, such as enabling PML partially on vcpus
67b0ae43df179f arch/x86/kvm/vmx/vmx.c Miaohe Lin          2019-12-11  6710  	 * for the guest), etc.
4704d0befb0721 arch/x86/kvm/vmx.c     Nadav Har'El        2011-05-25  6711  	 */
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6712  	if (enable_pml) {
4183683918efc3 arch/x86/kvm/vmx/vmx.c Ben Gardon          2019-02-11  6713  		vmx->pml_pg = alloc_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO);
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6714  		if (!vmx->pml_pg)
987b2594ed5d12 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6715  			goto free_vpid;
4704d0befb0721 arch/x86/kvm/vmx.c     Nadav Har'El        2011-05-25  6716  	}
4704d0befb0721 arch/x86/kvm/vmx.c     Nadav Har'El        2011-05-25  6717  
32f6b2af432079 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6718  	BUILD_BUG_ON(ARRAY_SIZE(vmx_uret_msrs_list) != MAX_NR_USER_RETURN_MSRS);
36be0b9deb2316 arch/x86/kvm/vmx.c     Paolo Bonzini       2014-02-24  6719  
32f6b2af432079 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6720  	for (i = 0; i < ARRAY_SIZE(vmx_uret_msrs_list); ++i) {
32f6b2af432079 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6721  		u32 index = vmx_uret_msrs_list[i];
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6722  		u32 data_low, data_high;
1092acd8977e78 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6723  		int j = vmx->nr_uret_msrs;
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6724  
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6725  		if (rdmsr_safe(index, &data_low, &data_high) < 0)
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6726  			continue;
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6727  		if (wrmsr_safe(index, data_low, data_high) < 0)
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6728  			continue;
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6729  
9f69a5dbc61f40 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6730  		vmx->guest_uret_msrs[j].slot = i;
bb5872c7537a6c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6731  		vmx->guest_uret_msrs[j].data = 0;
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6732  		switch (index) {
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6733  		case MSR_IA32_TSX_CTRL:
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6734  			/*
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6735  			 * No need to pass TSX_CTRL_CPUID_CLEAR through, so
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6736  			 * let's avoid changing CPUID bits under the host
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6737  			 * kernel's feet.
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6738  			 */
bb5872c7537a6c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6739  			vmx->guest_uret_msrs[j].mask = ~(u64)TSX_CTRL_CPUID_CLEAR;
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6740  			break;
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6741  		default:
bb5872c7537a6c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6742  			vmx->guest_uret_msrs[j].mask = -1ull;
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6743  			break;
46f4f0aabc61bf arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2019-11-21  6744  		}
1092acd8977e78 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2020-09-23  6745  		++vmx->nr_uret_msrs;
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6746  	}
4be53410262468 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6747  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6748  	err = alloc_loaded_vmcs(&vmx->vmcs01);
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6749  	if (err < 0)
7d73710d9ca256 arch/x86/kvm/vmx/vmx.c Jim Mattson         2019-12-03  6750  		goto free_pml;
21feb4eb64e21f arch/x86/kvm/vmx.c     Arthur Chunqi Li    2013-07-15  6751  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6752  	msr_bitmap = vmx->vmcs01.msr_bitmap;
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6753  	vmx_disable_intercept_for_msr(vcpu, MSR_IA32_TSC, MSR_TYPE_R);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6754  	vmx_disable_intercept_for_msr(vcpu, MSR_FS_BASE, MSR_TYPE_RW);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6755  	vmx_disable_intercept_for_msr(vcpu, MSR_GS_BASE, MSR_TYPE_RW);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6756  	vmx_disable_intercept_for_msr(vcpu, MSR_KERNEL_GS_BASE, MSR_TYPE_RW);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6757  	vmx_disable_intercept_for_msr(vcpu, MSR_IA32_SYSENTER_CS, MSR_TYPE_RW);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6758  	vmx_disable_intercept_for_msr(vcpu, MSR_IA32_SYSENTER_ESP, MSR_TYPE_RW);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6759  	vmx_disable_intercept_for_msr(vcpu, MSR_IA32_SYSENTER_EIP, MSR_TYPE_RW);
987b2594ed5d12 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6760  	if (kvm_cstate_in_guest(vcpu->kvm)) {
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6761  		vmx_disable_intercept_for_msr(vcpu, MSR_CORE_C1_RES, MSR_TYPE_R);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6762  		vmx_disable_intercept_for_msr(vcpu, MSR_CORE_C3_RESIDENCY, MSR_TYPE_R);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6763  		vmx_disable_intercept_for_msr(vcpu, MSR_CORE_C6_RESIDENCY, MSR_TYPE_R);
a804ea48d4536b arch/x86/kvm/vmx/vmx.c Aaron Lewis         2020-09-25  6764  		vmx_disable_intercept_for_msr(vcpu, MSR_CORE_C7_RESIDENCY, MSR_TYPE_R);
b51700632e0e53 arch/x86/kvm/vmx/vmx.c Wanpeng Li          2019-05-21  6765  	}
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6766  	vmx->msr_bitmap_mode = 0;
ff651cb613b4cc arch/x86/kvm/vmx.c     Wincy Van           2014-12-11  6767  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6768  	vmx->loaded_vmcs = &vmx->vmcs01;
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6769  	cpu = get_cpu();
34109c0476f10c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6770  	vmx_vcpu_load(vcpu, cpu);
34109c0476f10c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6771  	vcpu->cpu = cpu;
1b84292bea00c0 arch/x86/kvm/vmx/vmx.c Xiaoyao Li          2019-10-20  6772  	init_vmcs(vmx);
34109c0476f10c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6773  	vmx_vcpu_put(vcpu);
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6774  	put_cpu();
34109c0476f10c arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6775  	if (cpu_need_virtualize_apic_accesses(vcpu)) {
987b2594ed5d12 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6776  		err = alloc_apic_access_page(vcpu->kvm);
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6777  		if (err)
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6778  			goto free_vmcs;
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6779  	}
3af18d9c5fe95a arch/x86/kvm/vmx.c     Wincy Van           2015-02-03  6780  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6781  	if (enable_ept && !enable_unrestricted_guest) {
987b2594ed5d12 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6782  		err = init_rmode_identity_map(vcpu->kvm);
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6783  		if (err)
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6784  			goto free_vmcs;
4704d0befb0721 arch/x86/kvm/vmx.c     Nadav Har'El        2011-05-25  6785  	}
4704d0befb0721 arch/x86/kvm/vmx.c     Nadav Har'El        2011-05-25  6786  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6787  	if (nested)
a44e9dc3754e12 arch/x86/kvm/vmx/vmx.c Chenyi Qiang        2020-08-28  6788  		memcpy(&vmx->nested.msrs, &vmcs_config.nested, sizeof(vmx->nested.msrs));
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6789  	else
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6790  		memset(&vmx->nested.msrs, 0, sizeof(vmx->nested.msrs));
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6791  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6792  	vmx->nested.posted_intr_nv = -1;
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6793  	vmx->nested.current_vmptr = -1ull;
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6794  
bab0c318ba3da3 arch/x86/kvm/vmx/vmx.c Paolo Bonzini       2020-02-11  6795  	vcpu->arch.microcode_version = 0x100000000ULL;
32ad73db7fc5fe arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-20  6796  	vmx->msr_ia32_feature_control_valid_bits = FEAT_CTL_LOCKED;
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6797  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6798  	/*
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6799  	 * Enforce invariant: pi_desc.nv is always either POSTED_INTR_VECTOR
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6800  	 * or POSTED_INTR_WAKEUP_VECTOR.
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6801  	 */
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6802  	vmx->pi_desc.nv = POSTED_INTR_VECTOR;
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6803  	vmx->pi_desc.sn = 1;
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6804  
53963a70ac268c arch/x86/kvm/vmx/vmx.c Lan Tianyu          2018-12-06  6805  	vmx->ept_pointer = INVALID_PAGE;
53963a70ac268c arch/x86/kvm/vmx/vmx.c Lan Tianyu          2018-12-06  6806  
a9dd6f09d7e54d arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6807  	return 0;
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6808  
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6809  free_vmcs:
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6810  	free_loaded_vmcs(vmx->loaded_vmcs);
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6811  free_pml:
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6812  	vmx_destroy_pml_buffer(vmx);
987b2594ed5d12 arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6813  free_vpid:
55d2375e58a61b arch/x86/kvm/vmx/vmx.c Sean Christopherson 2018-12-03  6814  	free_vpid(vmx->vpid);
a9dd6f09d7e54d arch/x86/kvm/vmx/vmx.c Sean Christopherson 2019-12-18  6815  	return err;
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6816  }
bd18bffca35397 arch/x86/kvm/vmx.c     Sean Christopherson 2018-08-22  6817  

:::::: The code at line 6696 was first introduced by commit
:::::: 55d2375e58a61be072431dd3d3c8a320f4a4a01b KVM: nVMX: Move nested code to dedicated files

:::::: TO: Sean Christopherson <sean.j.christopherson@intel.com>
:::::: CC: Paolo Bonzini <pbonzini@redhat.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 74731 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [kvm:queue 145/149] arch/x86/kvm/vmx/vmx.c:6696:17: warning: variable 'msr_bitmap' set but not used
  2020-09-26  0:40 [kvm:queue 145/149] arch/x86/kvm/vmx/vmx.c:6696:17: warning: variable 'msr_bitmap' set but not used kernel test robot
@ 2020-09-26 11:04 ` Alexander Graf
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Graf @ 2020-09-26 11:04 UTC (permalink / raw)
  To: kernel test robot, Aaron Lewis
  Cc: kbuild-all, kvm, Robert Hu, Farrah Chen, Danmei Wei,
	Paolo Bonzini, Oliver Upton

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@intel.com>
> 
> 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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-26 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26  0:40 [kvm:queue 145/149] arch/x86/kvm/vmx/vmx.c:6696:17: warning: variable 'msr_bitmap' set but not used kernel test robot
2020-09-26 11:04 ` Alexander Graf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.