From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 12 Jan 2019 01:44:16 -0000 Received: from mga18.intel.com ([134.134.136.126]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1gi87X-0002MT-7u for speck@linutronix.de; Sat, 12 Jan 2019 02:29:56 +0100 From: Andi Kleen Subject: [MODERATED] [PATCH v4 22/28] MDSv4 5 Date: Fri, 11 Jan 2019 17:29:35 -0800 Message-Id: <23d56823578c53edb4a63c25223aca8d84c20d39.1547256470.git.ak@linux.intel.com> In-Reply-To: References: In-Reply-To: References: To: speck@linutronix.de Cc: Andi Kleen List-ID: From: Andi Kleen Subject: mds: Schedule clear cpu in swiotlb Schedule a cpu clear on next kernel exit for swiotlb running in interrupt context, since it touches user data with the CPU. Signed-off-by: Andi Kleen --- kernel/dma/swiotlb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index d6361776dc5c..e11ff1e45a4c 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -420,6 +421,7 @@ static void swiotlb_bounce(phys_addr_t orig_addr, phys_addr_t tlb_addr, } else { memcpy(phys_to_virt(orig_addr), vaddr, size); } + lazy_clear_cpu_interrupt(); } phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, -- 2.17.2