* arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression
@ 2021-02-27 23:47 kernel test robot
2021-03-01 17:22 ` Ben Gardon
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-02-27 23:47 UTC (permalink / raw)
To: Ben Gardon; +Cc: kbuild-all, linux-kernel, Paolo Bonzini, Peter Feiner
[-- Attachment #1: Type: text/plain, Size: 11049 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4
commit: 08f07c800e9d35b59d0c8346333f189160bd67d4 KVM: x86/mmu: Flush TLBs after zap in TDP MMU PF handler
date: 3 weeks ago
config: x86_64-randconfig-s022-20210228 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-241-geaceeafa-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=08f07c800e9d35b59d0c8346333f189160bd67d4
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 08f07c800e9d35b59d0c8346333f189160bd67d4
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: expected unsigned long long [usertype] *pt
arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:291:9: sparse: sparse: context imbalance in 'tdp_mmu_link_page' - different lock contexts for basic block
arch/x86/kvm/mmu/tdp_mmu.c:316:9: sparse: sparse: context imbalance in 'tdp_mmu_unlink_page' - different lock contexts for basic block
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
>> arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
vim +/__rcu +533 arch/x86/kvm/mmu/tdp_mmu.c
509
510 static inline bool tdp_mmu_zap_spte_atomic(struct kvm *kvm,
511 struct tdp_iter *iter)
512 {
513 /*
514 * Freeze the SPTE by setting it to a special,
515 * non-present value. This will stop other threads from
516 * immediately installing a present entry in its place
517 * before the TLBs are flushed.
518 */
519 if (!tdp_mmu_set_spte_atomic(kvm, iter, REMOVED_SPTE))
520 return false;
521
522 kvm_flush_remote_tlbs_with_address(kvm, iter->gfn,
523 KVM_PAGES_PER_HPAGE(iter->level));
524
525 /*
526 * No other thread can overwrite the removed SPTE as they
527 * must either wait on the MMU lock or use
528 * tdp_mmu_set_spte_atomic which will not overrite the
529 * special removed SPTE value. No bookkeeping is needed
530 * here since the SPTE is going from non-present
531 * to non-present.
532 */
> 533 WRITE_ONCE(*iter->sptep, 0);
534
535 return true;
536 }
537
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36274 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression
2021-02-27 23:47 arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression kernel test robot
@ 2021-03-01 17:22 ` Ben Gardon
0 siblings, 0 replies; 2+ messages in thread
From: Ben Gardon @ 2021-03-01 17:22 UTC (permalink / raw)
To: kernel test robot; +Cc: kbuild-all, LKML, Paolo Bonzini, Peter Feiner
It looks like the __rcu tags aren't being propagated around to all the
different references to PT memory. I'll look into what it would take
to fix this. I don't believe these kernel test warnings indicate a
correctness issue in the kernel, but propagating the __rcu annotations
will be helpful for developers in the future.
On Sat, Feb 27, 2021 at 3:48 PM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4
> commit: 08f07c800e9d35b59d0c8346333f189160bd67d4 KVM: x86/mmu: Flush TLBs after zap in TDP MMU PF handler
> date: 3 weeks ago
> config: x86_64-randconfig-s022-20210228 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.3-241-geaceeafa-dirty
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=08f07c800e9d35b59d0c8346333f189160bd67d4
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 08f07c800e9d35b59d0c8346333f189160bd67d4
> # save the attached .config to linux build tree
> make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> "sparse warnings: (new ones prefixed by >>)"
> arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: expected unsigned long long [usertype] *pt
> arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:291:9: sparse: sparse: context imbalance in 'tdp_mmu_link_page' - different lock contexts for basic block
> arch/x86/kvm/mmu/tdp_mmu.c:316:9: sparse: sparse: context imbalance in 'tdp_mmu_unlink_page' - different lock contexts for basic block
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
> >> arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
> arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
>
> vim +/__rcu +533 arch/x86/kvm/mmu/tdp_mmu.c
>
> 509
> 510 static inline bool tdp_mmu_zap_spte_atomic(struct kvm *kvm,
> 511 struct tdp_iter *iter)
> 512 {
> 513 /*
> 514 * Freeze the SPTE by setting it to a special,
> 515 * non-present value. This will stop other threads from
> 516 * immediately installing a present entry in its place
> 517 * before the TLBs are flushed.
> 518 */
> 519 if (!tdp_mmu_set_spte_atomic(kvm, iter, REMOVED_SPTE))
> 520 return false;
> 521
> 522 kvm_flush_remote_tlbs_with_address(kvm, iter->gfn,
> 523 KVM_PAGES_PER_HPAGE(iter->level));
> 524
> 525 /*
> 526 * No other thread can overwrite the removed SPTE as they
> 527 * must either wait on the MMU lock or use
> 528 * tdp_mmu_set_spte_atomic which will not overrite the
> 529 * special removed SPTE value. No bookkeeping is needed
> 530 * here since the SPTE is going from non-present
> 531 * to non-present.
> 532 */
> > 533 WRITE_ONCE(*iter->sptep, 0);
> 534
> 535 return true;
> 536 }
> 537
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-01 21:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27 23:47 arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression kernel test robot
2021-03-01 17:22 ` Ben Gardon
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®