Guillaume Thouvenin wrote:
Hello,

 Presently when we want to skip an emulated instruction we update the
eip by reading the instruction length from VMCS structure and we add
this value to the current eip. It gives us the new eip. A problem occurs
when the guest state doesn't allow us to use VT because in that case,
the values in VMCS structure are not up to date. That means that if we
call skip_emulated_instruction() while guest state is invalid, the
computed eip will be false.

 To fix the problem I introduced a new field in the structure kvm_io to
store the eip value if guest state is invalid. If the stored value is
equal to 0 we read the length of the current instruction in VMCS and if
not, we use it as the new eip. It works but I'm not really happy with
that hack and I don't see how to solve the problem nicely.

If we call the emulator we shouldn't call skip_emulated_instruction() in the first place, since the emulator already computes the next rip for us. I suggest moving ->skip_emulated_instruction() out of kvm_emulate_pio() and into handle_io() (and the svm equivalent).

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to