projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c38234
)
KVM: x86: clflushopt should be treated as a no-op by emulation
author
David Edmondson
<david.edmondson@oracle.com>
Tue, 3 Nov 2020 12:04:00 +0000
(12:04 +0000)
committer
Paolo Bonzini
<pbonzini@redhat.com>
Fri, 13 Nov 2020 11:28:33 +0000
(06:28 -0500)
The instruction emulator ignores clflush instructions, yet fails to
support clflushopt. Treat both similarly.
Fixes:
13e457e0eebf
("KVM: x86: Emulator does not decode clflush well")
Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Message-Id: <
20201103120400
.240882-1-david.edmondson@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/emulate.c
b/arch/x86/kvm/emulate.c
index 0d917eb70319498965590068afa61e4e85d3841a..56cae1ff9e3fe46362947f0911b39573d44397a8 100644
(file)
--- a/
arch/x86/kvm/emulate.c
+++ b/
arch/x86/kvm/emulate.c
@@
-4046,6
+4046,12
@@
static int em_clflush(struct x86_emulate_ctxt *ctxt)
return X86EMUL_CONTINUE;
}
+static int em_clflushopt(struct x86_emulate_ctxt *ctxt)
+{
+ /* emulating clflushopt regardless of cpuid */
+ return X86EMUL_CONTINUE;
+}
+
static int em_movsxd(struct x86_emulate_ctxt *ctxt)
{
ctxt->dst.val = (s32) ctxt->src.val;
@@
-4585,7
+4591,7
@@
static const struct opcode group11[] = {
};
static const struct gprefix pfx_0f_ae_7 = {
- I(SrcMem | ByteOp, em_clflush),
N
, N, N,
+ I(SrcMem | ByteOp, em_clflush),
I(SrcMem | ByteOp, em_clflushopt)
, N, N,
};
static const struct group_dual group15 = { {