Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3035059pxj; Mon, 10 May 2021 17:04:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjXbz81NMvO0QpN1YrN4Zc2+uVCZgZdW3vhoGtFFtV1A5+iCfK6XKbeTiQpHJLuThbplZn X-Received: by 2002:a92:c7a1:: with SMTP id f1mr23477805ilk.33.1620691443745; Mon, 10 May 2021 17:04:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620691443; cv=none; d=google.com; s=arc-20160816; b=txk6JScWWURecI6STNsJM/Vj9c5y2hCyxEyjfNygfijm9JvaT6OiNU2amMHUU5JTa1 QLXrskj1EOLHW2mD2yvHzpUxO5dK5v0tB2IHRRc1+Uo8FWE4VVbHosc5KPF93Si4DdKP i7MxqjDxLwm6dVbfWm1qhph5pGZonyOOnha+CTRcG3D6wtrkNE8ZXPd5Ka/HSfSrh42K UdgObriPiLlDVK3tB7Pjyfm5xFKy9Hl55xycmuWtSfPvJynnLWyOi+lG4hRkDIiEK37F PFuamxumh3C7L9flvAYOdYkM/Sr7qOqIh0/KtUCiYe5z4J4QmYpw9h8wECVxQn5BwXKD SrGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=EWEBGt/xmJtTw2f/yaF9Nki1g/PmC07EL5CkN0m1AF0=; b=ElUsCxvhEhz47Ab5of+vepMj6/QJTbppWdG8xfMZQwPpU1ybmItdgX4SPkc0+VtWxF aHvRtLheJRkyvCYdcM9IJ9dbmZoxQro+QskFZMJ8yYR277Tjqk3sS9zP1WaEp78u1/sM 755GSYWimsRxjSnQRiHLAC78+iLnwAKdJOrvOc+bvursh3NrmywjYJOG6dtyWJk/vKey RW3O77V9GoidGCi/7OlIeWcbR4wcd2WDcGd7SupqWcg2aHpB12Jb34yXeUoPwaQ5dHLS Lr8yt+uw7sPc5q7Q4FjEQCEHFfqkMLfUqtaM8c2WnR1z+jMEVDMfVGYknWfBI24lfk6c TAGQ== 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 w13si17373090ilq.89.2021.05.10.17.03.50; Mon, 10 May 2021 17:04:03 -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 S229944AbhEKAC3 (ORCPT + 99 others); Mon, 10 May 2021 20:02:29 -0400 Received: from mga18.intel.com ([134.134.136.126]:52014 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbhEKAC2 (ORCPT ); Mon, 10 May 2021 20:02:28 -0400 IronPort-SDR: GTGBq8W6Q3tm8sHBAQk1QoNecyS+HiDUgwNvbPucZ3Qs0zj8C6p0OtvthJhyaKi0Pyw84AGpk4 kOZVgJhkOFQw== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="186759309" X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="186759309" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 17:01:21 -0700 IronPort-SDR: oh4FgzYiaaOGS7G9qIZSYq4KtAUUReMP+pUWhvBkN9Ruili04khdTwQpBmgmKqkhLTv3UgX3Zb NFrUm1YKYQRw== X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="468540381" Received: from tassilo.jf.intel.com ([10.54.74.11]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 17:01:20 -0700 Date: Mon, 10 May 2021 17:01:19 -0700 From: Andi Kleen To: Dan Williams Cc: Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski , Dave Hansen , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , Linux Kernel Mailing List Subject: Re: [RFC v2 14/32] x86/tdx: Handle port I/O Message-ID: <20210511000119.GV4032392@tassilo.jf.intel.com> References: <0e7e94d1ee4bae49dfd0dd441dc4f2ab6df76668.1619458733.git.sathyanarayanan.kuppuswamy@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2021 at 04:34:34PM -0700, Dan Williams wrote: > > > Outside the boot decompression code isn't this branch of the "ifdef > > > BOOT_COMPRESSED_MISC_H" handled by #VE? I also don't see any usage of > > > __{in,out}() in this patch. > > > > I thought it was all alternative after decompression, so the #VE code > > shouldn't be called. We still have it for some reason though. > > Right, I'm struggling to understand where these spurious in/out > instructions are coming from that are not replaced by the > alternative's code? There should be nothing in the main tree at least. > Shouldn't those be dropped on the floor and warned > about rather than handled? It might be related to eventually handling them in ring 3, but I believe we disallow that currently too and it's not all that useful anyways. So yes it could be forbidden. > I.e. shouldn't port-io instruction escapes > that would cause #VE be precluded at build-time? You mean in objtool? That would seem like overkill for a more theoretical problem. > > There used to be SAVE_ALL/SAVE_REGS, but they have been all removed in > > some past refactorings. > > Not a huge deal, but at a minimum it seems a generic construct that > deserves to be declared centrally rather than tdx-guest-port-io local. Yes I agree. We should just bring SAVE_ALL/SAVE_REGS back. -Andi