From: Ian Campbell Subject: Re: [V1 PATCH 5/5] PVH xen tools: misc changes Date: Thu, 5 Sep 2013 11:06:55 +0100 Message-ID: <1378375615.14745.18.camel@kazak.uk.xensource.com> References: <1378344728-30624-1-git-send-email-mukesh.rathor@oracle.com> <1378344728-30624-6-git-send-email-mukesh.rathor@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VHWT7-0003ab-QF for xen-devel@lists.xenproject.org; Thu, 05 Sep 2013 10:07:18 +0000 In-Reply-To: <1378344728-30624-6-git-send-email-mukesh.rathor@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor Cc: xen-devel@lists.xenproject.org, Ian.Jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2013-09-04 at 18:32 -0700, Mukesh Rathor wrote: > - Introduce PVH guest type for gdbsx so it can be used to > debug a PVH guest. > - xl man page change. > > Signed-off-by: Mukesh Rathor > --- > docs/man/xl.cfg.pod.5 | 3 +++ This belongs in the patch to xl which introduces the option. Which then solves the problem of you arbitrarily grouping unrelated changes into a single patch... > tools/debugger/gdbsx/xg/xg_main.c | 4 +++- > 2 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > index 08d6cc4..4c925c9 100644 > --- a/docs/man/xl.cfg.pod.5 > +++ b/docs/man/xl.cfg.pod.5 > @@ -634,6 +634,9 @@ if your particular guest kernel does not require this behaviour then > it is safe to allow this to be enabled but you may wish to disable it > anyway. > > +=item B > +Selects whether to run this guest in an HVM container. Default is 0. > + > =back > > =head2 Fully-virtualised (HVM) Guest Specific Options > diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c > index 64c7484..5736b86 100644 > --- a/tools/debugger/gdbsx/xg/xg_main.c > +++ b/tools/debugger/gdbsx/xg/xg_main.c > @@ -81,6 +81,7 @@ int xgtrc_on = 0; > struct xen_domctl domctl; /* just use a global domctl */ > > static int _hvm_guest; /* hvm guest? 32bit HVMs have 64bit context */ > +static int _pvh_guest; /* PV guest in HVM container */ > static domid_t _dom_id; /* guest domid */ > static int _max_vcpu_id; /* thus max_vcpu_id+1 VCPUs */ > static int _dom0_fd; /* fd of /dev/privcmd */ > @@ -309,6 +310,7 @@ xg_attach(int domid, int guest_bitness) > > _max_vcpu_id = domctl.u.getdomaininfo.max_vcpu_id; > _hvm_guest = (domctl.u.getdomaininfo.flags & XEN_DOMINF_hvm_guest); > + _pvh_guest = (domctl.u.getdomaininfo.flags & XEN_DOMINF_pvh_guest); > return _max_vcpu_id; > } > > @@ -369,7 +371,7 @@ _change_TF(vcpuid_t which_vcpu, int guest_bitness, int setit) > int sz = sizeof(anyc); > > /* first try the MTF for hvm guest. otherwise do manually */ > - if (_hvm_guest) { > + if (_hvm_guest || _pvh_guest) { > domctl.u.debug_op.vcpu = which_vcpu; > domctl.u.debug_op.op = setit ? XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_ON : > XEN_DOMCTL_DEBUG_OP_SINGLE_STEP_OFF;