* Re: [PATCH 5/6] KVM: x86/xen: Maintain valid mapping of Xen shared_inf=
[not found] <8ba4d8cf27f03eb13841ebb9039fc4ff15fa1b50.camel@infradead.org>
@ 2021-11-01 14:18 ` kernel test robot
2021-11-01 20:35 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-01 14:18 UTC (permalink / raw)
To: David Woodhouse, Paolo Bonzini, kvm@vger.kernel.org,
Raslan, KarimAllah, Joao Martins, Ankur Arora
Cc: llvm, kbuild-all, jmattson@google.com, wanpengli@tencent.com,
seanjc@google.com, vkuznets@redhat.com, mtosatti@redhat.com
[-- Attachment #1: Type: text/plain, Size: 3415 bytes --]
Hi David,
I love your patch! Yet something to improve:
[auto build test ERROR on kvm/queue]
[also build test ERROR on mst-vhost/linux-next v5.15 next-20211101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/David-Woodhouse/KVM-x86-xen-Maintain-valid-mapping-of-Xen-shared_inf/20211101-161824
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: x86_64-randconfig-a003-20211101 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 82ed106567063ea269c6d5669278b733e173a42f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/5faac25097318b72a65ed637b6a46ec92353cadb
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Woodhouse/KVM-x86-xen-Maintain-valid-mapping-of-Xen-shared_inf/20211101-161824
git checkout 5faac25097318b72a65ed637b6a46ec92353cadb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/x86/kvm/xen.c:36:17: error: incompatible pointer types passing 'struct kvm *' to parameter of type 'struct kvm_vcpu *' [-Werror,-Wincompatible-pointer-types]
kvm_unmap_gfn(kvm, &kvm->arch.xen.shinfo_map,
^~~
include/linux/kvm_host.h:923:36: note: passing argument to parameter 'vcpu' here
int kvm_unmap_gfn(struct kvm_vcpu *vcpu, struct kvm_host_map *map,
^
arch/x86/kvm/xen.c:64:20: error: incompatible pointer types passing 'struct kvm *' to parameter of type 'struct kvm_vcpu *' [-Werror,-Wincompatible-pointer-types]
ret = kvm_map_gfn(kvm, gfn, &kvm->arch.xen.shinfo_map,
^~~
include/linux/kvm_host.h:919:34: note: passing argument to parameter 'vcpu' here
int kvm_map_gfn(struct kvm_vcpu *vcpu, gfn_t gfn, struct kvm_host_map *map,
^
2 errors generated.
vim +36 arch/x86/kvm/xen.c
23
24 static void kvm_xen_shared_info_unmap(struct kvm *kvm)
25 {
26 bool was_valid = false;
27
28 write_lock(&kvm->arch.xen.shinfo_lock);
29 if (kvm->arch.xen.shared_info)
30 was_valid = true;
31 kvm->arch.xen.shared_info = NULL;
32 kvm->arch.xen.shinfo_gfn = GPA_INVALID;
33 write_unlock(&kvm->arch.xen.shinfo_lock);
34
35 if (kvm_vcpu_mapped(&kvm->arch.xen.shinfo_map)) {
> 36 kvm_unmap_gfn(kvm, &kvm->arch.xen.shinfo_map,
37 &kvm->arch.xen.shinfo_cache, was_valid, false);
38
39 /* If the MMU notifier invalidated it, the gfn_to_pfn_cache
40 * may be invalid. Force it to notice */
41 if (!was_valid)
42 kvm->arch.xen.shinfo_cache.generation = -1;
43 }
44 }
45
---
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: 31258 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/6] KVM: x86/xen: Maintain valid mapping of Xen shared_inf=
[not found] <8ba4d8cf27f03eb13841ebb9039fc4ff15fa1b50.camel@infradead.org>
2021-11-01 14:18 ` [PATCH 5/6] KVM: x86/xen: Maintain valid mapping of Xen shared_inf= kernel test robot
@ 2021-11-01 20:35 ` kernel test robot
2021-11-01 20:43 ` David Woodhouse
1 sibling, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-11-01 20:35 UTC (permalink / raw)
To: David Woodhouse, Paolo Bonzini, kvm@vger.kernel.org,
Raslan, KarimAllah, Joao Martins, Ankur Arora
Cc: llvm, kbuild-all, jmattson@google.com, wanpengli@tencent.com,
seanjc@google.com, vkuznets@redhat.com, mtosatti@redhat.com
[-- Attachment #1: Type: text/plain, Size: 4303 bytes --]
Hi David,
I love your patch! Yet something to improve:
[auto build test ERROR on kvm/queue]
[also build test ERROR on mst-vhost/linux-next v5.15 next-20211101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/David-Woodhouse/KVM-x86-xen-Maintain-valid-mapping-of-Xen-shared_inf/20211101-161824
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-randconfig-a002-20211101 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 264d3b6d4e08401c5b50a85bd76e80b3461d77e6)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/5faac25097318b72a65ed637b6a46ec92353cadb
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Woodhouse/KVM-x86-xen-Maintain-valid-mapping-of-Xen-shared_inf/20211101-161824
git checkout 5faac25097318b72a65ed637b6a46ec92353cadb
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
if (static_branch_unlikely(&kvm_xen_enabled.key)) {
^
>> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
>> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
>> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
>> arch/x86/kvm/mmu/mmu.c:1582:6: error: invalid argument type 'void' to unary expression
if (static_branch_unlikely(&kvm_xen_enabled.key)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:508:35: note: expanded from macro 'static_branch_unlikely'
#define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:80:30: note: expanded from macro 'unlikely_notrace'
# define unlikely_notrace(x) unlikely(x)
^~~~~~~~~~~
include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^~~~
5 errors generated.
vim +/kvm_xen_enabled +1582 arch/x86/kvm/mmu/mmu.c
1577
1578 bool kvm_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range)
1579 {
1580 bool flush = false;
1581
> 1582 if (static_branch_unlikely(&kvm_xen_enabled.key)) {
1583 write_lock(&kvm->arch.xen.shinfo_lock);
1584
1585 if (kvm->arch.xen.shared_info &&
1586 kvm->arch.xen.shinfo_gfn >= range->start &&
1587 kvm->arch.xen.shinfo_cache.gfn < range->end) {
1588 /*
1589 * If kvm_xen_shared_info_init() had *finished* mapping the
1590 * page and assigned the pointer for real, then mark the page
1591 * dirty now instead of via the eventual cache teardown.
1592 */
1593 if (kvm->arch.xen.shared_info != KVM_UNMAPPED_PAGE) {
1594 kvm_set_pfn_dirty(kvm->arch.xen.shinfo_cache.pfn);
1595 kvm->arch.xen.shinfo_cache.dirty = false;
1596 }
1597
1598 kvm->arch.xen.shared_info = NULL;
1599 }
1600
1601 write_unlock(&kvm->arch.xen.shinfo_lock);
1602 }
1603
1604 if (kvm_memslots_have_rmaps(kvm))
1605 flush = kvm_handle_gfn_range(kvm, range, kvm_unmap_rmapp);
1606
1607 if (is_tdp_mmu_enabled(kvm))
1608 flush |= kvm_tdp_mmu_unmap_gfn_range(kvm, range, flush);
1609
1610 return flush;
1611 }
1612
---
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: 36389 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 5/6] KVM: x86/xen: Maintain valid mapping of Xen shared_inf=
2021-11-01 20:35 ` kernel test robot
@ 2021-11-01 20:43 ` David Woodhouse
0 siblings, 0 replies; 3+ messages in thread
From: David Woodhouse @ 2021-11-01 20:43 UTC (permalink / raw)
To: kernel test robot, Paolo Bonzini, kvm@vger.kernel.org,
Raslan, KarimAllah, Joao Martins, Ankur Arora
Cc: llvm, kbuild-all, jmattson@google.com, wanpengli@tencent.com,
seanjc@google.com, vkuznets@redhat.com, mtosatti@redhat.com
[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]
On Tue, 2021-11-02 at 04:35 +0800, kernel test robot wrote:
>
> All errors (new ones prefixed by >>):
>
> >> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
> if (static_branch_unlikely(&kvm_xen_enabled.key)) {
> ^
> >> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
> >> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
> >> arch/x86/kvm/mmu/mmu.c:1582:30: error: use of undeclared identifier 'kvm_xen_enabled'
> >> arch/x86/kvm/mmu/mmu.c:1582:6: error: invalid argument type 'void' to unary expression
> if (static_branch_unlikely(&kvm_xen_enabled.key)) {
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/jump_label.h:508:35: note: expanded from macro 'static_branch_unlikely'
> #define static_branch_unlikely(x) unlikely_notrace(static_key_enabled(&(x)->key))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/linux/compiler.h:80:30: note: expanded from macro 'unlikely_notrace'
> # define unlikely_notrace(x) unlikely(x)
> ^~~~~~~~~~~
> include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
> # define unlikely(x) __builtin_expect(!!(x), 0)
> ^~~~
> 5 errors generated.
Oops, missing #ifdef CONFIG_KVM_XEN around that one. Fixed in
https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/xen-evtchn
Thanks.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-01 20:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <8ba4d8cf27f03eb13841ebb9039fc4ff15fa1b50.camel@infradead.org>
2021-11-01 14:18 ` [PATCH 5/6] KVM: x86/xen: Maintain valid mapping of Xen shared_inf= kernel test robot
2021-11-01 20:35 ` kernel test robot
2021-11-01 20:43 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox