From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E15D0C47082 for ; Tue, 8 Jun 2021 16:00:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAFAC60FEA for ; Tue, 8 Jun 2021 16:00:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233142AbhFHQBw (ORCPT ); Tue, 8 Jun 2021 12:01:52 -0400 Received: from mga14.intel.com ([192.55.52.115]:60385 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232773AbhFHQBu (ORCPT ); Tue, 8 Jun 2021 12:01:50 -0400 IronPort-SDR: OAXBTQQunjTGnLcEwcHh15hrBhzzA9JIUKtweDnSURcbzHIw3eCUi0Dto7QdJltyEH/9r09vbe dEJvhtdMeClQ== X-IronPort-AV: E=McAfee;i="6200,9189,10009"; a="204688348" X-IronPort-AV: E=Sophos;i="5.83,258,1616482800"; d="scan'208";a="204688348" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 08:59:56 -0700 IronPort-SDR: 9eSfKfvbZIgTtMVqcQbgf1/1hxXG4ZOJWx3YSbfHDlJbB7dI3mdE6q06Ls9MND56zO6TKSvbGb 7HcV4O4F8uHA== X-IronPort-AV: E=Sophos;i="5.83,258,1616482800"; d="scan'208";a="637683394" Received: from ticela-az-103.amr.corp.intel.com (HELO skuppusw-desk1.amr.corp.intel.com) ([10.254.36.77]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 08:59:55 -0700 From: Kuppuswamy Sathyanarayanan To: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Dan Williams Cc: Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org, Kuppuswamy Sathyanarayanan Subject: [RFC v2-fix-v3 0/4] x86/tdx: Handle in-kernel MMIO Date: Tue, 8 Jun 2021 08:59:20 -0700 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset addresses the review comments in the patch titled "x86/tdx: Handle in-kernel MMIO". Since it requires patch split, sending these together. Changes since RFC-v2-fix-v2: * Further divided patch "x86/sev-es: Abstract out MMIO instruction decoding", and moved generic APIs common to both TDX/SEV into seperate patches. Also introduced new patch for AMD code to utilize the generic APIs. * Fixed commit log as per review comments. Changes since RFC v2-fix: * Introduced "x86/sev-es: Abstract out MMIO instruction decoding" patch for sharing common code between TDX and SEV. * Modified TDX MMIO code to utilize common shared functions. * Modified commit log to reflect latest changes and to address review comments. Changes since RFC v2: * Fixed commit log as per Dave's review. Kirill A. Shutemov (4): x86/insn-eval: Introduce insn_get_modrm_reg_ptr() x86/insn-eval: Introduce insn_decode_mmio() x86/sev-es: Use insn_decode_mmio() for MMIO implementation x86/tdx: Handle in-kernel MMIO arch/x86/include/asm/insn-eval.h | 13 +++ arch/x86/kernel/sev.c | 171 ++++++++----------------------- arch/x86/kernel/tdx.c | 109 ++++++++++++++++++++ arch/x86/lib/insn-eval.c | 102 ++++++++++++++++++ 4 files changed, 264 insertions(+), 131 deletions(-) -- 2.25.1