* Re: [RFC PATCH v2 02/10] kvm: gmem: Add KVM_GMEM_GET_PFN_SHARED
[not found] <20240910163038.1298452-3-roypat@amazon.co.uk>
@ 2024-09-13 18:47 ` kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-13 18:47 UTC (permalink / raw)
To: Patrick Roy; +Cc: llvm, oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-13 18:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20240910163038.1298452-3-roypat@amazon.co.uk>
2024-09-13 18:47 ` [RFC PATCH v2 02/10] kvm: gmem: Add KVM_GMEM_GET_PFN_SHARED kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox