2021-05-25 03:07:08

by Wanpeng Li

[permalink] [raw]
Subject: [PATCH] KVM: Fix ERROR: modpost: .kvm_vcpu_can_poll undefined!

From: Wanpeng Li <[email protected]>

Export kvm_vcpu_can_poll to fix ERROR: modpost: .kvm_vcpu_can_poll undefined!

Signed-off-by: Wanpeng Li <[email protected]>
---
virt/kvm/kvm_main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 62522c1..8eaec42 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2949,6 +2949,7 @@ bool kvm_vcpu_can_poll(ktime_t cur, ktime_t stop)
{
return single_task_running() && !need_resched() && ktime_before(cur, stop);
}
+EXPORT_SYMBOL_GPL(kvm_vcpu_can_poll);

/*
* The vCPU has executed a HLT instruction with in-kernel mode enabled.
--
2.7.4


2021-05-25 08:09:03

by Vitaly Kuznetsov

[permalink] [raw]
Subject: Re: [PATCH] KVM: Fix ERROR: modpost: .kvm_vcpu_can_poll undefined!

Wanpeng Li <[email protected]> writes:

> From: Wanpeng Li <[email protected]>
>
> Export kvm_vcpu_can_poll to fix ERROR: modpost: .kvm_vcpu_can_poll undefined!
>

Fixes: 0fee89fbc44b ("KVM: PPC: exit halt polling on need_resched()")

> Signed-off-by: Wanpeng Li <[email protected]>
> ---
> virt/kvm/kvm_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 62522c1..8eaec42 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -2949,6 +2949,7 @@ bool kvm_vcpu_can_poll(ktime_t cur, ktime_t stop)
> {
> return single_task_running() && !need_resched() && ktime_before(cur, stop);
> }
> +EXPORT_SYMBOL_GPL(kvm_vcpu_can_poll);
>
> /*
> * The vCPU has executed a HLT instruction with in-kernel mode enabled.

--
Vitaly