Re: [PATCH 7/8] KVM: PPC: booke/bookehv: Add debug stub support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01.02.2013, at 07:31, Bhushan Bharat-R65777 wrote:

> 
> 
>> -----Original Message-----
>> From: Alexander Graf [mailto:agraf@xxxxxxx]
>> Sent: Friday, January 25, 2013 5:37 PM
>> To: Bhushan Bharat-R65777
>> Cc: kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx; Bhushan Bharat-R65777
>> Subject: Re: [PATCH 7/8] KVM: PPC: booke/bookehv: Add debug stub support
>> 
>> 
>> On 16.01.2013, at 09:24, Bharat Bhushan wrote:
>> 
>>> This patch adds the debug stub support on booke/bookehv.
>>> Now QEMU debug stub can use hw breakpoint, watchpoint and software
>>> breakpoint to debug guest.
>>> 
>>> Signed-off-by: Bharat Bhushan <bharat.bhushan@xxxxxxxxxxxxx>
>>> ---
>>> arch/powerpc/include/asm/kvm_host.h   |    5 +
>>> arch/powerpc/include/asm/kvm_ppc.h    |    2 +
>>> arch/powerpc/include/uapi/asm/kvm.h   |   22 ++++-
>>> arch/powerpc/kernel/asm-offsets.c     |   26 ++++++
>>> arch/powerpc/kvm/booke.c              |  124 +++++++++++++++++++++++++----
>>> arch/powerpc/kvm/booke_interrupts.S   |  114 ++++++++++++++++++++++++++
>>> arch/powerpc/kvm/bookehv_interrupts.S |  145 ++++++++++++++++++++++++++++++++-
>>> arch/powerpc/kvm/e500_emulate.c       |    6 ++
>>> arch/powerpc/kvm/e500mc.c             |    3 +-
>>> 9 files changed, 422 insertions(+), 25 deletions(-)
>>> 
>>> diff --git a/arch/powerpc/include/asm/kvm_host.h
>>> b/arch/powerpc/include/asm/kvm_host.h
>>> index f4ba881..a9feeb0 100644
>>> --- a/arch/powerpc/include/asm/kvm_host.h
>>> +++ b/arch/powerpc/include/asm/kvm_host.h
>>> @@ -504,7 +504,12 @@ struct kvm_vcpu_arch {
>>> 	u32 mmucfg;
>>> 	u32 epr;
>>> 	u32 crit_save;
>>> +	/* guest debug registers*/
>>> 	struct kvmppc_booke_debug_reg dbg_reg;
>>> +	/* shadow debug registers */
>>> +	struct kvmppc_booke_debug_reg shadow_dbg_reg;
>>> +	/* host debug registers*/
>>> +	struct kvmppc_booke_debug_reg host_dbg_reg;
>>> #endif
>>> 	gpa_t paddr_accessed;
>>> 	gva_t vaddr_accessed;
>>> diff --git a/arch/powerpc/include/asm/kvm_ppc.h
>>> b/arch/powerpc/include/asm/kvm_ppc.h
>>> index b3c481e..e4b3398 100644
>>> --- a/arch/powerpc/include/asm/kvm_ppc.h
>>> +++ b/arch/powerpc/include/asm/kvm_ppc.h
>>> @@ -45,6 +45,8 @@ enum emulation_result {
>>> 	EMULATE_FAIL,         /* can't emulate this instruction */
>>> 	EMULATE_AGAIN,        /* something went wrong. go again */
>>> 	EMULATE_DO_PAPR,      /* kvm_run filled with PAPR request */
>>> +	EMULATE_DEBUG_INST,   /* debug instruction for software
>>> +				 breakpoint, exit to userspace */
>> 
>> Does this do something different from DO_PAPR? Maybe it makes sense to have an
>> exit code EMULATE_EXIT_USER?
> 
> I think EMULATE_DO_PAPR does something similar but the name is confusing. May be we can rename EMULATE_DO_PAPR to 
> EMULATE_EXIT_USER.

Yeah, please check that it actually does the right thing still for PAPR exits then :).


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux