aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorBharat Bhushan <Bharat.Bhushan@freescale.com>2014-08-06 02:38:54 -0400
committerAlexander Graf <agraf@suse.de>2014-09-22 04:11:30 -0400
commit2190991e7caa2e2a2b976e9ed16e55f8c51623be (patch)
tree448a459083b334c8fdb21dbef118b42010870093 /arch/powerpc/kvm
parent37277b1129de84024f1f427da7bf25aabccf835e (diff)
KVM: PPC: BOOKE: Clear guest dbsr in userspace exit KVM_EXIT_DEBUG
Dbsr is not visible to userspace and we do not think any need to expose this to userspace because: Userspace cannot inject debug interrupt to guest (as this does not know guest ability to handle debug interrupt), so userspace will always clear DBSR. Now if userspace has to always clear DBSR in KVM_EXIT_DEBUG handling then clearing dbsr in kernel looks simple as this avoid doing SET_SREGS/set_one_reg() to clear 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 322da7d2334a..b4ab86cdb51d 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -735,6 +735,8 @@ static int kvmppc_handle_debug(struct kvm_run *run, struct kvm_vcpu *vcpu)
735 struct debug_reg *dbg_reg = &(vcpu->arch.shadow_dbg_reg); 735 struct debug_reg *dbg_reg = &(vcpu->arch.shadow_dbg_reg);
736 u32 dbsr = vcpu->arch.dbsr; 736 u32 dbsr = vcpu->arch.dbsr;
737 737
738 /* Clear guest dbsr (vcpu->arch.dbsr) */
739 vcpu->arch.dbsr = 0;
738 run->debug.arch.status = 0; 740 run->debug.arch.status = 0;
739 run->debug.arch.address = vcpu->arch.pc; 741 run->debug.arch.address = vcpu->arch.pc;
740 742