Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4238064pxj; Tue, 8 Jun 2021 09:32:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6g13lskyj137p+NzRjOMIGb/IDKhShkW6KdT0s/dRX7SGiKGuRFYxQN2nah0n1pUf/4XP X-Received: by 2002:a17:906:c0c6:: with SMTP id bn6mr23540799ejb.436.1623169967487; Tue, 08 Jun 2021 09:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623169967; cv=none; d=google.com; s=arc-20160816; b=xA90j6Z7SR6Cj1I0HXo+UPe+5oNa8HGKbifM4tAddeIvSSi8EUQqicqSXyIITqkJfN Aqa1K+iQIs7aGCEzrSqwenO2kqco+32E+pYXrSS/uoO6zPu6NsUJGrNwxC9s2CWFGzyg XWS6+jesBElfe/8Wpo+tZeSfs/09SEdc7JpjS2ZHLgdXypqDnUSzaQj7ll+8Xo0AJMvm 0MRiSLfndSZbjjgR32kKYj6yg+xxiR7awE0iiDbX0S2/1eZV6dQaGHlEG/yEgsZR7xqp 0a3DFJJo3PW228PuNcdFZRnyMij1p7d3GD3ff9B6Wpk3YCYf9Q1swktRfu39orxDq7KY ptNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+sfGZQeQbtYdMrk29dEyePh2D+wRTJxj0sqHMA/znyg=; b=AxByBEQ1YDHpYjDgylFUSNFry5nqZuI7AwcU5xV2tEaLIgceXSU6f15SJI4fplRdDG fqN6kY5knHSO4AqRMmOLT7SMQcTLY4mEh296JukU17fvUW7JSNgnv10fav2+Ad2KReQ3 nI9cjie6eZLCLCIBqlYMBFSMWEJO6+u1J/GYuk/bP9zdttW43nUzZcMOG+1mKDpi67QF ggWwGeV9e19xhFS/c/9fo3Zo5DkIztIlO0HXKrbK8iQKi9HN3lqqxOjttPzhTQTOECal fpNemh+MqAoB7Nej3mCeRllNcxN1ENIHHxJ0nohlpnGt8SAR/+aMOEVEt78paXJwFwom vx2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=yc+6pOFm; 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 4si124737ejr.300.2021.06.08.09.32.22; Tue, 08 Jun 2021 09:32:47 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=yc+6pOFm; 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 S232917AbhFHQ3e (ORCPT + 99 others); Tue, 8 Jun 2021 12:29:34 -0400 Received: from mail-pj1-f49.google.com ([209.85.216.49]:37636 "EHLO mail-pj1-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbhFHQ3d (ORCPT ); Tue, 8 Jun 2021 12:29:33 -0400 Received: by mail-pj1-f49.google.com with SMTP id 22-20020a17090a0c16b0290164a5354ad0so14401045pjs.2 for ; Tue, 08 Jun 2021 09:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+sfGZQeQbtYdMrk29dEyePh2D+wRTJxj0sqHMA/znyg=; b=yc+6pOFmHqKH9buRub49eORug5GWzrWtHUaXJ0/5t3nvANNzNxpL7fva1+9HmAPN5h 65/EziO6nBWFgblSN94H0KxHMAg7hU5ZPLXeeAEyayCl5QMR5mNLN4RbsRb/mtb7oxmM venAV2aOBPLXcz+W8XAOggKWe+LLusARkUgSrUF2DTPt0lZa/VDJ8At5MNznq7khA+q9 CnEPosFT44b7+6lGpir/iani2FxTL3I0PNlZU/PMrZ8KBgElReQpN2XQNUcsINras9Sr XTotkbRGioImgyF4JhrAhWIaNDs5aB64Vpbs32a7SQKASf3v6gb/3MB18ZQo1a1GA8tP H/2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+sfGZQeQbtYdMrk29dEyePh2D+wRTJxj0sqHMA/znyg=; b=GYvmcyz2eG+rAzGPrgXVYSsaSF8XyiZz4NS2t1od5fUg1cWPqRhBYfA7Lh1SmIBKdG 2nGPSxn3IJCphu8QqnuiN7YmwCSB/tEbsOfUWqRS+CLggsuuI71XrkVleSaeVSOtWZH6 ZeA2oQD1Nnj9zrxLiBUOWcAEj+aLCOGvKakMWsG9TNc+4I68pHSn89ZLfPdree62I1Oe 9KM0PK035d0NC69k9VpA/ixxRoDXKRNAOw/cJTXfIQMjb334lQFW9jEyqxq5tEzx6yUS A0aoRR3K5SEIGAh/VAv516L3eKH5JOZjIbjtaofZX8EvxL7Z0Nlzrv73rwO2fT++fqXu S87g== X-Gm-Message-State: AOAM5303icwgPLCPwky+A84eQAo5jt1LY9JZ21EFQktoCwrqIXNwS1wd dMfV2ZI0UGUb/9XMX8rzBGSlrnBwRt07I43tzuE1HA== X-Received: by 2002:a17:902:820a:b029:10c:a12b:e524 with SMTP id x10-20020a170902820ab029010ca12be524mr746634pln.79.1623169600121; Tue, 08 Jun 2021 09:26:40 -0700 (PDT) MIME-Version: 1.0 References: <369a29afba9bb561afa1b77e113a9dae4921fe53.1623165571.git.sathyanarayanan.kuppuswamy@linux.intel.com> In-Reply-To: <369a29afba9bb561afa1b77e113a9dae4921fe53.1623165571.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Dan Williams Date: Tue, 8 Jun 2021 09:26:29 -0700 Message-ID: Subject: Re: [RFC v2-fix-v2 3/3] x86/tdx: Handle port I/O To: Kuppuswamy Sathyanarayanan Cc: Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 8, 2021 at 8:40 AM Kuppuswamy Sathyanarayanan wrote: > > From: "Kirill A. Shutemov" > > TDX hypervisors cannot emulate instructions directly. This > includes port IO which is normally emulated in the hypervisor. > All port IO instructions inside TDX trigger the #VE exception > in the guest and would be normally emulated there. > > Also string I/O is not supported in TDX guest. So, unroll the > string I/O operation into a loop operating on one element at > a time. This method is similar to AMD SEV, so just extend the > support for TDX guest platform. > > Co-developed-by: Kuppuswamy Sathyanarayanan > Signed-off-by: Kuppuswamy Sathyanarayanan > Signed-off-by: Kirill A. Shutemov > Reviewed-by: Andi Kleen > --- > Changes since RFC v2-fix-v1: > * Fixed commit log to adapt to decompression support code split. Looks good to me: Reviewed-by: Dan Williams