Question on get random long worse in VM than on host
Tangnianyao
tangnianyao at huawei.com
Fri Aug 30 20:34:33 PDT 2024
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
More information about the linux-arm-kernel
mailing list