WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] tools/debugger/gdbsx: use MTF flag for

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] tools/debugger/gdbsx: use MTF flag for HVM guests for single step
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Sep 2010 17:35:10 -0700
Delivery-date: Tue, 14 Sep 2010 17:35:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1284394687 -3600
# Node ID 5ca1d7547a42cc469d856b62f1894408ea8e1723
# Parent  16867267ac126043712703455b81c16f2549ee23
tools/debugger/gdbsx: use MTF flag for HVM guests for single step

The attached patch first tries the MTF flag for HVM guest
single step, reverting to manually setting the TF flag  if MTF fails.

Tested on 4.0.1. Compile tested on unstable.

Signed-off-by: mukesh.rathor@xxxxxxxxxx
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
xen-unstable changeset:   22115:cd87550cea5e
xen-unstable date:        Tue Sep 07 19:17:16 2010 +0100
---
 tools/debugger/gdbsx/xg/xg_main.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

diff -r 16867267ac12 -r 5ca1d7547a42 tools/debugger/gdbsx/xg/xg_main.c
--- a/tools/debugger/gdbsx/xg/xg_main.c Wed Sep 01 10:22:05 2010 +0100
+++ b/tools/debugger/gdbsx/xg/xg_main.c Mon Sep 13 17:18:07 2010 +0100
@@ -158,6 +158,7 @@ xg_init()
 
 
 /*
+ * Precondition: domctl global struct must be filled 
  * Returns : 0 Success, failure otherwise with errno set
  */
 static int
@@ -365,6 +366,19 @@ _change_TF(vcpuid_t which_vcpu, int gues
 {
     union vcpu_guest_context_any anyc;
     int sz = sizeof(anyc);
+
+    /* first try the MTF for hvm guest. otherwise do manually */
+    if (_hvm_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;
+
+        if (_domctl_hcall(XEN_DOMCTL_debug_op, NULL, 0) == 0) {
+            XGTRC("vcpu:%d:MTF success setit:%d\n", which_vcpu, setit);
+            return 0;
+        }
+        XGTRC("vcpu:%d:MTF failed. setit:%d\n", which_vcpu, setit);
+    }
 
     memset(&anyc, 0, sz);
     domctl.u.vcpucontext.vcpu = (uint16_t)which_vcpu;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] tools/debugger/gdbsx: use MTF flag for HVM guests for single step, Xen patchbot-4.0-testing <=