From: Mihai Donțu <mdo...@bitdefender.com>

This is needed in order to be able to support guest code that uses movss to
write into pages that are marked for write tracking.

Signed-off-by: Mihai Donțu <mdo...@bitdefender.com>
Signed-off-by: Adalbert Lazăr <ala...@bitdefender.com>
---
 arch/x86/kvm/emulate.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 9d38f892beea..b8a412b8b087 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1184,9 +1184,13 @@ static u8 simd_prefix_to_bytes(const struct 
x86_emulate_ctxt *ctxt,
 
        switch (ctxt->b) {
        case 0x11:
+               /* movss xmm, m32 */
                /* movsd xmm, m64 */
                /* movups xmm, m128 */
-               if (simd_prefix == 0xf2) {
+               if (simd_prefix == 0xf3) {
+                       bytes = 4;
+                       break;
+               } else if (simd_prefix == 0xf2) {
                        bytes = 8;
                        break;
                }
@@ -4550,7 +4554,7 @@ static const struct gprefix pfx_0f_2b = {
 };
 
 static const struct gprefix pfx_0f_10_0f_11 = {
-       I(Unaligned, em_mov), I(Unaligned, em_mov), I(Unaligned, em_mov), N,
+       I(Unaligned, em_mov), I(Unaligned, em_mov), I(Unaligned, em_mov), 
I(Unaligned, em_mov),
 };
 
 static const struct gprefix pfx_0f_28_0f_29 = {
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to