diff mbox series

powerpc/kvm/booke: fix altivec related build break

Message ID 20180426123319.10843-1-laurentiu.tudor@nxp.com (mailing list archive)
State Accepted
Commit b2d7ecbe355698010a6b7a15eb179e09eb3d6a34
Headers show
Series powerpc/kvm/booke: fix altivec related build break | expand

Commit Message

Laurentiu Tudor April 26, 2018, 12:33 p.m. UTC
From: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Add missing "altivec unavailable" interrupt injection helper
thus fixing the linker error below:

arch/powerpc/kvm/emulate_loadstore.o: In function `kvmppc_check_altivec_disabled':
arch/powerpc/kvm/emulate_loadstore.c: undefined reference to `.kvmppc_core_queue_vec_unavail'

Fixes: 09f984961c137c4b ("KVM: PPC: Book3S: Add MMIO emulation for VMX instructions")
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
---
 arch/powerpc/kvm/booke.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Michael Ellerman April 27, 2018, 6:14 a.m. UTC | #1
laurentiu.tudor@nxp.com writes:
> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>
> Add missing "altivec unavailable" interrupt injection helper
> thus fixing the linker error below:
>
> arch/powerpc/kvm/emulate_loadstore.o: In function `kvmppc_check_altivec_disabled':
> arch/powerpc/kvm/emulate_loadstore.c: undefined reference to `.kvmppc_core_queue_vec_unavail'
>
> Fixes: 09f984961c137c4b ("KVM: PPC: Book3S: Add MMIO emulation for VMX instructions")

What config are you using to hit this? I'd like to add it to my
auto-builder to catch it in future.

cheers
Michael Ellerman April 28, 2018, 11:12 a.m. UTC | #2
On Thu, 2018-04-26 at 12:33:19 UTC, laurentiu.tudor@nxp.com wrote:
> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
> 
> Add missing "altivec unavailable" interrupt injection helper
> thus fixing the linker error below:
> 
> arch/powerpc/kvm/emulate_loadstore.o: In function `kvmppc_check_altivec_disabled':
> arch/powerpc/kvm/emulate_loadstore.c: undefined reference to `.kvmppc_core_queue_vec_unavail'
> 
> Fixes: 09f984961c137c4b ("KVM: PPC: Book3S: Add MMIO emulation for VMX instructions")
> Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/b2d7ecbe355698010a6b7a15eb179e

cheers
Laurentiu Tudor May 2, 2018, 8:35 a.m. UTC | #3
Hi Michael,

On 04/27/2018 09:14 AM, Michael Ellerman wrote:
> laurentiu.tudor@nxp.com writes:
>> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>>
>> Add missing "altivec unavailable" interrupt injection helper
>> thus fixing the linker error below:
>>
>> arch/powerpc/kvm/emulate_loadstore.o: In function `kvmppc_check_altivec_disabled':
>> arch/powerpc/kvm/emulate_loadstore.c: undefined reference to `.kvmppc_core_queue_vec_unavail'
>>
>> Fixes: 09f984961c137c4b ("KVM: PPC: Book3S: Add MMIO emulation for VMX instructions")
>
> What config are you using to hit this? I'd like to add it to my
> auto-builder to catch it in future.
>

Start with the corenet64_smp_defconfig and enable CONFIG_KVM_E500MC 
option found in "Virtualization -> KVM support for PowerPC 
E500MC/E5500/E6500 processors".

P.S. Sorry for the late reply. I took advantage of labor day and 
arranged a mini-vacation. :-)

---
Best Regards, Laurentiu
diff mbox series

Patch

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 6038e2e7aee0..876d4f294fdd 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -305,6 +305,13 @@  void kvmppc_core_queue_fpunavail(struct kvm_vcpu *vcpu)
 	kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_FP_UNAVAIL);
 }
 
+#ifdef CONFIG_ALTIVEC
+void kvmppc_core_queue_vec_unavail(struct kvm_vcpu *vcpu)
+{
+	kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_ALTIVEC_UNAVAIL);
+}
+#endif
+
 void kvmppc_core_queue_dec(struct kvm_vcpu *vcpu)
 {
 	kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_DECREMENTER);