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
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("");
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|