[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-users] Running callbacks on instruction fetches and data accesses


  • To: xen-users@xxxxxxxxxxxxx
  • From: David Vernet <dcvernet@xxxxxxxxx>
  • Date: Fri, 09 Dec 2016 08:28:35 +0000
  • Delivery-date: Sun, 11 Dec 2016 11:23:42 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hello Xen users,

I am interested in using Xen for a research project of mine, and I was curious if it was possible to, for an OS running on Xen, run a callback on instruction fetches and data accesses. In the context of Simics (an x86 emulator), this can be accomplished by creating a module with Simics as such:

```
/* Initialize our Simics module. */
void init_local(void)
{
const class_data_t funcs = {
.new_instance = ls_new_instance,
.class_desc = "desc",
.description = "A simics module."
};

/* Register the empty device class. */
conf_class_t *conf_class = SIM_register_class(SIM_MODULE_NAME, &funcs);

/* Register our class class as a trace consumer. */
static const trace_consume_interface_t trace_int = {
.consume = (void (*)(conf_object_t *, trace_entry_t *))my_tool_entrypoint
};
SIM_register_interface(conf_class, TRACE_CONSUME_INTERFACE, &trace_int);
}
```

By doing this, Simics will call `my_tool_entrypoint` on every instruction and every data access; allowing me to instrument the kernel I'm running as I see fit. Is such a feature available for a guest OS running on Xen? We can modify the OS to hook into Xen however we need. I am aware that this would result in a gigantic performance hit, but that is acceptable for my use case.

If this feature is not currently available, and it sounds like something others would want, it is something I would possibly be willing to spend a lot of time on after the New Year adding to Xen.

Thanks in advance for your time and assistance. Please let me know if this is a message that I should forward to Xen-devel and I will do that instead.

Regards,

David
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
https://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.