Re: [PATCH v2 2/2] KVM: nVMX: Decouple EPT RWX bits from EPT Violation protection bits

From: Jon Kohler
Date: Thu Feb 27 2025 - 14:41:53 EST




> On Feb 27, 2025, at 1:52 AM, Nikolay Borisov <nik.borisov@xxxxxxxx> wrote:
>
> !-------------------------------------------------------------------|
> CAUTION: External Email
>
> |-------------------------------------------------------------------!
>
>
>
> On 27.02.25 г. 2:07 ч., Sean Christopherson wrote:
>> Define independent macros for the RWX protection bits that are enumerated
>> via EXIT_QUALIFICATION for EPT Violations, and tie them to the RWX bits in
>> EPT entries via compile-time asserts. Piggybacking the EPTE defines works
>> for now, but it creates holes in the EPT_VIOLATION_xxx macros and will
>> cause headaches if/when KVM emulates Mode-Based Execution (MBEC), or any
>> other features that introduces additional protection information.
>> Opportunistically rename EPT_VIOLATION_RWX_MASK to EPT_VIOLATION_PROT_MASK
>> so that it doesn't become stale if/when MBEC support is added.
>> No functional change intended.
>> Cc: Jon Kohler <jon@xxxxxxxxxxx>
>> Cc: Nikolay Borisov <nik.borisov@xxxxxxxx>
>> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
>
> Reviewed-by: Nikolay Borisov <nik.borisov@xxxxxxxx>

LGTM, but any chance we could hold this until I get the MBEC RFC
out? My apologies on the delay, I caught a terrible chest cold after
we met about it, followed by a secondary case of strep! Just getting
back into the grind now, so I need to rebase and send those out.

For anyone curious, the drafts are here:
https://github.com/JonKohler/linux/tree/mbec-rfc-v1-6.12
https://github.com/JonKohler/qemu/tree/mbec-rfc-v1

I need to incorporate some early off-list review comments and send
it out properly, but in reference to this specific change, you can
see how I approached it here:
https://github.com/JonKohler/linux/commit/0d2e82704ed3eb28c105967c8acd7907523ded5b