[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] unexpected results with xc_domain_get_vcpu_context
I'm getting some unexpected results with xc_domain_get_vcpu_context. Basically, I've written a simple application in domain 0 to view the vcpu for another domain. However, each time that I call xc_domain_get_vcpu_context, the value for eip is the same. Is this expected behavior? I would have expected eip to be changing continuously as the machine runs. Or does this function not give me the "live" values? Here's the code that I'm using... int main (int argc, char **argv) { int xc_handle; vcpu_guest_context_t ctxt; struct timespec sleep_timer; uint32_t dom = 6; /* hard code this for easy testing */ /* setup */ if ((xc_handle = xc_interface_open()) == -1){ printf("error opening xc interface\n"); goto error_exit; } sleep_timer.tv_sec = 2; sleep_timer.tv_nsec = 000000000; /* 0.00 seconds */ while (1){ /* sleep for designated time */ if (nanosleep(&sleep_timer, NULL) != 0){ perror("Sleep interrupted, exiting..."); goto error_exit; }if (xc_domain_get_vcpu_context(xc_handle, dom, 1, &ctxt) == -1){ printf("error getting vcpu context\n"); goto error_exit; } /* perform the designated task */ printf("eip = 0x%x\n", ctxt.user_regs.eip); } error_exit: if (xc_handle != -1) xc_interface_close(xc_handle); return 0; } Thanks, -bryan - Bryan D. Payne Graduate Student, Computer Science Georgia Tech Information Security Center http://www.bryanpayne.org _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |