Re: [PATCH v10 15/16] KVM: x86: Add kexec support for SEV Live Migration.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ashish,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v5.11-rc6]
[also build test WARNING on next-20210125]
[cannot apply to kvm/linux-next tip/x86/mm tip/x86/core]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ashish-Kalra/KVM-SVM-Add-KVM_SEV-SEND_START-command/20210204-093647
base:    1048ba83fb1c00cd24172e23e8263972f6b5d9ac
config: i386-randconfig-r034-20210202 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/51c7205a5d0abf98f52da67fcf7a223c521f9693
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ashish-Kalra/KVM-SVM-Add-KVM_SEV-SEND_START-command/20210204-093647
        git checkout 51c7205a5d0abf98f52da67fcf7a223c521f9693
        # 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/kernel/kvm.c: In function 'kvm_pv_guest_cpu_reboot':
>> arch/x86/kernel/kvm.c:402:18: warning: variable 'end_pfn' set but not used [-Wunused-but-set-variable]
     402 |    unsigned long end_pfn;
         |                  ^~~~~~~
>> arch/x86/kernel/kvm.c:401:18: warning: variable 'start_pfn' set but not used [-Wunused-but-set-variable]
     401 |    unsigned long start_pfn;
         |                  ^~~~~~~~~


vim +/end_pfn +402 arch/x86/kernel/kvm.c

   378	
   379	static void kvm_pv_guest_cpu_reboot(void *unused)
   380	{
   381		/*
   382		 * We disable PV EOI before we load a new kernel by kexec,
   383		 * since MSR_KVM_PV_EOI_EN stores a pointer into old kernel's memory.
   384		 * New kernel can re-enable when it boots.
   385		 */
   386		if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
   387			wrmsrl(MSR_KVM_PV_EOI_EN, 0);
   388		/*
   389		 * Reset the host's shared pages list related to kernel
   390		 * specific page encryption status settings before we load a
   391		 * new kernel by kexec. NOTE: We cannot reset the complete
   392		 * shared pages list here as we need to retain the
   393		 * UEFI/OVMF firmware specific settings.
   394		 */
   395		if (sev_live_migration_enabled & (smp_processor_id() == 0)) {
   396			int i;
   397			unsigned long nr_pages;
   398	
   399			for (i = 0; i < e820_table->nr_entries; i++) {
   400				struct e820_entry *entry = &e820_table->entries[i];
 > 401				unsigned long start_pfn;
 > 402				unsigned long end_pfn;
   403	
   404				if (entry->type != E820_TYPE_RAM)
   405					continue;
   406	
   407				start_pfn = entry->addr >> PAGE_SHIFT;
   408				end_pfn = (entry->addr + entry->size) >> PAGE_SHIFT;
   409				nr_pages = DIV_ROUND_UP(entry->size, PAGE_SIZE);
   410	
   411				kvm_sev_hypercall3(KVM_HC_PAGE_ENC_STATUS,
   412						   entry->addr, nr_pages, 1);
   413			}
   414		}
   415		kvm_pv_disable_apf();
   416		kvm_disable_steal_time();
   417	}
   418	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux