Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp923066pxb; Fri, 22 Apr 2022 14:24:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYi2rVst3slE7bWotoDm58fRwCegrnqBvI9ktxj410XrNBdC5UjXFnOHyJi0nBbMh2UqAn X-Received: by 2002:a17:902:ea53:b0:15b:1bb8:ac9e with SMTP id r19-20020a170902ea5300b0015b1bb8ac9emr6333092plg.45.1650662691042; Fri, 22 Apr 2022 14:24:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650662691; cv=pass; d=google.com; s=arc-20160816; b=LpoPDWiQfpl6B4iOcL86EqUVcM5GLLkC8Vx1gPy+njkRVwtowxYM+8eExr8Ox4oiFd fc0tnf438fL0WV8jcO4uZo9rnexOjTZuYTbvzEJTpDaMcsKdX1EStvnNI8+3hRPKxeio wYuV1Yp5ta+NslO9+1HZS7o0DysK27UkOnbb6aFeMp1dHBhfcsz0moJRAi7HLtYwPZxW HUBh2O406qRPDgbHXBcUwHUojhxQ/H6xqO11v0U2rnDg7QWz7dobky1MrG457PVC1CLv hKzB6aSt6EttCzRMst6HKSlDUA9lmGilY4uuRS/D7N6x2lAEiuSCn7/Ee2gan/KYCoTo zTYQ== 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:subject:from:references:cc:to:content-language :user-agent:date:message-id:dkim-signature; bh=VHdUW4zm39quwIDXvV4hcvGX63HxhXyD99+3RSL8Rlk=; b=jHxGa97sMDe9QryDrKomeVRPx2eJU92KUmNfj0Gf7gfllFWm7w4YG7TcN9K16b5jrA aq3F3GM0k031m8TAfm+jKmKnbXLSHJTHkhKQTehoMhtK9ksXrXe6ABpz8dTfLKUg7eaW 7l6QbCZg4tdHVCvBf742ogpjszPX49nXevq5LXcMHNNDd4spfYwWTIXPHUSPT7rZKbRF jCttMxfcZldHOoOtkDzVnCB2oqW4JCMSNjaeeVxIvlUWy7p4RS3oKRnxAzlTJwUf1vNo VYsTeAdmm82f0WG1gZb/rqCzQrjv3/CReQTpR2cynRP/Qelh8kOkKu49ReaQj3EdQlcX rETA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=oFnb+xNi; 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:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j189-20020a6255c6000000b0050ac8cd60e6si8748077pfb.183.2022.04.22.14.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 14:24:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=oFnb+xNi; 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A326D1E1DC0; Fri, 22 Apr 2022 12:31:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1449360AbiDVPSo (ORCPT + 99 others); Fri, 22 Apr 2022 11:18:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449334AbiDVPSK (ORCPT ); Fri, 22 Apr 2022 11:18:10 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2054.outbound.protection.outlook.com [40.107.220.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C96252B0B for ; Fri, 22 Apr 2022 08:15:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U8sC6OOV3rgUZL4xVQEyrKV3lt5DEGuVYvUXmEO1OUEc8nI3uVpj/338ztEELGn1mY/KVMLyZvsheFPf3Apw2Dg01hmS796PoHPeIKZz3ZM3hPzj4Xc70GcDg73gGIsv16Yq1BK8+hMRKuHVs5NMy2Cova9GC4Gr/Ral+bFaSPWOlCEuJzFtxsL5XAGiwnaggcdQBlQ+ttsXn+2xSysiQlHrhFGdNu2l/tOuC54GIb8su1IKACsKTM71VX29rPvSp8nRJUJ0f6nPIB4Nq5+J6cMYIFioCNu9lq1g1kYENvUy/cCW6mxpqCJaUiGyFf8/jlhzQwvaT4xUIRTU301bmQ== 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=VHdUW4zm39quwIDXvV4hcvGX63HxhXyD99+3RSL8Rlk=; b=bJl+2A6CYUX7+SDYxK+LswIp81ffXOsX8TUPvhnx3/dW7fn5JWVuj/L65KA0JJiad9m5M0MIGcmOULOjT3GKIxPjOqr3p3WzInVer8N/8qPxM5UG/fQG8lApo2xnSUos7WsStOKa2wduH3OGtY3IYwv7IpcQ5bXYqBkwBhs/nGPQS4lcDAPHXGUKwSOYZSlQS31Z+sWpNSlpzZUy/SQ9if9ZEg+RxQ7hNbtAgP8SXwRqW+2YTkHcXBc/NUEjHDUc0dSRpddt7MhIQ+qxowe6DSYnKS2lxZDH4/ElY2qcA4KtkYUhfntVaU61kz/xTrLHQPe3JwjeKNQtlg6P81NLmQ== 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=VHdUW4zm39quwIDXvV4hcvGX63HxhXyD99+3RSL8Rlk=; b=oFnb+xNiEX6juiAQNWQijW4U2u4QR+8pOTeDBeEWs2ihglLkb7MpsfQI3J6vmiN/BWtt7W9mPU8tQya9DG0cWVVjwaN3ZMwpKA2kBlP0OMgS3RIIg0bSlSAftSENXnkW2DahEc5d7dJuI0PrwczjmjbofBf1kOI5dyXFhG0T2L8= 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 DM5PR1201MB0220.namprd12.prod.outlook.com (2603:10b6:4:4e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Fri, 22 Apr 2022 15:15:11 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::781d:15d6:8f63:a4e7]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::781d:15d6:8f63:a4e7%7]) with mapi id 15.20.5186.015; Fri, 22 Apr 2022 15:15:11 +0000 Message-ID: Date: Fri, 22 Apr 2022 10:15:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Michael Roth , linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Kees Cook , "Kirill A . Shutemov" , Tony Luck , Nick Desaulniers , Kuppuswamy Sathyanarayanan , Venu Busireddy , Joerg Roedel , Tianyu Lan , Brijesh Singh References: <20220422135624.114172-1-michael.roth@amd.com> <20220422135624.114172-3-michael.roth@amd.com> From: Tom Lendacky Subject: Re: [PATCH v3 2/2] x86/sev: Get the AP jump table address from secrets page In-Reply-To: <20220422135624.114172-3-michael.roth@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN6PR08CA0002.namprd08.prod.outlook.com (2603:10b6:805:66::15) 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: be47bb20-9d70-412f-003d-08da2472e4e3 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0220:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R8UHFnRoqQJwyeC570WIHfgyM2legRTYOMrKoE+6V8kTkqMMhH+S6zOJrZPmBUjCfIRqwqpuw8oC8wepn/jeXrPTmtk7TAZLdDcqkis8axcCwtisDWZsM55wtKJsPmuPFeCPC5Zg1DaJWAJBRo7aRvSouuUUoFjEmN0ikmPSAe9tRHhlgXuWnByzgDKcWyhDkk136ss7G18XgmTWnGDI6syyQ3VZICGQBDaSNSnVTgs+rSFEy4EPrYDbQ3dRAW5jrYcsha80M6CwVutkGqNaUM5YKTdG8J+3gUEGePWqpLgp9CQSvdhK6xxAYGn9Xg0+dNlC48AGFT6dUGNTOXgw0zHnTBjWmlMCEGsAlkp7CzRbg5F7vLUSnTkddTt5uHqze6JG2C19Clw3Kx/whMO51zJTo8mx9NnELPF+oed/LHevgTMXy1NF1b2MjmgCwA2uKIKthLWRlJ40/zet8pZdjsGpD6xqGvjaqSBoC1BFRVo7v1tBtz7uoo+Lo9yxGv+wsWxgnwJmvVrMow1kWQDzUIA0wSwSfYL1mRNNPxL7oeiCdc5X0rYeDSNvfw3JOMu8grOgIAbPniliyfgjkZmnsm/EuuFF8Yv4ziTtpyXtQA025qS2L9DwKIRMhUufa3W+iP7vfrfP6Ubt2J60YGW/B3U5VAgxdDfMRyqUQDXxk7w5ZhTuzzqeIMEpOOnRn0Ggr4wJkrX0eyYqQKWXtamdGj4LrtG2eX94dIvsiFPUfnwdJn8pqgmhW5vUFs2UzOIJ7IyeeQ6owVgYTaAepLTgTQ== 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:(13230001)(4636009)(366004)(508600001)(66946007)(316002)(186003)(2616005)(31696002)(86362001)(66476007)(36756003)(6486002)(66556008)(2906002)(5660300002)(54906003)(6506007)(83380400001)(31686004)(4326008)(6666004)(38100700002)(4744005)(26005)(6512007)(53546011)(8676002)(8936002)(7416002)(15583001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eU84SEhSd3JJWGlQQlpzdisvUHNCZTlrZmkrNXE3cjVEU1p6dm95aGhKNkhJ?= =?utf-8?B?S2wydFhLUzFSaFluamFEUm1BWnJzYmMybThZTlRMd21wcmNoQ2NKbWg4WnN3?= =?utf-8?B?bUFiVXV0OWNUZUJUcFcyQnFoNWFrY0N3bmR1bHVIbFRSRTJ6cnNhaFVWQTNu?= =?utf-8?B?bTZYQUkzWnppYks0c2hhMEFkMWVYeWk2NFNGbWxjdlY5NEZGWXRZV3RxNjRZ?= =?utf-8?B?NmlrQTRUV01ibTh1N2VvbkppLzFGTVBWM0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TOEJXNWErR0llR0ZUV09nYVdtTUNkVWJ5WS9MQld0?= =?utf-8?B?YTJwb0Q0SVA3bmZDNkVaWnBoQkM0bFVWQmtuSWJlS0V3TUZOcmkxQzdYYlFt?= =?utf-8?B?S2NITUYzRzcvKyt1RmU0M0VxdTgxbHFSTGNXbzFqaWJ1cTRBenFqdnlZQ2Zp?= =?utf-8?B?VHo4eTl3cDF1T0J2WEFBV2NtWmxaNVVMS1FpdlkzQ0krS3FUcVlBZGFwK1dH?= =?utf-8?B?eThKRUFnTENPMkROcmt0a3p4UW1vT2UrYmErL0pkMnlVTHpLQmQ0dz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: be47bb20-9d70-412f-003d-08da2472e4e3 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 15:15:11.5843 (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: +ktq+Gvim+/hTG5bfxdhFGimwx37KS/BLxim1D772NCTmkGtCTZMZZlKmwwfcF7dD+tE+AEYxIS/6UdidgSAxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0220 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 4/22/22 08:56, Michael Roth wrote: > From: Brijesh Singh > > The GHCB specification section 2.7 states that when SEV-SNP is enabled, > a hypervisor must provide the AP jump table physical address through I missed this on the first version. It's not the hypervisor, but the guest BIOS that directly provides the AP jump table physical address, in our case OVMF sets the address in the SNP secrets page. This allows communication between UEFI/BIOS and OS without hypervisor involvement. > the SNP secrets pages. > > Fixes: 0afb6b660a6b ("x86/sev: Use SEV-SNP AP creation to start secondary CPUs") > Signed-off-by: Brijesh Singh > [ mroth: improve error handling when ioremap()/memremap() return NULL ] > [ mroth: don't mix function calls with declarations ] > [ mroth: add missing __init ] > Signed-off-by: Michael Roth With the commit message change: Reviewed-by: Tom Lendacky