Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp640901rwn; Thu, 15 Sep 2022 04:29:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR4B4tXlOqw//EZ8FmQlQGmSp5Ca35x5zqrIvsoC0tQ5T3sOhaYMrZmdZ9paApe4VdJlpAAG X-Received: by 2002:a17:907:2722:b0:77e:d84d:9e09 with SMTP id d2-20020a170907272200b0077ed84d9e09mr12067825ejl.679.1663241354458; Thu, 15 Sep 2022 04:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663241354; cv=none; d=google.com; s=arc-20160816; b=aUBVQzILhzUYWbIax3nmhemc5mOaa64BVm55vClkwneEF3paF+129Ekt28As4dXp/k k2ouMMd5T4oDxFiOgRhCcTPe3rNkj98/8btTQ2trwrkmbiW95qsgJ1+YjN2ip/s/RuLl V2aVO2eA5wjE7nP/0/G7y4ZBeZq2BK5zvONOZk2OGrr+imqt8si9T/nypnizY9x1qlNq w2k94KrTEsS2p2RWGEyCmKCBaBkHnWkiBYeh4sNKzVGMHCA3E093bHdi754J+soTaGGQ mNUZm9HGKNSetrMUjVhnEMmIhZQLYpxq+F4qDOBxhTW4n0b4f7CAEZF6AfWn9r7rP+ea lhkQ== 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=hyN/xNewJeCEE92PusIuf8C0eQXYxPRpiPdyWAJW8vw=; b=BlefrrwogsGYfOnRVvtuLERYDm1ToqXmJAOV+Y39OoSXjeX+Yjfxq9N7qSSzNKb3Q0 +/9M6f2UUxhCmEKRs+uyo3r6Co6m3Vd6vZERdPH09zG8IcgkspZuBpiTt+dmUa+8iwAm 7gn2av9p3fm03Q/Zxxcf4ACEfIm55yNonszioeo0pEvsMw3z1XdHybolioDYABoWpTTp eWt8dfoSJKKRudOdfbfHrhtDZrE2hXD/37veBvRAU8ewHQ0sX+8h3wEdX4aNVTQqKkQ4 652tjAvoTc/Nfdw1BPjntFqXaNMvv+WGymLJF5iaqOP6hwq+XKy8Yhn4jYnq75PW8jy6 IpwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zMGEuCDW; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds14-20020a170907724e00b0078012fb3c91si6967993ejc.192.2022.09.15.04.28.48; Thu, 15 Sep 2022 04:29:14 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=zMGEuCDW; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbiIOLGp (ORCPT + 99 others); Thu, 15 Sep 2022 07:06:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbiIOLGm (ORCPT ); Thu, 15 Sep 2022 07:06:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A5BB9A987; Thu, 15 Sep 2022 04:06:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 31DFBB81F8A; Thu, 15 Sep 2022 11:06:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D067C433C1; Thu, 15 Sep 2022 11:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663239998; bh=ZIFotHUugfjczGXzVpaayucTOv/a8Z+G34K/xXDTAxA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zMGEuCDWqMWpwwGn/0OvjUA/wc12taaOSDPSbhsLTs2klmo2Q7L7IzqXUkqLu9N4P 5F4jIH3KN2MwxqQJ99bM2/ZquSVS2vWmzojAPWslqH/l/YLNRW/FaKIWyu+xTflPSp V6p86CUP7ntzOof2wbiEYRosPdLvsQelJbUqwlJQ= Date: Thu, 15 Sep 2022 13:07:05 +0200 From: Greg Kroah-Hartman To: Sathyanarayanan Kuppuswamy Cc: Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan , "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , Kai Huang , Wander Lairson Costa , Isaku Yamahata , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v13 1/3] x86/tdx: Add TDX Guest attestation interface driver Message-ID: References: <20220909192708.1113126-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220909192708.1113126-2-sathyanarayanan.kuppuswamy@linux.intel.com> <7c3cc265-869b-b2fc-43f2-d2cbd0bc142c@intel.com> <1182ef92-cae3-b7c1-8339-8e8bfa48f2e3@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Wed, Sep 14, 2022 at 05:30:45PM -0700, Sathyanarayanan Kuppuswamy wrote: > I have also included info about why we don't use a separate config > option for it. > > The code for the SEV equivalent of this TDX attestation functionality > can be found in drivers/virt/coco/sev-guest/. It is implemented as a > platform module driver, and it can be enabled using the CONFIG_SEV_GUEST > config option. However, in the case of TDX, it is implemented as a > built-in driver in the arch/x86/coco/tdx/tdx.c because of the following > reasons: > > 1. Attestation is expected to be needed by all distributions that support > TDX. Therefore, using a separate configuration option is not necessary. > With TDX support, it can be enabled by default, and a built-in driver > model will work better in this use case. No, that's not valid. Distros want to enable everything, but only load stuff that is only present. You don't allow this for this code, which isn't ok. > 2. Since it is not a conventional device driver and the code is very simple, > creating an individual driver for it may be an overkill. "simple" is not the issue, again, this should be a "normal" driver that autoloads when the hardware is present and not load when the hardware is not present. This is not "special" to avoid the normal functionality of all other drivers. So again, no, this is not ok, fix this properly, don't be lazy. thanks, greg k-h