* [Qemu-devel] implemetation of wfe and sev instructions on aarch64
@ 2015-05-26 7:29 Pei XiaoYong
2015-05-26 8:00 ` Peter Crosthwaite
0 siblings, 1 reply; 2+ messages in thread
From: Pei XiaoYong @ 2015-05-26 7:29 UTC (permalink / raw)
To: qemu-devel, dengkairong
hello everybody:
in linux kernel , when smp booting via spin tables , primary core use
sev instruction to wakeup the secondery cores .
but qemu don't support sev and wfe in TCG model . does somebody have
some idea about how to implemet wfe and sev
instruction on aarch64?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] implemetation of wfe and sev instructions on aarch64
2015-05-26 7:29 [Qemu-devel] implemetation of wfe and sev instructions on aarch64 Pei XiaoYong
@ 2015-05-26 8:00 ` Peter Crosthwaite
0 siblings, 0 replies; 2+ messages in thread
From: Peter Crosthwaite @ 2015-05-26 8:00 UTC (permalink / raw)
To: Pei XiaoYong, Peter Maydell; +Cc: dengkairong, qemu-devel@nongnu.org Developers
On Tue, May 26, 2015 at 12:29 AM, Pei XiaoYong <peixiaoyong@huawei.com> wrote:
> hello everybody:
> in linux kernel , when smp booting via spin tables , primary core use
> sev instruction to wakeup the secondery cores .
> but qemu don't support sev and wfe in TCG model .
So it should still work as the semantic of wfe is it is still
implementable as a nop, is it just potentially bad performance. Also
note that QEMU wfe as-is, even though it is still a busy-wait, should
yield the CPU time slice back up to the top level, so performance
should be tolerable for spin-table boot.
> does somebody have
> some idea about how to implemet wfe and sev
> instruction on aarch64?
>
I have done it before but there are complications. The main problem is
there is no notion of a cpu-cluster and the CPUs don't have linkages
between each other to sev each other. My approach was crude, in that
sev just iterated through and notified all cpus in the system. Sevl
was implemented too. This might be acceptable, but I never got the
patches into shape and I found that just the yielding semantic is
still ok perf in the end.
Both sev and wfe were implemented as helpers, similar to existing wfi
and yield helpers.
Does your linux kernel have this patch:
https://lkml.org/lkml/2015/3/2/672
? This was the leading source of slowdown when I was doing SMP boots.
Regards,
Peter
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-26 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-26 7:29 [Qemu-devel] implemetation of wfe and sev instructions on aarch64 Pei XiaoYong
2015-05-26 8:00 ` Peter Crosthwaite
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.