From 607a4221acd7be576ebd395362bcefb8551c8d47 Mon Sep 17 00:00:00 2001 From: Xiaoguang Wu Date: Sun, 12 Jul 2020 22:42:03 +0800 Subject: [PATCH] hv: fix stos and stosq asm instruction emulation error This patch is used to fix asm instruction error such as stos and stosq. Tracked-On: #5165 Signed-off-by: Xiaoguang Wu --- hypervisor/arch/x86/guest/instr_emul.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/guest/instr_emul.c b/hypervisor/arch/x86/guest/instr_emul.c index 78d9954f4..2776cc586 100644 --- a/hypervisor/arch/x86/guest/instr_emul.c +++ b/hypervisor/arch/x86/guest/instr_emul.c @@ -162,11 +162,11 @@ static const struct instr_emul_vie_op one_byte_opcodes[256] = { }, [0xAA] = { .op_type = VIE_OP_TYPE_STOS, - .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_BYTE_OP, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_BYTE_OP | VIE_OP_F_CHECK_GVA_DI, }, [0xAB] = { .op_type = VIE_OP_TYPE_STOS, - .op_flags = VIE_OP_F_NO_MODRM + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_CHECK_GVA_DI, }, [0xC6] = { /* XXX Group 11 extended opcode - not just MOV */