]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: PPC: BOOKE: Emulate debug registers and exception
authorBharat Bhushan <Bharat.Bhushan@freescale.com>
Wed, 13 Aug 2014 09:09:44 +0000 (14:39 +0530)
committerAlexander Graf <agraf@suse.de>
Mon, 22 Sep 2014 08:11:33 +0000 (10:11 +0200)
commit2f699a59f399d65d51df6eb916bf2e0f7c6f8148
tree05195a1fd71036497d12fd0e0605798a09a23bdf
parent3840edc8033ad5b86deee309c1c321ca54257452
KVM: PPC: BOOKE: Emulate debug registers and exception

This patch emulates debug registers and debug exception
to support guest using debug resource. This enables running
gdb/kgdb etc in guest.

On BOOKE architecture we cannot share debug resources between QEMU and
guest because:
    When QEMU is using debug resources then debug exception must
    be always enabled. To achieve this we set MSR_DE and also set
    MSRP_DEP so guest cannot change MSR_DE.

    When emulating debug resource for guest we want guest
    to control MSR_DE (enable/disable debug interrupt on need).

    So above mentioned two configuration cannot be supported
    at the same time. So the result is that we cannot share
    debug resources between QEMU and Guest on BOOKE architecture.

In the current design QEMU gets priority over guest, this means that if
QEMU is using debug resources then guest cannot use them and if guest is
using debug resource then QEMU can overwrite them.

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/include/asm/reg_booke.h
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/booke_emulate.c