summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorBharat Bhushan <Bharat.Bhushan@freescale.com>2014-08-06 12:08:56 +0530
committerAlexander Graf <agraf@suse.de>2014-09-22 10:11:30 +0200
commit2c5096720f3e325df697881cc2a5b3d810b57109 (patch)
treea142558d1207b7db43631521bdab04abd7277cce /arch/powerpc/kvm
parent348ba71081cd8444178d24d3ed13d34fc1b61dae (diff)
KVM: PPC: BOOKE: Add one reg interface for DBSR
Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/booke.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index e47de01b0db..074b7fc795b 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -1494,6 +1494,9 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
case KVM_REG_PPC_DAC2:
val = get_reg_val(reg->id, vcpu->arch.dbg_reg.dac2);
break;
+ case KVM_REG_PPC_DBSR:
+ val = get_reg_val(reg->id, vcpu->arch.dbsr);
+ break;
case KVM_REG_PPC_EPR: {
u32 epr = kvmppc_get_epr(vcpu);
val = get_reg_val(reg->id, epr);
@@ -1564,6 +1567,9 @@ int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
case KVM_REG_PPC_DAC2:
vcpu->arch.dbg_reg.dac2 = set_reg_val(reg->id, val);
break;
+ case KVM_REG_PPC_DBSR:
+ vcpu->arch.dbsr = set_reg_val(reg->id, val);
+ break;
case KVM_REG_PPC_EPR: {
u32 new_epr = set_reg_val(reg->id, val);
kvmppc_set_epr(vcpu, new_epr);