|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Calculate correct instruction length for data-fa
On 28 Apr 2006, at 02:52, Khoa Huynh wrote:
It should be noted that VMX only uses this instrlen
function when the hypervisor needs the instruction-length
info and that info is undefined in VMCS, e.g., for MMIO
instructions. In other cases where the instruction-length
field is valid in VMCS, the hypervisor continues to get
that info from VMCS (via vmread operation).
I don't believe we need the instruction-length at all, and I suspect
that the decoder could be removed from hvm/svm entirely. There are two
broad categories of instruction I'm thinking of:
1. Instructions with their own VMEXIT reason code tend to be really
simple so we know their length anyway and, if not, the instr-length
field should be valid
2. For mmio instructions, the emulator can work out the length for
itself and increment eip appropriately. There's no need to know the
instruction length in advance of invoking the emulator.
I guess there may be one or two instructions, particularly on AMD,
where we aren't feeding the instruction to the mmio emulator and the
instruction isn't fixed length, so perhaps we'll need a small decoder
in hvm/svm for those. But even if so, it could be much simpler than
what is there right now.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|