]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: Emulate MOVBE
authorBorislav Petkov <bp@suse.de>
Tue, 29 Oct 2013 11:54:56 +0000 (12:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 30 Oct 2013 17:54:41 +0000 (18:54 +0100)
commitd1ac65d09dffd94ea3a466c07eb6ec656e035f16
treee6558ea19648dd028cd877640d9fa8a934c42dee
parent5120da5c1b97ef3841c9d104212a1618a95ddcf5
kvm: Emulate MOVBE

This basically came from the need to be able to boot 32-bit Atom SMP
guests on an AMD host, i.e. a host which doesn't support MOVBE. As a
matter of fact, qemu has since recently received MOVBE support but we
cannot share that with kvm emulation and thus we have to do this in the
host. We're waay faster in kvm anyway. :-)

So, we piggyback on the #UD path and emulate the MOVBE functionality.
With it, an 8-core SMP guest boots in under 6 seconds.

Also, requesting MOVBE emulation needs to happen explicitly to work,
i.e. qemu -cpu n270,+movbe...

Just FYI, a fairly straight-forward boot of a MOVBE-enabled 3.9-rc6+
kernel in kvm executes MOVBE ~60K times.

Signed-off-by: Andre Przywara <andre@andrep.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c
arch/x86/kvm/emulate.c