On Mon, Jun 30, 2025 at 11:34:34AM +0000, Huang, Kai wrote: > Yeah I agree the text can be improved. I tried to run AI to simplify but so > far I am not quite happy about the result yet. I'll try more. Ask it to simplify it. I get it that you want to be exhaustive in your commit message but there really is such thing as too much text. Think of it this way: is the text I'm writing optimal when anyone needs to read it in the future to know why a change has been done. If not, try to make it so. > Yeah I agree a single u32 + flags is better. However this is the problem in > the existing code (this patch only does renaming). > > I think I can come up with a patch to clean this up and put it as the first > patch of this series, or I can do a patch to clean this up after this series > (either together with this series, or separately at a later time). Which > way do you prefer? Clean ups go first, so yeah, please do a cleanup pre-patch. > /* > * The cache may be in an incoherent state (e.g., due to memory > * encryption) and needs flushing during kexec. > */ Better than nothing. I'd try to explain with 1-2 sentences what can happen due to memory encryption and why cache invalidation is required. So that the comment is standalone and is not sending you on a wild goose chasing ride. > IIUC the X86_FEATURE_SME could be cleared via 'clearcpuid' kernel cmdline. > > Please also see my reply to Tom. I know but we have never said that clearcpuid= should be used in production. If you break the kernel using it, you get to keep the pieces. clearcpuid= taints the kernel and screams bloody murder. So I'm not too worried about that. What is more relevant is this: "I did verify that booting with mem_encrypt=off will start with X86_FEATURE_SME set, the BSP will clear it and then all APs will not see it set after that." which should be put there in the comment. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette