Re: [PATCH v6 3/5] x86/mm: make code robust to future PAT changes

2023-01-05 Thread Andrew Cooper
On 05/01/2023 2:01 pm, Jan Beulich wrote: > On 22.12.2022 23:31, Demi Marie Obenour wrote: >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -6352,6 +6352,11 @@ unsigned long get_upper_mfn_bound(void) >> return min(max_mfn, 1UL << (paddr_bits - PAGE_SHIFT)) - 1; >> } >> >> + >>

Re: [PATCH v6 3/5] x86/mm: make code robust to future PAT changes

2023-01-05 Thread Jan Beulich
On 22.12.2022 23:31, Demi Marie Obenour wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -6352,6 +6352,11 @@ unsigned long get_upper_mfn_bound(void) > return min(max_mfn, 1UL << (paddr_bits - PAGE_SHIFT)) - 1; > } > > + > +/* Nit: Please avoid introducing double blank

[PATCH v6 3/5] x86/mm: make code robust to future PAT changes

2022-12-22 Thread Demi Marie Obenour
It may be desirable to change Xen's PAT for various reasons. This requires changes to several _PAGE_* macros as well. Add static assertions to check that XEN_MSR_PAT is consistent with the _PAGE_* macros, and that _PAGE_WB is 0 as required by Linux. Signed-off-by: Demi Marie Obenour ---