lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] KVM: VMX: Zero host's SYSENTER_ESP iff SYSENTER is NOT used
From
On 1/22/22 09:47, Vitaly Kuznetsov wrote:
>> */
>> - vmcs_writel(HOST_IA32_SYSENTER_ESP, 0);
>> + if (!IS_ENABLED(CONFIG_IA32_EMULATION) && !IS_ENABLED(CONFIG_X86_32))
> Isn't it the same as "!IS_ENABLED(CONFIG_COMPAT_32)"? (same goes to the
> check in vmx_vcpu_load_vmcs())
>

It is, but I think it's clearer to write it as it's already done in
arch/x86/kvm/vmx/vmx.c, or possibly

if (IS_ENABLED(CONFIG_X86_64) && !IS_ENABLED(CONFIG_IA32_EMULATION))

CONFIG_COMPAT_32 doesn't say as clearly whether it's enabled for 32-bit
systems or not.

Paolo

\
 
 \ /
  Last update: 2022-01-24 14:46    [W:0.070 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site