]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: BSF and BSR emulation change register unnecassarily
authorNadav Amit <namit@cs.technion.ac.il>
Mon, 30 Mar 2015 12:39:21 +0000 (15:39 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 30 Mar 2015 14:46:11 +0000 (16:46 +0200)
commitead08daf4eeb576a5c441566d1ec747ae4f252b2
tree88322796917be9a8edc1b43adb7f0d932e8acea8
parent9bde5fc22caaa034848064d4011600a53e8a2d49
KVM: x86: BSF and BSR emulation change register unnecassarily

If the source of BSF and BSR is zero, the destination register should not
change. That is how real hardware behaves.  If we set the destination even with
the same value that we had before, we may clear bits [63:32] unnecassarily.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Message-Id: <1427719163-5429-4-git-send-email-namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c