* [PATCH][kdb] Implement dbg_rw_hvm_mem
@ 2008-06-03 19:28 Ben Guthro
2008-06-05 2:14 ` Mukesh Rathor
0 siblings, 1 reply; 2+ messages in thread
From: Ben Guthro @ 2008-06-03 19:28 UTC (permalink / raw)
To: mukesh.rathor; +Cc: xen-devel
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][kdb] Implement dbg_rw_hvm_mem
2008-06-03 19:28 [PATCH][kdb] Implement dbg_rw_hvm_mem Ben Guthro
@ 2008-06-05 2:14 ` Mukesh Rathor
0 siblings, 0 replies; 2+ messages in thread
From: Mukesh Rathor @ 2008-06-05 2:14 UTC (permalink / raw)
To: Ben Guthro; +Cc: xen-devel
Ben Guthro wrote:
> The following patch does 2 things:
> - Correct a bug confusing XEN_SUBVERSION with XEN_VERSION - preventing
> kdb working on xen 3.2
Actually, there's no confusion. The api's are different in 3.1.x and
3.3. Looks like 3.2 is same as 3.3. I'm downloading 3.2 and will change
appropriately.
> - Implement dbg_rw_hvm_mem for Xen 3.X hypervisors
ok, thanks.
BTW, you must refresh your kdb with a BUG fix i made in kdbmain.c/kdbmain()
regarding disabling irqs in ss mode.
Thanks
Mukesh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-06-05 2:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 19:28 [PATCH][kdb] Implement dbg_rw_hvm_mem Ben Guthro
2008-06-05 2:14 ` Mukesh Rathor
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.