On 14.03.2013, at 05:30, Bhushan Bharat-R65777 wrote: > > >> -----Original Message----- >> From: Alexander Graf [mailto:agraf@xxxxxxx] >> Sent: Thursday, March 07, 2013 6:38 PM >> To: Bhushan Bharat-R65777 >> Cc: kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx; Wood Scott-B07421; Bhushan >> Bharat-R65777 >> Subject: Re: [PATCH 2/7] Added ONE_REG interface for debug instruction >> >> >> On 28.02.2013, at 05:13, Bharat Bhushan wrote: >> >>> This patch adds the one_reg interface to get the special instruction >>> to be used for setting software breakpoint from userspace. >>> >>> Signed-off-by: Bharat Bhushan <bharat.bhushan@xxxxxxxxxxxxx> >>> --- >>> Documentation/virtual/kvm/api.txt | 1 + >>> arch/powerpc/include/asm/kvm_book3s.h | 1 + >>> arch/powerpc/include/asm/kvm_booke.h | 2 ++ >>> arch/powerpc/include/uapi/asm/kvm.h | 4 ++++ >>> arch/powerpc/kvm/book3s.c | 6 ++++++ >>> arch/powerpc/kvm/booke.c | 6 ++++++ >>> 6 files changed, 20 insertions(+), 0 deletions(-) >>> >>> diff --git a/Documentation/virtual/kvm/api.txt >>> b/Documentation/virtual/kvm/api.txt >>> index cce500a..dbfcc04 100644 >>> --- a/Documentation/virtual/kvm/api.txt >>> +++ b/Documentation/virtual/kvm/api.txt >>> @@ -1766,6 +1766,7 @@ registers, find a list below: >>> PPC | KVM_REG_PPC_TSR | 32 >>> PPC | KVM_REG_PPC_OR_TSR | 32 >>> PPC | KVM_REG_PPC_CLEAR_TSR | 32 >>> + PPC | KVM_REG_PPC_DEBUG_INST| 32 >>> >>> 4.69 KVM_GET_ONE_REG >>> >>> diff --git a/arch/powerpc/include/asm/kvm_book3s.h >>> b/arch/powerpc/include/asm/kvm_book3s.h >>> index 5a56e1c..36164cc 100644 >>> --- a/arch/powerpc/include/asm/kvm_book3s.h >>> +++ b/arch/powerpc/include/asm/kvm_book3s.h >>> @@ -458,6 +458,7 @@ static inline bool kvmppc_critical_section(struct kvm_vcpu >> *vcpu) >>> #define OSI_SC_MAGIC_R4 0x77810F9B >>> >>> #define INS_DCBZ 0x7c0007ec >>> +#define INS_TW 0x7c000008 >> >> This one should be "trap", so TO needs to be 31. The instruction as it's here is >> a nop if I read the spec correctly. > > Yes I missed this. > BTW rather than setting TO = 31, what if we set TO = 2 as RA and RB is same here. Well, the unconditional "trap" instruction is simply defined as TO = 31, so I'd stick to that :) Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html