linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Question on get random long worse in VM than on host
@ 2024-08-31  3:34 Tangnianyao
  2024-08-31  7:42 ` Marc Zyngier
  0 siblings, 1 reply; 10+ messages in thread
From: Tangnianyao @ 2024-08-31  3:34 UTC (permalink / raw)
  To: Will Deacon, Marc Zyngier, oliver.upton, linux-arm-kernel,
	linux-kernel, kvmarm
  Cc: guoyang (C)

Hi, all

On ARM64 server(Kunpeng), performance of some syscall cases (like fork

and open) in guest, which need random u64, are 10~20% worse than

those on host. Because CONFIG_ARCH_HAS_ELF_RANDOMIZE=y and

CONFIG_STACKPROTECTOR=y, guest kernel need random u64 and

require them from host kvm using hvc.

If FEAT_RNG is supported and EL3 firmware not support smccc trng, host

kvm finally return random u64 using RNDRRS to guest.

Shall we firstly let guest get random u64 from RNDRRS to avoid hvc trap?

For example, if host find smccc trng not available, then tell guest smccc

trng not available when guest check trng version.


Thanks for your help.

Nianyao



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-09-06  3:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-31  3:34 Question on get random long worse in VM than on host Tangnianyao
2024-08-31  7:42 ` Marc Zyngier
2024-08-31  7:56   ` Ard Biesheuvel
2024-08-31  8:14     ` Marc Zyngier
2024-09-02 21:26       ` Ard Biesheuvel
2024-09-03  1:39         ` Tangnianyao
2024-09-03 15:04           ` Ard Biesheuvel
2024-09-05  3:12             ` Tangnianyao
2024-09-05  8:17               ` Marc Zyngier
2024-09-06  3:42                 ` Tangnianyao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).