Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1693185pxj; Wed, 19 May 2021 11:36:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZpp+IgAPXqvxsTT/8U8kpQIHl2VJWuvl5LVw3yDuFABG/ChGtLOtbqLYsYsJA4P4B9raD X-Received: by 2002:a92:c5aa:: with SMTP id r10mr431297ilt.89.1621449411096; Wed, 19 May 2021 11:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621449411; cv=none; d=google.com; s=arc-20160816; b=JO81OoYvkOPCc9wPy/Qn5YUXTf6mCWQIoglGo/+QKXMoqkY1ZBTHtto3iT0/gM4BLw YRh83cpXX0iHiZMGrIcsTmS21QSPi2vA6OGHvynbvbV+33b6IDiSWvIzbU25Z8ihF5do l2v3Xq7dGyythSKwWWT6sQaClBjoCvgsK5cVUkL4obd+keLug0VZct7gVUD5Kk+q4RFb RXMNvLKr/8iWrqmnH8O/Qw+YTz2iT41EfCgkZRiHFj9Jcd7Toz+h8FIGK/KtKStEwQFP wghSuv0+MetFmWI1W2kxF4CZh03wscvEQjEfgxQtrRtXQ97KEDx9LLnyF9qycaLz2RwP a71w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=OiLoZrDEvGmtJyo5Y+wXPzvqTXmUEcfzxJMGseXT/qE=; b=tpaMxX12AHsy+zwjAYoFj27lw7AZkaGC8hUMt8Shv7b/stPfVxgf0WcnZyF3kBrqYz i/fee5nd9zLW88RhjrKdxq26RGlJw6GP2/mJjPxV+JjL5Y1nFmUhVKttmai5cZPv1JXQ v777uBYd1+vB+y8iuKPP94GxVtJ5FBdVmpfWU2Ur8w/8fHe542HERKy683Lu86L8/kqK rDw0pXeiRjfK7HAN1Hdqh9OvgxbzN63cnQg4JK0M/SB7K3Ty3dOxyANU/hyqr1h5p0Ad 3KEjRxreXXd5eANibEZiy55vhHyA1ckJivCkxNKuJJaFjEnjWTSbDaM8buzhgvDwN/58 wXUQ== 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 w14si417812ilu.141.2021.05.19.11.36.38; Wed, 19 May 2021 11:36:51 -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 S1352324AbhERVGl (ORCPT + 99 others); Tue, 18 May 2021 17:06:41 -0400 Received: from mga06.intel.com ([134.134.136.31]:34921 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240342AbhERVGk (ORCPT ); Tue, 18 May 2021 17:06:40 -0400 IronPort-SDR: K2atSkCMswWLjBTsGtSns9QnpqET8+MFh9o+vjlGcve8f8QUqoi6mfZRFlpqLig1Gta7MvMN7S JrYHd5+WagMQ== X-IronPort-AV: E=McAfee;i="6200,9189,9988"; a="262046929" X-IronPort-AV: E=Sophos;i="5.82,310,1613462400"; d="scan'208";a="262046929" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2021 14:05:21 -0700 IronPort-SDR: kdkQNPVnSxUhXsXwBunT2zS3NZXjEXl9j1tN8HdDYiJlGJM7MNl73uqESiww5XNxso7RSBC3lO lndX7VYR2t1Q== X-IronPort-AV: E=Sophos;i="5.82,310,1613462400"; d="scan'208";a="439635187" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.65.183]) ([10.209.65.183]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2021 14:05:21 -0700 Subject: Re: [RFC v2-fix 1/1] x86/tdx: Handle in-kernel MMIO To: Dave Hansen , Sean Christopherson Cc: Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Dan Williams , Raj Ashok , linux-kernel@vger.kernel.org References: <3e9a26c3-8eee-88f5-f8e2-8a2dd2c028ea@intel.com> <20210518004807.258503-1-sathyanarayanan.kuppuswamy@linux.intel.com> <36cd2665-6d8b-9c0b-eec1-25152dcca2a3@intel.com> <43e583a3-ee2b-52d8-5275-e26a6609c126@linux.intel.com> <8fb0e52c-ed0a-2185-585a-27007c27ed56@linux.intel.com> <8dd9b9c8-0bf5-3ce5-119c-b52f8518e473@intel.com> From: Andi Kleen Message-ID: <26518d17-cc9e-ac0d-aac0-b65dbe22af68@linux.intel.com> Date: Tue, 18 May 2021 14:05:20 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <8dd9b9c8-0bf5-3ce5-119c-b52f8518e473@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I'm not actually trying to propose things. I'm really just trying to > get an idea why the implementation ended up how it did. I actually > entirely respect the position that the KVM code is a monster and > shouldn't get reused. That seems totally reasonable. Mainly because it's relatively simple and straight forward to do it this way, Yes I know, that's a shocking concept, but sometimes it works even in Linux code. > > What isn't reasonable is the lack of documentation of these design > decisions in the changelogs. My goal here is to raise the quality of > the changelogs so that other reviewers and maintainers don't have to ask > these questions when they perform their reviews. > > This is honestly the best way I know to help get this code merged as > soon as possible. If I'm not helping, please let me know. I'm happy to > spend my time elsewhere. I'm sure the commit logs can be improved and I appreciate your feedback. I don't think every commit log needs to be an extended essay meandering all over the possible design space, talking about everything that could have been and wasn't. The way code is normally written is that we don't do an exhaustive search of possible options, but instead we pick a reasonable path and as long as that works and doesn't have too many problems we just stick to it. The commit log reflects that single path chosen, with only rare exceptions to talk about dead alleys. In this case you can even see that multiple independent efforts (AMD and Intel) came mostly to fairly similar implementations, so the path chosen wasn't really that strange or non obvious. Also overall I would appreciate if people would focus more on the code than the commit logs. Commit logs are important, but in the end what really matters is that the code is correct. -Andi