Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2153961pxm; Thu, 24 Feb 2022 17:55:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyusNmixhF78ktUTS5IBuXo5Tk+h5PXIIeuS9obdcXgK2WiSYD8m9Tf5KYnlJgaUGsmpruw X-Received: by 2002:a17:906:5786:b0:6cf:7206:98d5 with SMTP id k6-20020a170906578600b006cf720698d5mr4436256ejq.77.1645754157095; Thu, 24 Feb 2022 17:55:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645754157; cv=none; d=google.com; s=arc-20160816; b=amUCl5/hcVaQGfJmSsYjHw16aLN4xmCJwKLFMNw9gCBpkYsQQC5T7M5gD/RATQ29HM edQOOWJymOcWUsRaKX7bhUQd+0+DtozD+gKDgvYm/i4FlF60WauiKGYoAKgIa6TX41Kq kX12WaVzRmbJs6RP97dTFfK4U7nFxar/yL7VRCVV2q+fQjwoAk4af1XrZVgp60++T9H+ O7954w6M/hGnGz33B48DqhZdT1oDaakiO5vqHVgHC7g18NmTgR8pi3Zdxj8Lr6/ZY9xv XTZPDf6fygQZQz8xi3d7zbK0KA+OIQ5Wq3H30a5m6GuhAkxR813AAWBt+NvwHmcTVsxI pIew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=HrUTzFfudGc1Ywv9H56VudrKwM4WsqYifzPE8Kw+6bA=; b=lwWsiQZl8iWvz7EnYWIxKv8fSJNmaoJVIqZu8qeQo75cUSLQpyZVjBIqL7KFhi43KJ R2+MC6hhl1tThUXrjEd9UevN4MbxrfWdkr5lWU6Iiob4hdRO9xVwnMY45ybN3Y5ka2E3 iXxuirmxt3AdYSgyujX4R9Vogkzcs970VnaFJarJX/pvR7qXKcO9x7KruUBZ5j/i8RIl x9ij3JdaeQrCMkuxGFhsHDfe+LY0P9M0RgDoIB5vlMteWAXkqIy7JSsC53s6GEds0ZJp lQXkRhR+9BGgd5gXw9GQ00BhkIHyFJ00RFKsBISo5jzd3n4+ABdk5I5H85oSh5P/7iEN 3oUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MoT/iHWG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a1709062a4300b006ae96f7b834si621577eje.264.2022.02.24.17.55.34; Thu, 24 Feb 2022 17:55:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MoT/iHWG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235369AbiBXWOj (ORCPT + 99 others); Thu, 24 Feb 2022 17:14:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232825AbiBXWOj (ORCPT ); Thu, 24 Feb 2022 17:14:39 -0500 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77B9D24FA0F for ; Thu, 24 Feb 2022 14:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645740848; x=1677276848; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=8LOlYO3u/8uK6oD2D++8gUDMBp+ApM70zCznGhWW1cI=; b=MoT/iHWGE5Q+v+/4g1w0zI+mlu3pV2r9WseTytn7d3K7507AePDeoPLd MHInz8GOOu9LvCMsUpiY7cl61IcOs0GhoBBjrQc35RtrsNlSptTEF2+G1 qR8WOxNR0bA0m4SpU8t188uy0Vx7rTo3TI2sYjl+oh2ud8SX/F5mMg68I OB4St3I/ZV8YJ2l4MMR3yGA0cgQERaHJbUgJgpCmF+D+gHYR9zYTwDN37 DRk7GoDU/fHu1APyiF5Xm1+CiS52UlKky1BuMYbxXuCkBnVGqLtFfs6Py r9zCibpURlpTrlnV6E/3qHMa4KnwUWvSsgiq7HMFNT9DUtt+cDnOgvwK8 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10268"; a="313081367" X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="313081367" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 14:14:08 -0800 X-IronPort-AV: E=Sophos;i="5.90,134,1643702400"; d="scan'208";a="639899893" Received: from hthen-mobl2.amr.corp.intel.com (HELO [10.209.48.194]) ([10.209.48.194]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2022 14:14:07 -0800 Message-ID: <5b82c83c-e3bc-9f5d-b164-8553d1894d64@intel.com> Date: Thu, 24 Feb 2022 14:14:02 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: "Kirill A. Shutemov" , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, luto@kernel.org, peterz@infradead.org Cc: sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, knsathya@kernel.org, pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org References: <20220224155630.52734-1-kirill.shutemov@linux.intel.com> <20220224155630.52734-16-kirill.shutemov@linux.intel.com> From: Dave Hansen Subject: Re: [PATCHv4 15/30] x86/boot: Allow to hook up alternative port I/O helpers In-Reply-To: <20220224155630.52734-16-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/24/22 07:56, Kirill A. Shutemov wrote: > Port I/O instructions trigger #VE in the TDX environment. In response to > the exception, kernel emulates these instructions using hypercalls. > > But during early boot, on the decompression stage, it is cumbersome to > deal with #VE. It is cleaner to go to hypercalls directly, bypassing #VE > handling. > > Add a way to hook up alternative port I/O helpers in the boot stub. I'd add one more sentence to that: ... with a new pio_ops structure. For now, set the ops structure to just call the normal I/O operation functions. But, either way: Acked-by: Dave Hansen