Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint
From: Madhavan Srinivasan <hidden>
Date: 2014-08-12 05:18:04
Also in:
kvm
On Monday 11 August 2014 02:45 PM, Alexander Graf wrote:
On 11.08.14 10:51, Benjamin Herrenschmidt wrote:quoted
On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote:quoted
quoted
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index da86d9b..d95014e 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.cThis should be book3s_emulate.c.Any reason we can't make that 00dddd00 opcode as breakpoint common to all powerpc variants ?I can't think of a good reason. We use a hypercall on booke (which traps into an illegal instruction for pr) today, but I don't think it has to be that way. Given that the user space API allows us to change it dynamically, there should be nothing blocking us from going with 00dddd00 always.
Kindly correct me if i am wrong. So we can still have a common code in emulate.c to set the env for both HV and pr incase of illegal instruction (i will rebase latest src). But suggestion here to use 00dddd00, in that case current path in embed is kvmppc_handle_exit (booke.c) -> BOOKE_INTERRUPT_HV_PRIV -> emulation_exit -> kvmppc_emulate_instruction, will change to kvmppc_handle_exit (booke.c) -> BOOKE_INTERRUPT_PROGRAM -> if debug instr call emulation_exit else send to guest? Thanks for review regards Maddy
Alex