summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Bhushan <Bharat.Bhushan@freescale.com>2013-05-13 06:55:58 (GMT)
committerFleming Andrew-AFLEMING <AFLEMING@freescale.com>2013-05-13 22:30:03 (GMT)
commitc2d58d284409a9cda107bf48b51aa297dc8a8bee (patch)
tree3032d4b0e5faf3befa1a533c903240a9a691a2cd
parent061b810224f7f3c74619b50eb8ef91c33529fcfb (diff)
downloadlinux-fsl-qoriq-c2d58d284409a9cda107bf48b51aa297dc8a8bee.tar.xz
KVM: PPC: Fix one-reg for debug instruction
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Change-Id: Ib10502392542024294338d82433aa4a831bf40e1 Reviewed-on: http://git.am.freescale.net:8181/2451 Reviewed-by: Yoder Stuart-B08248 <stuart.yoder@freescale.com> Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com> Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
-rw-r--r--arch/powerpc/kvm/booke.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index da6b643..1bbd13a 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -1559,12 +1559,9 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
case KVM_REG_PPC_TSR:
val = get_reg_val(reg->id, vcpu->arch.tsr);
break;
- case KVM_REG_PPC_DEBUG_INST: {
- u32 opcode = KVMPPC_INST_EHPRIV;
- r = copy_to_user((u32 __user *)(long)reg->addr,
- &opcode, sizeof(u32));
+ case KVM_REG_PPC_DEBUG_INST:
+ val = get_reg_val(reg->id, KVMPPC_INST_EHPRIV);
break;
- }
default:
r = kvmppc_get_one_reg(vcpu, reg->id, &val);
break;