[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrVonxn6tDkxZnbetM9W4Uxxm7-M-tv1e7YsieX3U5OBKA@mail.gmail.com>
Date: Mon, 15 Jul 2019 15:12:15 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Uros Bizjak <ubizjak@...il.com>,
LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
Andrew Lutomirski <luto@...nel.org>
Subject: Re: [RFC PATCH, x86]: Disable CPA cache flush for selfsnoop targets
On Mon, Jul 15, 2019 at 12:38 PM Andi Kleen <ak@...ux.intel.com> wrote:
>
> >
> > That does not answer the question whether it's worthwhile to do that.
>
> It's likely worthwhile for (Intel integrated) graphics.
>
> There was also a recent issue with 3dxp/dax, which uses ioremap in some
> cases.
>
FWIW, I applied this simpler patch:
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 6a9a77a403c9..a933f99b176a 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -1729,6 +1729,7 @@ static int change_page_attr_set_clr(unsigned
long *addr, int numpages,
* attributes:
*/
cache = !!pgprot2cachemode(mask_set);
+ WARN_ON(cache);
/*
* On error; flush everything to be sure.
and booted a VM, including loading a module. The warning did not
fire. For the most part, we use PAT for things like ioremap_wc(), but
there's no flush, since there's no preexisting mapping at all.
I haven't tested on a real kernel with i915. Does i915 really hit
this code path? Does it happen more than once or twice at boot?
The only case I can think of where this would really matter is DAX, if
anyone uses WT for DAX.
Powered by blists - more mailing lists