From: kernel test robot <lkp@intel.com>
To: Patrick Roy <roypat@amazon.co.uk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH v2 02/10] kvm: gmem: Add KVM_GMEM_GET_PFN_SHARED
Date: Sat, 14 Sep 2024 02:47:02 +0800 [thread overview]
Message-ID: <202409140259.UDF2K6th-lkp@intel.com> (raw)
In-Reply-To: <20240910163038.1298452-3-roypat@amazon.co.uk>
Hi Patrick,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:
[auto build test ERROR on 332d2c1d713e232e163386c35a3ba0c1b90df83f]
url: https://github.com/intel-lab-lkp/linux/commits/Patrick-Roy/kvm-gmem-Add-option-to-remove-gmem-from-direct-map/20240911-003258
base: 332d2c1d713e232e163386c35a3ba0c1b90df83f
patch link: https://lore.kernel.org/r/20240910163038.1298452-3-roypat%40amazon.co.uk
patch subject: [RFC PATCH v2 02/10] kvm: gmem: Add KVM_GMEM_GET_PFN_SHARED
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240914/202409140259.UDF2K6th-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409140259.UDF2K6th-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409140259.UDF2K6th-lkp@intel.com/
All errors (new ones prefixed by >>):
>> arch/x86/kvm/svm/sev.c:3860:56: error: too few arguments to function call, expected 6, have 5
3860 | if (kvm_gmem_get_pfn(vcpu->kvm, slot, gfn, &pfn, NULL))
| ~~~~~~~~~~~~~~~~ ^
include/linux/kvm_host.h:2439:5: note: 'kvm_gmem_get_pfn' declared here
2439 | int kvm_gmem_get_pfn(struct kvm *kvm, struct kvm_memory_slot *slot,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2440 | gfn_t gfn, kvm_pfn_t *pfn, int *max_order, unsigned long flags);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/svm/sev.c:4715:53: error: too few arguments to function call, expected 6, have 5
4715 | ret = kvm_gmem_get_pfn(kvm, slot, gfn, &pfn, &order);
| ~~~~~~~~~~~~~~~~ ^
include/linux/kvm_host.h:2439:5: note: 'kvm_gmem_get_pfn' declared here
2439 | int kvm_gmem_get_pfn(struct kvm *kvm, struct kvm_memory_slot *slot,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2440 | gfn_t gfn, kvm_pfn_t *pfn, int *max_order, unsigned long flags);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +3860 arch/x86/kvm/svm/sev.c
9b54e248d2644b Michael Roth 2024-05-01 3833
e366f92ea99e19 Tom Lendacky 2024-05-01 3834 static int __sev_snp_update_protected_guest_state(struct kvm_vcpu *vcpu)
e366f92ea99e19 Tom Lendacky 2024-05-01 3835 {
e366f92ea99e19 Tom Lendacky 2024-05-01 3836 struct vcpu_svm *svm = to_svm(vcpu);
e366f92ea99e19 Tom Lendacky 2024-05-01 3837
e366f92ea99e19 Tom Lendacky 2024-05-01 3838 WARN_ON(!mutex_is_locked(&svm->sev_es.snp_vmsa_mutex));
e366f92ea99e19 Tom Lendacky 2024-05-01 3839
e366f92ea99e19 Tom Lendacky 2024-05-01 3840 /* Mark the vCPU as offline and not runnable */
e366f92ea99e19 Tom Lendacky 2024-05-01 3841 vcpu->arch.pv.pv_unhalted = false;
e366f92ea99e19 Tom Lendacky 2024-05-01 3842 vcpu->arch.mp_state = KVM_MP_STATE_HALTED;
e366f92ea99e19 Tom Lendacky 2024-05-01 3843
e366f92ea99e19 Tom Lendacky 2024-05-01 3844 /* Clear use of the VMSA */
e366f92ea99e19 Tom Lendacky 2024-05-01 3845 svm->vmcb->control.vmsa_pa = INVALID_PAGE;
e366f92ea99e19 Tom Lendacky 2024-05-01 3846
e366f92ea99e19 Tom Lendacky 2024-05-01 3847 if (VALID_PAGE(svm->sev_es.snp_vmsa_gpa)) {
e366f92ea99e19 Tom Lendacky 2024-05-01 3848 gfn_t gfn = gpa_to_gfn(svm->sev_es.snp_vmsa_gpa);
e366f92ea99e19 Tom Lendacky 2024-05-01 3849 struct kvm_memory_slot *slot;
e366f92ea99e19 Tom Lendacky 2024-05-01 3850 kvm_pfn_t pfn;
e366f92ea99e19 Tom Lendacky 2024-05-01 3851
e366f92ea99e19 Tom Lendacky 2024-05-01 3852 slot = gfn_to_memslot(vcpu->kvm, gfn);
e366f92ea99e19 Tom Lendacky 2024-05-01 3853 if (!slot)
e366f92ea99e19 Tom Lendacky 2024-05-01 3854 return -EINVAL;
e366f92ea99e19 Tom Lendacky 2024-05-01 3855
e366f92ea99e19 Tom Lendacky 2024-05-01 3856 /*
e366f92ea99e19 Tom Lendacky 2024-05-01 3857 * The new VMSA will be private memory guest memory, so
e366f92ea99e19 Tom Lendacky 2024-05-01 3858 * retrieve the PFN from the gmem backend.
e366f92ea99e19 Tom Lendacky 2024-05-01 3859 */
e366f92ea99e19 Tom Lendacky 2024-05-01 @3860 if (kvm_gmem_get_pfn(vcpu->kvm, slot, gfn, &pfn, NULL))
e366f92ea99e19 Tom Lendacky 2024-05-01 3861 return -EINVAL;
e366f92ea99e19 Tom Lendacky 2024-05-01 3862
e366f92ea99e19 Tom Lendacky 2024-05-01 3863 /*
e366f92ea99e19 Tom Lendacky 2024-05-01 3864 * From this point forward, the VMSA will always be a
e366f92ea99e19 Tom Lendacky 2024-05-01 3865 * guest-mapped page rather than the initial one allocated
e366f92ea99e19 Tom Lendacky 2024-05-01 3866 * by KVM in svm->sev_es.vmsa. In theory, svm->sev_es.vmsa
e366f92ea99e19 Tom Lendacky 2024-05-01 3867 * could be free'd and cleaned up here, but that involves
e366f92ea99e19 Tom Lendacky 2024-05-01 3868 * cleanups like wbinvd_on_all_cpus() which would ideally
e366f92ea99e19 Tom Lendacky 2024-05-01 3869 * be handled during teardown rather than guest boot.
e366f92ea99e19 Tom Lendacky 2024-05-01 3870 * Deferring that also allows the existing logic for SEV-ES
e366f92ea99e19 Tom Lendacky 2024-05-01 3871 * VMSAs to be re-used with minimal SNP-specific changes.
e366f92ea99e19 Tom Lendacky 2024-05-01 3872 */
e366f92ea99e19 Tom Lendacky 2024-05-01 3873 svm->sev_es.snp_has_guest_vmsa = true;
e366f92ea99e19 Tom Lendacky 2024-05-01 3874
e366f92ea99e19 Tom Lendacky 2024-05-01 3875 /* Use the new VMSA */
e366f92ea99e19 Tom Lendacky 2024-05-01 3876 svm->vmcb->control.vmsa_pa = pfn_to_hpa(pfn);
e366f92ea99e19 Tom Lendacky 2024-05-01 3877
e366f92ea99e19 Tom Lendacky 2024-05-01 3878 /* Mark the vCPU as runnable */
e366f92ea99e19 Tom Lendacky 2024-05-01 3879 vcpu->arch.pv.pv_unhalted = false;
e366f92ea99e19 Tom Lendacky 2024-05-01 3880 vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
e366f92ea99e19 Tom Lendacky 2024-05-01 3881
e366f92ea99e19 Tom Lendacky 2024-05-01 3882 svm->sev_es.snp_vmsa_gpa = INVALID_PAGE;
e366f92ea99e19 Tom Lendacky 2024-05-01 3883
e366f92ea99e19 Tom Lendacky 2024-05-01 3884 /*
e366f92ea99e19 Tom Lendacky 2024-05-01 3885 * gmem pages aren't currently migratable, but if this ever
e366f92ea99e19 Tom Lendacky 2024-05-01 3886 * changes then care should be taken to ensure
e366f92ea99e19 Tom Lendacky 2024-05-01 3887 * svm->sev_es.vmsa is pinned through some other means.
e366f92ea99e19 Tom Lendacky 2024-05-01 3888 */
e366f92ea99e19 Tom Lendacky 2024-05-01 3889 kvm_release_pfn_clean(pfn);
e366f92ea99e19 Tom Lendacky 2024-05-01 3890 }
e366f92ea99e19 Tom Lendacky 2024-05-01 3891
e366f92ea99e19 Tom Lendacky 2024-05-01 3892 /*
e366f92ea99e19 Tom Lendacky 2024-05-01 3893 * When replacing the VMSA during SEV-SNP AP creation,
e366f92ea99e19 Tom Lendacky 2024-05-01 3894 * mark the VMCB dirty so that full state is always reloaded.
e366f92ea99e19 Tom Lendacky 2024-05-01 3895 */
e366f92ea99e19 Tom Lendacky 2024-05-01 3896 vmcb_mark_all_dirty(svm->vmcb);
e366f92ea99e19 Tom Lendacky 2024-05-01 3897
e366f92ea99e19 Tom Lendacky 2024-05-01 3898 return 0;
e366f92ea99e19 Tom Lendacky 2024-05-01 3899 }
e366f92ea99e19 Tom Lendacky 2024-05-01 3900
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-09-13 18:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 16:30 [RFC PATCH v2 00/10] Unmapping guest_memfd from Direct Map Patrick Roy
2024-09-10 16:30 ` [RFC PATCH v2 01/10] kvm: gmem: Add option to remove gmem from direct map Patrick Roy
2024-09-13 17:43 ` kernel test robot
2024-09-18 5:48 ` Mike Rapoport
2024-09-10 16:30 ` [RFC PATCH v2 02/10] kvm: gmem: Add KVM_GMEM_GET_PFN_SHARED Patrick Roy
2024-09-13 18:47 ` kernel test robot [this message]
2024-09-10 16:30 ` [RFC PATCH v2 03/10] kvm: gmem: Add KVM_GMEM_GET_PFN_LOCKED Patrick Roy
2024-09-10 16:30 ` [RFC PATCH v2 04/10] kvm: Allow reading/writing gmem using kvm_{read,write}_guest Patrick Roy
2024-09-10 16:30 ` [RFC PATCH v2 05/10] kvm: gmem: Refcount internal accesses to gmem Patrick Roy
2024-09-10 16:30 ` [RFC PATCH v2 06/10] kvm: gmem: add tracepoints for gmem share/unshare Patrick Roy
2024-10-04 22:50 ` Steven Rostedt
2024-09-10 16:30 ` [RFC PATCH v2 07/10] kvm: pfncache: invalidate when memory attributes change Patrick Roy
2024-09-13 18:04 ` kernel test robot
2024-09-10 16:30 ` [RFC PATCH v2 08/10] kvm: pfncache: Support caching gmem pfns Patrick Roy
2024-09-10 16:30 ` [RFC PATCH v2 09/10] kvm: pfncache: hook up to gmem invalidation Patrick Roy
2024-09-10 16:30 ` [RFC PATCH v2 10/10] kvm: x86: support walking guest page tables in gmem Patrick Roy
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=202409140259.UDF2K6th-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=roypat@amazon.co.uk \
/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.