From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23146EEB562 for ; Fri, 8 Sep 2023 18:00:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245491AbjIHSAR (ORCPT ); Fri, 8 Sep 2023 14:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245484AbjIHSAQ (ORCPT ); Fri, 8 Sep 2023 14:00:16 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE00F1FCD for ; Fri, 8 Sep 2023 11:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694196011; x=1725732011; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=lJcDDd1iiAVsiZV2Yf1EraA6YBLwWFpJzpmN/FxXRqU=; b=ZxnScoGiz8s/raedoaRDbkoZDPz+edlfX6vjhxpNNJoEPYrCOunWI8Xu qIEXvLKMIbgI4IOmfJZxKl5nYwte2tb5BHSsiBXJo3t66QYOY1UebLFq3 ZcXZFlxzViY8jQA9+0FABcBE1woF7a6A9RetEpSCNA7tXPu/Va3zUoUob pe98Mzy+TUd7u22EiAQpyNgtLwAmniTtQFJZeEwwnvBYDX2fu/wupDIlt CISoScY1i6EcOR+CXFltDe91k1mb6dU8xOw+XtNoJQAxBbR6EL4w7lnf9 QW0zliotl9eDpQYNDddE3GRDmpiOviOY3ME+Ou72LTD8DNbErqyCQuMBs Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="381527330" X-IronPort-AV: E=Sophos;i="6.02,237,1688454000"; d="scan'208";a="381527330" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2023 11:00:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10827"; a="832738267" X-IronPort-AV: E=Sophos;i="6.02,237,1688454000"; d="scan'208";a="832738267" Received: from fgilganx-mobl1.amr.corp.intel.com (HELO [10.209.17.195]) ([10.209.17.195]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2023 11:00:09 -0700 Message-ID: Date: Fri, 8 Sep 2023 11:00:08 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] x86/tdx: Allow extended topology CPUID leafs to be emulated by hypercall Content-Language: en-US To: Sagi Shahar , "Kirill A. Shutemov" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Peter Zijlstra , Jun Nakajima , Isaku Yamahata , Erdem Aktas , Vishal Annapurve Cc: Sean Christopherson , Nikolay Borisov , "Jason A. Donenfeld" , Kuppuswamy Sathyanarayanan , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org References: <20230908175644.2478924-1-sagis@google.com> From: Dave Hansen In-Reply-To: <20230908175644.2478924-1-sagis@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/8/23 10:56, Sagi Shahar wrote: > The current TDX module does not handle extended topology leaves > explicitly and will generate a #VE but the current #VE handler > implementation blindly returns 0 for those CPUID leaves. > > This currently causes TDX guests to see 0 values when querying the numa > topology leading to incorrect numa configurations. > > This patch fixes this behavior by emulating the extended topology leaves > using the CPUID hypercall. ... and thus acquires the data from the untrusted VMM. Right? What are the security implications of consuming this untrusted data?