Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4214220pxj; Tue, 8 Jun 2021 09:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNdMWxnuXp6eWhnhFOV349bTWQK3VQd8rCZ26ATYLo/UqVgkDPkB2Xv742m4Ewflo3EmLf X-Received: by 2002:a17:906:4e05:: with SMTP id z5mr23993005eju.520.1623168161095; Tue, 08 Jun 2021 09:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623168161; cv=none; d=google.com; s=arc-20160816; b=lF/h4VIIDvTvLjO8K/xC4FcMlOXq1wZlMjr051qfMTwlyF2dd2IoLRSnRoJVNZwCW+ /nsQ4oc5T3yJvL9kb6v0LWRV3F3QPKlt4u4O9eSgUH+ruOTLhXVUBvlK4fCUiZp5iYpp ZRGpRvwVQyma2fb/w91JhKhavysL8ysGbRy8KQoHEwirKFYGf5kwzMyY0HuatQF39CkF DSGKJR3CGMWPaagrfUQQCvIZckfNHq7jL/BSWWoOWJKie1a1gN5OFjOkzp+00FQL0RpE XpChHo+4UytBmdBwVY10zAiU69y6JVx2Rs2Q7UBf1rlga3bjroDL/Hrf8H7U4eZqMzFT QnQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=dJ/hPs4iPOAs+iqAjYI8szp5qkL26YVrlb4mBv6Q/uU=; b=V4n4j6du+KcZlRtimm4klb3UblK8mUdhtF777hHES3s9xoedgFH1esh05kf/7xw3Jr PdZ9SH1FmkY/lGSVXbfFbOhIETH6vo5K+jxH1iypHDtsbMkGTRVnm/aontdpN9Gvi9f4 LcJPbB5qk9ry63svL51BhXWeuW71E+GY9pRahtcWbynnfH3R+eobje35XDQ/RxNh8dTz OdzP5et/1/sgIcPtlAxv4Q0K4YSvig8BjWq8EilRYgkQoOdIMqFyuxkJRaRMYPnInuYS ont726Bq3I4WPob15w/GP9KP1JMYfm+nw8oRntjheNMmXqUFX/Rdl4ncWJFHSRRJ5ysf hOHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id m26si86122edp.349.2021.06.08.09.02.13; Tue, 08 Jun 2021 09:02:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232887AbhFHQBv (ORCPT + 99 others); Tue, 8 Jun 2021 12:01:51 -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