On Mon, May 1, 2023 at 6:16 PM Robert Hoo <robert.hoo.linux@xxxxxxxxx> wrote: > > On 5/1/2023 10:51 PM, Sean Christopherson wrote: > > > > For the NX hugepage mitation, I think it makes sense to restart the discussion > > in the context of this thread: https://lore.kernel.org/all/ZBxf+ewCimtHY2XO@xxxxxxxxxx > > > OK, wasn't aware of that thread. Thanks for pointing out. > Just took a glance at it, I'll comment there. > > > > TL;DR: I am open to providng an option to hard disable the mitigation, > > Why hard disable? Isn't already "nx_huge_pages" parameter sufficient for this? > My aforementioned not-sent-out patch is to consider nx_huge_pages for > creating the kthread or not, i.e. if nx_huge is enabled, start the kthread, > if not, terminate the kthread; once re-enabled, spawn the kthread again... > > > but there > > needs to be sufficient justification, e.g. that the above 100ms latency is a > > problem for real world deployments. > > > Ah, I was objected by similar reason: the kthread does nothing if > nx_huge_pages = false, it does no harm. Therefore I put the patch aside. > > For the justification from real world, I guess Zhuangel570 can say more. > > >> As more and more old CPUs retires, I think NX-HugePage code will become more > >> and more minority code path/situation, and be refactored out eventually one > >> day. > > > > Heh, yeah, one day. But "one day" is likely 10+ years away. Intel discontinuing > > a CPU has practically zero relevance to KVM removing support a CPU, e.g. KVM still > > supports the original Core CPUs from ~2006, which were launched in 2006 and > > discontinued in 2008. > > OK, got it. > Why does KVM still FULLY support so old CPUs? Any real world users? What's > the rational/necessity? even if it's already EOL by manufacture. > My thought was that each new generation of CPU will linger in CSP's data > center for 3~4 yrs. Hobbyists drive the rationale for what kvm supports, not CSPs.