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 195CFC77B60 for ; Fri, 31 Mar 2023 06:59:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbjCaG73 (ORCPT ); Fri, 31 Mar 2023 02:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjCaG70 (ORCPT ); Fri, 31 Mar 2023 02:59:26 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E296EA5C8; Thu, 30 Mar 2023 23:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680245965; x=1711781965; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=B14wSSeuy/BQ80OZrpBUeZ0EHeHcF77aIQAwlArz8sg=; b=Q+N6kksvXhC3yMVIJ3i+4Z02vXGEux/8CWZri2F5zCJzk+yCK+kP7o8B fvGIY1UEuG3j3VatB+hds8gZ/cSDg0h1gmCmgib6YQ/YeuRJoFGsMrqR1 Ym44Ibj0JYeCPTdMREL8t1KtUo69jQrjeUWqehdm7gvDtv+SIvfkzg/GQ WMUmHgwZaDF3MG0D2AeCRzlsZsRASy3W2+b1G2egK2n0XVqIzLyqevpE6 KJzWG37Sso44HnO5TwQVPzMjaXzVgBYIHIQ98gt34zRVKfHEQDPe9pC/H 25lw2E/5aG7nm9Jw8ghNfJ1EZzqW4XaqxYlyLMF/Oe+3OLIflr4CEScre w==; X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="321031999" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="321031999" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 23:59:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10665"; a="754308888" X-IronPort-AV: E=Sophos;i="5.98,307,1673942400"; d="scan'208";a="754308888" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.249.173.97]) ([10.249.173.97]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 23:59:21 -0700 Message-ID: Date: Fri, 31 Mar 2023 14:59:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.9.1 Subject: Re: [PATCH v13 016/113] KVM: TDX: x86: Add ioctl to get TDX systemwide parameters Content-Language: en-US To: Zhi Wang , isaku.yamahata@intel.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , David Matlack , Kai Huang , Sean Christopherson References: <20230325104306.00004585@gmail.com> From: Xiaoyao Li In-Reply-To: <20230325104306.00004585@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/25/2023 4:43 PM, Zhi Wang wrote: > On Sun, 12 Mar 2023 10:55:40 -0700 > isaku.yamahata@intel.com wrote: > > Does this have to be a new generic ioctl with a dedicated new x86_ops? SNP > does not use it at all and all the system-scoped ioctl of SNP going through > the CCP driver. So getting system-scope information of TDX/SNP will end up > differently. > > Any thought, Sean? Moving getting SNP system-wide information to > KVM dev ioctl seems not ideal and TDX does not have a dedicated driver like > CCP. Maybe make this ioctl TDX-specific? KVM_TDX_DEV_OP? What's the real different of it? For me, it's just renaming KVM_MEMORY_ENCRYPT_OP to KVM_TDX_DEV_OP and maybe add some error message if the IOCTL is issued for AMD plaform.