From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BE6543B6C9 for ; Wed, 23 Sep 2026 07:59:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790150387; cv=none; b=ijzQ9nE2mZrjB0eJlXwV0aMJ2vD83c3p9jBYZ/xgshr/CpIB8wHzPnmdMmrzBaU0ihilhaclipiKwkLYaalJvBCnSuRGkVyNZD6TZTPQMJlc+RCX+w8V36Ck55JbpCnhiDz3X6ffyFG9eoHAOogE1Cx5PUEznYqtbx0+rkf2f88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790150387; c=relaxed/simple; bh=8rw3+c4kPtR72QWHxMWMRr1gNJlZjyztVlhL0rhpLDA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fs+OXcEZ0AUaSSXBWONB7oodvLcp0mvLnnwqZ+2yxRj6nC9cqmH6WjBwnugr2LtRSiQBMgrJmJOsKxZw/b1PKmS/9QJ846I8LpKC6+42o/AqRg9ZxM/1LxH0il9J1S2kCQXyGuMP76AIjRyUqkBi7vQL+2Lf+anmGgVD1jDVYfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jB+jW6Dg; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jB+jW6Dg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1790150383; x=1821686383; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=8rw3+c4kPtR72QWHxMWMRr1gNJlZjyztVlhL0rhpLDA=; b=jB+jW6DgRaI63nCptDX/V2S/l7tsALnYJHx66DVmKUQtZvVyqvIONF8d 49vmPZE+AkPAJFl+DS6/25sDqJKi1/aKrbIE9AFZp/B7gcUlxckz6XGAY f/l3KH7lxwiMWb+tdqBRBi46c+vmEFqfv1yXSOUPR0yGmAIV5t4WK6y7A QN1zvIgO0wW0WSy8YKuxSqyVThr2XODmg7D7/Jh3jzkgt2JNSgXeb4JJ/ H/nGtdQ6cVt1Bhllp2UUNTYF/ZvC7/wa8Zgl+cVkIUykTKoy3XpAoUdfK HUQ6mVo6b7b6eXbRLMXp/rlZR5/yc/3pqBH2G8UavOB/iTVdgfRUE37hH A==; X-CSE-ConnectionGUID: qIyjCkjeQNay2Me93URXGA== X-CSE-MsgGUID: +vPGbletRD6lKRDMGbIwNQ== X-IronPort-AV: E=McAfee;i="6800,10657,11913"; a="94639991" X-IronPort-AV: E=Sophos;i="6.27,118,1787036400"; d="scan'208";a="94639991" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2026 00:59:31 -0700 X-CSE-ConnectionGUID: Po7jkFkVSc2JkQTQNtzy6A== X-CSE-MsgGUID: Ahay1OAaSNGIRt0bt+dd4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,118,1787036400"; d="scan'208";a="270023355" Received: from bradocaj-mobl.ger.corp.intel.com (HELO localhost) ([10.245.246.235]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2026 00:59:25 -0700 Date: Wed, 23 Sep 2026 10:59:22 +0300 From: Tony Lindgren To: Xu Yilun Cc: x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, kas@kernel.org, rick.p.edgecombe@intel.com, yilun.xu@intel.com, xiaoyao.li@intel.com, sohil.mehta@intel.com, adrian.hunter@intel.com, kishen.maloor@intel.com, peter.fang@intel.com, baolu.lu@linux.intel.com, zhenzhong.duan@intel.com, chao.gao@intel.com, artem.bityutskiy@linux.intel.com, kvm@vger.kernel.org, nik.borisov@suse.com Subject: Re: [PATCH v2 2/5] x86/virt/tdx: Configure add-on features on TDX module init Message-ID: References: <20260915102658.713079-1-yilun.xu@linux.intel.com> <20260915102658.713079-3-yilun.xu@linux.intel.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Sep 23, 2026 at 03:30:55PM +0800, Xu Yilun wrote: > On Tue, Sep 22, 2026 at 10:13:56AM +0300, Tony Lindgren wrote: > > On Tue, Sep 15, 2026 at 06:26:55PM +0800, Xu Yilun wrote: > > > --- a/arch/x86/virt/vmx/tdx/tdx.c > > > +++ b/arch/x86/virt/vmx/tdx/tdx.c > > > @@ -998,6 +998,15 @@ static __init int construct_tdmrs(struct list_head *tmb_list, > > > return ret; > > > } > > > > > > +/* List all kernel supported add-on features0 bits here */ > > > +#define TDX_KERNEL_SUPPORTED_ADDON_FEATURES0 (0) > > > + > > > +static __init u64 get_tdx_addon_features0(void) > > > +{ > > > + return tdx_sysinfo.features.tdx_features0 & > > > + TDX_KERNEL_SUPPORTED_ADDON_FEATURES0; > > > +} > > > > How about get_tdx_supported_addon_features() for the above? It makes the > > mm.. I think this would make a bit confusion. "tdx_supported" reads like > the module supported features, which is just .tdx_features0. But here we > want both the module & kernel support. I'm thinking of: > > get_tdx_addon_features0(), just as is > > or > > tdx_get_supported_addon_features0(), maybe this is better? Something to describe it's masked with Linux supported features would be nicest. Maybe something like get_tdx_masked_features0() or just get_tdx_usable_features0()?