On Mon, 12 Aug 2024 at 14:02, Chris Parker <ch...@parkerfamily.name> wrote:
>
> I have a very simple use case for QEMU that doesn't seem to be possible, 
> despite suggestions in some parts of the documentation that it should be, or 
> am I doing something wrong?
>
> The basic issue is how to get QEMU to provide new processor functionality for 
> the host on the same architecture. In other words, add CPU flags in the 
> accelerator that are not supported by the host CPU via emulation.
>
> For example, I want to run an application that contains SSE4.1 instructions 
> on a host machine that doesn't have support for these. If I try to do it with 
> QEMUt, I'm just given warnings at startup and it doesn't seem that they have 
> been made available?
>
> $ qemu-system-x86_64 -enable-kvm -cpu "host,+ssse3,+sse4.1" -m 256M -smp 1 
> -boot d -cdrom /home/chris/vmware/iso/TinyCorePure64-15.0.iso -vga qxl 
> -device AC97
> qemu-system-x86_64: warning: host doesn't support requested feature: 
> CPUID.01H:ECX.ssse3 [bit 9]
> qemu-system-x86_64: warning: host doesn't support requested feature: 
> CPUID.01H:ECX.sse4.1 [bit 19]
>
> Is there something I can change in that command line to make this work, or 
> why is this impossible?  I know emulation is going to be inefficient and 
> slow, but my main concern is getting it to actually work at all!

Your command line has "-enable-kvm", which means "don't use emulation,
use the host CPU's virtualization support to run the guest code directly
on the host CPU". In this setup, you can only get what the host CPU
actually has.

If you want pure emulation, then remove the "-enable-kvm" option: the
default is TCG emulation. You'll also probably need to specify a CPU
type that isn't "host", because (I think) that CPU type only works
with KVM.

-- PMM

Reply via email to