From: Andrea Arcangeli <andrea@qumranet.com>
To: Mohammed Gamal <m.gamal005@gmail.com>
Cc: Avi Kivity <avi@qumranet.com>, kvm@vger.kernel.org, riel@surriel.com
Subject: Re: [PATCH][RESEND] x86_emulator: Emulate cld and std instruction
Date: Thu, 31 Jul 2008 20:16:47 +0200 [thread overview]
Message-ID: <20080731181647.GI11494@duo.random> (raw)
In-Reply-To: <52d4a3890807310325r208b7943h89df5490e2af0131@mail.gmail.com>
On Thu, Jul 31, 2008 at 01:25:40PM +0300, Mohammed Gamal wrote:
> The only check was if CS RPL equals SS RPL, so what happens is that
> when a vmexit and then a vmentry occurs CS and SS RPL maybe equal, but
Yes same problem here, vmentry fails because CS is set to >16 bit
value (I think) but the last two bits of CS and SS are the same. That
surely is the wrong check to know if we've to invoke emulation on
vmentry failure.
> other checks might cause a vmentry failure. I've written a function to
> check that guest state is VMX valid - although not all checks are
> implemented yet, and I no more get the occasional vmexits.
Can you send me your latest patch so I can test. I tried to force
unconditional emulation on invalid guest state exception generated by
vmentry failure but even emulation fails for me, and then your patch
sets SS to sane value but that's meaningless here as it's CS that is
set to >16bit value. I've yet to trace where emulation fails, but I
suspect it's fetching instructions from the wrong place by not
emulating the segment-caches set by protected mode, maybe not.
prev parent reply other threads:[~2008-07-31 18:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 21:27 [PATCH][RESEND] x86_emulator: Emulate cld and std instruction Mohammed Gamal
2008-07-31 9:57 ` Avi Kivity
2008-07-31 10:25 ` Mohammed Gamal
2008-07-31 10:50 ` Avi Kivity
2008-07-31 13:27 ` Mohammed Gamal
2008-07-31 18:16 ` Andrea Arcangeli [this message]
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=20080731181647.GI11494@duo.random \
--to=andrea@qumranet.com \
--cc=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=m.gamal005@gmail.com \
--cc=riel@surriel.com \
/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