From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Jan Beulich <JBeulich@suse.com>, Andrei LUTAS <vlutas@bitdefender.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
keir@xen.org, "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Possible problem emulating movntq, movss
Date: Thu, 07 Aug 2014 11:09:28 +0300 [thread overview]
Message-ID: <53E33438.7010008@bitdefender.com> (raw)
In-Reply-To: <53E240CA0200007800029BE3@mail.emea.novell.com>
On 08/06/2014 03:50 PM, Jan Beulich wrote:
>>>> On 06.08.14 at 14:16, <JBeulich@suse.com> wrote:
>>>>> On 06.08.14 at 12:47, <vlutas@bitdefender.com> wrote:
>>> On 8/6/2014 12:54 PM, Jan Beulich wrote:
>>>>>>> On 06.08.14 at 10:57, <rcojocaru@bitdefender.com> wrote:
>>>>> We found that our HVM guests froze when trying to emulate movntq
>>>>> instructions. The solution seems to be to replace "goto done;" with
>>>>> "break;" at line 4191 (when handling "case 0x7f:") in
>>>>> xen/arch/x86/x86_emulate/x86_emulate.c. Otherwise the writeback part
>>>>> doesn't happen.
>>>>>
>>>>> If you're happy with the fix I can prepare a patch, otherwise please let
>>>>> me know if we're missing something.
>>>> No, that doesn't look right: There's nothing left to be written back at
>>>> that point (registers get updated with the instruction executed via the
>>>> on-stack stub, and memory gets written with immediately preceding
>>>> ops->write(). So without you being more specific about _what_ you
>>>> see going wrong I don't think I can give further advice.
>>> Except for maybe the instruction pointer? That doesn't seem to be updated
>>> anywhereexcept during the write-back phase (or maybe I'm missing the spot).
>>> The problem is that the guest gets stuck with the instruction pointer
>>> pointing to the sameinstruction (in our particular case it is
>>> "MOVDQU xmm0, xmmword ptr [rdx + rcx - 0x10]"),entering in an infinite
>>> loop (EPT violation - emulate), since the IP doesn't seem to be updated.
>>
>> Now that is indeed a problem, but not solved by simply replacing
>> the "goto done" with "break". I'll look into getting you a proper fix.
>
> Mind giving this one (lightly tested only) a try?
We've tested this with both a modified version of test_x86_emulator.c
(small patch to follow) and our HVM guest, and everything seems to be
working.
Thanks,
Razvan Cojocaru
next prev parent reply other threads:[~2014-08-07 8:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-06 8:57 Possible problem emulating movntq, movss Razvan Cojocaru
2014-08-06 9:22 ` Andrew Cooper
2014-08-06 9:54 ` Jan Beulich
2014-08-06 10:39 ` Razvan Cojocaru
2014-08-06 10:47 ` Andrei LUTAS
2014-08-06 11:05 ` Andrew Cooper
2014-08-06 11:22 ` Razvan Cojocaru
2014-08-06 12:16 ` Jan Beulich
2014-08-06 12:50 ` Jan Beulich
2014-08-07 8:09 ` Razvan Cojocaru [this message]
2014-08-06 12:29 ` Jan Beulich
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=53E33438.7010008@bitdefender.com \
--to=rcojocaru@bitdefender.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=keir@xen.org \
--cc=vlutas@bitdefender.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.