KVM: x86: Emulator does not decode clflush well
authorNadav Amit <namit@cs.technion.ac.il>
Mon, 13 Oct 2014 10:04:13 +0000 (13:04 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Oct 2014 11:30:36 +0000 (13:30 +0200)
commit13e457e0eebf0a0c82c38ceb890d93eb826d62a6
treef0ab042f6b4b419ec6cda09f0f199764636fda25
parenta430c9166312e1aa3d80bce32374233bdbfeba32
KVM: x86: Emulator does not decode clflush well

Currently, all group15 instructions are decoded as clflush (e.g., mfence,
xsave).  In addition, the clflush instruction requires no prefix (66/f2/f3)
would exist. If prefix exists it may encode a different instruction (e.g.,
clflushopt).

Creating a group for clflush, and different group for each prefix.

This has been the case forever, but the next patch needs the cflush group
in order to fix a bug introduced in 3.17.

Fixes: 41061cdb98a0bec464278b4db8e894a3121671f5
Cc: stable@vger.kernel.org
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c