1 #include <palacios/vm_guest.h>
2 #include <palacios/vmm.h>
4 void PrintV3Segments(struct guest_info * info) {
5 struct v3_segments * segs = &(info->segments);
7 struct v3_segment * seg_ptr;
9 seg_ptr=(struct v3_segment *)segs;
11 char *seg_names[] = {"CS", "DS" , "ES", "FS", "GS", "SS" , "LDTR", "GDTR", "IDTR", "TR", NULL};
12 PrintDebug("Segments\n");
14 for (i = 0; seg_names[i] != NULL; i++) {
16 PrintDebug("\t%s: Sel=%x, base=%x, limit=%x\n", seg_names[i], seg_ptr[i].selector, seg_ptr[i].base, seg_ptr[i].limit);
23 void PrintV3CtrlRegs(struct guest_info * info) {
24 struct v3_ctrl_regs * regs = &(info->ctrl_regs);
27 char * reg_names[] = {"CR0", "CR2", "CR3", "CR4", "CR8", "FLAGS", NULL};
29 reg_ptr= (v3_reg_t *)regs;
31 PrintDebug("32 bit Ctrl Regs:\n");
33 for (i = 0; reg_names[i] != NULL; i++) {
34 PrintDebug("\t%s=0x%x\n", reg_names[i], reg_ptr[i]);
39 void PrintV3GPRs(struct guest_info * info) {
40 struct v3_gprs * regs = &(info->vm_regs);
43 char * reg_names[] = { "RDI", "RSI", "RBP", "RSP", "RBX", "RDX", "RCX", "RAX", NULL};
45 reg_ptr= (v3_reg_t *)regs;
47 PrintDebug("32 bit GPRs:\n");
49 for (i = 0; reg_names[i] != NULL; i++) {
50 PrintDebug("\t%s=0x%x\n", reg_names[i], reg_ptr[i]);