Discussion:
[gentoo-user] OT: Can QEMU emulate cpu instructions the host cpu doesn't have?
(too old to reply)
Walter Dnes
2016-12-21 01:20:02 UTC
Permalink
I have "Intel(R) Core(TM) i5-3330 CPU @ 3.00GHz" on a physical host
machine. I'd like to emulate a cpu with the "movbe" instruction set.
Doing some testing, I tried, as root stuff like...

qemu-system-x86_64 -enable-kvm -cpu Broadwell

...and got the following warnings
warning: host doesn't support requested feature: CPUID.01H:ECX.fma [bit 12]
warning: host doesn't support requested feature: CPUID.01H:ECX.movbe [bit 22]
warning: host doesn't support requested feature: CPUID.07H:EBX.bmi1 [bit 3]
warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
warning: host doesn't support requested feature: CPUID.07H:EBX.avx2 [bit 5]
warning: host doesn't support requested feature: CPUID.07H:EBX.bmi2 [bit 8]
warning: host doesn't support requested feature: CPUID.07H:EBX.invpcid [bit 10]
warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
warning: host doesn't support requested feature: CPUID.07H:EBX.rdseed [bit 18]
warning: host doesn't support requested feature: CPUID.07H:EBX.adx [bit 19]
warning: host doesn't support requested feature: CPUID.07H:EBX.smap [bit 20]
warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]
warning: host doesn't support requested feature: CPUID.80000001H:ECX.3dnowprefetch [bit 8]

On real qemu sessions "grep movbe /proc/cpuinfo" doesn't get any hits.
I hope I'm doing something wrong here, rather than qemu not being able
to emulate a newer cpu. Any ideas?
--
Walter Dnes <***@waltdnes.org>
I don't run "desktop environments"; I run useful applications
Poison BL.
2016-12-21 04:30:01 UTC
Permalink
Post by Walter Dnes
machine. I'd like to emulate a cpu with the "movbe" instruction set.
Doing some testing, I tried, as root stuff like...
qemu-system-x86_64 -enable-kvm -cpu Broadwell
...and got the following warnings
warning: host doesn't support requested feature: CPUID.01H:ECX.fma [bit 12]
warning: host doesn't support requested feature: CPUID.01H:ECX.movbe [bit 22]
warning: host doesn't support requested feature: CPUID.07H:EBX.bmi1 [bit 3]
warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
warning: host doesn't support requested feature: CPUID.07H:EBX.avx2 [bit 5]
warning: host doesn't support requested feature: CPUID.07H:EBX.bmi2 [bit 8]
warning: host doesn't support requested feature: CPUID.07H:EBX.invpcid [bit 10]
warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
warning: host doesn't support requested feature: CPUID.07H:EBX.rdseed [bit 18]
warning: host doesn't support requested feature: CPUID.07H:EBX.adx [bit 19]
warning: host doesn't support requested feature: CPUID.07H:EBX.smap [bit 20]
warning: host doesn't support requested feature: CPUID.80000001H:ECX.abm [bit 5]
warning: host doesn't support requested feature: CPUID.80000001H:ECX.3dnowprefetch [bit 8]
On real qemu sessions "grep movbe /proc/cpuinfo" doesn't get any hits.
I hope I'm doing something wrong here, rather than qemu not being able
to emulate a newer cpu. Any ideas?
--
I don't run "desktop environments"; I run useful applications
I think the issue is using KVM there. When you're emulating something
feature-different from the host cpu (or at least something that requires an
added feature), I suspect you're stuck with non-accelerated emulation (I'm
pretty sure the *old* acceleration kernel module is no longer maintained).
I know qemu can do full emulation of instruction sets that the host cpu
lacks because I've used it for arm... but I've never really toyed with
other x86 series features like that personally.
--
Poison [BLX]
Joshua M. Murphy
Walter Dnes
2016-12-21 07:30:02 UTC
Permalink
Post by Poison BL.
I think the issue is using KVM there. When you're emulating
something feature-different from the host cpu (or at least something
that requires an added feature), I suspect you're stuck with
non-accelerated emulation (I'm pretty sure the *old* acceleration
kernel module is no longer maintained). I know qemu can do full
emulation of instruction sets that the host cpu lacks because I've
used it for arm... but I've never really toyed with other x86 series
features like that personally.
I've tried RTFM, and it only serves to confuse me even more. I have
qemu-kvm. Google shows aa bunch of documentation on qemu and on kvm. I
have qemu-system-x86_64 and qemu-x86_64.
--
Walter Dnes <***@waltdnes.org>
I don't run "desktop environments"; I run useful applications
Loading...