[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/6 v6] ppc: debug stub: Get trap ins
From: |
Peter Maydell |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/6 v6] ppc: debug stub: Get trap instruction opcode from KVM |
Date: |
Thu, 10 Jul 2014 15:07:25 +0100 |
On 10 July 2014 11:57, Bharat Bhushan <address@hidden> wrote:
> Get trap instruction opcode from KVM and this opcode will
> be used for setting software breakpoint in following patch
>
> Signed-off-by: Bharat Bhushan <address@hidden>
> ---
> v5->v6
> - no change
>
> target-ppc/kvm.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
> index 2d87108..4df23dd 100644
> --- a/target-ppc/kvm.c
> +++ b/target-ppc/kvm.c
> @@ -72,6 +72,8 @@ static int cap_papr;
> static int cap_htab_fd;
> static int cap_fixup_hcalls;
>
> +static uint32_t debug_inst_opcode;
> +
> /* XXX We have a race condition where we actually have a level triggered
> * interrupt, but the infrastructure can't expose that yet, so the guest
> * takes but ignores it, goes to sleep and never gets notified that
> there's
> @@ -436,6 +438,8 @@ int kvm_arch_init_vcpu(CPUState *cs)
> break;
> }
>
> + kvm_get_one_reg(cs, KVM_REG_PPC_DEBUG_INST, &debug_inst_opcode);
> +
Presumably the kernel guarantees that this is always the
same value for every CPU in the system?
thanks
-- PMM
- [Qemu-ppc] [PATCH 0/6 v6] ppc: Add debug stub support, Bharat Bhushan, 2014/07/10
- [Qemu-ppc] [PATCH 1/6 v6] ppc: debug stub: Get trap instruction opcode from KVM, Bharat Bhushan, 2014/07/10
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/6 v6] ppc: debug stub: Get trap instruction opcode from KVM,
Peter Maydell <=
- [Qemu-ppc] [PATCH 2/6 v6] ppc: Add interface to inject interrupt to guest, Bharat Bhushan, 2014/07/10
- [Qemu-ppc] [PATCH 6/6 v6] ppc: Add hw breakpoint watchpoint support, Bharat Bhushan, 2014/07/10
- [Qemu-ppc] [PATCH 3/6 v6] ppc: synchronize excp_vectors for injecting exception, Bharat Bhushan, 2014/07/10
- [Qemu-ppc] [PATCH 5/6 v6] ppc: Add software breakpoint support, Bharat Bhushan, 2014/07/10
- [Qemu-ppc] [PATCH 4/6 v6] ppc: Add program exception injection handler, Bharat Bhushan, 2014/07/10