Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4672175ybi; Mon, 15 Jul 2019 12:47:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyetgj9zyIqJrbDlMDzQIWpzKXiYN0K9UOmMxIv6layPpVqKLa3R3yrn/dZaQ58wR2k0BC8 X-Received: by 2002:a17:902:1e9:: with SMTP id b96mr30556924plb.277.1563220028261; Mon, 15 Jul 2019 12:47:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563220028; cv=none; d=google.com; s=arc-20160816; b=DRZT+9qch6QPHwaD/jHkIIgUcJRB2KG7acV3P2x5ndev7Igcc5sjWPl+ChWLpEdIOn ZP8HqGFy9qtCXjDNGGiEPEFa6p3/bWGMgpo1nYbBDFVfO+58xoKTCptbqKPPnaoTxzBE jVG4Cz3mtQ9fTVuGZiI2UKZMofvyIBcMWVWqQZINdhP8mkMDey9jCu0B4sPGm1haY+NC H1Zhg8cLn1rtNpnSmyr4Btswh/oUVb4M1h+3ARPyKHXV5JrsBshK/9vCTbsu4HyZ9C8q o2X4aUAI6xYQv6018jP1bHUC29uHTJdK8wisaKxpYIn4hANDPgW6lGdyo3TCpKIiQ957 I25Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aO+1+gUP6P2+6e9p8+dhxYriHkqCDgHbRN4D4UyRODw=; b=EWifvHuVgHhunpgkXDvMxbLmoRGVbZqPj+rtQLTTbQDOfBcncUwLu4qP9PVvNLS/U7 w8RsF2f58altHZ9uDcyyUE9mLO0gnspy+lX9CqWyPpNv89ISf9DG7jUapKGD1sld2LQJ S4jqKMk4ksBcOzx6LDNbF6Qh3MFYNNttlqiwps6ZGOK9IyS5LoTEEJDyO1SnUnCaxUeJ xaDPSm+/kmHNO4fL19kh2yAAPBagArAr8uukCras2g3VWrGn1U6Z6/SspVALG7NPPVcL XZKKF1/TxxDvtXcSbzuX57t0Ud2Vif/asNV7qSSDB79rOh8S6qIYjL83nW1xKgBv+GEc r1ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IXBGoqnw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v41si17110820pgn.481.2019.07.15.12.46.51; Mon, 15 Jul 2019 12:47:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IXBGoqnw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731735AbfGOTo6 (ORCPT + 99 others); Mon, 15 Jul 2019 15:44:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:48424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729598AbfGOTo5 (ORCPT ); Mon, 15 Jul 2019 15:44:57 -0400 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5D9952173B for ; Mon, 15 Jul 2019 19:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563219896; bh=eR7tQFCtsIZZKhV6oeIXYXLEwaZdSRmOV4XGxmJFXSY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IXBGoqnwfx6gH4+R7zihNHPWlDyRp6A32ettpPl9uP5usiof27oZQ2CZTffpc8DgE WJLmcCzB4jdBz7uCznSI3hSGpm4GXMCCLdxwc7G96S7l2UzUK65oDwiATwlm2Mx8/3 nGODe1obul03Hj2tDBIR0Yk36jMpDI4ihpjRLNc4= Received: by mail-wr1-f43.google.com with SMTP id n9so18390121wrr.4 for ; Mon, 15 Jul 2019 12:44:56 -0700 (PDT) X-Gm-Message-State: APjAAAXfZvARqqSDCZLiKS/5Pkw+QJvcVvmwKCDAUrrP7q6OLlNMTnCA sn/Vji8AuGAmfz4Oh74gY5+0fVvV8GmjefclKVwEkg== X-Received: by 2002:a5d:4309:: with SMTP id h9mr29584933wrq.221.1563219894946; Mon, 15 Jul 2019 12:44:54 -0700 (PDT) MIME-Version: 1.0 References: <8736j7gsza.fsf@linux.intel.com> <20190715193938.GG32439@tassilo.jf.intel.com> In-Reply-To: <20190715193938.GG32439@tassilo.jf.intel.com> From: Andy Lutomirski Date: Mon, 15 Jul 2019 12:44:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH, x86]: Disable CPA cache flush for selfsnoop targets To: Andi Kleen Cc: Thomas Gleixner , Uros Bizjak , LKML , X86 ML , Andrew Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 15, 2019 at 12:39 PM Andi Kleen wrote: > > > Right, we don't know where the PAT invocation comes from and whether they > > are safe to omit flushing the cache. The module load code would be one > > obvious candidate. > > Module load just changes the writable/executable status, right? That shouldn't > need to flush in any case because it doesn't change the caching attributes. > Indeed. module load should require a single TLB flush and no cache flushes. I don't think we're currently efficient enough to do it with a single TLB flush, but we should be able to...