Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5904470ioo; Wed, 1 Jun 2022 15:34:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwn1nkOKCIRVPO1PFhGOdBRp255SVipl+nM2E4oDfo72IAPVESz2bvKzhmCyLZ2vO8GfojW X-Received: by 2002:a05:6a00:1393:b0:518:68fe:f036 with SMTP id t19-20020a056a00139300b0051868fef036mr62493640pfg.54.1654122841573; Wed, 01 Jun 2022 15:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654122841; cv=none; d=google.com; s=arc-20160816; b=SUPmEp3rCCQ1f6xpVGlbIbzAkawR77qJAyvNRNH2ujcxKEndW9fyD0F76fIbNeFhqV 1KVG/v1dbkEKsPICARSCSs0C8qkyfXVQFpShnMEGhp5krWh/rPahpTaBExpwklOvoVH6 UgxcHpX8AZOVPBnQum6hDMIKFn+NXWjYkZWinA9UvZsy16HKVbkdHuU2MV4GwexuI+fR zy7CRO1b3CoKBt60UV29FUQycAz37w9WADd5Uz7YYKOSqWmEICBF1n/3aCnrFRrfLBIr h9CPiAiE/p2WJiQvSQfzYYxaMrWrbkMpU07aoLI+UHkVloD+u6/3AxOZQFpSkwWIOGB6 C7IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=bLlB/SgwgDJTXHbjrHgi8fnrMeFWy1M924PPjkRXOlw=; b=EJAPkxyluvjZM0Vw+Pqs5vCbKMBgnGvlnYwOvG8Pg10T4zaEnyUt2zc42R0bk78R5i KxdjAXcyysXowpT6lahD98yV+VsJDmh4OozwESaGYgHfti9ttI+BgCVXrDfsQ9aTui7T jYyDoAOy4HOJwXoo8oLrgyjnuVlEB/JGzFt/kdIlxicJZJTHc7IUbN8ZCK7OkEA++Q8R LSCscKp/IXkNPNByfBrp3g3lQ34B2a1FzePivzimh0SLk21kOpa/6BlPP2F0faf1A1ke LWS3fmgbVtvdPWDFyjGzKM+zWhc7/AmSONa+lngMF224RG8eRq8wGpagiUvUsjQzoKAy stnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mia3V9Ns; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nn14-20020a17090b38ce00b001e077425476si8758647pjb.134.2022.06.01.15.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 15:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mia3V9Ns; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 0A1FF1C7; Wed, 1 Jun 2022 15:11:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232214AbiFAWLT (ORCPT + 99 others); Wed, 1 Jun 2022 18:11:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232208AbiFAWLQ (ORCPT ); Wed, 1 Jun 2022 18:11:16 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71D77D124; Wed, 1 Jun 2022 15:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654121473; x=1685657473; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=es6Cwl8W59Z9iWQR9a2wl0JY6YwBArtWx7MYgzVvdZM=; b=mia3V9Ns0r5685/99jbcdRsx2tQSIvdEIJJu/dUD+dEnZMbrsxTS6o4U mmBZ7bjGwut0o/NzJJUlDkmOVz6SF/771ao7vKprDZ+R19WcujSdreQwg tICzyXKEy/lqiiog8jyB7jYCpk8lngnkregABUfhL20myihQuGsXDbO5Q Kn4uEJafGus36hEKKsYViUTBjRAJLsBsW4Y2AzW0dT79GoZAvxX76PGBg pAmFPs0womFodxWHNtU1oLyvA3uwUBgmBXWs/jPejUkETrYWAR+UXxoos gljokKPWzaDezZxJhvEabE972SmaMdMmaQz4s+bOdzq5WoBvPnw1cq2tb Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10365"; a="274547914" X-IronPort-AV: E=Sophos;i="5.91,269,1647327600"; d="scan'208";a="274547914" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 15:11:13 -0700 X-IronPort-AV: E=Sophos;i="5.91,269,1647327600"; d="scan'208";a="904664455" Received: from bandyopa-mobl1.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.4.241]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 15:11:11 -0700 Message-ID: <5ec9be313961b4cb3771180a75a4767998c6fdc0.camel@intel.com> Subject: Re: [RFC PATCH v6 006/104] KVM: TDX: Detect CPU feature on kernel module initialization From: Kai Huang To: Isaku Yamahata , Sagi Shahar Cc: "Yamahata, Isaku" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Erdem Aktas , Sean Christopherson Date: Thu, 02 Jun 2022 10:11:09 +1200 In-Reply-To: <20220526192844.GC3413287@ls.amr.corp.intel.com> References: <20220526192844.GC3413287@ls.amr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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, 2022-05-26 at 12:28 -0700, Isaku Yamahata wrote: > +       if (!platform_has_tdx()) { > +               if (__seamrr_enabled()) > +                       pr_warn("Cannot enable TDX with SEAMRR disabled\n"); > +               else > +                       pr_warn("Cannot enable TDX on TDX disabled platform.\n"); > +               return -ENODEV; > +       } This is really overkill. I cannot tell the difference between "SEAMRR disabled" and "TDX disabled platform". Btw, the v4 has removed __seamrr_enabled(), and there are other changes too. Could you rebase the KVM code to latest v4? https://lore.kernel.org/lkml/cover.1654025430.git.kai.huang@intel.com/ -- Thanks, -Kai