Re: [PATCH RFC 0/5] x86/KVM/svm: get rid of hardcoded instructions lengths

Paolo Bonzini
2019-06-20T12:14:13Z

On 20/06/19 13:02, Vitaly Kuznetsov wrote:
>
> P.S. If you'd like to test the series you'll have to have a CPU without
> NRIP_SAVE feature or forcefully disable it, something like:
>
> index 8d4e50428b68..93c7eaad7915 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -922,6 +922,9 @@ static void init_amd(struct cpuinfo_x86 *c)
> /* AMD CPUs don't reset SS attributes on SYSRET, Xen does. */
> if (!cpu_has(c, X86_FEATURE_XENPV))
> set_cpu_bug(c, X86_BUG_SYSRET_SS_ATTRS);
> +
> + /* No nrips */
> + clear_cpu_cap(c, X86_FEATURE_NRIPS);
> }
>
> #ifdef CONFIG_X86_32

Let's add a module parameter instead. Patch sent (forgot to Cc you).

Paolo