[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 0/8] x86/mtrr: fix handling with PAT but without MTRR
- To: Juergen Gross <jgross@xxxxxxxx>
- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 15 Feb 2023 15:22:35 -0800
- Cc: "Edgecombe, Rick P" <rick.p.edgecombe@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "Ostrovsky, Boris" <boris.ostrovsky@xxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "kys@xxxxxxxxxxxxx" <kys@xxxxxxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "lists@xxxxxxxxxxxxxxx" <lists@xxxxxxxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "wei.liu@xxxxxxxxxx" <wei.liu@xxxxxxxxxx>, "Lutomirski, Andy" <luto@xxxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "Cui, Dexuan" <decui@xxxxxxxxxxxxx>, "mikelley@xxxxxxxxxxxxx" <mikelley@xxxxxxxxxxxxx>, "haiyangz@xxxxxxxxxxxxx" <haiyangz@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 15 Feb 2023 23:29:28 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Feb 15, 2023 at 12:25 AM Juergen Gross <jgross@xxxxxxxx> wrote:
>
> The problem arises in case a large mapping is spanning multiple MTRRs,
> even if they define the same caching type (uniform is set to 0 in this
> case).
Oh, I think then you should fix uniform to be 1.
IOW, we should not think "multiple MTRRs" means "non-uniform". Only
"different actual memory types" should mean non-uniformity.
If I remember correctly, there were good reasons to have overlapping
MTRR's. In fact, you can generate a single MTRR that described a
memory ttype that wasn't even contiguous if you had odd memory setups.
Intel definitely defines how overlapping MTRR's work, and "same types
overlaps" is documented as a real thing.
Linus
|