From: Nadav Amit Date: Sun, 2 Nov 2014 09:54:50 +0000 (+0200) Subject: KVM: x86: Wrong flags on CMPS and SCAS emulation X-Git-Tag: omap-for-v3.19/fixes-rc1~43^2~81 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aca3722362689a679419dc9b3e426921c70ef16;p=pandora-kernel.git KVM: x86: Wrong flags on CMPS and SCAS emulation CMPS and SCAS instructions are evaluated in the wrong order. For reference (of CMPS), see http://www.fermimn.gov.it/linux/quarta/x86/cmps.htm : "Note that the direction of subtraction for CMPS is [SI] - [DI] or [ESI] - [EDI]. The left operand (SI or ESI) is the source and the right operand (DI or EDI) is the destination. This is the reverse of the usual Intel convention in which the left operand is the destination and the right operand is the source." Introducing em_cmp_r for this matter that performs comparison in reverse order using fastop infrastructure to avoid a wrapper function. Signed-off-by: Nadav Amit Signed-off-by: Paolo Bonzini --- Reading git-diff-tree failed