Re: [PATCH Part2 RFC v4 33/40] KVM: SVM: Add support to handle MSR based Page State Change VMGEXIT
From: Borislav Petkov
Date: Fri Aug 13 2021 - 12:31:54 EST
On Mon, Jul 19, 2021 at 06:55:54PM +0000, Sean Christopherson wrote:
> I've no objection to using PSC for enums and whatnot, and I'll happily
> defer to Boris for functions in the core kernel and guest, but for KVM
> I'd really like to spell out the name for the two or so main handler
> functions.
Well,
- we abbreviate things in the kernel all the time - this is no
exception. We don't name it
secure_nested_paging_handle_page_state_change()
either. :-)
- If you don't know what PSC means, now you do :-P Also, comments above
the function names help.
- I asked for the shortening because those function names were a
mouthful and when you see
snp_handle_page_state_change()
I wonder, it is "handling", is it "changing" or what is it doing. And
the page state change is a thing so the "handle" is important here. Thus
the
snp_handle_psc()
variant.
Also, shorter function names make the code more readable. I'm sure
you've read firmware code or other OS code before to understand what I
mean.
Anyway, I felt I should give my arguments why I requested the
shortening.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette