From: Paolo Bonzini <pbonzini@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>, kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86 emulator: emulate MOVNTDQ
Date: Fri, 29 Aug 2014 14:55:06 +0200 [thread overview]
Message-ID: <5400782A.3050902@redhat.com> (raw)
In-Reply-To: <20140711175345.19079.28143.stgit@gimli.home>
Il 11/07/2014 19:56, Alex Williamson ha scritto:
> Windows 8.1 guest with NVIDIA driver and GPU fails to boot with an
> emulation failure. The KVM spew suggests the fault is with lack of
> movntdq emulation (courtesy of Paolo):
>
> Code=02 00 00 b8 08 00 00 00 f3 0f 6f 44 0a f0 f3 0f 6f 4c 0a e0 <66> 0f e7 41 f0 66 0f e7 49 e0 48 83 e9 40 f3 0f 6f 44 0a 10 f3 0f 6f 0c 0a 66 0f e7 41 10
>
> $ as -o a.out
> .section .text
> .byte 0x66, 0x0f, 0xe7, 0x41, 0xf0
> .byte 0x66, 0x0f, 0xe7, 0x49, 0xe0
> $ objdump -d a.out
> 0: 66 0f e7 41 f0 movntdq %xmm0,-0x10(%rcx)
> 5: 66 0f e7 49 e0 movntdq %xmm1,-0x20(%rcx)
>
> Add the necessary emulation.
>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> ---
>
> Hope I got all the flags correct from copying similar MOV ops, but it
> allows the guest to boot, so I suspect it's ok.
>
> arch/x86/kvm/emulate.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index e4e833d..ae39f08 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3681,6 +3681,10 @@ static const struct gprefix pfx_0f_28_0f_29 = {
> I(Aligned, em_mov), I(Aligned, em_mov), N, N,
> };
>
> +static const struct gprefix pfx_0f_e7 = {
> + N, I(Sse, em_mov), N, N,
> +};
> +
> static const struct escape escape_d9 = { {
> N, N, N, N, N, N, N, I(DstMem, em_fnstcw),
> }, {
> @@ -3951,7 +3955,8 @@ static const struct opcode twobyte_table[256] = {
> /* 0xD0 - 0xDF */
> N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N,
> /* 0xE0 - 0xEF */
> - N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N,
> + N, N, N, N, N, N, N, GP(SrcReg | DstMem | ModRM | Mov, &pfx_0f_e7),
> + N, N, N, N, N, N, N, N,
> /* 0xF0 - 0xFF */
> N, N, N, N, N, N, N, N, N, N, N, N, N, N, N, N
> };
>
This slipped through the cracks, I'm applying to kvm/queue now.
Paolo
prev parent reply other threads:[~2014-08-29 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 17:56 [PATCH] KVM: x86 emulator: emulate MOVNTDQ Alex Williamson
2014-07-11 19:31 ` Eric Northup
2014-07-11 20:05 ` Alex Williamson
2014-07-11 20:40 ` Paolo Bonzini
2014-07-13 16:12 ` Avi Kivity
2014-08-29 12:55 ` Paolo Bonzini [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=5400782A.3050902@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).