Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2131290rwb; Thu, 15 Dec 2022 20:22:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf54J5gdpZlKA0+mZFwfiBCjs9dKa7Iwh1T+SuWTEhEO5kq0XNKLelw4hFwW0ytWOO8PX+0u X-Received: by 2002:a05:6a20:4919:b0:af:6f28:7c42 with SMTP id ft25-20020a056a20491900b000af6f287c42mr9842894pzb.62.1671164521296; Thu, 15 Dec 2022 20:22:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671164521; cv=none; d=google.com; s=arc-20160816; b=jZEpOMpojW9RplK63qxwuXU+i2noKTcOPo7yE8jUrtlJuwc3GNcHQB55DKQeq2pIC4 U07mN2vO0PWtN3hiQ6CIE67rG7P+c8gafHcZtPJMz2TN6FSfa8LuQEJRlra0M0XEp/1X X0HK6Ft959Z6mrSQkVL21fVi9slJ7AYm0MwFfJKnFED0U9qAUJf9nH7tJVCDnIn3F4J1 155prh3VEQbrFxa0Em0tutdlI0yjT6VVooJQ+lBVROrqMSe+4lYxlHABGE6joCvg8lAa +XmZ+wC07yJfPq1wFVPCaoxD+cOC+sdjqW48usUwd6uByDLpSv2bW5B3phMQgZdAIbtm XeUw== 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=uaxgo5LlIOi0S9JhLYqDMZ4gD6Tc+L6skMURu3UvP5M=; b=J1IjESqjmg3TJCzNODcGe5yNkH+d+1503aNvcZ9Y40hcpVbwax2rg9r+2bsGnpwYz8 HUj1q69jNbX+SJqmC3R1lC3OX78hDfx/813GPvb3fzOZ1Ad1Nqf5gq4UxNNTjJ7PO9lw WzAfw8kqadtEBi4bJnmge56BfAcwyo4Korw5zEbrnVb0YjykhAIdpCp1wicx+vNsUPpy X97VlfTMRVToA0xHOwLCA1BMCP4/vmHr/QYZuECK5VnlQaHfW3lrZSYGrxQsYnBCOUZY T4DMkzTjYVMmrdJyqaxUzpUCBevIQXCWsCwu1uH6SBevMFVVPoZ/glrPII2rLmhj57q7 io7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="VhKJWMt/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f25-20020a631019000000b0046f4696a544si1489423pgl.128.2022.12.15.20.21.51; Thu, 15 Dec 2022 20:22:01 -0800 (PST) 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=@gmail.com header.s=20210112 header.b="VhKJWMt/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230099AbiLPD62 (ORCPT + 68 others); Thu, 15 Dec 2022 22:58:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiLPD6Z (ORCPT ); Thu, 15 Dec 2022 22:58:25 -0500 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41A594AF19; Thu, 15 Dec 2022 19:58:25 -0800 (PST) Received: by mail-pj1-x102f.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so1161664pjj.4; Thu, 15 Dec 2022 19:58:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uaxgo5LlIOi0S9JhLYqDMZ4gD6Tc+L6skMURu3UvP5M=; b=VhKJWMt/vBbVHTOsROGaTOiEgWFUEkhaYjOnufZYir75TQ1WusnkY8EayMfHzsOIHM MI9f1yV5IvtPNbGxgpeL5G25+BhhGZcoSOQAw7tCQznHWT46Zbr6aa/fAgpnB6q6WVlH tnKzteOV0o9ac11RfS0XPTIqRXrin9XIvWWYXDomMjAW4Yt7VwaXR7QR0udOPfD84rlY b8ebobqKHhSF5c217HYTCAu5MxYLNT17uD7PPPUcBCLttBp5nYoxvcxtjlZyfL5edYNF DTZVP8IfOyc8kjqWLYwipHwKAOFFk23xcVwcrX1/80ktMo8/n5/vfoD1hABfFATe3u+s h1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uaxgo5LlIOi0S9JhLYqDMZ4gD6Tc+L6skMURu3UvP5M=; b=Aqm+f7BELEuCYcczv17DZs5Uze4/4mEZyWJq3kYNnUkTwS/MkjTmoijOik4y1/LqfD zYyuCkkrJbA8pZt1Lx/uNrpoyk4a+nisEbVsUKv/AuxEXNHDH02KP9hQ1+x31vwh9sOc /qeURm+ulJhk+i1u0+JieY0EVuQvYANzmfptrEsQINmKRXtIdf+UGgoLKZExdNtVT/Wh Nlcu9v9+RLngw7YGRkD0HUhJrTELCiUCGuj0N1IPpM0fnP/JgUSY9mVkC0MxZ8AsTVQA fULqFdijUFSwAf9oV+Ifyb6pc8F0tHsI9SaxIo3OU4U7U3lGRSIeuexfyv8SpPhVFfw7 81Dw== X-Gm-Message-State: ANoB5plhc+HKx+KUu5KQg9PU5jeNHRv33Tt2kbFczsZot6JtzoRmUcjg yVM6LbComgKVYuz2FNeJXpVDZYRtkeA= X-Received: by 2002:a17:902:e811:b0:189:d8fb:152d with SMTP id u17-20020a170902e81100b00189d8fb152dmr44450718plg.25.1671163104670; Thu, 15 Dec 2022 19:58:24 -0800 (PST) Received: from localhost ([192.55.54.55]) by smtp.gmail.com with ESMTPSA id v17-20020a63d551000000b00477bdc1d5d5sm499680pgi.6.2022.12.15.19.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 19:58:24 -0800 (PST) Date: Thu, 15 Dec 2022 19:58:23 -0800 From: Isaku Yamahata To: Binbin Wu Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , David Matlack Subject: Re: [PATCH v10 106/108] Documentation/virt/kvm: Document on Trust Domain Extensions(TDX) Message-ID: <20221216035823.GE527635@ls.amr.corp.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Fri, Nov 25, 2022 at 11:49:08AM +0800, Binbin Wu wrote: > > +New KVM API, ioctl (sub)command, to manage TD VMs > > +------------------------------------------------- > > +Additional KVM API > API -> APIs > > are needed to control TD VMs. The operations on TD > > +VMs are specific to TDX. > > + > > +- Piggyback and repurpose KVM_MEMORY_ENCRYPT_OP > > + > > + Although not all operation isn't memory encryption, > > How to understand it? > > > > repupose to get How about the followings? New KVM API, ioctl (sub)command, to manage TD VMs ------------------------------------------------- Additional KVM APIs are needed to control TD VMs. The operations on TD VMs are specific to TDX. - Piggyback and repurpose KVM_MEMORY_ENCRYPT_OP Although operations for TD VMs aren't necessarily related to memory encryption, define sub operations of KVM_MEMORY_ENCRYPT_OP for TDX specific ioctls. Pros: - No major change in common x86 KVM code. - Follows the SEV case. Cons: - The sub operations of KVM_MEMORY_ENCRYPT_OP aren't necessarily memory encryption, but operations on TD VMs. -- Isaku Yamahata