* [PATCH] pvh support for gdbsx
@ 2013-11-23 0:48 Mukesh Rathor
2013-11-25 11:04 ` George Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Mukesh Rathor @ 2013-11-23 0:48 UTC (permalink / raw)
To: Xen-devel@lists.xensource.com
Add pvh support to gdbsx so it can be used to debug pvh domUs.
Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
tools/debugger/gdbsx/xg/xg_main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
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;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pvh support for gdbsx
2013-11-23 0:48 [PATCH] pvh support for gdbsx Mukesh Rathor
@ 2013-11-25 11:04 ` George Dunlap
2013-11-26 11:14 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: George Dunlap @ 2013-11-25 11:04 UTC (permalink / raw)
To: Mukesh Rathor; +Cc: Xen-devel@lists.xensource.com
On Sat, Nov 23, 2013 at 12:48 AM, Mukesh Rathor
<mukesh.rathor@oracle.com> wrote:
> Add pvh support to gdbsx so it can be used to debug pvh domUs.
>
> Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
In theory the "pvh_guest" flag will go away at some point, but until then:
Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> tools/debugger/gdbsx/xg/xg_main.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> 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;
> --
> 1.7.2.3
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pvh support for gdbsx
2013-11-25 11:04 ` George Dunlap
@ 2013-11-26 11:14 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2013-11-26 11:14 UTC (permalink / raw)
To: George Dunlap; +Cc: Xen-devel@lists.xensource.com
On Mon, 2013-11-25 at 11:04 +0000, George Dunlap wrote:
> On Sat, Nov 23, 2013 at 12:48 AM, Mukesh Rathor
> <mukesh.rathor@oracle.com> wrote:
> > Add pvh support to gdbsx so it can be used to debug pvh domUs.
> >
> > Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
>
> In theory the "pvh_guest" flag will go away at some point, but until then:
>
> Release-acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Applied. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-26 11:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-23 0:48 [PATCH] pvh support for gdbsx Mukesh Rathor
2013-11-25 11:04 ` George Dunlap
2013-11-26 11:14 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).