|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Re: X86_emulate to be moved into qemu...
On 18 May 2006, at 13:34, Petersson, Mats wrote:
1. Add a pointer to a struct (or opaque void *) the x86_emulate_memop()
to allow us to pass extra data from HVM that can be used inside the
call-back functions when needed. For the current usage, that would be
null.
I was considering packing all the current emulator parameter into an
args structure, then passing a pointer to that to the callback
functions. That'll let them get at potentially interesting things like
execution mode, and they can use container_of() to get at a containing
structure if there is other stuff of interest to them out side the
scope of emulator parameters.
That would also clean up calls to the emulator (imo) as if we add many
more parameters we'll end up with unwieldy parameter lists. Packing a
structure then making the emulator call would be cleaner as you'd
assign to each argument structure field on a separate source code line,
and the field your assigning to would be explicitly named (rather than
having to work out what the ordering of parameters to the function is,
as you do now).
2. Add new interface functionality - add a "fetch_insn_byte" function
pointer, and use that instead of/inside the macro insn_fetch. This will
be necessary if we pass a translated CS:rIP to the QEMU version. Or if
we pass along a buffer of instruction bytes from the guest code, we'd
need to fetch from that. The current code doesn't make any difference
between reading code-bytes or any other reads of guest memory...
I think we should pass that buffer in as an array, plus count of bytes
it contains. Two extra fields for the args sturcture. :-)
-- keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- RE: [Xen-devel] Re: X86_emulate to be moved into qemu..., Petersson, Mats
- RE: [Xen-devel] Re: X86_emulate to be moved into qemu..., Petersson, Mats
- RE: [Xen-devel] Re: X86_emulate to be moved into qemu..., Petersson, Mats
- RE: [Xen-devel] Re: X86_emulate to be moved into qemu..., Petersson, Mats
- Re: [Xen-devel] Re: X86_emulate to be moved into qemu...,
Keir Fraser <=
- RE: [Xen-devel] Re: X86_emulate to be moved into qemu..., Petersson, Mats
- RE: [Xen-devel] Re: X86_emulate to be moved into qemu..., Petersson, Mats
|
|
|
|
|