Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp45178imm; Tue, 24 Jul 2018 13:42:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd0m5grAeyVIlWoclWJmGBcTtHVZXBJqKYaQO885QD8ZCKD1OdfjdT+8BqJFF+hbclPvKsS X-Received: by 2002:a63:d244:: with SMTP id t4-v6mr17877538pgi.335.1532464959503; Tue, 24 Jul 2018 13:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532464959; cv=none; d=google.com; s=arc-20160816; b=cPFV5YB5Luptp8PJ2NvKSNgQrE1CHzzpiU+6+hjMsT4SEXJY9FLs7fYsRJKeUBrzLE FqnKQY7rua8wejKKrwrMR6xL/ec2QmnS8SgQgkqWOOzFX310vjoPM31ZtY9YROlhTZL3 eaAaajN6WWPzgXFqPJYQU9uqW6hlRJx7UYL7gXy4oB5oxWTxm3nFoZmNMSkTCqs638Pe l3YgHAUt6dabVgRx3ITGLfryFP9E82WLV+COOcagwN9vxyd5K1quG3p1jrJ07HcNg0cq LSF7Rc7s77U5OYuXtUOZe78Dq1DG4oslrmlPRIvvUCR6CGfUZkBDihPsS3Eve2qfvLea U1fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=bAKBuuMY5Doo6KuHSVnFJ2SR8urZyuF4MYP7DVqHpDg=; b=iIvDwIo7NDofKSdAwwdE8RpGX8k1eIUJFN45NTaRGvBf+ES1gKgLIax9xAmeE8cQrZ mmzn/P3KXrmLv2aMN2gtWrKP+7OXC8BhKe/kbt5hLZfkqcMgBZ2yeQ/eA1MF3Cx2HO1v KmBxNAzS1xLdGTe9xQhYie8LnHb9cHARXGU4MmWqiQT/xc1kU7iId/ALLHIVaIcbjNio m0Jk8zDN7vU/mSI+fyH2cxsqCaeClK65HsKLk1WgoMfhXu1MI1ICfLusGzUT+KQVUetZ VLRaE3EYOmai6UYllWb4tO4jLjy4RxL785hmzyxsSl+J7dv3KbUmBW2Cl/jIVB0GPGqZ E92w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1-v6si12027823pge.521.2018.07.24.13.42.24; Tue, 24 Jul 2018 13:42:39 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388919AbeGXVt1 (ORCPT + 99 others); Tue, 24 Jul 2018 17:49:27 -0400 Received: from mga09.intel.com ([134.134.136.24]:61800 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388858AbeGXVtJ (ORCPT ); Tue, 24 Jul 2018 17:49:09 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 13:40:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,399,1526367600"; d="scan'208";a="74172835" Received: from rchatre-s.jf.intel.com ([10.54.70.76]) by fmsmga004.fm.intel.com with ESMTP; 24 Jul 2018 13:40:29 -0700 From: Reinette Chatre To: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, vikas.shivappa@linux.intel.com Cc: gavin.hindman@intel.com, jithu.joseph@intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, Reinette Chatre Subject: [RFC PATCH 0/7] x86/intel_rdt: Restoration of Cache Pseudo-Locked regions Date: Tue, 24 Jul 2018 13:40:11 -0700 Message-Id: X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Maintainers, A Cache Pseudo-Locked region is vulnerable to certain instructions (INVD, WBINVD, CLFLUSH) or deeper C-states (that could shrink or power off the cache) evicting the pseudo-locked memory. The current support for pseudo-locked regions already restrict deeper C-states on cores associated with the pseudo-locked regions, but the vulnerability to some instructions remain. This work does not prevent the instructions to which Cache Pseudo-Locked regions are vulnerable, instead, this work support the restoration of Cache Pseudo-Locked regions that can be triggered manually by the user or automatically after the WBINVD instruction has been issued. A new debugfs file "pseudo_lock_restore" is associated with each pseudo-locked region and can be used to manually trigger the memory associated with the region to be pseudo-locked to cache again. The system-wide "native_wbinvd()" is modified to trigger the restoration of all Cache Pseudo-Locked regions after the WBINVD instruction returns and effort is made to avoid any unnecessary work in this flow. Within the kernel two locations with direct invocations of the WBINVD instruction are coverted to native_wbinvd() and compile tested. Neither location is likely to be used on the platforms supporting Cache Pseudo-Locking. I am sending this as RFC to maintainers of core first to obtain feedback on the approach before including the maintainers of other subsystems changed. Your feedback on this proposal would be greatly appreciated. Reinette Reinette Chatre (7): x86/intel_rdt: Expose useful functions to all RDT code x86/intel_rdt: Enable a pseudo-locked region to be restored x86/intel_rdt: Enable user to trigger pseudo-locked region restore x86/intel_rdt: Support restore of all pseudo-locked regions x86/intel_rdt: Trigger pseudo-lock restore after wbinvd call mtd: replace direct wbinvd invoke with kernel api video: fbdev: i810: replace direct wbinvd invoke with kernel api Documentation/x86/intel_rdt_ui.txt | 18 +- arch/x86/include/asm/special_insns.h | 13 +- arch/x86/kernel/cpu/intel_rdt.h | 2 + arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c | 198 +++++++++++++++++++- arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 4 +- drivers/mtd/maps/nettel.c | 6 +- drivers/video/fbdev/i810/i810_main.h | 2 +- 7 files changed, 229 insertions(+), 14 deletions(-) -- 2.17.0