Re: [PATCH v10 02/28] KVM: VMX: Initialize VM entry/exit FRED controls in vmcs_config
From: Binbin Wu
Date: Thu Oct 22 2026 - 05:55:18 EST
On 9/12/2026 5:36 AM, Sohil Mehta wrote:
[...]
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index b4aec4218b7d..062631e2dd37 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -2778,6 +2778,8 @@ static int setup_vmcs_config(struct vmcs_config *vmcs_conf,
> u32 entry_control;
> u64 exit_control;
> } const vmcs_entry_exit2_pairs[] = {
> + { VM_ENTRY_LOAD_IA32_FRED,
> + SECONDARY_VM_EXIT_SAVE_IA32_FRED | SECONDARY_VM_EXIT_LOAD_IA32_FRED },
I think it can be break into two lines for much better readability:
} const vmcs_entry_exit2_pairs[] = {
{ VM_ENTRY_LOAD_IA32_FRED, SECONDARY_VM_EXIT_SAVE_IA32_FRED },
{ VM_ENTRY_LOAD_IA32_FRED, SECONDARY_VM_EXIT_LOAD_IA32_FRED },
};
Oh, it also fixes the issue reported by the sashiko.