[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bk1tn6ks.ffs@tglx>
Date: Thu, 15 Aug 2024 17:34:11 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Sean Christopherson <seanjc@...gle.com>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, Andy Lutomirski <luto@...nel.org>, Peter Zijlstra
<peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org, Xiaoyao Li
<xiaoyao.li@...el.com>, Kai Huang <kai.huang@...el.com>, Jim Mattson
<jmattson@...gle.com>, Shan Kang <shan.kang@...el.com>, Xin Li
<xin3.li@...el.com>, Zhao Liu <zhao1.liu@...el.com>
Subject: Re: [PATCH v8 01/10] x86/cpu: KVM: Add common defines for
architectural memory types (PAT, MTRRs, etc.)
On Wed, Jun 05 2024 at 16:19, Sean Christopherson wrote:
> Add defines for the architectural memory types that can be shoved into
> various MSRs and registers, e.g. MTRRs, PAT, VMX capabilities MSRs, EPTPs,
> etc. While most MSRs/registers support only a subset of all memory types,
> the values themselves are architectural and identical across all users.
>
> Leave the goofy MTRR_TYPE_* definitions as-is since they are in a uapi
> header, but add compile-time assertions to connect the dots (and sanity
> check that the msr-index.h values didn't get fat-fingered).
>
> Keep the VMX_EPTP_MT_* defines so that it's slightly more obvious that the
> EPTP holds a single memory type in 3 of its 64 bits; those bits just
> happen to be 2:0, i.e. don't need to be shifted.
>
> Opportunistically use X86_MEMTYPE_WB instead of an open coded '6' in
> setup_vmcs_config().
>
> No functional change intended.
>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
Reviewed-by: Thomas Gleixner <tglx@...utronix.de>
Powered by blists - more mailing lists