Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1659690pxp; Thu, 17 Mar 2022 13:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBRJERJkOMTPnYmxe6dxceVSAppvjfHJHQd4dKg8HnBIRo8qwOhdLshFKGRltXh7/KWHW0 X-Received: by 2002:a17:902:f683:b0:153:ee22:18b7 with SMTP id l3-20020a170902f68300b00153ee2218b7mr4902594plg.159.1647550289623; Thu, 17 Mar 2022 13:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647550289; cv=none; d=google.com; s=arc-20160816; b=AWz1x+R2H7h4+Gw9eGKgmeNEQwpMqJdxuuurDLEo3Y+Ii6mtBx7tlQdzJs4YEouj2d uG4AZxonMdDnaG0usPdBNx73sOqk9CubAd1U5YWooMRxglQVekrQxxBMKYO4qb4Hma7m decWYBNdkLSoCoKT55T4LHvFKNbEQ5Rgzr+OSc6B4XcTrndFmuayU64qs/ppUSeizs5L pQAR9eJ5ctlunYKJLq7Y30P+fy6IOqQSYyykeDqwJotpK8VgcO0n8x1kXiupUmfDo76X KvJFwHBPZC1OW4EyU96VLgUX5l+rR4A871e/XRtPpL3yvFRDjr/mGChCgYh5tKBfS7Lj JdTQ== 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=BnmuLeYftWhpsIXcqV3m1tWFPye2yGPZQ9k46AfOou8=; b=qlOTZsC6X/hoKrUbE1GQzui6Yk/n7M3Me4BUxTRe/WUh3rleHDD5iy/O+XbG7//Ckl zwBqyu4IAU/IrkbATr4DkwfJy0DvIZZgFahdvO8s3FMayPL+6acT8a8RZUrhuIQ41OPA 6DiE1kRtecPbEj1kkSdsAP7zOlh1Ji7jSwsBbb0eUv3+4/PAmr9+jB73zN5yCuJFGt1/ LOOKPj1tHaPHzSkSQk6weN/IKj7Wz2O6/fFN0qDx7PNQ8APy6sMioHrQ3p6Z+K3KPnV0 /qPnCK5nFqNGKoZL5iLNnbCroOBUMn9DfnkipXbtHk9C6WMqB9C92bSkWx18mR5eBmMu n3ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FHUcDv6i; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j10-20020a636e0a000000b003816043efc4si3096018pgc.441.2022.03.17.13.51.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:51:29 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FHUcDv6i; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C35B81817A2; Thu, 17 Mar 2022 13:15:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbiCQUQy (ORCPT + 99 others); Thu, 17 Mar 2022 16:16:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiCQUQw (ORCPT ); Thu, 17 Mar 2022 16:16:52 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6211B18178A for ; Thu, 17 Mar 2022 13:15:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647548135; x=1679084135; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4IEXH+5e8WrDwBBE7fqvs3d479Wemz0Jxmrl5fa4VSk=; b=FHUcDv6iM3f9Nwk2qLlzxKJQv70DW/izgDoIPEW83dpcW7JgrgUdVuup VnFRnvUtOpfYJPT5JlrBrI4FtUetHQGB+QTsU+pBhuDr1roF3dxZlLqcQ ab33yMfbSoCIhQ3qPEKdskXXFgp6hQ3tD+NTPRgDgBqDgFRAf1LOps+/H BBpZDxeUcdI9tgEOKH/2+b/2ss3c6c6oRejpI1A2iaS8JPrQbDi10tBeL ZvTSGe2QER0h8hAyOJJc7r2ULCaP6qOy6ls0ZPiuU4HS3pfUHWUJUmeRL 7U7PhEp/qpSp5wTwI8jDpdizmKreuWvIDwacD1ezN67GS8RVIJNDgraCM A==; X-IronPort-AV: E=McAfee;i="6200,9189,10289"; a="239136817" X-IronPort-AV: E=Sophos;i="5.90,190,1643702400"; d="scan'208";a="239136817" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2022 13:15:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,190,1643702400"; d="scan'208";a="541524573" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 17 Mar 2022 13:15:28 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id C7B55107; Thu, 17 Mar 2022 22:15:47 +0200 (EET) Date: Thu, 17 Mar 2022 23:15:47 +0300 From: "Kirill A. Shutemov" To: Thomas Gleixner Cc: mingo@redhat.com, bp@alien8.de, 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, thomas.lendacky@amd.com, brijesh.singh@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, Dave Hansen Subject: Re: [PATCHv6 16/30] x86/boot: Port I/O: add decompression-time support for TDX Message-ID: <20220317201547.haoyqy2iaid7lku3@black.fi.intel.com> References: <20220316020856.24435-1-kirill.shutemov@linux.intel.com> <20220316020856.24435-17-kirill.shutemov@linux.intel.com> <87a6do22t6.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a6do22t6.ffs@tglx> X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Thu, Mar 17, 2022 at 01:15:01PM +0100, Thomas Gleixner wrote: > On Wed, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote: > > void early_tdx_detect(void) > > { > > u32 eax, sig[3]; > > @@ -23,4 +94,12 @@ void early_tdx_detect(void) > > > > /* Cache TDX guest feature status */ > > tdx_guest_detected = true; > > + > > + /* Use hypercalls instead of I/O instructions */ > > + inb = tdx_inb; > > Eeew. What's wrong with writing this out? > > pio_ops.inb = tdx_inb; > > So it becomes obvious what this is about? This leads to preprocessor hell: "pio_ops.inb" is expanded to "pio_ops.pio_ops.inb" :/ I can rename fields in struct port_io_ops to avoid conflicts, I donno. -- Kirill A. Shutemov