Skip to content

Commit

Permalink
ppc: debug stub: Get trap instruction opcode from KVM
Browse files Browse the repository at this point in the history
Get trap instruction opcode from KVM and this opcode will
be used for setting software breakpoint in following patch

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
r65777 authored and agraf committed Sep 8, 2014
1 parent b7d1f77 commit 3c902d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions target-ppc/kvm.c
Expand Up @@ -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
Expand Down Expand Up @@ -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);

return ret;
}

Expand Down

0 comments on commit 3c902d4

Please sign in to comment.