qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Is SSE2 implemented with hardware support ?


From: Jakob Bohm
Subject: Re: [Qemu-discuss] Is SSE2 implemented with hardware support ?
Date: Wed, 30 Jul 2014 10:22:56 +0200
User-agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0

On 7/30/2014 9:14 AM, 邓尧 wrote:
Hello,

I need to optimize a Linux program running under qemu-system-i386. qemu
is compiled with KVM support. File /proc/cpuinfo in the guest shows that
SSE2 is supported.
If SSE2 is backed with host hardware, using SSE2 may improve my
program's performance significantly. The host is x86_64 Linux.
My question is: whether sse2 is backed with host hardware ? If it is,
how much overhead does an SSE2 instruction have ? (compared with an SSE2
instruction on the host)


In KVM and XEN modes, almost every CPU instruction is executed directly
by the physical host CPU.  Only parts of memory management, and a few
system administration instructions and (on some CPUs) virtual real mode
16 bit (DOS) modes involve the emulation software.

So mathematical SSE2 operations should run at full hardware speed.
Cache preload SSE/MMX operations may have different performance than on
the host.

Exact relationships depend on the specific CPU chip design and how the
chip designers implemented the VM chip extensions inside each CPU core.

P.S.

Note that even if qemu-system-i386 is compiled with KVM support, KVM is
only active if specified on the command line AND the kvm modules are
loaded in the host kernel AND VM extensions are enabled in the host CPU
AND it actually works.  Otherwise qemu-system-i386 falls back to its
usual software emulation.

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded



reply via email to

[Prev in Thread] Current Thread [Next in Thread]