Skip to contentSkip to conversation

Keep shadow pid equal to guest pid on E500

PATCH In review Liu Yu 1 participant 2 messages Dec 15, 2008

Subsystems (2)
lore
Share & tools
lore

Liu Yu

author
#0 lore raw

PATCH 1/1 Keep shadow pid equal to guest pid on E500

---
 arch/powerpc/kvm/e500_emulate.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/kvm/e500_emulate.c +2 -1
index ae3b249..ecb3f55 100644
@@ -124,7 +124,9 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs)
 	switch (sprn) {
 	/* E500 */
 	case SPRN_PID:
-		vcpu_e500->pid[0] = vcpu->arch.pid = vcpu->arch.gpr[rs]; break;
+		vcpu_e500->pid[0] = vcpu->arch.shadow_pid +			vcpu->arch.pid = vcpu->arch.gpr[rs];
+		break;
 	case SPRN_PID1:
 		vcpu_e500->pid[1] = vcpu->arch.gpr[rs]; break;
 	case SPRN_PID2:
Signature · 1 line
1.5.4
author
#1 lore raw

Hi Hollis,

You can ignore the patch "[PATCH 03/11] Use arch.pid as shadow pid for E500" and append this one,
or I will wait for more feedback and then resend the whole patchset.

Quoted 33 lines

-----Original Message-----
From: Liu Yu-B13201
Sent: Monday, December 15, 2008 5:55 PM
To: [email protected]
Cc: Liu Yu-B13201
Subject: [PATCH] Keep shadow pid equal to guest pid on E500

---
 arch/powerpc/kvm/e500_emulate.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/powerpc/kvm/e500_emulate.c +2 -1
index ae3b249..ecb3f55 100644
@@ -124,7 +124,9 @@ int kvmppc_core_emulate_mtspr(struct 
 kvm_vcpu *vcpu, int sprn, int rs)
 	switch (sprn) {
 	/* E500 */
 	case SPRN_PID:
-		vcpu_e500->pid[0] = vcpu->arch.pid = 
 vcpu->arch.gpr[rs]; break;
+		vcpu_e500->pid[0] = vcpu->arch.shadow_pid > +			vcpu->arch.pid = vcpu->arch.gpr[rs];
+		break;
 	case SPRN_PID1:
 		vcpu_e500->pid[1] = vcpu->arch.gpr[rs]; break;
 	case SPRN_PID2:
Signature · 1 line
1.5.4