linux-next: build failure after merge of the kvm-x86 tree

From: Stephen Rothwell
Date: Tue Apr 11 2023 - 00:01:04 EST


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@xxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxxx>
---
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: pgpjmQ3YGVGxR.pgp
Description: OpenPGP digital signature