diff mbox

KVM: PPC: emulate dcbst

Message ID 1365539783-21415-1-git-send-email-stuart.yoder@freescale.com
State New, archived
Headers show

Commit Message

Stuart Yoder April 9, 2013, 8:36 p.m. UTC
From: Stuart Yoder <stuart.yoder@freescale.com>

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
 arch/powerpc/kvm/emulate.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Yoder Stuart-B08248 April 10, 2013, 3:20 a.m. UTC | #1
> -----Original Message-----
> From: Yoder Stuart-B08248
> Sent: Tuesday, April 09, 2013 3:36 PM
> To: agraf@suse.de
> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart-B08248
> Subject: [PATCH] KVM: PPC: emulate dcbst
> 
> From: Stuart Yoder <stuart.yoder@freescale.com>
> 
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
> ---

One thing I should have mentioned...without this patch
on the host 64-bit guest kernels are currently broken
when using -smp.  Not sure how far back things are broken,
the oldest kernel I had a chance to try was like 3.8-rc3.

Stuart

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Scott Wood April 10, 2013, 4:03 p.m. UTC | #2
On 04/09/2013 10:20:41 PM, Yoder Stuart-B08248 wrote:
> > -----Original Message-----
> > From: Yoder Stuart-B08248
> > Sent: Tuesday, April 09, 2013 3:36 PM
> > To: agraf@suse.de
> > Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Yoder  
> Stuart-B08248
> > Subject: [PATCH] KVM: PPC: emulate dcbst
> >
> > From: Stuart Yoder <stuart.yoder@freescale.com>
> >
> > Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
> > ---
> 
> One thing I should have mentioned...without this patch
> on the host 64-bit guest kernels are currently broken
> when using -smp.  Not sure how far back things are broken,
> the oldest kernel I had a chance to try was like 3.8-rc3.

It's due to dcbst being used on the spin table, which is treated as  
emulated MMIO under QEMU.

-Scott
--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alexander Graf April 10, 2013, 10:02 p.m. UTC | #3
On 09.04.2013, at 22:36, Stuart Yoder wrote:

> From: Stuart Yoder <stuart.yoder@freescale.com>
> 
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>

Thanks, applied to kvm-ppc-queue.


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index 7a73b6f..631a265 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -38,6 +38,7 @@ 
 
 #define OP_31_XOP_TRAP      4
 #define OP_31_XOP_LWZX      23
+#define OP_31_XOP_DCBST     54
 #define OP_31_XOP_TRAP_64   68
 #define OP_31_XOP_DCBF      86
 #define OP_31_XOP_LBZX      87
@@ -370,6 +371,7 @@  int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
 			emulated = kvmppc_emulate_mtspr(vcpu, sprn, rs);
 			break;
 
+		case OP_31_XOP_DCBST:
 		case OP_31_XOP_DCBF:
 		case OP_31_XOP_DCBI:
 			/* Do nothing. The guest is performing dcbi because