From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Subject: Re: [PATCH 2/4 v2] KVM: PPC: debug stub interface parameter defined Date: Fri, 29 Mar 2013 02:55:34 +0100 Message-ID: References: <1363847101-26503-1-git-send-email-Bharat.Bhushan@freescale.com> <1363847101-26503-3-git-send-email-Bharat.Bhushan@freescale.com> Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: , , , Bharat Bhushan To: Bharat Bhushan Return-path: In-Reply-To: <1363847101-26503-3-git-send-email-Bharat.Bhushan@freescale.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 21.03.2013, at 07:24, Bharat Bhushan wrote: > From: Bharat Bhushan > > This patch defines the interface parameter for KVM_SET_GUEST_DEBUG > ioctl support. Follow up patches will use this for setting up > hardware breakpoints, watchpoints and software breakpoints. > > Also kvm_arch_vcpu_ioctl_set_guest_debug() is brought one level below. > This is because I am not sure what is required for book3s. So this ioctl > behaviour will not change for book3s. > > Signed-off-by: Bharat Bhushan > --- > v2: > - No Change > > arch/powerpc/include/uapi/asm/kvm.h | 23 +++++++++++++++++++++++ > arch/powerpc/kvm/book3s.c | 6 ++++++ > arch/powerpc/kvm/booke.c | 6 ++++++ > arch/powerpc/kvm/powerpc.c | 6 ------ > 4 files changed, 35 insertions(+), 6 deletions(-) > > diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h > index c2ff99c..15f9a00 100644 > --- a/arch/powerpc/include/uapi/asm/kvm.h > +++ b/arch/powerpc/include/uapi/asm/kvm.h > @@ -272,8 +272,31 @@ struct kvm_debug_exit_arch { > > /* for KVM_SET_GUEST_DEBUG */ > struct kvm_guest_debug_arch { > + struct { > + /* H/W breakpoint/watchpoint address */ > + __u64 addr; > + /* > + * Type denotes h/w breakpoint, read watchpoint, write > + * watchpoint or watchpoint (both read and write). > + */ > +#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) Are you sure you want to introduce these here, just to remove them again in a later patch? Alex From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Fri, 29 Mar 2013 01:55:34 +0000 Subject: Re: [PATCH 2/4 v2] KVM: PPC: debug stub interface parameter defined Message-Id: List-Id: References: <1363847101-26503-1-git-send-email-Bharat.Bhushan@freescale.com> <1363847101-26503-3-git-send-email-Bharat.Bhushan@freescale.com> In-Reply-To: <1363847101-26503-3-git-send-email-Bharat.Bhushan@freescale.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bharat Bhushan Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, scottwood@freescale.com, Bharat Bhushan On 21.03.2013, at 07:24, Bharat Bhushan wrote: > From: Bharat Bhushan > > This patch defines the interface parameter for KVM_SET_GUEST_DEBUG > ioctl support. Follow up patches will use this for setting up > hardware breakpoints, watchpoints and software breakpoints. > > Also kvm_arch_vcpu_ioctl_set_guest_debug() is brought one level below. > This is because I am not sure what is required for book3s. So this ioctl > behaviour will not change for book3s. > > Signed-off-by: Bharat Bhushan > --- > v2: > - No Change > > arch/powerpc/include/uapi/asm/kvm.h | 23 +++++++++++++++++++++++ > arch/powerpc/kvm/book3s.c | 6 ++++++ > arch/powerpc/kvm/booke.c | 6 ++++++ > arch/powerpc/kvm/powerpc.c | 6 ------ > 4 files changed, 35 insertions(+), 6 deletions(-) > > diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h > index c2ff99c..15f9a00 100644 > --- a/arch/powerpc/include/uapi/asm/kvm.h > +++ b/arch/powerpc/include/uapi/asm/kvm.h > @@ -272,8 +272,31 @@ struct kvm_debug_exit_arch { > > /* for KVM_SET_GUEST_DEBUG */ > struct kvm_guest_debug_arch { > + struct { > + /* H/W breakpoint/watchpoint address */ > + __u64 addr; > + /* > + * Type denotes h/w breakpoint, read watchpoint, write > + * watchpoint or watchpoint (both read and write). > + */ > +#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) Are you sure you want to introduce these here, just to remove them again in a later patch? Alex