From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Isaku Yamahata <isaku.yamahata@intel.com>
Subject: [intel-tdx:kvm-upstream-workaround 601/846] arch/x86/kvm/mmu/mmu.c:689:53: error: incompatible type for argument 1 of 'kvm_mmu_topup_memory_cache'
Date: Mon, 8 Aug 2022 11:35:55 +0800 [thread overview]
Message-ID: <202208081156.UDyRF0Eq-lkp@intel.com> (raw)
tree: https://github.com/intel/tdx.git kvm-upstream-workaround
head: d2f4a2362378fcfa26297befc778815836aecd3b
commit: 8aa5fe0bd8b2e79634440087c32a5d32b4dbe1af [601/846] KVM: x86/mmu: Allow non-zero value for non-present SPTE
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220808/202208081156.UDyRF0Eq-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/tdx/commit/8aa5fe0bd8b2e79634440087c32a5d32b4dbe1af
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream-workaround
git checkout 8aa5fe0bd8b2e79634440087c32a5d32b4dbe1af
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/x86/kvm/mmu/mmu.c: In function 'mmu_topup_shadow_page_cache':
>> arch/x86/kvm/mmu/mmu.c:689:53: error: incompatible type for argument 1 of 'kvm_mmu_topup_memory_cache'
689 | return kvm_mmu_topup_memory_cache(vcpu->arch.mmu_shadow_page_cache,
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
| |
| struct kvm_mmu_memory_cache
In file included from arch/x86/kvm/irq.h:15,
from arch/x86/kvm/mmu/mmu.c:18:
include/linux/kvm_host.h:1353:61: note: expected 'struct kvm_mmu_memory_cache *' but argument is of type 'struct kvm_mmu_memory_cache'
1353 | int kvm_mmu_topup_memory_cache(struct kvm_mmu_memory_cache *mc, int min);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
arch/x86/kvm/mmu/mmu.c: In function 'kvm_mmu_zap_collapsible_spte':
arch/x86/kvm/mmu/mmu.c:6484:19: warning: variable 'pfn' set but not used [-Wunused-but-set-variable]
6484 | kvm_pfn_t pfn;
| ^~~
arch/x86/kvm/mmu/mmu.c: In function 'mmu_topup_shadow_page_cache':
arch/x86/kvm/mmu/mmu.c:691:1: error: control reaches end of non-void function [-Werror=return-type]
691 | }
| ^
cc1: some warnings being treated as errors
vim +/kvm_mmu_topup_memory_cache +689 arch/x86/kvm/mmu/mmu.c
666
667 static int mmu_topup_shadow_page_cache(struct kvm_vcpu *vcpu)
668 {
669 struct kvm_mmu_memory_cache *mc = &vcpu->arch.mmu_shadow_page_cache;
670 int start, end, i, r;
671
672 start = kvm_mmu_memory_cache_nr_free_objects(mc);
673 r = kvm_mmu_topup_memory_cache(mc, PT64_ROOT_MAX_LEVEL);
674
675 /*
676 * Note, topup may have allocated objects even if it failed to allocate
677 * the minimum number of objects required to make forward progress _at
678 * this time_. Initialize newly allocated objects even on failure, as
679 * userspace can free memory and rerun the vCPU in response to -ENOMEM.
680 */
681 end = kvm_mmu_memory_cache_nr_free_objects(mc);
682 for (i = start; i < end; i++)
683 kvm_init_shadow_page(mc->objects[i]);
684 return r;
685 }
686 #else
687 static int mmu_topup_shadow_page_cache(struct kvm_vcpu *vcpu)
688 {
> 689 return kvm_mmu_topup_memory_cache(vcpu->arch.mmu_shadow_page_cache,
690 PT64_ROOT_MAX_LEVEL);
691 }
692 #endif /* CONFIG_X86_64 */
693
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-08-08 3:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202208081156.UDyRF0Eq-lkp@intel.com \
--to=lkp@intel.com \
--cc=isaku.yamahata@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sean.j.christopherson@intel.com \
/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
all inboxes | Powered by JetHome®