On Wed, Mar 24, 2021 at 07:43:29PM -0700, Hugh Dickins wrote: > Right, after looking into it more, I completely agree with you: > the Kaiser series (in both 4.4-stable and 4.9-stable) was simply > wrong to lose that invlpg - fine in the kaiser case when we don't > enable Globals at all, but plain wrong in the !kaiser_enabled case. > One way or another, we have somehow got away with it for three years. Yeah, because there were no boxes with kaiser_enabled=0 *and* PCID which would set INVPCID_SINGLE. Before those, it would INVLPG in the !INVPCID_SINGLE case. Oh, btw, booting with "pci=on" "fixes" the issue too. And I tried reproducing this on an Intel box with "pti=off" but it booted fine so I'm probably missing some other aspect or triggering it there is harder/different due to TLB differences or whatnot. And Babu triggered the same issue on a AMD baremetal yesterday. > I do agree with Paolo that the PCID_ASID_KERN flush would be better > moved under the "if (kaiser_enabled)" now. Ok. > (And if this were ongoing development, I'd want to rewrite the > function altogether: but no, these old stable trees are not the place > for that.) Bah, it brought some very mixed memories, wading through that code after years. And yeah, people should stop using all these dead kernels already! So yeah, no, you don't want to clean up stuff there - let sleeping dogs lie. > Boris, may I leave both -stable fixes to you? > Let me know if you'd prefer me to clean up my mess. No worries, I'll take care of it. > Thanks a lot for tracking this down, Thanks for double-checking me so quickly, lemme whip up a patch. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette