Arun Sharma
2005-Jul-10 18:59 UTC
[Xen-devel] [PATCH][1/5] Fix xenctx compilation and support 64 bit.
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); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
David Hopwood
2005-Jul-10 21:30 UTC
Re: [Xen-devel] [PATCH][1/5] Fix xenctx compilation and support 64 bit.
Arun Sharma wrote:> - 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");perror("xc_domain_get_vcpu_context"); -- David Hopwood <david.nospam.hopwood@blueyonder.co.uk> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Pratt
2005-Jul-10 21:49 UTC
[Xen-devel] RE: [PATCH][1/5] Fix xenctx compilation and support 64 bit.
> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel