Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1311809pxb; Wed, 2 Feb 2022 01:52:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFSomq9KhmAGiy2XxHBhdwTKRnuOOXREaxvV+HzU/IQQkHUlnR1LoB/1v8/xmP+DtdYyCj X-Received: by 2002:a05:6402:280f:: with SMTP id h15mr29028472ede.113.1643795566380; Wed, 02 Feb 2022 01:52:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643795566; cv=none; d=google.com; s=arc-20160816; b=reAB+X1ACx4rQH2EYnht60lPOMK2ZWDcQqfKwqvv2a+9CIzJq/PchBrmjq16n48+fU rniyjlF8kdsrPM0AECG+BGw1tqzEehAgbLbpYN3M1fL+UOG/tdrG0qWr6ooUIk6Hl5GB gNwvAaFF5jzunyDU3sV9JQmMThV9bTWA+5TjFjTzxuPX5Impd2W3qOUrS/HVIu+YocRa ib41Eutb9+HyXyixVP6JPEnLFCD2Se8AxXovSyzUTZIvZYGPE7nzS5vr1plTKsR1ChEA TjYoYNTHX4LfCdDHeWNUL9Wur14soUqgf9xhdHKkDcQ2hTR4VxxWbneWsyb9OuZq7j8I drrw== 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:dkim-signature; bh=sMD/D31sXs4fBGWeHEfOilbAUNlN6E+BckKU637Cks8=; b=kUSqVaEhI3J3SkCSHhCZHjAnBhUemxMLu0P8HBiO8RX2cVUkuS5BbaMMnHys1kNa1F V4tdKQUyHkI5XhfOJp/l7TfMWH1wBVWRVzj8p2rtgjDRnDq+HP8iuhE4CHpRznJEkuVg 57aRSNIN0QZgDJAPX6z5EaDY2cC6K+4ynNvTMTMMLUKgKxo6BgMewWDnLVttR8HGNeXA 4TNas7grDYqdhBmE8m4L6J9uN2GSX6pQzcIZVppcgioikQYnGGmemQrCblxruHMStiay 4Tufma4cktb8pBxAoplo6D0V/X9ItvIXaiQSuXKYKTD7RrMwUafKRs/8W/53/D/JlCWC EVnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=MkLQo87j; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb16si11198853ejc.473.2022.02.02.01.52.21; Wed, 02 Feb 2022 01:52:46 -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=@alien8.de header.s=dkim header.b=MkLQo87j; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240719AbiBATCX (ORCPT + 99 others); Tue, 1 Feb 2022 14:02:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbiBATCW (ORCPT ); Tue, 1 Feb 2022 14:02:22 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CD97C061714 for ; Tue, 1 Feb 2022 11:02:22 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id B12341EC0453; Tue, 1 Feb 2022 20:02:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1643742136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=sMD/D31sXs4fBGWeHEfOilbAUNlN6E+BckKU637Cks8=; b=MkLQo87j6k+qoMo5XV7fJI1jxPFle1fNlSyXro2g1sNO/bGu8oUCgjQWt8Lz9c0MLke0Ww dv5kNMRdFBcQUAH9qgCmj2KkqOS7IC1ovOUmiddqrb8+Q4O6ex1BWY46NCjzgXgQKr3jE9 9hH8B1yCNUvTkYvRDTwOTEcir6/PwNw= Date: Tue, 1 Feb 2022 20:02:12 +0100 From: Borislav Petkov To: "Kirill A. Shutemov" Cc: tglx@linutronix.de, mingo@redhat.com, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org, 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, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv2 11/29] x86/boot: Allow to hook up alternative port I/O helpers Message-ID: References: <20220124150215.36893-1-kirill.shutemov@linux.intel.com> <20220124150215.36893-12-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220124150215.36893-12-kirill.shutemov@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 06:01:57PM +0300, 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. > All port I/O operations are routed via 'pio_ops'. By default 'pio_ops' > initialized with native port I/O implementations. I see that you like to talk about what a patch is doing in the commit message but there's really no need for it - that's visible from the diff itself, hopefully. So talk about the *why* instead, pls. > This is a preparation patch. The next patch will override 'pio_ops' if > the kernel booted in the TDX environment. That's also not needed. The rest LGTM. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette