Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp790594rwe; Fri, 26 Aug 2022 14:49:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR58IG2rtrLnyv5b5RR8Qo3a5CU4kSe/Ej80AZwcJNtQs0+vJoY/+o+xOs8hLR9SDJsvwzHB X-Received: by 2002:a17:907:60c7:b0:739:52ba:cbd0 with SMTP id hv7-20020a17090760c700b0073952bacbd0mr6689629ejc.152.1661550560424; Fri, 26 Aug 2022 14:49:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1661550560; cv=pass; d=google.com; s=arc-20160816; b=RLhe/P13PEppVQ+DpswUDgMzjEI4jkSoKA5bxDuF5FIvpHOW8iDYkbJbMIGxtEbj55 glCrlOFytvkc9IHF3+fjRBrF1rPd9Hz/ccWxnvLJi9hwfylZOG2I6wZt6SE+GpQwUmBM RhV/8vq6YhRH3pDVOOUIA3QDa7fgw4hiq5PDwnTFQRLw/IyCuZ9rYC6EcgO+BOA/T7IG 3flAy4Dk4elJLSnXhelP92jaGF35yKZvGGVwDQzeZFTP+R+vYMc3QKdDgOZMqfd9yCwE NAl/izT+SP+x6tVyGKCHC0duUQaajA2+LRx8KX2g4+d8i/LXo1r7dGJUFYNYtSg1ZLyu W/lw== 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=6waJVi4vDNOeV1nN3PT61iMn2lWbupo19V4i1niclw4=; b=cNpEOYPS+5ud3715zk09t2TJ0ZvuSeZ9RykiCBQsTje0IgTJyvrB11z2XkvTJ9aX6v 9gXc9HTZvV3SobJHguacsf+8KSjyOQWJb7QKDV9D0CdK0Xhe6Kv4jEbRyq1zYgCmG0mU yraklGBd2cMvbMYufAs7TsFr1c60Lygt9mGfgnjR6nhh5AB05lS20z6mj+T+aamI0L+m 4T5rYHj79p0SPqRZiso4WrqdOQohXh5DIkBXefxpsjJtEjWNweT6Pj5cvecwLQzxHGZO tT/LKaj4ghEw7uDYeb7vvCCjUN3cl0loddyqpHEixtdBNSMKOiFah+qFJ7oLLd/JJ2P2 vLDQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=s6YMRMfr; 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-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=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 gs35-20020a1709072d2300b0073d83260df4si2359844ejc.672.2022.08.26.14.48.53; Fri, 26 Aug 2022 14:49:20 -0700 (PDT) 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=@amd.com header.s=selector1 header.b=s6YMRMfr; 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-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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237072AbiHZV3X (ORCPT + 99 others); Fri, 26 Aug 2022 17:29:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230416AbiHZV3T (ORCPT ); Fri, 26 Aug 2022 17:29:19 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2077.outbound.protection.outlook.com [40.107.243.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DAB3A7226 for ; Fri, 26 Aug 2022 14:29:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KRe6K+X427otyIvhPTrhnhFSa9W86RKou2KLHrJzfu6CHgne5Xr7sxXVkiWcOnVBaUNAn483Oqk+2o61+hYTQMVQQ3imWykSVUufCNe3hip3+SYLOvRh/xi2kaDNgzu7RwB+l/CvQRXkzuCkjFCDM5NkjCbJi01C9sFE8THSJzZ7V8tDa8XHBFRIOR0AMDTnb1k3heI2LokqbgzwDfHSY/ixkI4hhzdr3uvyB4GG/KG4og6WFzYQH0mLZFbTOoNWNAyLh8SpROY9Vmw3mfYR38F8Yf4/gdCqzSY/2CRWNXcpwgZyza9dmeAt7H7Fire1Cgxv3eGP81AidrnV7iDLRw== 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=6waJVi4vDNOeV1nN3PT61iMn2lWbupo19V4i1niclw4=; b=EjQnpClzHAgvuB1xU2m6sACEc0IMcjN6G40T9Zg5vKaNS8bC1zW6flECfm6IPCSUPMJtWUikSSFwmX2oXV9t9p3pQ0isAAqnB3nXS1g+EY6+0a/+fGpmchDV+OXGDlk4EcAUWqkEl+O2KfTycC8wNauiCFw8JOiSNNlKt8N7KHPa56pLipjPV8XbdTDX16jY54EgOENfQZbawnfuDFlZRiHWmFyMN5vok1pSK6N8XvPe+riDLqqopQArzPkfiTnjRo1oHSvtk0hMJNPfDNJWvRh0QbAAgERgCfO4zm8xeJvnbpO85ED3D+3mzTI/VP+SiwLYdQlWrAA0425EnZHa1A== 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=6waJVi4vDNOeV1nN3PT61iMn2lWbupo19V4i1niclw4=; b=s6YMRMfr+XqUHe6BXk/CJtmYppEvXF8OWC4HZeawoPZrGGbqwMOCzxXGaZVkbOSXkaC1OctrxtRaPen059GKSi/J6jcUPkxeXdpAgcDISEJkn6OeL4oKEc7ze73PSMINvrTffx+1ZgEwFoZGaMRcoHnXL/H8ajTXV8TZmFtjps4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by DM5PR12MB2392.namprd12.prod.outlook.com (2603:10b6:4:b1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.21; Fri, 26 Aug 2022 21:29:15 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::c175:4c:c0d:1396]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::c175:4c:c0d:1396%4]) with mapi id 15.20.5566.016; Fri, 26 Aug 2022 21:29:14 +0000 Message-ID: <58903fe7-c4d9-def6-71f4-6173b47fe462@amd.com> Date: Fri, 26 Aug 2022 16:29:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v4 4/4] x86/sev: Add SNP-specific unaccepted memory support Content-Language: en-US To: Dionna Amalie Glaze Cc: LKML , the arch/x86 maintainers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "Kirill A. Shutemov" , "H. Peter Anvin" , Michael Roth , Joerg Roedel , Andy Lutomirski , Peter Zijlstra References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> From: Tom Lendacky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN6PR01CA0020.prod.exchangelabs.com (2603:10b6:805:b6::33) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab69a9af-8f05-4809-973c-08da87aa065f X-MS-TrafficTypeDiagnostic: DM5PR12MB2392:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ksHyQJvyvYnwPTZUG8kCz3MsTC19iQnN07ygNct0BQdGciJxXlJd4sObrLA1CV+Pz52vkZ7cGc3j/Ig7WjVpeleHfDY9JaPCaIxFbuVCE9iD72YT4Lmmh9Y1Yj+hcWg+dOazkRN1JmugB1w9grPJNjDaZ5YT0+LJbid0APedyNXUdFZw8SwV3Ii6UT3uvA57DRCs9RXqWwX6NN7QpP0u3c0QuMqL82OKwx+Ojc8T31TMZRpINLbhfNelDu+YuS/xPYkBz9oASHX4Rgd04698GQqaNqiormPeYJABAOPEX/NMnHqsaOYipsiiT2Wmb7MsjZZyLXLsBj3APoodkTpCYbtUAWPiBSWBRHDjTYFL5znaso4O6ZvHxwAe98GFmIKHvTO6LoFvOgVtLSEmVwqSEJwFc2mmqwalmAg3r0JcmJl+nzJFrtsYIWzZWTWFXZCcQEYrD4Lf3AhBT4843gC5+Yhino6yNhDAzK1zTensRztE9TCxvRhCxYA8uteYYq3V1/NNq60kwb3yvqGxNMgvyUMOixNcJUWARU1xZOhPTtavTYYeagrO/BybhLOphBDcRtZskPlJIiz4OjB4qvatqqtqnylTZ+0bB0fLO0FiP8u6DLkh82ZcW1DvWMtzgHUmMe+9mObXk4PFhidVgQXud1TjEss81zK1oeSihcbZuy4EAU+jFqRO9D5EBaGths6UFaQyKP1OghSZObSRlG5g31N7u1CyBq4noxI0L4hdftGgPinmusBApsJuUC99jgzuTawuJ63wCOGvUu4l5UqctuGJsxJELpJQBmcwq15hGLg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(396003)(136003)(39860400002)(346002)(376002)(366004)(41300700001)(36756003)(8676002)(83380400001)(54906003)(6486002)(6506007)(31686004)(186003)(2616005)(26005)(53546011)(6916009)(316002)(38100700002)(66946007)(6512007)(66476007)(66556008)(478600001)(7416002)(86362001)(5660300002)(31696002)(8936002)(4326008)(2906002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SVZ6cmNpd2ErSVJ4d1J0NHJ1bGQvdW9GaCtXOVkwQkRvMWpTTnhqYjRwd1E4?= =?utf-8?B?QWtwRi9oOXR0M1JyR1RrUkkyck5nNE94dWo5UEpPNkZGNHFKQWp2U1JjNVoy?= =?utf-8?B?a05iMkQxVkF5anVWZXlYODlZN3djVEVOaFlUeFIxTDVPd0JTbC85cUVwejcy?= =?utf-8?B?c3o5UVphQzMxK2JLZkh6R2lPZTZ4N3RNRVhOSHZHUGVZU0QzOGZxM1h2SGZN?= =?utf-8?B?UG8rZlY2eDRPNHd5Q2tNVThUdWt0U3lIckJZZ1NWcEN5aEoyY3U3RXJMYUsr?= =?utf-8?B?eksvTnNJd2Z6S1JtekN1M2ZGUTVRWGJtQ1hLUjE0S0k3dmJqMCs4NENFUGNE?= =?utf-8?B?L0ZnUGpFWHRZUjFrdng0OE9kQ2N6ME9ISnRJSjc4S3VEZmVUc0tWeXhQZ3pW?= =?utf-8?B?ZFRNU0o3aVlrRE13VUhzQ0N4ekZweVpXY3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d12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2022 21:29:14.8558 (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: YFXSFlf4gglJ4nt9WhcG5uFP6qfezQlT9/y7FfNLyLZBJYRLUsfiGaeekjeyn49d9zwkhp190ECISo1g+eLu2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2392 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 8/25/22 17:10, Dionna Amalie Glaze wrote: >> >> Add SNP-specific hooks to the unaccepted memory support in the boot >> path (__accept_memory()) and the core kernel (accept_memory()) in order >> to support booting SNP guests when unaccepted memory is present. Without >> this support, SNP guests will fail to boot and/or panic() when unaccepted >> memory is present in the EFI memory map. >> >> The process of accepting memory under SNP involves invoking the hypervisor >> to perform a page state change for the page to private memory and then >> issuing a PVALIDATE instruction to accept the page. > > Thanks for this update! Tests show the boot performance shaves off a > good few seconds over eager acceptance, and it'll get better when we > have on-demand pinning. > > The uncaught #VC exception is still there for 256GB machines and larger though. Any chance of getting a stack trace when this occurs, e.g. adding a WARN_ON() in vc_handle_exitcode() (assuming it happens when logging is enabled)? Thanks, Tom >