This patch-set fixes KVM behavior when handling a REP-string instruction that runs with an address-size of 32-bit. In this case ECX/EDI/ESI are used as counter and pointers, and the high 32-bits should be cleared. The first patch handles with the simple case. The second one handles the corner-case in which ECX is initially zero. It appears that Intel and AMD behave differently in this case (and some experiments suggest even different Intel generations act differently), and I could not find any documentation that describes it. Yet, the behavior of INS/OUTS can be observed by the guest and VMware appears to get it right. Thanks for reviewing the patches. Nadav Amit (2): KVM: x86: Fix update RCX/RDI/RSI on REP-string KVM: x86: Fix zero iterations REP-string arch/x86/kvm/emulate.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html