All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Guthro <bguthro@virtualiron.com>
To: mukesh.rathor@oracle.com
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH][kdb] Implement dbg_rw_hvm_mem
Date: Tue, 03 Jun 2008 15:28:05 -0400	[thread overview]
Message-ID: <48459B45.2030609@virtualiron.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

The following patch does 2 things:
- Correct a bug confusing XEN_SUBVERSION with XEN_VERSION - preventing 
kdb working on xen 3.2
- Implement dbg_rw_hvm_mem for Xen 3.X hypervisors



[-- Attachment #2: xen-kdb-fixes.patch --]
[-- Type: text/plain, Size: 1359 bytes --]

diff -r 7e82d2b0a20d xen/arch/x86/debug.c
--- a/xen/arch/x86/debug.c
+++ b/xen/arch/x86/debug.c
@@ -34,12 +34,15 @@
 typedef unsigned char dbgbyte_t;
 
 
-#if XEN_SUBVERSION >= 3             /* xen 3.x.x */
+#if XEN_VERSION >= 3             /* xen 3.x.x */
 static noinline int
 dbg_rw_hvm_mem(dbgva_t addr, dbgbyte_t *buf, int len, struct domain *dp,
                int toaddr)
 {
-	return len;
+        if ( toaddr ) 
+                return hvm_copy_to_guest_virt(addr, buf, len) == HVMCOPY_okay;
+        else 
+                return hvm_copy_from_guest_virt(buf, addr, len) == HVMCOPY_okay;         
 }
 
 #else
@@ -82,7 +85,7 @@
     	return len;
 }
 
-#endif /* XEN_SUBVERSION >= 3 */
+#endif /* XEN_VERSION >= 3 */
 
 
 /*
diff -r 7e82d2b0a20d xen/kdb/kdb_cmds.c
--- a/xen/kdb/kdb_cmds.c
+++ b/xen/kdb/kdb_cmds.c
@@ -658,7 +658,7 @@
 	return KDB_CPU_MAIN_KDB;
 }
 
-#if XEN_SUBVERSION >= 3             /* xen 3.x.x */
+#if XEN_VERSION >= 3             /* xen 3.x.x */
 struct  Xgt_desc_struct {
         unsigned short size;
         unsigned long address __attribute__((packed));
@@ -1496,7 +1496,7 @@
 kdb_cpu_cmd_t
 kdb_cmdf_reboot(int argc, const char **argv, struct cpu_user_regs *regs)
 {
-#if XEN_SUBVERSION >= 3             /* xen 3.x.x */
+#if XEN_VERSION >= 3             /* xen 3.x.x */
 	machine_restart();
 #else
 	machine_restart("");

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

             reply	other threads:[~2008-06-03 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-03 19:28 Ben Guthro [this message]
2008-06-05  2:14 ` [PATCH][kdb] Implement dbg_rw_hvm_mem Mukesh Rathor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48459B45.2030609@virtualiron.com \
    --to=bguthro@virtualiron.com \
    --cc=mukesh.rathor@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.