|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 08/14] x86: Replace MTRR_* constants with X86_MT_* constants
On 13.12.2022 23:26, Demi Marie Obenour wrote:
> This allows eliminating most of the former. No functional change
> intended.
"most" would be nice to accompany by what has to stay, and for what reason.
Is this solely about MTRR_NUM_TYPES or more?
> --- a/xen/arch/x86/include/asm/mtrr.h
> +++ b/xen/arch/x86/include/asm/mtrr.h
> @@ -3,12 +3,6 @@
>
> #include <xen/mm.h>
>
> -/* These are the region types. They match the architectural specification. */
> -#define MTRR_TYPE_UNCACHABLE 0
> -#define MTRR_TYPE_WRCOMB 1
> -#define MTRR_TYPE_WRTHROUGH 4
> -#define MTRR_TYPE_WRPROT 5
> -#define MTRR_TYPE_WRBACK 6
> #define MTRR_NUM_TYPES 7
May I suggest to use X86_MT_UCM here, matching the transformation you
do ...
> @@ -1426,12 +1426,12 @@ void ept_p2m_uninit(struct p2m_domain *p2m)
> static const char *memory_type_to_str(unsigned int x)
> {
> static const char memory_types[8][3] = {
> - [MTRR_TYPE_UNCACHABLE] = "UC",
> - [MTRR_TYPE_WRCOMB] = "WC",
> - [MTRR_TYPE_WRTHROUGH] = "WT",
> - [MTRR_TYPE_WRPROT] = "WP",
> - [MTRR_TYPE_WRBACK] = "WB",
> - [MTRR_NUM_TYPES] = "??"
> + [X86_MT_UC] = "UC",
> + [X86_MT_WC] = "WC",
> + [X86_MT_WT] = "WT",
> + [X86_MT_WP] = "WP",
> + [X86_MT_WB] = "WB",
> + [X86_MT_UCM] = "??",
... here (and where I wonder whether MTRR_NUM_TYPES wouldn't better be
kept).
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |