From patchwork Fri Jul 12 03:41:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 11041385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5927614DB for ; Fri, 12 Jul 2019 03:41:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F09D28B96 for ; Fri, 12 Jul 2019 03:41:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32D8E28BBC; Fri, 12 Jul 2019 03:41:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2526428B96 for ; Fri, 12 Jul 2019 03:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729404AbfGLDlk (ORCPT ); Thu, 11 Jul 2019 23:41:40 -0400 Received: from mga02.intel.com ([134.134.136.20]:32229 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729293AbfGLDlk (ORCPT ); Thu, 11 Jul 2019 23:41:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 20:41:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,481,1557212400"; d="scan'208";a="166567465" Received: from sjchrist-coffee.jf.intel.com ([10.54.74.165]) by fmsmga008.fm.intel.com with ESMTP; 11 Jul 2019 20:41:39 -0700 From: Sean Christopherson To: Jarkko Sakkinen Cc: linux-sgx@vger.kernel.org Subject: [PATCH for_v21 v2 0/2] x86/sgx: Use SRCU and mmu_notifier Date: Thu, 11 Jul 2019 20:41:36 -0700 Message-Id: <20190712034138.18564-1-sean.j.christopherson@intel.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-sgx-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move to SRCU to eliminate custom list walker, and optionally use mmu_notifier in lieu of refcounting VMAs to avoid defining ->close. v2: Rebase to latest master. Sean Christopherson (2): x86/sgx: Use SRCU to protect mm_list during reclaim x86/sgx: Use mmu_notifier.release() instead of per-vma refcounting arch/x86/Kconfig | 2 + arch/x86/kernel/cpu/sgx/driver/main.c | 60 +++++---- arch/x86/kernel/cpu/sgx/encl.c | 182 +++++++++++++------------- arch/x86/kernel/cpu/sgx/encl.h | 12 +- arch/x86/kernel/cpu/sgx/reclaim.c | 71 ++++------ 5 files changed, 158 insertions(+), 169 deletions(-)