From: kernel test robot <lkp@intel.com>
To: Tom Lendacky <thomas.lendacky@amd.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
x86@kernel.org
Cc: kbuild-all@lists.01.org, Paolo Bonzini <pbonzini@redhat.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Sean Christopherson <sean.j.christopherson@intel.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH v3 05/34] KVM: SVM: Add support for the SEV-ES VMSA
Date: Tue, 10 Nov 2020 11:25:09 +0800 [thread overview]
Message-ID: <202011101129.gLSWA0qG-lkp@intel.com> (raw)
In-Reply-To: <316f09c279628b972730664250903936b8a7b372.1604960760.git.thomas.lendacky@amd.com>
[-- Attachment #1: Type: text/plain, Size: 6923 bytes --]
Hi Tom,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/master]
[also build test WARNING on v5.10-rc3 next-20201109]
[cannot apply to tip/x86/core vhost/linux-next kvm/linux-next]
[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/Tom-Lendacky/SEV-ES-hypervisor-support/20201110-063133
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git a2445441a132ee5b3e61e6a26c27a3491f4296ef
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://github.com/0day-ci/linux/commit/58eb9eb5fdd545590b75f3cf84c62582b012c5b8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tom-Lendacky/SEV-ES-hypervisor-support/20201110-063133
git checkout 58eb9eb5fdd545590b75f3cf84c62582b012c5b8
# 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/svm/sev.c:1198:6: warning: no previous prototype for 'sev_flush_guest_memory' [-Wmissing-prototypes]
1198 | void sev_flush_guest_memory(struct vcpu_svm *svm, void *va, unsigned long len)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/svm/sev.c: In function 'sev_flush_guest_memory':
>> arch/x86/kvm/svm/sev.c:1216:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1216 | start = (u64)va & PAGE_MASK;
| ^
In file included from include/linux/cache.h:5,
from include/linux/printk.h:9,
from include/linux/kernel.h:16,
from include/asm-generic/bug.h:20,
from arch/x86/include/asm/bug.h:93,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/svm/sev.c:11:
arch/x86/kvm/svm/sev.c:1217:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1217 | stop = PAGE_ALIGN((u64)va + len);
| ^
include/uapi/linux/kernel.h:11:41: note: in definition of macro '__ALIGN_KERNEL_MASK'
11 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
include/linux/mm.h:222:26: note: in expansion of macro 'ALIGN'
222 | #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
| ^~~~~
arch/x86/kvm/svm/sev.c:1217:10: note: in expansion of macro 'PAGE_ALIGN'
1217 | stop = PAGE_ALIGN((u64)va + len);
| ^~~~~~~~~~
arch/x86/kvm/svm/sev.c:1217:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1217 | stop = PAGE_ALIGN((u64)va + len);
| ^
include/uapi/linux/kernel.h:11:47: note: in definition of macro '__ALIGN_KERNEL_MASK'
11 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
include/linux/mm.h:222:26: note: in expansion of macro 'ALIGN'
222 | #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
| ^~~~~
arch/x86/kvm/svm/sev.c:1217:10: note: in expansion of macro 'PAGE_ALIGN'
1217 | stop = PAGE_ALIGN((u64)va + len);
| ^~~~~~~~~~
arch/x86/kvm/svm/sev.c:1217:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1217 | stop = PAGE_ALIGN((u64)va + len);
| ^
include/uapi/linux/kernel.h:11:58: note: in definition of macro '__ALIGN_KERNEL_MASK'
11 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
| ^~~~
include/linux/kernel.h:33:22: note: in expansion of macro '__ALIGN_KERNEL'
33 | #define ALIGN(x, a) __ALIGN_KERNEL((x), (a))
| ^~~~~~~~~~~~~~
include/linux/mm.h:222:26: note: in expansion of macro 'ALIGN'
222 | #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
| ^~~~~
arch/x86/kvm/svm/sev.c:1217:10: note: in expansion of macro 'PAGE_ALIGN'
1217 | stop = PAGE_ALIGN((u64)va + len);
| ^~~~~~~~~~
vim +/sev_flush_guest_memory +1198 arch/x86/kvm/svm/sev.c
1193
1194 /*
1195 * Pages used by hardware to hold guest encrypted state must be flushed before
1196 * returning them to the system.
1197 */
> 1198 void sev_flush_guest_memory(struct vcpu_svm *svm, void *va, unsigned long len)
1199 {
1200 /*
1201 * If hardware enforced cache coherency for encrypted mappings of the
1202 * same physical page is supported, nothing to do.
1203 */
1204 if (boot_cpu_has(X86_FEATURE_SME_COHERENT))
1205 return;
1206
1207 /*
1208 * If the VM Page Flush MSR is supported, use it to flush the page
1209 * (using the page virtual address and the guest ASID).
1210 */
1211 if (boot_cpu_has(X86_FEATURE_VM_PAGE_FLUSH)) {
1212 struct kvm_sev_info *sev;
1213 u64 start, stop;
1214
1215 /* Align start and stop to page boundaries. */
> 1216 start = (u64)va & PAGE_MASK;
1217 stop = PAGE_ALIGN((u64)va + len);
1218
1219 if (start < stop) {
1220 sev = &to_kvm_svm(svm->vcpu.kvm)->sev_info;
1221
1222 while (start < stop) {
1223 wrmsrl(MSR_AMD64_VM_PAGE_FLUSH,
1224 start | sev->asid);
1225
1226 start += PAGE_SIZE;
1227 }
1228
1229 return;
1230 } else {
1231 WARN(1, "Address overflow, using WBINVD\n");
1232 }
1233 }
1234
1235 /*
1236 * Hardware should always have one of the above features,
1237 * but if not, use WBINVD and issue a warning.
1238 */
1239 WARN_ONCE(1, "Using WBINVD to flush guest memory\n");
1240 wbinvd_on_all_cpus();
1241 }
1242
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 75864 bytes --]
next prev parent reply other threads:[~2020-11-10 3:25 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 22:25 [PATCH v3 00/34] SEV-ES hypervisor support Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 01/34] x86/cpu: Add VM page flush MSR availablility as a CPUID feature Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 02/34] KVM: SVM: Remove the call to sev_platform_status() during setup Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 03/34] KVM: SVM: Add support for SEV-ES capability in KVM Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 04/34] KVM: SVM: Add GHCB accessor functions for retrieving fields Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 05/34] KVM: SVM: Add support for the SEV-ES VMSA Tom Lendacky
2020-11-10 3:25 ` kernel test robot [this message]
2020-11-09 22:25 ` [PATCH v3 06/34] KVM: x86: Mark GPRs dirty when written Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 07/34] KVM: SVM: Add required changes to support intercepts under SEV-ES Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 08/34] KVM: SVM: Prevent debugging " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 09/34] KVM: SVM: Do not allow instruction emulation " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 10/34] KVM: SVM: Cannot re-initialize the VMCB after shutdown with SEV-ES Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 11/34] KVM: SVM: Prepare for SEV-ES exit handling in the sev.c file Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 12/34] KVM: SVM: Add initial support for a VMGEXIT VMEXIT Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 13/34] KVM: SVM: Create trace events for VMGEXIT processing Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 14/34] KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x002 Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 15/34] KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x004 Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 16/34] KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x100 Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 17/34] KVM: SVM: Create trace events for VMGEXIT MSR protocol processing Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 18/34] KVM: SVM: Support MMIO for an SEV-ES guest Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 19/34] KVM: SVM: Support string IO operations " Tom Lendacky
2020-11-10 3:56 ` kernel test robot
2020-11-09 22:25 ` [PATCH v3 20/34] KVM: SVM: Add support for EFER write traps " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 21/34] KVM: SVM: Add support for CR0 " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 22/34] KVM: SVM: Add support for CR4 " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 23/34] KVM: SVM: Add support for CR8 " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 24/34] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 25/34] KVM: SVM: Do not report support for SMM for an SEV-ES guest Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 26/34] KVM: SVM: Guest FPU state save/restore not needed for " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 27/34] KVM: SVM: Add support for booting APs for an " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 28/34] KVM: SVM: Add NMI support " Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 29/34] KVM: SVM: Set the encryption mask for the SVM host save area Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 30/34] KVM: SVM: Update ASID allocation to support SEV-ES guests Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 31/34] KVM: SVM: Provide support for SEV-ES vCPU creation/loading Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 32/34] KVM: SVM: Provide support for SEV-ES vCPU loading Tom Lendacky
2020-11-09 22:25 ` [PATCH v3 33/34] KVM: SVM: Provide an updated VMRUN invocation for SEV-ES guests Tom Lendacky
2020-11-09 22:26 ` [PATCH v3 34/34] KVM: SVM: Provide support to launch and run an SEV-ES guest Tom Lendacky
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=202011101129.gLSWA0qG-lkp@intel.com \
--to=lkp@intel.com \
--cc=bp@alien8.de \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kbuild-all@lists.01.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=thomas.lendacky@amd.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).