All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][1/5] Fix xenctx compilation and support 64 bit.
@ 2005-07-10 18:59 Arun Sharma
  2005-07-10 21:30 ` David Hopwood
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Sharma @ 2005-07-10 18:59 UTC (permalink / raw)
  To: Ian Pratt, Keir Fraser; +Cc: xen-devel

Fix xenctx compilation and support 64 bit.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>

--- a/tools/xentrace/Makefile	Wed Jul  6 21:33:25 2005
+++ b/tools/xentrace/Makefile	Wed Jul  6 22:39:17 2005
@@ -14,7 +14,7 @@
 HDRS     = $(wildcard *.h)
 OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
 
-BIN      = xentrace
+BIN      = xentrace xenctx
 SCRIPTS  = xentrace_format
 MAN1     = $(wildcard *.1)
 MAN8     = $(wildcard *.8)
diff -r 1d5b35c1e60c -r 2d1eefd20f84 tools/xentrace/xenctx.c
--- a/tools/xentrace/xenctx.c	Wed Jul  6 21:33:25 2005
+++ b/tools/xentrace/xenctx.c	Wed Jul  6 22:39:17 2005
@@ -28,22 +28,55 @@
 {
     struct cpu_user_regs *regs = &ctx1->user_regs;
 
-    printf("eip: %08lx\t", regs->eip);
-    printf("esp: %08lx\n", regs->esp);
+    printf("eip: %08x\t", regs->eip);
+    printf("esp: %08x\n", regs->esp);
 
-    printf("eax: %08lx\t", regs->eax);
-    printf("ebx: %08lx\t", regs->ebx);
-    printf("ecx: %08lx\t", regs->ecx);
-    printf("edx: %08lx\n", regs->edx);
+    printf("eax: %08x\t", regs->eax);
+    printf("ebx: %08x\t", regs->ebx);
+    printf("ecx: %08x\t", regs->ecx);
+    printf("edx: %08x\n", regs->edx);
 
-    printf("esi: %08lx\t", regs->esi);
-    printf("edi: %08lx\t", regs->edi);
-    printf("ebp: %08lx\n", regs->ebp);
+    printf("esi: %08x\t", regs->esi);
+    printf("edi: %08x\t", regs->edi);
+    printf("ebp: %08x\n", regs->ebp);
 
-    printf(" cs: %08lx\t", regs->cs);
-    printf(" ds: %08lx\t", regs->ds);
-    printf(" fs: %08lx\t", regs->fs);
-    printf(" gs: %08lx\n", regs->gs);
+    printf(" cs: %08x\t", regs->cs);
+    printf(" ds: %08x\t", regs->ds);
+    printf(" fs: %08x\t", regs->fs);
+    printf(" gs: %08x\n", regs->gs);
+
+}
+#elif defined(__x86_64__)
+void print_ctx(vcpu_guest_context_t *ctx1)
+{
+    struct cpu_user_regs *regs = &ctx1->user_regs;
+
+    printf("rip: %08lx\t", regs->rip);
+    printf("rsp: %08lx\n", regs->rsp);
+
+    printf("rax: %08lx\t", regs->rax);
+    printf("rbx: %08lx\t", regs->rbx);
+    printf("rcx: %08lx\t", regs->rcx);
+    printf("rdx: %08lx\n", regs->rdx);
+
+    printf("rsi: %08lx\t", regs->rsi);
+    printf("rdi: %08lx\t", regs->rdi);
+    printf("rbp: %08lx\n", regs->rbp);
+
+    printf("r8: %08lx\t", regs->r8);
+    printf("r9: %08lx\t", regs->r9);
+    printf("r10: %08lx\t", regs->r10);
+    printf("r11: %08lx\n", regs->r11);
+
+    printf("r12: %08lx\t", regs->r12);
+    printf("r13: %08lx\t", regs->r13);
+    printf("r14: %08lx\t", regs->r14);
+    printf("r15: %08lx\n", regs->r15);
+
+    printf(" cs: %08x\t", regs->cs);
+    printf(" ds: %08x\t", regs->ds);
+    printf(" fs: %08x\t", regs->fs);
+    printf(" gs: %08x\n", regs->gs);
 
 }
 #endif
@@ -51,12 +84,11 @@
 void dump_ctx(u32 domid, u32 vcpu)
 {
     int ret;
-    xc_domaininfo_t info;
     vcpu_guest_context_t ctx;
 
     int xc_handle = xc_interface_open(); /* for accessing control interface */
 
-    ret = xc_domain_getfullinfo(xc_handle, domid, vcpu, &info, &ctx);
+    ret = xc_domain_get_vcpu_context(xc_handle, domid, vcpu, &ctx);
     if (ret != 0) {
         perror("xc_domain_getfullinfo");
         exit(-1);

^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: [PATCH][1/5] Fix xenctx compilation and support 64 bit.
@ 2005-07-10 21:49 Ian Pratt
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Pratt @ 2005-07-10 21:49 UTC (permalink / raw)
  To: Arun Sharma, Ian Pratt, Keir Fraser; +Cc: xen-devel

> Fix xenctx compilation and support 64 bit.

Has xenctx been fixed to check that the target domain is actually the
one returned by the hypercall (rather than the next in the list)?

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-07-10 21:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-10 18:59 [PATCH][1/5] Fix xenctx compilation and support 64 bit Arun Sharma
2005-07-10 21:30 ` David Hopwood
  -- strict thread matches above, loose matches on Subject: below --
2005-07-10 21:49 Ian Pratt

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.