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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E6DAC433EF for ; Thu, 24 Feb 2022 22:14:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235367AbiBXWOm (ORCPT ); Thu, 24 Feb 2022 17:14:42 -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 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