* [kvmarm:kvm-arm64/nv-wip-v5.0-rc1 45/75] arch/arm/kvm/../../../virt/kvm/arm/arm.c:1003:3: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'?
@ 2019-01-09 9:22 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-01-09 9:22 UTC (permalink / raw)
To: Christoffer Dall
Cc: Marc Zyngier, Jintack Lim, kbuild-all, linux-arm-kernel, kvmarm
[-- Attachment #1: Type: text/plain, Size: 43979 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm64/nv-wip-v5.0-rc1
head: 688c386ca096f2c1f2eee386697586c88df5d5bc
commit: 3da39279c7b03e5f797de7c283a0de99f69e6a17 [45/75] KVM: arm64: nv: Unmap/flush shadow stage 2 page tables
config: arm-axm55xx_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 3da39279c7b03e5f797de7c283a0de99f69e6a17
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm
All errors (new ones prefixed by >>):
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_init_vm':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:133:39: error: 'struct kvm_arch' has no member named 'mmu'
ret = kvm_alloc_stage2_pgd(&kvm->arch.mmu);
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:138:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.vmid.vmid_gen = 0;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:139:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.kvm = kvm;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:140:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.vttbr = -1;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:141:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.nested_stage2_enabled = false;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:143:11: error: 'struct kvm_arch' has no member named 'nested_mmus'
kvm->arch.nested_mmus = NULL;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:144:11: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
kvm->arch.nested_mmus_size = 0;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:158:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_free_stage2_pgd(&kvm->arch.mmu);
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_init':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:363:12: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
vcpu->arch.hw_mmu = &vcpu->kvm->arch.mmu;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:363:38: error: 'struct kvm_arch' has no member named 'mmu'
vcpu->arch.hw_mmu = &vcpu->kvm->arch.mmu;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_load':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:372:2: error: implicit declaration of function 'kvm_vcpu_load_hw_mmu'; did you mean 'kvm_vcpu_load_sysregs'? [-Werror=implicit-function-declaration]
kvm_vcpu_load_hw_mmu(vcpu);
^~~~~~~~~~~~~~~~~~~~
kvm_vcpu_load_sysregs
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_put':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:406:2: error: implicit declaration of function 'kvm_vcpu_put_hw_mmu'; did you mean 'kvm_vcpu_dabt_is_cm'? [-Werror=implicit-function-declaration]
kvm_vcpu_put_hw_mmu(vcpu);
^~~~~~~~~~~~~~~~~~~
kvm_vcpu_dabt_is_cm
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_ioctl_run':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:689:26: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
update_vmid(&vcpu->arch.hw_mmu->vmid);
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:738:48: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
if (ret <= 0 || need_new_vmid_gen(&vcpu->arch.hw_mmu->vmid) ||
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_vcpu_set_target':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:973:15: error: 'KVM_ARM_VCPU_NESTED_VIRT' undeclared (first use in this function); did you mean 'KVM_ARM_VCPU_TIMER_CTRL'?
if (test_bit(KVM_ARM_VCPU_NESTED_VIRT, vcpu->arch.features)) {
^~~~~~~~~~~~~~~~~~~~~~~~
KVM_ARM_VCPU_TIMER_CTRL
arch/arm/kvm/../../../virt/kvm/arm/arm.c:973:15: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/kvm/../../../virt/kvm/arm/arm.c:976:8: error: implicit declaration of function 'cpus_have_const_cap'; did you mean 'cpu_have_feature'? [-Werror=implicit-function-declaration]
if (!cpus_have_const_cap(ARM64_HAS_NESTED_VIRT))
^~~~~~~~~~~~~~~~~~~
cpu_have_feature
arch/arm/kvm/../../../virt/kvm/arm/arm.c:976:28: error: 'ARM64_HAS_NESTED_VIRT' undeclared (first use in this function); did you mean 'KVM_ARM_VCPU_NESTED_VIRT'?
if (!cpus_have_const_cap(ARM64_HAS_NESTED_VIRT))
^~~~~~~~~~~~~~~~~~~~~
KVM_ARM_VCPU_NESTED_VIRT
arch/arm/kvm/../../../virt/kvm/arm/arm.c:979:9: error: implicit declaration of function 'kvm_vcpu_init_nested'; did you mean 'kvm_vcpu_initialized'? [-Werror=implicit-function-declaration]
ret = kvm_vcpu_init_nested(vcpu);
^~~~~~~~~~~~~~~~~~~~
kvm_vcpu_initialized
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_ioctl_vcpu_init':
>> arch/arm/kvm/../../../virt/kvm/arm/arm.c:1003:3: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'? [-Werror=implicit-function-declaration]
kvm_nested_s2_clear(vcpu->kvm);
^~~~~~~~~~~~~~~~~~~
__nodes_clear
cc1: some warnings being treated as errors
--
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:182:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void clear_stage2_pud_entry(struct kvm_s2_mmu *mmu, pud_t *pud, phys_addr_t addr)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:313:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void unmap_stage2_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'unmap_stage2_puds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:316:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:328:28: error: passing argument 1 of 'kvm_tlb_flush_vmid_ipa' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_tlb_flush_vmid_ipa(mmu, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:69:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:332:23: error: passing argument 1 of 'unmap_stage2_pmds' from incompatible pointer type [-Werror=incompatible-pointer-types]
unmap_stage2_pmds(mmu, pud, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:283:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void unmap_stage2_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:338:26: error: passing argument 1 of 'clear_stage2_pgd_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
clear_stage2_pgd_entry(mmu, pgd, start_addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:171:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void clear_stage2_pgd_entry(struct kvm_s2_mmu *mmu, pgd_t *pgd, phys_addr_t addr)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:316:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:352:36: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_unmap_stage2_range(struct kvm_s2_mmu *mmu, phys_addr_t start, u64 size)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_stage2_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:354:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:373:22: error: passing argument 1 of 'unmap_stage2_puds' from incompatible pointer type [-Werror=incompatible-pointer-types]
unmap_stage2_puds(mmu, pgd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:313:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void unmap_stage2_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:383:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_ptes(struct kvm_s2_mmu *mmu, pmd_t *pmd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:395:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_pmds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:398:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:409:23: error: passing argument 1 of 'stage2_flush_ptes' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_flush_ptes(mmu, pmd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:383:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_flush_ptes(struct kvm_s2_mmu *mmu, pmd_t *pmd,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:414:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_puds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:417:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:428:23: error: passing argument 1 of 'stage2_flush_pmds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_flush_pmds(mmu, pud, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:395:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_flush_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:417:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:433:36: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_stage2_flush_range(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_stage2_flush_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:436:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:444:22: error: passing argument 1 of 'stage2_flush_puds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_flush_puds(mmu, pgd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:414:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_flush_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:448:41: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_memslot(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_memslot':
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:454:25: error: passing argument 1 of 'kvm_stage2_flush_range' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_stage2_flush_range(mmu, addr, end);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:433:6: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
void kvm_stage2_flush_range(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_vm':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:475:34: error: 'struct kvm_arch' has no member named 'mmu'
stage2_flush_memslot(&kvm->arch.mmu, memslot);
^
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:477:2: error: implicit declaration of function 'kvm_nested_s2_flush'; did you mean 'kvm_set_way_flush'? [-Werror=implicit-function-declaration]
kvm_nested_s2_flush(kvm);
^~~~~~~~~~~~~~~~~~~
kvm_set_way_flush
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:928:33: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
int kvm_alloc_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:928:5: error: conflicting types for 'kvm_alloc_stage2_pgd'
int kvm_alloc_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~~~~~~~~~~~
In file included from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:28:0:
arch/arm/include/asm/kvm_mmu.h:67:5: note: previous declaration of 'kvm_alloc_stage2_pgd' was here
int kvm_alloc_stage2_pgd(struct kvm *kvm);
^~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_alloc_stage2_pgd':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:932:9: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
if (mmu->pgd != NULL) {
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_unmap_memslot':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:982:37: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, vm_end - vm_start);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1014:33: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1014:6: error: conflicting types for 'kvm_free_stage2_pgd'
void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~~~~~~~~~~
In file included from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:28:0:
arch/arm/include/asm/kvm_mmu.h:68:6: note: previous declaration of 'kvm_free_stage2_pgd' was here
void kvm_free_stage2_pgd(struct kvm *kvm);
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_free_stage2_pgd':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1016:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1021:26: error: passing argument 1 of 'kvm_unmap_stage2_range' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_unmap_stage2_range(mmu, 0, kvm_phys_size(kvm));
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:352:6: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
void kvm_unmap_stage2_range(struct kvm_s2_mmu *mmu, phys_addr_t start, u64 size)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1022:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pgd = READ_ONCE(mmu->pgd);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:37: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_get_pud':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1035:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1035:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1051:37: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static pmd_t *stage2_get_pmd(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_get_pmd':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1054:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1058:23: error: passing argument 1 of 'stage2_get_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
pud = stage2_get_pud(mmu, cache, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1054:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1073:39: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static int stage2_set_pmd_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_set_pmd_huge':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1079:23: error: passing argument 1 of 'stage2_get_pmd' from incompatible pointer type [-Werror=incompatible-pointer-types]
pmd = stage2_get_pmd(mmu, cache, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1051:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pmd_t *stage2_get_pmd(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1112:26: error: passing argument 1 of 'kvm_tlb_flush_vmid_ipa' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_tlb_flush_vmid_ipa(mmu, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:69:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1121:39: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static int stage2_set_pud_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_set_pud_huge':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1125:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1128:24: error: passing argument 1 of 'stage2_get_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
--
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1162:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1197:35: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static bool stage2_is_exec(struct kvm_s2_mmu *mmu, phys_addr_t addr)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_is_exec':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1204:32: error: passing argument 1 of 'stage2_get_leaf_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
found = stage2_get_leaf_entry(mmu, addr, &pudp, &pmdp, &ptep);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1159:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static bool stage2_get_leaf_entry(struct kvm_s2_mmu *mmu, phys_addr_t addr,
^~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1216:34: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static int stage2_set_pte(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_set_pte':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1221:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1231:23: error: passing argument 1 of 'stage2_get_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
pud = stage2_get_pud(mmu, cache, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1245:23: error: passing argument 1 of 'stage2_dissolve_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_dissolve_pud(mmu, addr, pud);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:127:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_dissolve_pud(struct kvm_s2_mmu *mmu, phys_addr_t addr, pud_t *pudp)
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1269:23: error: passing argument 1 of 'stage2_dissolve_pmd' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_dissolve_pmd(mmu, addr, pmd);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:108:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_dissolve_pmd(struct kvm_s2_mmu *mmu, phys_addr_t addr, pmd_t *pmd)
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1293:26: error: passing argument 1 of 'kvm_tlb_flush_vmid_ipa' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_tlb_flush_vmid_ipa(mmu, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:69:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1221:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_phys_addr_ioremap':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1359:34: error: 'struct kvm_arch' has no member named 'mmu'
ret = stage2_set_pte(&kvm->arch.mmu, &cache, addr, &pte,
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1448:35: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_wp_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_wp_pmds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1451:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1478:36: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_wp_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_wp_puds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1481:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1493:20: error: passing argument 1 of 'stage2_wp_pmds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_wp_pmds(mmu, pud, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1448:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_wp_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1481:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1505:33: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_stage2_wp_range(struct kvm_s2_mmu *mmu, phys_addr_t addr, phys_addr_t end)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_stage2_wp_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1507:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1527:19: error: passing argument 1 of 'stage2_wp_puds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_wp_puds(mmu, pgd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1478:14: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_wp_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_mmu_wp_memory_region':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1552:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_stage2_wp_range(&kvm->arch.mmu, start, end);
^
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1553:2: error: implicit declaration of function 'kvm_nested_s2_wp'; did you mean 'kvm_reset_vcpu'? [-Werror=implicit-function-declaration]
kvm_nested_s2_wp(kvm);
^~~~~~~~~~~~~~~~
kvm_reset_vcpu
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_mmu_write_protect_pt_masked':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1577:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_stage2_wp_range(&kvm->arch.mmu, start, end);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1676:13: warning: 'struct kvm_s2_trans' declared inside parameter list will not be visible outside of this definition or declaration
struct kvm_s2_trans *nested,
^~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'user_mem_abort':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1693:37: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
struct kvm_s2_mmu *mmu = vcpu->arch.hw_mmu;
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1720:6: error: implicit declaration of function 'kvm_is_shadow_s2_fault'; did you mean 'kvm_is_write_fault'? [-Werror=implicit-function-declaration]
if (kvm_is_shadow_s2_fault(vcpu)) {
^~~~~~~~~~~~~~~~~~~~~~
kvm_is_write_fault
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1721:15: error: dereferencing pointer to incomplete type 'struct kvm_s2_trans'
ipa = nested->output;
^~
In file included from include/asm-generic/bug.h:18:0,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from include/linux/mman.h:5,
from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:19:
include/linux/kernel.h:870:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__safe_cmp(x, y), \
^
include/linux/kernel.h:879:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1728:18: note: in expansion of macro 'min'
max_map_size = min(nested->block_size, max_map_size);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1821:47: error: passing argument 1 of 'stage2_is_exec' from incompatible pointer type [-Werror=incompatible-pointer-types]
(fault_status == FSC_PERM && stage2_is_exec(mmu, fault_ipa));
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1197:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static bool stage2_is_exec(struct kvm_s2_mmu *mmu, phys_addr_t addr)
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1833:29: error: passing argument 1 of 'stage2_set_pud_huge' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = stage2_set_pud_huge(mmu, memcache, fault_ipa, &new_pud);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1121:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static int stage2_set_pud_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1845:29: error: passing argument 1 of 'stage2_set_pmd_huge' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = stage2_set_pmd_huge(mmu, memcache, fault_ipa, &new_pmd);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1073:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static int stage2_set_pmd_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1857:24: error: passing argument 1 of 'stage2_set_pte' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = stage2_set_pte(mmu, memcache, fault_ipa, &new_pte, flags);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1216:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static int stage2_set_pte(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'handle_access_fault':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1886:39: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
if (!stage2_get_leaf_entry(vcpu->arch.hw_mmu, fault_ipa, &pud, &pmd, &pte))
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_handle_guest_abort':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1927:22: error: storage size of 'nested_trans' isn't known
struct kvm_s2_trans nested_trans;
^~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1986:9: error: implicit declaration of function 'kvm_walk_nested_s2'; did you mean 'kvm_inject_nested_irq'? [-Werror=implicit-function-declaration]
ret = kvm_walk_nested_s2(vcpu, fault_ipa, &nested_trans);
^~~~~~~~~~~~~~~~~~
kvm_inject_nested_irq
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1988:4: error: implicit declaration of function 'kvm_inject_s2_fault'; did you mean 'kvm_inject_pabt'? [-Werror=implicit-function-declaration]
kvm_inject_s2_fault(vcpu, nested_trans.esr);
^~~~~~~~~~~~~~~~~~~
kvm_inject_pabt
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1993:9: error: implicit declaration of function 'kvm_s2_handle_perm_fault'; did you mean 'handle_mm_fault'? [-Werror=implicit-function-declaration]
ret = kvm_s2_handle_perm_fault(vcpu, fault_ipa, &nested_trans);
^~~~~~~~~~~~~~~~~~~~~~~~
handle_mm_fault
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1927:22: warning: unused variable 'nested_trans' [-Wunused-variable]
struct kvm_s2_trans nested_trans;
^~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_hva_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2093:35: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, size);
^
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2094:2: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'? [-Werror=implicit-function-declaration]
kvm_nested_s2_clear(kvm);
^~~~~~~~~~~~~~~~~~~
__nodes_clear
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_hva_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2101:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_set_spte_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2121:27: error: 'struct kvm_arch' has no member named 'mmu'
stage2_set_pte(&kvm->arch.mmu, NULL, gpa, pte, 0);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_set_spte_hva':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2133:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_age_hva_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2156:39: error: 'struct kvm_arch' has no member named 'mmu'
if (!stage2_get_leaf_entry(&kvm->arch.mmu, gpa, &pud, &pmd, &pte))
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_test_age_hva_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2181:39: error: 'struct kvm_arch' has no member named 'mmu'
if (!stage2_get_leaf_entry(&kvm->arch.mmu, gpa, &pud, &pmd, &pte))
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_age_hva':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2199:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_test_age_hva':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2207:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_prepare_memory_region':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2420:36: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, mem->guest_phys_addr, mem->memory_size);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2422:34: error: 'struct kvm_arch' has no member named 'mmu'
stage2_flush_memslot(&kvm->arch.mmu, memslot);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_flush_shadow_all':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2448:27: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2449:38: error: 'struct kvm_arch' has no member named 'nested_mmus'
struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
^
In file included from arch/arm/include/asm/bug.h:60:0,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from include/linux/mman.h:5,
from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:19:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2451:14: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
WARN_ON(mmu->usage_count > 0);
^
include/asm-generic/bug.h:122:25: note: in definition of macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2454:24: error: passing argument 1 of 'kvm_free_stage2_pgd' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_free_stage2_pgd(mmu);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1014:6: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2456:17: error: 'struct kvm_arch' has no member named 'nested_mmus'
kfree(kvm->arch.nested_mmus);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2457:11: error: 'struct kvm_arch' has no member named 'nested_mmus'
kvm->arch.nested_mmus = NULL;
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2458:11: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
kvm->arch.nested_mmus_size = 0;
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2459:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_free_stage2_pgd(&kvm->arch.mmu);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_flush_shadow_memslot':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2469:35: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, size);
^
cc1: some warnings being treated as errors
vim +1003 arch/arm/kvm/../../../virt/kvm/arm/arm.c
934
935 static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
936 const struct kvm_vcpu_init *init)
937 {
938 unsigned int i;
939 int phys_target = kvm_target_cpu();
940
941 if (init->target != phys_target)
942 return -EINVAL;
943
944 /*
945 * Secondary and subsequent calls to KVM_ARM_VCPU_INIT must
946 * use the same target.
947 */
948 if (vcpu->arch.target != -1 && vcpu->arch.target != init->target)
949 return -EINVAL;
950
951 /* -ENOENT for unknown features, -EINVAL for invalid combinations. */
952 for (i = 0; i < sizeof(init->features) * 8; i++) {
953 bool set = (init->features[i / 32] & (1 << (i % 32)));
954
955 if (set && i >= KVM_VCPU_MAX_FEATURES)
956 return -ENOENT;
957
958 /*
959 * Secondary and subsequent calls to KVM_ARM_VCPU_INIT must
960 * use the same feature set.
961 */
962 if (vcpu->arch.target != -1 && i < KVM_VCPU_MAX_FEATURES &&
963 test_bit(i, vcpu->arch.features) != set)
964 return -EINVAL;
965
966 if (set)
967 set_bit(i, vcpu->arch.features);
968 }
969
970 vcpu->arch.target = phys_target;
971
972 /* Now we know what it is, we can reset it. */
973 if (test_bit(KVM_ARM_VCPU_NESTED_VIRT, vcpu->arch.features)) {
974 int ret;
975
> 976 if (!cpus_have_const_cap(ARM64_HAS_NESTED_VIRT))
977 return -EINVAL;
978
979 ret = kvm_vcpu_init_nested(vcpu);
980 if (ret)
981 return ret;
982 }
983
984 return kvm_reset_vcpu(vcpu);
985 }
986
987
988 static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu,
989 struct kvm_vcpu_init *init)
990 {
991 int ret;
992
993 ret = kvm_vcpu_set_target(vcpu, init);
994 if (ret)
995 return ret;
996
997 /*
998 * Ensure a rebooted VM will fault in RAM pages and detect if the
999 * guest MMU is turned off and flush the caches as needed.
1000 */
1001 if (vcpu->arch.has_run_once) {
1002 stage2_unmap_vm(vcpu->kvm);
> 1003 kvm_nested_s2_clear(vcpu->kvm);
1004 }
1005
1006 vcpu_reset_hcr(vcpu);
1007
1008 /*
1009 * Handle the "start in power-off" case.
1010 */
1011 if (test_bit(KVM_ARM_VCPU_POWER_OFF, vcpu->arch.features))
1012 vcpu_power_off(vcpu);
1013 else
1014 vcpu->arch.power_off = false;
1015
1016 return 0;
1017 }
1018
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 20426 bytes --]
[-- Attachment #3: Type: text/plain, Size: 151 bytes --]
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
^ permalink raw reply [flat|nested] 2+ messages in thread
* [kvmarm:kvm-arm64/nv-wip-v5.0-rc1 45/75] arch/arm/kvm/../../../virt/kvm/arm/arm.c:1003:3: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'?
@ 2019-01-09 9:22 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-01-09 9:22 UTC (permalink / raw)
To: Christoffer Dall
Cc: Marc Zyngier, Jintack Lim, kbuild-all, linux-arm-kernel, kvmarm
[-- Attachment #1: Type: text/plain, Size: 43979 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git kvm-arm64/nv-wip-v5.0-rc1
head: 688c386ca096f2c1f2eee386697586c88df5d5bc
commit: 3da39279c7b03e5f797de7c283a0de99f69e6a17 [45/75] KVM: arm64: nv: Unmap/flush shadow stage 2 page tables
config: arm-axm55xx_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 3da39279c7b03e5f797de7c283a0de99f69e6a17
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm
All errors (new ones prefixed by >>):
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_init_vm':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:133:39: error: 'struct kvm_arch' has no member named 'mmu'
ret = kvm_alloc_stage2_pgd(&kvm->arch.mmu);
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:138:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.vmid.vmid_gen = 0;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:139:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.kvm = kvm;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:140:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.vttbr = -1;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:141:11: error: 'struct kvm_arch' has no member named 'mmu'
kvm->arch.mmu.nested_stage2_enabled = false;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:143:11: error: 'struct kvm_arch' has no member named 'nested_mmus'
kvm->arch.nested_mmus = NULL;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:144:11: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
kvm->arch.nested_mmus_size = 0;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:158:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_free_stage2_pgd(&kvm->arch.mmu);
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_init':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:363:12: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
vcpu->arch.hw_mmu = &vcpu->kvm->arch.mmu;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:363:38: error: 'struct kvm_arch' has no member named 'mmu'
vcpu->arch.hw_mmu = &vcpu->kvm->arch.mmu;
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_load':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:372:2: error: implicit declaration of function 'kvm_vcpu_load_hw_mmu'; did you mean 'kvm_vcpu_load_sysregs'? [-Werror=implicit-function-declaration]
kvm_vcpu_load_hw_mmu(vcpu);
^~~~~~~~~~~~~~~~~~~~
kvm_vcpu_load_sysregs
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_put':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:406:2: error: implicit declaration of function 'kvm_vcpu_put_hw_mmu'; did you mean 'kvm_vcpu_dabt_is_cm'? [-Werror=implicit-function-declaration]
kvm_vcpu_put_hw_mmu(vcpu);
^~~~~~~~~~~~~~~~~~~
kvm_vcpu_dabt_is_cm
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_ioctl_run':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:689:26: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
update_vmid(&vcpu->arch.hw_mmu->vmid);
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c:738:48: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
if (ret <= 0 || need_new_vmid_gen(&vcpu->arch.hw_mmu->vmid) ||
^
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_vcpu_set_target':
arch/arm/kvm/../../../virt/kvm/arm/arm.c:973:15: error: 'KVM_ARM_VCPU_NESTED_VIRT' undeclared (first use in this function); did you mean 'KVM_ARM_VCPU_TIMER_CTRL'?
if (test_bit(KVM_ARM_VCPU_NESTED_VIRT, vcpu->arch.features)) {
^~~~~~~~~~~~~~~~~~~~~~~~
KVM_ARM_VCPU_TIMER_CTRL
arch/arm/kvm/../../../virt/kvm/arm/arm.c:973:15: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/kvm/../../../virt/kvm/arm/arm.c:976:8: error: implicit declaration of function 'cpus_have_const_cap'; did you mean 'cpu_have_feature'? [-Werror=implicit-function-declaration]
if (!cpus_have_const_cap(ARM64_HAS_NESTED_VIRT))
^~~~~~~~~~~~~~~~~~~
cpu_have_feature
arch/arm/kvm/../../../virt/kvm/arm/arm.c:976:28: error: 'ARM64_HAS_NESTED_VIRT' undeclared (first use in this function); did you mean 'KVM_ARM_VCPU_NESTED_VIRT'?
if (!cpus_have_const_cap(ARM64_HAS_NESTED_VIRT))
^~~~~~~~~~~~~~~~~~~~~
KVM_ARM_VCPU_NESTED_VIRT
arch/arm/kvm/../../../virt/kvm/arm/arm.c:979:9: error: implicit declaration of function 'kvm_vcpu_init_nested'; did you mean 'kvm_vcpu_initialized'? [-Werror=implicit-function-declaration]
ret = kvm_vcpu_init_nested(vcpu);
^~~~~~~~~~~~~~~~~~~~
kvm_vcpu_initialized
arch/arm/kvm/../../../virt/kvm/arm/arm.c: In function 'kvm_arch_vcpu_ioctl_vcpu_init':
>> arch/arm/kvm/../../../virt/kvm/arm/arm.c:1003:3: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'? [-Werror=implicit-function-declaration]
kvm_nested_s2_clear(vcpu->kvm);
^~~~~~~~~~~~~~~~~~~
__nodes_clear
cc1: some warnings being treated as errors
--
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:182:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void clear_stage2_pud_entry(struct kvm_s2_mmu *mmu, pud_t *pud, phys_addr_t addr)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:313:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void unmap_stage2_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'unmap_stage2_puds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:316:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:328:28: error: passing argument 1 of 'kvm_tlb_flush_vmid_ipa' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_tlb_flush_vmid_ipa(mmu, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:69:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:332:23: error: passing argument 1 of 'unmap_stage2_pmds' from incompatible pointer type [-Werror=incompatible-pointer-types]
unmap_stage2_pmds(mmu, pud, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:283:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void unmap_stage2_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:338:26: error: passing argument 1 of 'clear_stage2_pgd_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
clear_stage2_pgd_entry(mmu, pgd, start_addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:171:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void clear_stage2_pgd_entry(struct kvm_s2_mmu *mmu, pgd_t *pgd, phys_addr_t addr)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:316:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:352:36: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_unmap_stage2_range(struct kvm_s2_mmu *mmu, phys_addr_t start, u64 size)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_stage2_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:354:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:373:22: error: passing argument 1 of 'unmap_stage2_puds' from incompatible pointer type [-Werror=incompatible-pointer-types]
unmap_stage2_puds(mmu, pgd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:313:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void unmap_stage2_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:383:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_ptes(struct kvm_s2_mmu *mmu, pmd_t *pmd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:395:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_pmds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:398:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:409:23: error: passing argument 1 of 'stage2_flush_ptes' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_flush_ptes(mmu, pmd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:383:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_flush_ptes(struct kvm_s2_mmu *mmu, pmd_t *pmd,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:414:38: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_puds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:417:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:428:23: error: passing argument 1 of 'stage2_flush_pmds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_flush_pmds(mmu, pud, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:395:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_flush_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:417:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:433:36: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_stage2_flush_range(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_stage2_flush_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:436:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:444:22: error: passing argument 1 of 'stage2_flush_puds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_flush_puds(mmu, pgd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:414:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_flush_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:448:41: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_flush_memslot(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_memslot':
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:454:25: error: passing argument 1 of 'kvm_stage2_flush_range' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_stage2_flush_range(mmu, addr, end);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:433:6: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
void kvm_stage2_flush_range(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_flush_vm':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:475:34: error: 'struct kvm_arch' has no member named 'mmu'
stage2_flush_memslot(&kvm->arch.mmu, memslot);
^
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:477:2: error: implicit declaration of function 'kvm_nested_s2_flush'; did you mean 'kvm_set_way_flush'? [-Werror=implicit-function-declaration]
kvm_nested_s2_flush(kvm);
^~~~~~~~~~~~~~~~~~~
kvm_set_way_flush
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:928:33: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
int kvm_alloc_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:928:5: error: conflicting types for 'kvm_alloc_stage2_pgd'
int kvm_alloc_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~~~~~~~~~~~
In file included from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:28:0:
arch/arm/include/asm/kvm_mmu.h:67:5: note: previous declaration of 'kvm_alloc_stage2_pgd' was here
int kvm_alloc_stage2_pgd(struct kvm *kvm);
^~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_alloc_stage2_pgd':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:932:9: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
if (mmu->pgd != NULL) {
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_unmap_memslot':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:982:37: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, vm_end - vm_start);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1014:33: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1014:6: error: conflicting types for 'kvm_free_stage2_pgd'
void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~~~~~~~~~~
In file included from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:28:0:
arch/arm/include/asm/kvm_mmu.h:68:6: note: previous declaration of 'kvm_free_stage2_pgd' was here
void kvm_free_stage2_pgd(struct kvm *kvm);
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_free_stage2_pgd':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1016:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1021:26: error: passing argument 1 of 'kvm_unmap_stage2_range' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_unmap_stage2_range(mmu, 0, kvm_phys_size(kvm));
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:352:6: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
void kvm_unmap_stage2_range(struct kvm_s2_mmu *mmu, phys_addr_t start, u64 size)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1022:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pgd = READ_ONCE(mmu->pgd);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:37: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_get_pud':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1035:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1035:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1051:37: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static pmd_t *stage2_get_pmd(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_get_pmd':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1054:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1058:23: error: passing argument 1 of 'stage2_get_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
pud = stage2_get_pud(mmu, cache, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1054:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1073:39: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static int stage2_set_pmd_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_set_pmd_huge':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1079:23: error: passing argument 1 of 'stage2_get_pmd' from incompatible pointer type [-Werror=incompatible-pointer-types]
pmd = stage2_get_pmd(mmu, cache, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1051:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pmd_t *stage2_get_pmd(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1112:26: error: passing argument 1 of 'kvm_tlb_flush_vmid_ipa' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_tlb_flush_vmid_ipa(mmu, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:69:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1121:39: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static int stage2_set_pud_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_set_pud_huge':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1125:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1128:24: error: passing argument 1 of 'stage2_get_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
--
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1162:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1197:35: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static bool stage2_is_exec(struct kvm_s2_mmu *mmu, phys_addr_t addr)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_is_exec':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1204:32: error: passing argument 1 of 'stage2_get_leaf_entry' from incompatible pointer type [-Werror=incompatible-pointer-types]
found = stage2_get_leaf_entry(mmu, addr, &pudp, &pmdp, &ptep);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1159:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static bool stage2_get_leaf_entry(struct kvm_s2_mmu *mmu, phys_addr_t addr,
^~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1216:34: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static int stage2_set_pte(struct kvm_s2_mmu *mmu,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_set_pte':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1221:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1231:23: error: passing argument 1 of 'stage2_get_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
pud = stage2_get_pud(mmu, cache, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1032:15: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static pud_t *stage2_get_pud(struct kvm_s2_mmu *mmu, struct kvm_mmu_memory_cache *cache,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1245:23: error: passing argument 1 of 'stage2_dissolve_pud' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_dissolve_pud(mmu, addr, pud);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:127:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_dissolve_pud(struct kvm_s2_mmu *mmu, phys_addr_t addr, pud_t *pudp)
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1269:23: error: passing argument 1 of 'stage2_dissolve_pmd' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_dissolve_pmd(mmu, addr, pmd);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:108:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_dissolve_pmd(struct kvm_s2_mmu *mmu, phys_addr_t addr, pmd_t *pmd)
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1293:26: error: passing argument 1 of 'kvm_tlb_flush_vmid_ipa' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_tlb_flush_vmid_ipa(mmu, addr);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:69:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void kvm_tlb_flush_vmid_ipa(struct kvm_s2_mmu *mmu, phys_addr_t ipa)
^~~~~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1221:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_phys_addr_ioremap':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1359:34: error: 'struct kvm_arch' has no member named 'mmu'
ret = stage2_set_pte(&kvm->arch.mmu, &cache, addr, &pte,
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1448:35: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_wp_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_wp_pmds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1451:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1478:36: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
static void stage2_wp_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'stage2_wp_puds':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1481:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1493:20: error: passing argument 1 of 'stage2_wp_pmds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_wp_pmds(mmu, pud, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1448:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_wp_pmds(struct kvm_s2_mmu *mmu, pud_t *pud,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1481:14: warning: unused variable 'kvm' [-Wunused-variable]
struct kvm *kvm = mmu->kvm;
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1505:33: warning: 'struct kvm_s2_mmu' declared inside parameter list will not be visible outside of this definition or declaration
void kvm_stage2_wp_range(struct kvm_s2_mmu *mmu, phys_addr_t addr, phys_addr_t end)
^~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_stage2_wp_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1507:23: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
struct kvm *kvm = mmu->kvm;
^~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1527:19: error: passing argument 1 of 'stage2_wp_puds' from incompatible pointer type [-Werror=incompatible-pointer-types]
stage2_wp_puds(mmu, pgd, addr, next);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1478:14: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static void stage2_wp_puds(struct kvm_s2_mmu *mmu, pgd_t *pgd,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_mmu_wp_memory_region':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1552:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_stage2_wp_range(&kvm->arch.mmu, start, end);
^
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1553:2: error: implicit declaration of function 'kvm_nested_s2_wp'; did you mean 'kvm_reset_vcpu'? [-Werror=implicit-function-declaration]
kvm_nested_s2_wp(kvm);
^~~~~~~~~~~~~~~~
kvm_reset_vcpu
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_mmu_write_protect_pt_masked':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1577:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_stage2_wp_range(&kvm->arch.mmu, start, end);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: At top level:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1676:13: warning: 'struct kvm_s2_trans' declared inside parameter list will not be visible outside of this definition or declaration
struct kvm_s2_trans *nested,
^~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'user_mem_abort':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1693:37: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
struct kvm_s2_mmu *mmu = vcpu->arch.hw_mmu;
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1720:6: error: implicit declaration of function 'kvm_is_shadow_s2_fault'; did you mean 'kvm_is_write_fault'? [-Werror=implicit-function-declaration]
if (kvm_is_shadow_s2_fault(vcpu)) {
^~~~~~~~~~~~~~~~~~~~~~
kvm_is_write_fault
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1721:15: error: dereferencing pointer to incomplete type 'struct kvm_s2_trans'
ipa = nested->output;
^~
In file included from include/asm-generic/bug.h:18:0,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from include/linux/mman.h:5,
from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:19:
include/linux/kernel.h:870:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__safe_cmp(x, y), \
^
include/linux/kernel.h:879:19: note: in expansion of macro '__careful_cmp'
#define min(x, y) __careful_cmp(x, y, <)
^~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1728:18: note: in expansion of macro 'min'
max_map_size = min(nested->block_size, max_map_size);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1821:47: error: passing argument 1 of 'stage2_is_exec' from incompatible pointer type [-Werror=incompatible-pointer-types]
(fault_status == FSC_PERM && stage2_is_exec(mmu, fault_ipa));
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1197:13: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static bool stage2_is_exec(struct kvm_s2_mmu *mmu, phys_addr_t addr)
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1833:29: error: passing argument 1 of 'stage2_set_pud_huge' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = stage2_set_pud_huge(mmu, memcache, fault_ipa, &new_pud);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1121:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static int stage2_set_pud_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1845:29: error: passing argument 1 of 'stage2_set_pmd_huge' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = stage2_set_pmd_huge(mmu, memcache, fault_ipa, &new_pmd);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1073:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static int stage2_set_pmd_huge(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1857:24: error: passing argument 1 of 'stage2_set_pte' from incompatible pointer type [-Werror=incompatible-pointer-types]
ret = stage2_set_pte(mmu, memcache, fault_ipa, &new_pte, flags);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1216:12: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
static int stage2_set_pte(struct kvm_s2_mmu *mmu,
^~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'handle_access_fault':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1886:39: error: 'struct kvm_vcpu_arch' has no member named 'hw_mmu'
if (!stage2_get_leaf_entry(vcpu->arch.hw_mmu, fault_ipa, &pud, &pmd, &pte))
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_handle_guest_abort':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1927:22: error: storage size of 'nested_trans' isn't known
struct kvm_s2_trans nested_trans;
^~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1986:9: error: implicit declaration of function 'kvm_walk_nested_s2'; did you mean 'kvm_inject_nested_irq'? [-Werror=implicit-function-declaration]
ret = kvm_walk_nested_s2(vcpu, fault_ipa, &nested_trans);
^~~~~~~~~~~~~~~~~~
kvm_inject_nested_irq
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1988:4: error: implicit declaration of function 'kvm_inject_s2_fault'; did you mean 'kvm_inject_pabt'? [-Werror=implicit-function-declaration]
kvm_inject_s2_fault(vcpu, nested_trans.esr);
^~~~~~~~~~~~~~~~~~~
kvm_inject_pabt
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1993:9: error: implicit declaration of function 'kvm_s2_handle_perm_fault'; did you mean 'handle_mm_fault'? [-Werror=implicit-function-declaration]
ret = kvm_s2_handle_perm_fault(vcpu, fault_ipa, &nested_trans);
^~~~~~~~~~~~~~~~~~~~~~~~
handle_mm_fault
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1927:22: warning: unused variable 'nested_trans' [-Wunused-variable]
struct kvm_s2_trans nested_trans;
^~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_hva_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2093:35: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, size);
^
>> arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2094:2: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'? [-Werror=implicit-function-declaration]
kvm_nested_s2_clear(kvm);
^~~~~~~~~~~~~~~~~~~
__nodes_clear
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_unmap_hva_range':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2101:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_set_spte_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2121:27: error: 'struct kvm_arch' has no member named 'mmu'
stage2_set_pte(&kvm->arch.mmu, NULL, gpa, pte, 0);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_set_spte_hva':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2133:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_age_hva_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2156:39: error: 'struct kvm_arch' has no member named 'mmu'
if (!stage2_get_leaf_entry(&kvm->arch.mmu, gpa, &pud, &pmd, &pte))
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_test_age_hva_handler':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2181:39: error: 'struct kvm_arch' has no member named 'mmu'
if (!stage2_get_leaf_entry(&kvm->arch.mmu, gpa, &pud, &pmd, &pte))
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_age_hva':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2199:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_test_age_hva':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2207:16: error: 'struct kvm_arch' has no member named 'mmu'
if (!kvm->arch.mmu.pgd)
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_prepare_memory_region':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2420:36: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, mem->guest_phys_addr, mem->memory_size);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2422:34: error: 'struct kvm_arch' has no member named 'mmu'
stage2_flush_memslot(&kvm->arch.mmu, memslot);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_flush_shadow_all':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2448:27: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
for (i = 0; i < kvm->arch.nested_mmus_size; i++) {
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2449:38: error: 'struct kvm_arch' has no member named 'nested_mmus'
struct kvm_s2_mmu *mmu = &kvm->arch.nested_mmus[i];
^
In file included from arch/arm/include/asm/bug.h:60:0,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from include/linux/mman.h:5,
from arch/arm/kvm/../../../virt/kvm/arm/mmu.c:19:
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2451:14: error: dereferencing pointer to incomplete type 'struct kvm_s2_mmu'
WARN_ON(mmu->usage_count > 0);
^
include/asm-generic/bug.h:122:25: note: in definition of macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2454:24: error: passing argument 1 of 'kvm_free_stage2_pgd' from incompatible pointer type [-Werror=incompatible-pointer-types]
kvm_free_stage2_pgd(mmu);
^~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:1014:6: note: expected 'struct kvm_s2_mmu *' but argument is of type 'struct kvm_s2_mmu *'
void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
^~~~~~~~~~~~~~~~~~~
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2456:17: error: 'struct kvm_arch' has no member named 'nested_mmus'
kfree(kvm->arch.nested_mmus);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2457:11: error: 'struct kvm_arch' has no member named 'nested_mmus'
kvm->arch.nested_mmus = NULL;
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2458:11: error: 'struct kvm_arch' has no member named 'nested_mmus_size'
kvm->arch.nested_mmus_size = 0;
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2459:32: error: 'struct kvm_arch' has no member named 'mmu'
kvm_free_stage2_pgd(&kvm->arch.mmu);
^
arch/arm/kvm/../../../virt/kvm/arm/mmu.c: In function 'kvm_arch_flush_shadow_memslot':
arch/arm/kvm/../../../virt/kvm/arm/mmu.c:2469:35: error: 'struct kvm_arch' has no member named 'mmu'
kvm_unmap_stage2_range(&kvm->arch.mmu, gpa, size);
^
cc1: some warnings being treated as errors
vim +1003 arch/arm/kvm/../../../virt/kvm/arm/arm.c
934
935 static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
936 const struct kvm_vcpu_init *init)
937 {
938 unsigned int i;
939 int phys_target = kvm_target_cpu();
940
941 if (init->target != phys_target)
942 return -EINVAL;
943
944 /*
945 * Secondary and subsequent calls to KVM_ARM_VCPU_INIT must
946 * use the same target.
947 */
948 if (vcpu->arch.target != -1 && vcpu->arch.target != init->target)
949 return -EINVAL;
950
951 /* -ENOENT for unknown features, -EINVAL for invalid combinations. */
952 for (i = 0; i < sizeof(init->features) * 8; i++) {
953 bool set = (init->features[i / 32] & (1 << (i % 32)));
954
955 if (set && i >= KVM_VCPU_MAX_FEATURES)
956 return -ENOENT;
957
958 /*
959 * Secondary and subsequent calls to KVM_ARM_VCPU_INIT must
960 * use the same feature set.
961 */
962 if (vcpu->arch.target != -1 && i < KVM_VCPU_MAX_FEATURES &&
963 test_bit(i, vcpu->arch.features) != set)
964 return -EINVAL;
965
966 if (set)
967 set_bit(i, vcpu->arch.features);
968 }
969
970 vcpu->arch.target = phys_target;
971
972 /* Now we know what it is, we can reset it. */
973 if (test_bit(KVM_ARM_VCPU_NESTED_VIRT, vcpu->arch.features)) {
974 int ret;
975
> 976 if (!cpus_have_const_cap(ARM64_HAS_NESTED_VIRT))
977 return -EINVAL;
978
979 ret = kvm_vcpu_init_nested(vcpu);
980 if (ret)
981 return ret;
982 }
983
984 return kvm_reset_vcpu(vcpu);
985 }
986
987
988 static int kvm_arch_vcpu_ioctl_vcpu_init(struct kvm_vcpu *vcpu,
989 struct kvm_vcpu_init *init)
990 {
991 int ret;
992
993 ret = kvm_vcpu_set_target(vcpu, init);
994 if (ret)
995 return ret;
996
997 /*
998 * Ensure a rebooted VM will fault in RAM pages and detect if the
999 * guest MMU is turned off and flush the caches as needed.
1000 */
1001 if (vcpu->arch.has_run_once) {
1002 stage2_unmap_vm(vcpu->kvm);
> 1003 kvm_nested_s2_clear(vcpu->kvm);
1004 }
1005
1006 vcpu_reset_hcr(vcpu);
1007
1008 /*
1009 * Handle the "start in power-off" case.
1010 */
1011 if (test_bit(KVM_ARM_VCPU_POWER_OFF, vcpu->arch.features))
1012 vcpu_power_off(vcpu);
1013 else
1014 vcpu->arch.power_off = false;
1015
1016 return 0;
1017 }
1018
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 20426 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-09 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 9:22 [kvmarm:kvm-arm64/nv-wip-v5.0-rc1 45/75] arch/arm/kvm/../../../virt/kvm/arm/arm.c:1003:3: error: implicit declaration of function 'kvm_nested_s2_clear'; did you mean '__nodes_clear'? kbuild test robot
2019-01-09 9:22 ` kbuild test robot
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.