Nitin A Kamble wrote:
> Hi Avi,
>    I was trying to avoid vm86 mode completely, by using emulation for
> all the real mode code emulation. It is doing better than vm86 mode, 

Why do you think it is better?  I would have thought that vm86 is much
faster.

I thought of doing it this way:

- try to run normally
- if vm entry failed due to invalid guest state (the famous 0x80000021),
then emulate 50 instructions
- repeat

That will also handle the few cases where VT can't handle protected mode.

> but
> I am seeing one issue with this approch.
>
>    The emulator is failing due to this code. Seems like the execution
> need to go back to qemu to finish some pending MMIO.
>
>        if (vcpu->mmio_is_write) {
>                 vcpu->mmio_needed = 0;
>                 return EMULATE_DO_MMIO;
>         }
>
> Do you have how should it be handled? I am not clear what needs to be
> done to handle this situation properly.
>   

It should exit to userspace, same as the non-emulating case.  However it
shouldn't happen for normal writes.


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to