[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/svm: Improve segment register printing in svm_vmcb_dump()
commit 660eb42c021869cb57a32504e875135ea167f056 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Thu Oct 27 13:07:21 2016 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Dec 2 12:56:38 2016 +0000 x86/svm: Improve segment register printing in svm_vmcb_dump() This makes it more succinct and easier to read. Before: (XEN) H_CR3 = 0x000000042a0ec000 CleanBits = 0 (XEN) CS: sel=0x0008, attr=0x029b, limit=0xffffffff, base=0x0000000000000000 (XEN) DS: sel=0x0033, attr=0x0cf3, limit=0xffffffff, base=0x0000000000000000 (XEN) SS: sel=0x0018, attr=0x0c93, limit=0xffffffff, base=0x0000000000000000 (XEN) ES: sel=0x0033, attr=0x0cf3, limit=0xffffffff, base=0x0000000000000000 (XEN) FS: sel=0x0033, attr=0x0cf3, limit=0xffffffff, base=0x0000000000000000 (XEN) GS: sel=0x0033, attr=0x0cf3, limit=0xffffffff, base=0x0000000000000000 (XEN) GDTR: sel=0x0000, attr=0x0000, limit=0x00000067, base=0x000000000010d100 (XEN) LDTR: sel=0x0000, attr=0x0000, limit=0x00000000, base=0x0000000000000000 (XEN) IDTR: sel=0x0000, attr=0x0000, limit=0x00000fff, base=0x0000000000110900 (XEN) TR: sel=0x0038, attr=0x0089, limit=0x00000067, base=0x000000000010d020 After: (XEN) H_CR3 = 0x000000042a0ec000 CleanBits = 0 (XEN) sel attr limit base (XEN) CS: 0008 029b ffffffff 0000000000000000 (XEN) DS: 0033 0cf3 ffffffff 0000000000000000 (XEN) SS: 0018 0c93 ffffffff 0000000000000000 (XEN) ES: 0033 0cf3 ffffffff 0000000000000000 (XEN) FS: 0033 0cf3 ffffffff 0000000000000000 (XEN) GS: 0033 0cf3 ffffffff 0000000000000000 (XEN) GDTR: 0000 0000 00000067 000000000010d100 (XEN) LDTR: 0000 0000 00000000 0000000000000000 (XEN) IDTR: 0000 0000 00000fff 0000000000110900 (XEN) TR: 0038 0089 00000067 000000000010d020 Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Boris Ostrovsky <boris.ostorvsky@xxxxxxxxxx> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> --- xen/arch/x86/hvm/svm/svmdebug.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svmdebug.c b/xen/arch/x86/hvm/svm/svmdebug.c index f93dfed..0a64e92 100644 --- a/xen/arch/x86/hvm/svm/svmdebug.c +++ b/xen/arch/x86/hvm/svm/svmdebug.c @@ -20,11 +20,10 @@ #include <asm/msr-index.h> #include <asm/hvm/svm/svmdebug.h> -static void svm_dump_sel(const char *name, svm_segment_register_t *s) +static void svm_dump_sel(const char *name, const svm_segment_register_t *s) { - printk("%s: sel=0x%04x, attr=0x%04x, limit=0x%08x, base=0x%016llx\n", - name, s->sel, s->attr.bytes, s->limit, - (unsigned long long)s->base); + printk("%s: %04x %04x %08x %016"PRIx64"\n", + name, s->sel, s->attr.bytes, s->limit, s->base); } /* This function can directly access fields which are covered by clean bits. */ @@ -83,16 +82,17 @@ void svm_vmcb_dump(const char *from, struct vmcb_struct *vmcb) (unsigned long long)vmcb->_h_cr3, vmcb->cleanbits.bytes); /* print out all the selectors */ - svm_dump_sel("CS", &vmcb->cs); - svm_dump_sel("DS", &vmcb->ds); - svm_dump_sel("SS", &vmcb->ss); - svm_dump_sel("ES", &vmcb->es); - svm_dump_sel("FS", &vmcb->fs); - svm_dump_sel("GS", &vmcb->gs); + printk(" sel attr limit base\n"); + svm_dump_sel(" CS", &vmcb->cs); + svm_dump_sel(" DS", &vmcb->ds); + svm_dump_sel(" SS", &vmcb->ss); + svm_dump_sel(" ES", &vmcb->es); + svm_dump_sel(" FS", &vmcb->fs); + svm_dump_sel(" GS", &vmcb->gs); svm_dump_sel("GDTR", &vmcb->gdtr); svm_dump_sel("LDTR", &vmcb->ldtr); svm_dump_sel("IDTR", &vmcb->idtr); - svm_dump_sel("TR", &vmcb->tr); + svm_dump_sel(" TR", &vmcb->tr); } bool_t -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |