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

[Xen-devel] Dynamic Disassembling domU Instructions


I am trying to modify Xen 4.8 to have it print out the opcode as well as some registers of an HVM domU as it runs. I tried to modify xen/arch/x86/hvm/emulate.c 's hvmemul_insn_fetch to output the content in hvmemul_ctxt->insn_buf with printk. In hvmemul_insn_fetch, it seems that a lot of the requested bytes are cached, does the domU's OS repeatedly calls the same instruction region over and over again?

If xen/arch/x86/hvm/emulate.c is not the right file / function to look at, I was wondering if someone can point me to the correct file / functions to look into modifying.

Lastly, I am using printk to log the opcodes. Ideally I would want the opcode to be written to a separate file, but I read that it is not good to do any file access in kernel programming. Are there other alternatives or util functions that I should consider using?

P.S. This is a test environment, so it can be assumed that only one VM will be created at any given time.

Man Chon
Xen-devel mailing list



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