> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Alexander Graf
> Sent: Wednesday, February 03, 2010 4:57 PM
> To: Liu Yu-B13201
> Cc: [email protected]; [email protected]; 
> [email protected]; Liu Yu-B13201
> Subject: Re: [PATCH 1/4] kvmppc: guest debug definitions
> 
> 
> Am 03.02.2010 um 08:53 schrieb Liu Yu <[email protected]>:
> 
> > Signed-off-by: Liu Yu <[email protected]>
> > ---
> > arch/powerpc/include/asm/kvm.h      |   20 ++++++++++++++++++++
> > arch/powerpc/include/asm/kvm_host.h |   16 ++++++++++++++++
> > 2 files changed, 36 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/ 
> > asm/kvm.h
> > index 81f3b0b..b7f7861 100644
> > --- a/arch/powerpc/include/asm/kvm.h
> > +++ b/arch/powerpc/include/asm/kvm.h
> > @@ -22,6 +22,9 @@
> >
> > #include <linux/types.h>
> >
> > +/* Select powerpc specific features in <linux/kvm.h> */
> > +#define __KVM_HAVE_GUEST_DEBUG
> > +
> > struct kvm_regs {
> >    __u64 pc;
> >    __u64 cr;
> > @@ -71,10 +74,27 @@ struct kvm_fpu {
> > };
> >
> > struct kvm_debug_exit_arch {
> > +    __u32 exception;
> > +    __u32 pc;
> > +    __u32 status;
> > };
> >
> > +#define KVM_INST_GUESTGDB               0x44000022
> 
> What instruction is this again? :) Is it something reserved for  
> purposes like this?
> 

Just an invalid instruction which can generate program interrupt...
I'm open to it's value btw.

> 
> > +
> > +#define KVM_GUESTDBG_USE_SW_BP          0x00010000
> > +#define KVM_GUESTDBG_USE_HW_BP          0x00020000
> > +
> > +#define KVMPPC_DEBUG_NOTYPE             0x0
> > +#define KVMPPC_DEBUG_BREAKPOINT         (1UL << 1)
> > +#define KVMPPC_DEBUG_WATCH_WRITE        (1UL << 2)
> > +#define KVMPPC_DEBUG_WATCH_READ         (1UL << 3)
> > +
> > /* for KVM_SET_GUEST_DEBUG */
> > struct kvm_guest_debug_arch {
> > +    struct {
> > +        __u32 addr;
> > +        __u32 type;
> > +    } bp[6];
> 
> I can't look up the sources right now. Is this a struct that 
> 1:1 maps  
> to an ioctl struct? If so, we should add padding for a 
> possible future  
> extension of debug registers.

Yes it's used by ioctl.
What's the usually pad size?

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

Reply via email to