Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp3339244rdb; Thu, 7 Sep 2023 11:31:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbMs7GJw7ms8fTWBjzgwK+IpuPXEBCGBs9bSY1irbuk7qequSVZy5hJ1+Dg0OcrBrzxbts X-Received: by 2002:a17:903:2446:b0:1b8:33d4:77f8 with SMTP id l6-20020a170903244600b001b833d477f8mr421428pls.23.1694111463199; Thu, 07 Sep 2023 11:31:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1694111463; cv=pass; d=google.com; s=arc-20160816; b=nVobJCcOTANznrU0fLvNigdVsRanzsT0+awRnk0/UNHqGXPU8EQfAeCQKjKIYcz1Z2 ukhRyiwHqp72QBVg/ZrTIze4LK1iIioBctOhO7ZhQXy6bADwbg3ED08S1ua6zZAq4zte SNXa5BJfe/gV1AJeuHS/S4o4ahQUgBgcOtS18WOgbjjO+VKpEAR8NLTs2TRXftqrP2g1 QgVxaZx9+vp2scDI2YLXG+5v0nlEVepGSVu5MYp/HKAFlRg5OGXHUo9LcSQ7LLs9t6PW PnGJ1TPkXDV3EVG8Z1cz+nduzSxKlwWKQlPli5g3pqieDwOghHerpAizds/52aFCBLl2 9vGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=tSovdzbRAPE3j+pzKCVHVRAQ4AtnQaD0dILMNynw5Zo=; fh=zN5+Ey1l6mghQ3OnOuYGE55Jb9Df4EwJefzBB+PdxX4=; b=TcPNcA8lV8U8vtMzI7QBqvaJx8vAAci3S2mjwuNFAC8EfeuXMB6GyRfmEHkw5zt8o2 epnoWlDRUXd/Ysj/heX+6XtK/pJuRSPSh6bWhOhx60aNr/03C+JoM8bkLPauzknzn3ww 3AiDaVTE6vXvPhVZA6vpaHhmgNL9kneOmOu/6prFCCqhBKAA+OSaNE+WUMXp02MwLepn TUWiLqmu9ghC1A7YshiGXRQI8na8ouY0MNeLsDxvVzCEwPVbRttU9VR7orA5A4HMIDZe 8r1mu0wYGXxdz7dZEfIq9uLEhi35zIMGwMzjW5f7j7WaFjmVKuvAII7ImgcNA1pXYJgP prTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=L1X0tkyU; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kw7-20020a170902f90700b001b9c205a860si105693plb.377.2023.09.07.11.30.27; Thu, 07 Sep 2023 11:31:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@amd.com header.s=selector1 header.b=L1X0tkyU; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235849AbjIGPrk (ORCPT + 99 others); Thu, 7 Sep 2023 11:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344161AbjIGPcg (ORCPT ); Thu, 7 Sep 2023 11:32:36 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20618.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::618]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA82C1739; Thu, 7 Sep 2023 08:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JeAlRWHu/aNukUybtpjXuq+UsdMcRGsewgzChWOQO/nJ6UrEhH1P2xB8JgN+vilKom1X29NKR6WVjRtK89CaWcqkyeFvhA8FQh0Jh+AgMqEKf7WbGXfVTFfAFeBYhWimCb507e5z1QbJjmljW/oZTy+h1GYugUKGL/K4l+sdTJ5vW87VjjRh6oyYG0z46UYmmbWiKNQ4kPTvQaZ3IzjPY+lOpRw7DO6FrvlcXfHZX2ZJihru/Y0qC8DmY3KhbmyO6DxojJmlLvhFi7fn8dStjn/EY+lhDX5/svG/4iMRTKUbhu3T6czgA1+OaChMei/4XASO1dP/i0VwWcegprHhWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tSovdzbRAPE3j+pzKCVHVRAQ4AtnQaD0dILMNynw5Zo=; b=XR12v8kFA4S2p9nNKMh+rDPg/IC3cJiL8qnEfSyJwOViSV5p55AkmPYlrK2kmcu5wsu5bFnk2XxMr6jtiD/wymP2bv2TdjLlJ1fYm6WYlrQniGUvOgUmBrHLmGeG55RV+1Th+mQ+Zbkpa3SbasGF/ghDUifARBwFo2gsjJzpAywqtp7H8e/p5edg3ssr0Pp9Vj28doDFvBs9YM2Nft+23aENSs7/i+7TzAYB2/5XqaA+olhK05fqYy3/H9WThMveZKbGG66fcHVxr5jaivUW06QUvWpNCSznB3xDmEdXibvW9GwSjkzM78hMSmX8n7pvAWRfPbmt4fMumsL0d2fflA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tSovdzbRAPE3j+pzKCVHVRAQ4AtnQaD0dILMNynw5Zo=; b=L1X0tkyUhBNI0O+TgwGlL4DypjlqA30bgW10liVC6w4Teo+mz7QTAEA6TK1n8QWGQDp9EBh3aM1rSBQQpZTxplUYfcwA/rn45y5+Qt7IaOufkCP8xQ+zoYhwSmBX4//qNO8t12LxgKjGdnyOBnDc969qYDHkWDShnrn6cNpaTTM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM8PR12MB5445.namprd12.prod.outlook.com (2603:10b6:8:24::7) by PH7PR12MB5656.namprd12.prod.outlook.com (2603:10b6:510:13b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 10:31:55 +0000 Received: from DM8PR12MB5445.namprd12.prod.outlook.com ([fe80::12ec:a62b:b286:d309]) by DM8PR12MB5445.namprd12.prod.outlook.com ([fe80::12ec:a62b:b286:d309%7]) with mapi id 15.20.6768.029; Thu, 7 Sep 2023 10:31:55 +0000 Message-ID: <657e86cb-76b2-ab2b-5ce3-f53ec4341f08@amd.com> Date: Thu, 7 Sep 2023 17:31:35 +0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH RFC v9 47/51] iommu/amd: Add IOMMU_SNP_SHUTDOWN support Content-Language: en-US To: Michael Roth , kvm@vger.kernel.org Cc: linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, jroedel@suse.de, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.com, jmattson@google.com, luto@kernel.org, dave.hansen@linux.intel.com, slp@redhat.com, pgonda@google.com, peterz@infradead.org, srinivas.pandruvada@linux.intel.com, rientjes@google.com, dovmurik@linux.ibm.com, tobin@ibm.com, bp@alien8.de, vbabka@suse.cz, kirill@shutemov.name, ak@linux.intel.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com, alpergun@google.com, dgilbert@redhat.com, jarkko@kernel.org, ashish.kalra@amd.com, nikunj.dadhania@amd.com, liam.merwick@oracle.com, zhi.a.wang@intel.com References: <20230612042559.375660-1-michael.roth@amd.com> <20230612042559.375660-48-michael.roth@amd.com> From: "Suthikulpanit, Suravee" In-Reply-To: <20230612042559.375660-48-michael.roth@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2PR03CA0090.apcprd03.prod.outlook.com (2603:1096:4:7c::18) To DM8PR12MB5445.namprd12.prod.outlook.com (2603:10b6:8:24::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR12MB5445:EE_|PH7PR12MB5656:EE_ X-MS-Office365-Filtering-Correlation-Id: 508a5eb1-dd64-4fb6-475b-08dbaf8da7e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hDPly98E4WIV0WGEJM9NIWFNObX+Aday+l8qUZ5nqHmBBi+rFi+l6FwFkl7lBz4CeeA7y44LhO/p/BXIfgNlKEGer0/s2MzTqwnNMVzmg1wWF2hiuVnMUembldszX2hepvtvpX04By+q40/wCq8q1wQeivBis3zGxB9lo0qbUxWuTqla1XdK3m7DaWsv7zQ0cChhbsHW9aSQQozQohrYll5PZYtL8HQKmWmVyhba/hS5lZqBb5UJzaJWjKok/f83sdONQC1w6KQLJIHI2+xVG6yPFIPzusAfWosF1S00CL6AeT5A3XoQCblg3C5x78s+V0VtxyzIUu7VyNZhkIM/8fqrlFi20leQnfDF8uYHy+3ggGGjob88seT11o/S7OWQtkObRYHWaEpmejXluzZW7ci5qrUDsAJjSryJUV7dnlIwM81MpePdWQgoJr1crgLjOgImoj0vRDWekCl+iAFzJVWQ77LFRvnw1aPSZEcU8G7EppssjMWICAUEZosW/UTTFvX4xTB6Ba6Cj7EasU1X4Bk7/R3lBBH6wNVkvKJE3zBWvx6eOvwDb/YTn7iEm1IIs52kx81p37DkhsQWvu2Bw/jJGSuj2kO1HA3PvayU7wVhwy1giM/CuZZbbrX9kKb7K1uE6gmQGsesWyR5o1VB+w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR12MB5445.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(376002)(396003)(346002)(366004)(186009)(451199024)(1800799009)(38100700002)(53546011)(6666004)(6506007)(6486002)(26005)(6512007)(478600001)(2616005)(966005)(4744005)(2906002)(7406005)(7416002)(41300700001)(66476007)(8676002)(66946007)(5660300002)(66556008)(4326008)(316002)(8936002)(36756003)(86362001)(31696002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RHczNjRmMSs3TjBUSTJhemdiYk1oWlV0cXIrSktaalBOM1pZaDN2QTBkL0Iw?= =?utf-8?B?YUI0RVRkelRwQlF6M3lQMmJ0ZE9iSFdWaFZBRXIzdkxLK1c4WVdFYWdpd0Z1?= =?utf-8?B?ZUdlVnRMa3AxaXlaajlNak9NbFNIYXdNa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d0pYZWxGbXBLK3BMMGpDcE5zYUttMkc2NG1vRWV0RnpEQlJBMlJGWmpGMm1l?= =?utf-8?B?WlVESnNMazdXNjZmQmdWb3ozQ3JSMEdESnU3VGhjV0dMS0J6WHkwenN6Tm5T?= =?utf-8?B?ZjEyWnYyNjlRL0VabExLdXJ1dlhHeXFqTTNPMk05TkQwVWpoL2VFOUc3RWFJ?= =?utf-8?Q?YUD4Jjlb1dm5tlYSrCicdNTUP?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 508a5eb1-dd64-4fb6-475b-08dbaf8da7e7 X-MS-Exchange-CrossTenant-AuthSource: DM8PR12MB5445.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 10:31:54.9018 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xOuG9z9ULsZspiOYXAzpHc+AkcZfGsspVUns/TQ2mR63sXUYi5f/EXC7OcXF7hPc/ZS3yWa4yuPhq8IshMmZ+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5656 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_NONE 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-crypto@vger.kernel.org Mike / Ashish FYI, you might need to start including the change from this patch https://lore.kernel.org/linux-iommu/ZPiAUx9Qysw0AKNq@ziepe.ca/T/ in this series since Christoph would like to remove the code from the current upstream, and re-introduce the change within this series instead. Regards, Suravee On 6/12/2023 11:25 AM, Michael Roth wrote: > From: Ashish Kalra > > Add a new IOMMU API interface amd_iommu_snp_disable() to transition > IOMMU pages to Hypervisor state from Reclaim state after SNP_SHUTDOWN_EX > command. Invoke this API from the CCP driver after SNP_SHUTDOWN_EX > command. > > Signed-off-by: Ashish Kalra > Signed-off-by: Michael Roth