Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp411755rdb; Thu, 2 Nov 2023 07:18:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSUifInv9Wui9+BQD5kLsCmsjrRHD7dkEvgnipCjqau5ftsKgR09TuS6BR8T3TG47+swja X-Received: by 2002:a17:90b:1d09:b0:280:aa7b:fbe8 with SMTP id on9-20020a17090b1d0900b00280aa7bfbe8mr6716516pjb.32.1698934682496; Thu, 02 Nov 2023 07:18:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698934682; cv=pass; d=google.com; s=arc-20160816; b=BAMIzb9gmMU5luGl2xprpph4rfnRrrKMLNjhMIy6z4xVDYGsbt2+vRYsYQkloUlKae 17V4+RsoVpnYSCY5BumNLJ3EYGWFPaqJCYgFLCvYaJDE8e73XHVhI/IHRwYYsP4HI5yH vJvVTjaCZDynSvdjVVJq6PTbVf/vMEQXoDJLRVTfWSdcC9gpzlCPotwXzNAJA37CZ6M3 gGqJRoQDWeSYk2s4G0Ylz8vnfTl5ivQ0DjvFTx7EkXCESvs9zOK70ieA7yjZCvKD8Q8u 1rEf5qrt0WlBQcUYKzrqxxKkA7gy8gjf5dITwdbMfSocMKnKEv01Cw+S/aoz9YEshdHl v1UQ== 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:autocrypt:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature; bh=gL83Ew1qZX2Lp+WbdkhpETUlAJaBtUKLLV/rAYQuRks=; fh=XjpHcIH2XSJ1UcSjOlMI3/A1WCIBn1BbDPDpo8MSiwM=; b=RUqFRg99fYYwM2QrJ12EeC0qeeZF4p3GiFIGxoHC0h4jUkqEnG3WBBbq6XpCl7qalC k9dET6ekuAGlPev/D5AGEJuxGiy5S6VKnRtS/PJ0N3wUgrgO/OgEC3dq0W1ImawlnWvb dEEQZLAYO0otOdF09VH4fWlgd72m3tHazDvfIEK8BVSrwIBVQS+ubDopi1BeOvqKPMTo GD0wu9qqxi165v9mhCp/zxphh8v7JJM+gmaPn4T7zEfa0ApN7xtK895t36w1x2zTUUQM UgD+8nwNqX+z9qudLmZYdVcupRvFRHbH24J0k1jcHL8BTDvFQHYuLne8NNE15jFE2yGx a6UQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=rdQAgKIZ; 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::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id l3-20020a17090a660300b0027d567be2e5si2819852pjj.92.2023.11.02.07.18.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 07:18:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=rdQAgKIZ; 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::3:5 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 56CB8802539F; Thu, 2 Nov 2023 07:17:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376579AbjKBOR2 (ORCPT + 99 others); Thu, 2 Nov 2023 10:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbjKBOR1 (ORCPT ); Thu, 2 Nov 2023 10:17:27 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2057.outbound.protection.outlook.com [40.107.243.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D7EA12E; Thu, 2 Nov 2023 07:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NhtsDg6XHI41aXInjC8qBp4BvM1qBkgrA3vOhhXtyNzCCVKqiLURWFOVjWV64GKUEVGabLD6FoKarP0qAQDtj2xUAkTgtj6dUqGCiaOsSdqce/J34+BJM/A59dNWW/OlwNxD56XZHSP4vWoPDevvJ/nNf/5JNjacvwz2rP/rV2EcwIovwHFj9T2kI1oNdszH9dj5bUz6xV1bCDuHTQIpPlyLTtvR9q5kpkrVkyyuMMJHnWvY0JZ/gdLW9HQ2dzAl+GC8ou9TXoG+ACmOV4zefrN6wenIYeBnuS9Lopkckg2+0PaHzrIr7fOPyI2OFTOvSqZLSr6SIwiR/dKlL++5Lg== 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=gL83Ew1qZX2Lp+WbdkhpETUlAJaBtUKLLV/rAYQuRks=; b=F+4Gu9v9xSmXGtnq2bTpEQeUas/vbnid6QwfmnmkdoRATFfWAkt5MBKDBAOaNtr4QHnwNwvkWd+D2hyH23L3oNvL7psNKMB0Hd7jdZAHwNQxurZ6EjYy39H7aolhR0NVyYsEPgwxopuJsrTFrKGeD1KI1TtX74CTZ96HHItNliUP6EISh7f72yIBjyMgCFc/AgOlslDAXc9nKrgl1HPN+XmHLeJhiWOX3z3pKhmM8eQBf4J/ildD4gZevzWDvrAb51syQ+VYVhMTras8+t4O+9sHpngphjo2xgzqctULy7JfGVd1tQsi/As3SOtLPgTJU3Vt7SVl6ImwFnlYsZnKyQ== 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=gL83Ew1qZX2Lp+WbdkhpETUlAJaBtUKLLV/rAYQuRks=; b=rdQAgKIZLrnmbEuSQt4oaxI/GznO6S6dTD7tFusELzhjDl4ESRAXkWwv135Qka1ggqJMKZmgrYNObIGNnmMvRvRExGwAuP39jMgxWvQsJAKO8IH9YWCp8u3ZdAGUIZD4yAKhLxAnvGPeURRANI5WLLmvJjD/JffGg1bHRJU/5Ro= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) by SN7PR12MB6814.namprd12.prod.outlook.com (2603:10b6:806:266::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.27; Thu, 2 Nov 2023 14:17:17 +0000 Received: from BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::e16e:d7f1:94ad:3021]) by BL1PR12MB5732.namprd12.prod.outlook.com ([fe80::e16e:d7f1:94ad:3021%7]) with mapi id 15.20.6933.030; Thu, 2 Nov 2023 14:17:17 +0000 Message-ID: Date: Thu, 2 Nov 2023 09:17:14 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 07/14] x86/sev: Move and reorganize sev guest request api Content-Language: en-US To: nikunj@amd.com, linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org Cc: bp@alien8.de, mingo@redhat.com, tglx@linutronix.de, dave.hansen@linux.intel.com, dionnaglaze@google.com, pgonda@google.com, seanjc@google.com, pbonzini@redhat.com References: <20231030063652.68675-1-nikunj@amd.com> <20231030063652.68675-8-nikunj@amd.com> From: Tom Lendacky Autocrypt: addr=thomas.lendacky@amd.com; keydata= xsFNBFaNZYkBEADxg5OW/ajpUG7zgnUQPsMqWPjeAxtu4YH3lCUjWWcbUgc2qDGAijsLTFv1 kEbaJdblwYs28z3chM7QkfCGMSM29JWR1fSwPH18WyAA84YtxfPD8bfb1Exwo0CRw1RLRScn 6aJhsZJFLKyVeaPO1eequEsFQurRhLyAfgaH9iazmOVZZmxsGiNRJkQv4YnM2rZYi+4vWnxN 1ebHf4S1puN0xzQsULhG3rUyV2uIsqBFtlxZ8/r9MwOJ2mvyTXHzHdJBViOalZAUo7VFt3Fb aNkR5OR65eTL0ViQiRgFfPDBgkFCSlaxZvc7qSOcrhol160bK87qn0SbYLfplwiXZY/b/+ez 0zBtIt+uhZJ38HnOLWdda/8kuLX3qhGL5aNz1AeqcE5TW4D8v9ndYeAXFhQI7kbOhr0ruUpA udREH98EmVJsADuq0RBcIEkojnme4wVDoFt1EG93YOnqMuif76YGEl3iv9tYcESEeLNruDN6 LDbE8blkR3151tdg8IkgREJ+dK+q0p9UsGfdd+H7pni6Jjcxz8mjKCx6wAuzvArA0Ciq+Scg hfIgoiYQegZjh2vF2lCUzWWatXJoy7IzeAB5LDl/E9vz72cVD8CwQZoEx4PCsHslVpW6A/6U NRAz6ShU77jkoYoI4hoGC7qZcwy84mmJqRygFnb8dOjHI1KxqQARAQABzSZUb20gTGVuZGFj a3kgPHRob21hcy5sZW5kYWNreUBhbWQuY29tPsLBmQQTAQoAQwIbIwcLCQ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8bhpwKeUwGsgvXWGEqwlEDs2rswfAU/tGZ 7L30CgQ9itbxnlaOz1LkKOTuuxx4A+MDMCHbUMAAP9Eoh/L1ZU0z71xDyJ53WPBd9Izfr9wJ 1NhFSLKvfA== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SA1PR05CA0013.namprd05.prod.outlook.com (2603:10b6:806:2d2::19) To BL1PR12MB5732.namprd12.prod.outlook.com (2603:10b6:208:387::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL1PR12MB5732:EE_|SN7PR12MB6814:EE_ X-MS-Office365-Filtering-Correlation-Id: 76466e18-6165-43a0-aebf-08dbdbae6b1b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZimlL9fI8XReqO8vv2cfcDvo/SXOTMZwJtCmUdhvHrr9NVxr/zR8/wK0lPFg8v5AwSNso1tlJd/HeST6syIxSgHVNCnQsfN7onrVQSioe9grkMseXcBXM8/4UkfKhiOot9dT1wLDs4dTxFiU2tSvdc7zz59ecMDYt0MielxvXVkm338bM0Gdj2KKrK3gyOpoR3TYNIGdjYMuYpRjzeuhuR5R09FLJoMHCaWkJ7mSkaDCJ9ygL3SeBYTcXEDGx64R1XLGdMvL6HQUKR1pqqTKtrYB1XNdxUTk219bP1+2erC18flX/vb/+aFvPGxePbnX3X3Ukc1SmziNg+/er8hfAI0QFhHPEOsXrcCXYlzL7H9NlHgzTxR/RC8W9077PYjl/aoganQkQMRazCksQ14NXd3ytYvdVA6BoWsbDCHB/Bc/1OTeLCnSXosgEfw8WYIA3YkS/FNTWwVuy4OnPk2opnsewlx0lpyc9rItMwFOxSR3EKsOe3A3yzTDQYA8/wg2qyBXpwE4etmNP/BVKYGkDTgZxtT4Eut6I4ovX/ce0e5CwdgSTpx1bIOwwMhdicfxPpJgnlBWOjJy8gLoeSD5sysq/s2h9p2IqlKtwd7ZSwZDcug4eiVRYMJPD0m9TRshedikcC1vlHNrSMBHU24vdQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR12MB5732.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(39860400002)(376002)(366004)(396003)(230922051799003)(451199024)(64100799003)(186009)(1800799009)(6512007)(36756003)(83380400001)(26005)(7416002)(5660300002)(53546011)(6666004)(6506007)(2616005)(8936002)(66476007)(8676002)(66556008)(316002)(41300700001)(31686004)(66946007)(86362001)(478600001)(6486002)(38100700002)(2906002)(4326008)(31696002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?blNOQ21GMnVCNnpMWkFwOGJBQzdpVTJIMGxQN3k0N2xIUFFzV0ZwQnk2MVN2?= =?utf-8?B?aEhSZ2h1ZUF5Vm8wUnlHZW9pZisvWmJDK2V6MnJoNTNFY2FKSXhWNzduU1Qw?= =?utf-8?B?YWlSWC9VeXBMN05UTUdhQ1A0Y2YzRzl5QVpiSHB3Rk1DMnMrZlgxR1JzY3dR?= =?utf-8?B?Y1dkK0V5QWcyUThHb255bkRjTDg0Y2RIK09ZNFJUT1ZIbEhXOGFYd2hESVl1?= =?utf-8?B?QlJGR1V4L0FSN2cvSXhjMm4vOGgyZ1FQeXpiS2hXdG13SjRiRFh6YmNiK3ls?= =?utf-8?B?cUZpb0oveVI2L2luVjJHWE1tOVRWSTlYMWVRcUlJSWpsb0F0WVVndEttUkJD?= =?utf-8?B?c29XVU9nT1RhVkQzMVZYanJiUVJSdXhZN2t6ajJuN0VRdkxFNmxmQW5GdC9D?= =?utf-8?B?OWFBcUhtVGhzeXhldnlqVFdyWmVkd0pNZ3VwOHdHS0xhZGtmeFN0dG52SVVM?= =?utf-8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jTG1LS3Vpajhvd2pXTVFM?= =?utf-8?B?MzVOSzdVWkhOcEUvRnUzMWFQelZDQkIvNWJwbVF4QjkvaEFHUDRROEFOMm5k?= =?utf-8?B?QVVXNmlsQ0UyMmF0TnVwbzVkbFQrU2RxMFRIZmhodlJzMkFqakdMQ2VrKzQ5?= =?utf-8?B?R3krM1JJQXVEakVmRUNWS1JqU3JTcG5WTG9pY3VsdU9aZGZ2eGJsTzhRR0p6?= =?utf-8?B?M3ZxZGFBSmZVQkIwWVdJQ0ZyNnIwZkJqSEo0ZXZ2WVY3cWxzOGNXUHJPL3lh?= =?utf-8?B?V3V6YXBMMy9rc0xzL2huWHFlQ3ZCUmN5b1BtOTY4ZGFPNE90K1dqVFlTMUta?= =?utf-8?B?SUNNUGFzdENqSVNBNDFTRTdXQlczMHRYWHF2bEhxVTBhMys2QXI0OGJxQzNO?= =?utf-8?B?SUphdUxwTkFBRTRaVEpVa1JQdy9qakRDWXY1ZkVNczFGNmE2a0dNdGlLdnJX?= =?utf-8?B?SmtreVk0cysya2JFb290UzlJWHpnTDdXWUNZd2JUYUZHT3dvTmpsTWg3SGdQ?= =?utf-8?B?WC9HRTZQV084RHRyd3FoYjNVYkIvYzN0YnJJTWtEKzEydkxHVnVDb0Y0anI0?= =?utf-8?B?NytWajh0YjI2RERpdkJpaHJ0ZWdvTUFZbWJtWGNsSkptTC9iVVlQUTcyNEZH?= =?utf-8?B?dDVrTU1SM29nbGQwbDArUTExMWJOQmU0alRsZEsvU2h1NGh5b3puRXMzejVW?= =?utf-8?B?K25ST3VDM3NXbFcwVHgrbUJJZkN2MTRUSndMSlJvT01yVmV1dGR1SVV1YlNT?= =?utf-8?Q?fZ904ReJP844KGIJwtL41SFNT?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76466e18-6165-43a0-aebf-08dbdbae6b1b X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5732.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2023 14:17:17.6275 (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: kZY9IXXrrcgfIah2AFBqYqi4dpXts0NxYLZtY9te0NJbcMff+nDCdveulybE4rOfyqNzfduYdfu+uD5SzismNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6814 X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 07:17:48 -0700 (PDT) On 11/1/23 23:28, Nikunj A. Dadhania wrote: > On 10/31/2023 12:46 AM, Tom Lendacky wrote: >> On 10/30/23 01:36, Nikunj A Dadhania wrote: >>> For enabling Secure TSC, SEV-SNP guests need to communicate with the >>> AMD Security Processor early during boot. Many of the required >>> functions are implemented in the sev-guest driver and therefore not >>> available at early boot. Move the required functions and provide an >>> API to the driver to assign key and send guest request. >>> >>> Signed-off-by: Nikunj A Dadhania >>> --- >>> +static void snp_inc_msg_seqno(struct snp_guest_dev *snp_dev) >>> +{ >>> +    u32 *os_area_msg_seqno = snp_get_os_area_msg_seqno(snp_dev->vmpck_id); >>> + >>> +    if (!os_area_msg_seqno) { >>> +        pr_err("SNP unable to get message sequence counter\n"); >>> +        return; >>> +    } >> >> I probably missed this in the other patch or even when the driver was first created, but shouldn't we have a lockdep_assert_held() here, too, before updating the count? > > As per the current code flow, snp_get_msg_seqno() is always called before snp_inc_msg_seqno(), maybe because of that the check wasnt there. It still makes sense to have a lockdep_assert_held() in snp_inc_msg_seqno(). > > Should I add this change as a separate fix ? It can be sent as a separate patch (I don't think it is a fix) either before or after this series. Thanks, Tom > >>