[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bc122388-05f7-4c62-a608-9b34df03199b@intel.com>
Date: Thu, 5 Sep 2024 11:55:41 +1200
From: "Huang, Kai" <kai.huang@...el.com>
To: Borislav Petkov <bp@...en8.de>
CC: <dave.hansen@...el.com>, <kirill.shutemov@...ux.intel.com>,
<tglx@...utronix.de>, <peterz@...radead.org>, <mingo@...hat.com>,
<x86@...nel.org>, <hpa@...or.com>, <luto@...nel.org>,
<linux-kernel@...r.kernel.org>, <thomas.lendacky@....com>,
<pbonzini@...hat.com>, <seanjc@...gle.com>
Subject: Re: [PATCH v5 2/5] x86/kexec: do unconditional WBINVD for bare-metal
in relocate_kernel()
On 5/09/2024 3:30 am, Borislav Petkov wrote:
> On Fri, Aug 16, 2024 at 12:29:18AM +1200, Kai Huang wrote:
>> diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
>> index 9c9ac606893e..07ca9d3361a3 100644
>> --- a/arch/x86/kernel/machine_kexec_64.c
>> +++ b/arch/x86/kernel/machine_kexec_64.c
>> @@ -392,7 +392,7 @@ void machine_kexec(struct kimage *image)
>> (unsigned long)page_list,
>> image->start,
>> image->preserve_context,
>> - host_mem_enc_active);
>> + !boot_cpu_has(X86_FEATURE_HYPERVISOR));
>
> Everytime you feel the need to check a X86_FEATURE_ flag, make sure you use
> cpu_feature_enabled().
>
Thanks for review. Yeah will do.
Powered by blists - more mailing lists