[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a949eff1971c57f447ab9250eb034a009c144bd.camel@intel.com>
Date: Fri, 14 Mar 2025 18:57:06 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Hansen, Dave" <dave.hansen@...el.com>, "Huang, Kai"
<kai.huang@...el.com>, "bp@...en8.de" <bp@...en8.de>, "peterz@...radead.org"
<peterz@...radead.org>, "mingo@...hat.com" <mingo@...hat.com>,
"thomas.lendacky@....com" <thomas.lendacky@....com>, "tglx@...utronix.de"
<tglx@...utronix.de>, "kirill.shutemov@...ux.intel.com"
<kirill.shutemov@...ux.intel.com>
CC: "dwmw@...zon.co.uk" <dwmw@...zon.co.uk>, "dyoung@...hat.com"
<dyoung@...hat.com>, "seanjc@...gle.com" <seanjc@...gle.com>,
"x86@...nel.org" <x86@...nel.org>, "sagis@...gle.com" <sagis@...gle.com>,
"hpa@...or.com" <hpa@...or.com>, "Chatre, Reinette"
<reinette.chatre@...el.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Williams, Dan J" <dan.j.williams@...el.com>,
"bhe@...hat.com" <bhe@...hat.com>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "nik.borisov@...e.com" <nik.borisov@...e.com>,
"ashish.kalra@....com" <ashish.kalra@....com>, "Yamahata, Isaku"
<isaku.yamahata@...el.com>
Subject: Re: [RFC PATCH 1/5] x86/kexec: Do unconditional WBINVD for bare-metal
in stop_this_cpu()
On Fri, 2025-03-14 at 13:18 -0500, Tom Lendacky wrote:
> > Does the stop_this_cpu() part never come into play for SME either? It looks
> > like
> > it was added for TDX guest kexec, but is a general ACPI thing.
>
> It is a general ACPI thing, but I don't know of it being used by our MADT
> tables.
>
> >
> > Regarding the kasan thing, I was looking at this too:
> > wbinvd()
> > cpumask_clear_cpu()
> > clear_bit()
> > instrument_atomic_write()
> > kasan_check_write()
> > __kasan_check_write() <- non-inline
>
> Yes, this does look worrisome. Too bad there isn't a way to turn off KASAN
> for a single function.
I wonder why that one has an explicit call, compared to compiler generated
stuff. It makes me wonder if there is just some KASAN skipping bit-wise
operations that could be done to fix it.
For stop_this_cpu(), not sure how to avoid it. Maybe just a raw jump to the
function pointer or something. It's not supposed to return. If it is actually
not an issue due foreseeable lack of real world HW/firmware, a comment would be
nice touch.
Ok, well based on your earlier point, the new code actually doesn't make things
worse for SME. For TDX the late function calls are not a problem. So we'll leave
it to you guys.
Thanks for responding so quickly.
Powered by blists - more mailing lists