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 A58C1C61DA3 for ; Fri, 24 Feb 2023 12:38:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbjBXMiV (ORCPT ); Fri, 24 Feb 2023 07:38:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbjBXMiU (ORCPT ); Fri, 24 Feb 2023 07:38:20 -0500 Received: from smtp-fw-6002.amazon.com (smtp-fw-6002.amazon.com [52.95.49.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D52971588E; Fri, 24 Feb 2023 04:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1677242297; x=1708778297; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=D/FBueQOSeZs/t1qYgq9kYXAa0p8/ZhQl/Zmd0tLZC0=; b=NtYuGn9XeowvyG+kr6alFCY1+VkI568xB6w7V5VZoIFhoPf/Ln9m0vLO 07NGZb1Le8eY5dgRzMTp/6t0bVlv+eYKN237HTbVaFFiKp78TBadAW34L im2LM71eFADnvuVJAJYDIBnBMFTx3Qj58+5g27fx6vXf++fY47LP7O4+d c=; X-IronPort-AV: E=Sophos;i="5.97,324,1669075200"; d="scan'208";a="300736811" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-m6i4x-44b6fc51.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-6002.iad6.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Feb 2023 12:38:11 +0000 Received: from EX13MTAUWC001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-m6i4x-44b6fc51.us-west-2.amazon.com (Postfix) with ESMTPS id 55BC2A2AB0; Fri, 24 Feb 2023 12:37:59 +0000 (UTC) Received: from EX19D020UWC004.ant.amazon.com (10.13.138.149) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1497.45; Fri, 24 Feb 2023 12:37:58 +0000 Received: from [0.0.0.0] (10.253.83.51) by EX19D020UWC004.ant.amazon.com (10.13.138.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.24; Fri, 24 Feb 2023 12:37:51 +0000 Message-ID: <09696af0-b72d-29e7-862b-22ae4a630299@amazon.com> Date: Fri, 24 Feb 2023 13:37:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH RFC v8 47/56] KVM: SVM: Support SEV-SNP AP Creation NAE event Content-Language: en-US To: Michael Roth , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Brijesh Singh References: <20230220183847.59159-1-michael.roth@amd.com> <20230220183847.59159-48-michael.roth@amd.com> From: Alexander Graf In-Reply-To: <20230220183847.59159-48-michael.roth@amd.com> X-Originating-IP: [10.253.83.51] X-ClientProxiedBy: EX19D041UWA004.ant.amazon.com (10.13.139.9) To EX19D020UWC004.ant.amazon.com (10.13.138.149) Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Ck9uIDIwLjAyLjIzIDE5OjM4LCBNaWNoYWVsIFJvdGggd3JvdGU6Cj4gRnJvbTogVG9tIExlbmRh Y2t5IDx0aG9tYXMubGVuZGFja3lAY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mICghcGFnZV9hZGRyZXNzX3ZhbGlkKHZjcHUsIHN2bS0+dm1jYi0+Y29udHJvbC5leGl0 X2luZm9fMikpIHsKPiArICAgICAgICAgICAgICAgICAgICAgICB2Y3B1X3VuaW1wbCh2Y3B1LCAi dm1nZXhpdDogaW52YWxpZCBBUCBWTVNBIGFkZHJlc3MgWyUjbGx4XSBmcm9tIGd1ZXN0XG4iLAo+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN2bS0+dm1jYi0+Y29udHJvbC5l eGl0X2luZm9fMik7Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0gLUVJTlZBTDsKPiAr ICAgICAgICAgICAgICAgICAgICAgICBnb3RvIG91dDsKPiArICAgICAgICAgICAgICAgfQo+ICsK PiArICAgICAgICAgICAgICAgLyoKPiArICAgICAgICAgICAgICAgICogTWFsaWNpb3VzIGd1ZXN0 IGNhbiBSTVBBREpVU1QgYSBsYXJnZSBwYWdlIGludG8gVk1TQSB3aGljaAo+ICsgICAgICAgICAg ICAgICAgKiB3aWxsIGhpdCB0aGUgU05QIGVycmF0dW0gd2hlcmUgdGhlIENQVSB3aWxsIGluY29y cmVjdGx5IHNpZ25hbAo+ICsgICAgICAgICAgICAgICAgKiBhbiBSTVAgdmlvbGF0aW9uICNQRiBp ZiBhIGh1Z2VwYWdlIGNvbGxpZGVzIHdpdGggdGhlIFJNUCBlbnRyeQo+ICsgICAgICAgICAgICAg ICAgKiBvZiBWTVNBIHBhZ2UsIHJlamVjdCB0aGUgQVAgQ1JFQVRFIHJlcXVlc3QgaWYgVk1TQSBh ZGRyZXNzIGZyb20KPiArICAgICAgICAgICAgICAgICogZ3Vlc3QgaXMgMk0gYWxpZ25lZC4KCgpU aGlzIHdpbGwgYnJlYWsgZ2VudWluZSBjdXJyZW50IExpbnV4IGtlcm5lbHMgdGhhdCBqdXN0IGhh cHBlbiB0byAKYWxsb2NhdGUgYSBndWVzdCBwYWdlLCBubz8gSW4gZmFjd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