Gautam,

Thanks for this patch

Gautam Menghani <gau...@linux.ibm.com> writes:

> Currently, on a P10 KVM guest, the mitigations seen in the output of
> "lscpu" command are different from the host. The reason for this
> behaviour is that when the KVM guest makes the "h_get_cpu_characteristics"
> hcall, QEMU does not consider the data it received from the host via the
> KVM_PPC_GET_CPU_CHAR ioctl, and just uses the values present in
> spapr->eff.caps[], which in turn just contain the default values set in
> spapr_machine_class_init().
>
> Fix this behaviour by making sure that h_get_cpu_characteristics()
> returns the data received from the KVM ioctl for a KVM guest.
>
> Perf impact:
> With null syscall benchmark[1], ~45% improvement is observed.
>
> 1. Vanilla QEMU
> $ ./null_syscall
> 132.19 ns     456.54 cycles
>
> 2. With this patch
> $ ./null_syscall
> 91.18 ns     314.57 cycles
>
> [1]: https://ozlabs.org/~anton/junkcode/null_syscall.c
>
> Signed-off-by: Gautam Menghani <gau...@linux.ibm.com>
> ---
<snip>

LGTM,

Reviewed-by: Vaibhav Jain <vaib...@linux.ibm.com>

-- 
Cheers
~ Vaibhav

Reply via email to