All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v10 15/16] KVM: x86: Add kexec support for SEV Live Migration.
Date: Mon, 08 Feb 2021 09:46:15 +0800	[thread overview]
Message-ID: <202102080909.l9Revz50-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <11de0243f7991ebe2b6a2acd4992cd7dcc5afb61.1612398155.git.ashish.kalra@amd.com>
References: <11de0243f7991ebe2b6a2acd4992cd7dcc5afb61.1612398155.git.ashish.kalra@amd.com>
TO: Ashish Kalra <Ashish.Kalra@amd.com>
TO: pbonzini(a)redhat.com
CC: tglx(a)linutronix.de
CC: mingo(a)redhat.com
CC: hpa(a)zytor.com
CC: rkrcmar(a)redhat.com
CC: joro(a)8bytes.org
CC: bp(a)suse.de
CC: thomas.lendacky(a)amd.com
CC: x86(a)kernel.org
CC: kvm(a)vger.kernel.org

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
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: i386-randconfig-m021-20210207 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
arch/x86/kernel/kvm.c:395 kvm_pv_guest_cpu_reboot() warn: maybe use && instead of &
arch/x86/kernel/kvm.c:395 kvm_pv_guest_cpu_reboot() warn: bitwise AND condition is false here

vim +395 arch/x86/kernel/kvm.c

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

---
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: 38375 bytes --]

             reply	other threads:[~2021-02-08  1:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  1:46 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-04  0:35 [PATCH v10 00/17] Add AMD SEV guest live migration support Ashish Kalra
2021-02-04  0:40 ` [PATCH v10 15/16] KVM: x86: Add kexec support for SEV Live Migration Ashish Kalra
2021-02-04  4:10   ` kernel test robot
2021-02-04  4:10     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202102080909.l9Revz50-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.