linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the kvm-x86 tree
@ 2023-10-30  2:48 Stephen Rothwell
  2023-10-30 10:05 ` Christian Brauner
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2023-10-30  2:48 UTC (permalink / raw)
  To: Sean Christopherson, Christian Brauner
  Cc: Ackerley Tng, Chao Peng, Isaku Yamahata, Kirill A. Shutemov,
	Michael Roth, Paolo Bonzini, Yu Zhang, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]

Hi all,

After merging the kvm-x86 tree, today's linux-next build (x86_64
allmodconfig) failed like this:

arch/x86/kvm/../../../virt/kvm/guest_memfd.c: In function 'kvm_gmem_get_file':
arch/x86/kvm/../../../virt/kvm/guest_memfd.c:280:35: error: passing argument 1 of 'get_file_rcu' from incompatible pointer type [-Werror=incompatible-pointer-types]
  280 |         if (file && !get_file_rcu(file))
      |                                   ^~~~
      |                                   |
      |                                   struct file *
In file included from include/linux/backing-dev.h:13,
                 from arch/x86/kvm/../../../virt/kvm/guest_memfd.c:2:
include/linux/fs.h:1046:47: note: expected 'struct file **' but argument is of type 'struct file *'
 1046 | struct file *get_file_rcu(struct file __rcu **f);
      |                           ~~~~~~~~~~~~~~~~~~~~^

Caused by commit

  fcbef1e5e5d2 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory")

interacting with commit

  0ede61d8589c ("file: convert to SLAB_TYPESAFE_BY_RCU")

from the vfs-brauner tree.

I have applied the following merg resolution patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 30 Oct 2023 13:35:38 +1100
Subject: [PATCH] fix up for "KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for
 guest-specific backing memory"

interacting with "file: convert to SLAB_TYPESAFE_BY_RCU"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 virt/kvm/guest_memfd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c
index 94bc478c26f3..7f62abe3df9e 100644
--- a/virt/kvm/guest_memfd.c
+++ b/virt/kvm/guest_memfd.c
@@ -276,9 +276,7 @@ static struct file *kvm_gmem_get_file(struct kvm_memory_slot *slot)
 
 	rcu_read_lock();
 
-	file = rcu_dereference(slot->gmem.file);
-	if (file && !get_file_rcu(file))
-		file = NULL;
+	file = get_file_rcu(&slot->gmem.file);
 
 	rcu_read_unlock();
 
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* linux-next: build failure after merge of the kvm-x86 tree
@ 2023-04-11  4:00 Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2023-04-11  4:00 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Jeremi Piotrowski, Paolo Bonzini, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2672 bytes --]

Hi all,

After merging the kvm-x86 tree, today's linux-next build (x86_64
allmodconfig) failed like this:

arch/x86/kvm/svm/svm.c: In function 'svm_flush_tlb_all':
arch/x86/kvm/svm/svm.c:3852:17: error: implicit declaration of function 'hv_remote_flush_tlb' [-Werror=implicit-function-declaration]
 3852 |                 hv_remote_flush_tlb(vcpu->kvm);
      |                 ^~~~~~~~~~~~~~~~~~~

Caused by commit

  8a1300ff9518 ("KVM: x86: Rename Hyper-V remote TLB hooks to match established scheme")

interacting with commit

  e5c972c1fada ("KVM: SVM: Flush Hyper-V TLB when required")

from Linus' tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 11 Apr 2023 13:21:46 +1000
Subject: [PATCH] fixup for "KVM: x86: Rename Hyper-V remote TLB hooks to match established scheme"

interacting with "KVM: SVM: Flush Hyper-V TLB when required"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/kvm/kvm_onhyperv.h | 2 +-
 arch/x86/kvm/svm/svm.c      | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kvm/kvm_onhyperv.h b/arch/x86/kvm/kvm_onhyperv.h
index 2d5f669c1ea1..f9ca3e7432b2 100644
--- a/arch/x86/kvm/kvm_onhyperv.h
+++ b/arch/x86/kvm/kvm_onhyperv.h
@@ -11,7 +11,7 @@ int hv_flush_remote_tlbs_range(struct kvm *kvm, gfn_t gfn, gfn_t nr_pages);
 int hv_flush_remote_tlbs(struct kvm *kvm);
 void hv_track_root_tdp(struct kvm_vcpu *vcpu, hpa_t root_tdp);
 #else /* !CONFIG_HYPERV */
-static inline int hv_remote_flush_tlb(struct kvm *kvm)
+static inline int hv_flush_remote_tlbs(struct kvm *kvm)
 {
 	return -EOPNOTSUPP;
 }
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index a9c940a31f3a..ca32389f3c36 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -3843,13 +3843,13 @@ static void svm_flush_tlb_all(struct kvm_vcpu *vcpu)
 {
 	/*
 	 * When running on Hyper-V with EnlightenedNptTlb enabled, remote TLB
-	 * flushes should be routed to hv_remote_flush_tlb() without requesting
+	 * flushes should be routed to hv_flush_remote_tlbs() without requesting
 	 * a "regular" remote flush.  Reaching this point means either there's
-	 * a KVM bug or a prior hv_remote_flush_tlb() call failed, both of
+	 * a KVM bug or a prior hv_flush_remote_tlbs() call failed, both of
 	 * which might be fatal to the guest.  Yell, but try to recover.
 	 */
 	if (WARN_ON_ONCE(svm_hv_is_enlightened_tlb_enabled(vcpu)))
-		hv_remote_flush_tlb(vcpu->kvm);
+		hv_flush_remote_tlbs(vcpu->kvm);
 
 	svm_flush_tlb_asid(vcpu);
 }
-- 
2.39.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-31 13:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-30  2:48 linux-next: build failure after merge of the kvm-x86 tree Stephen Rothwell
2023-10-30 10:05 ` Christian Brauner
2023-10-30 11:27   ` Paolo Bonzini
2023-10-30 20:37     ` Stephen Rothwell
2023-10-30 21:05       ` Sean Christopherson
2023-10-30 21:10         ` Stephen Rothwell
2023-10-31 13:42           ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2023-04-11  4:00 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).