• Paolo Bonzini's avatar
    KVM: emulator: emulate SALC · 326f578f
    Paolo Bonzini authored
    This is an almost-undocumented instruction available in 32-bit mode.
    I say "almost" undocumented because AMD documents it in their opcode
    maps just to say that it is unavailable in 64-bit mode (sections
    "A.2.1 One-Byte Opcodes" and "B.3 Invalid and Reassigned Instructions
    in 64-Bit Mode").
    It is roughly equivalent to "sbb %al, %al" except it does not
    set the flags.  Use fastop to emulate it, but do not use the opcode
    directly because it would fail if the host is 64-bit!
    Reported-by: default avatarJun'ichi Nomura <j-nomura@ce.jp.nec.com>
    Cc: stable@vger.kernel.org # 3.9
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>