From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: Question about EMULATE_DO_MMIO
Date: Tue, 16 Oct 2007 22:12:40 +0200 [thread overview]
Message-ID: <47151B38.1070402@qumranet.com> (raw)
In-Reply-To: <1192559057.2488.5.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
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/
next prev parent reply other threads:[~2007-10-16 20:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 18:24 Question about EMULATE_DO_MMIO Nitin A Kamble
[not found] ` <1192559057.2488.5.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-10-16 20:12 ` Avi Kivity [this message]
[not found] ` <47151B38.1070402-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-16 20:28 ` Nitin A Kamble
[not found] ` <1192566489.2488.10.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-10-17 10:50 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47151B38.1070402@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox