Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3720198pxb; Fri, 4 Feb 2022 15:03:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7rUpfppi745Wrjb034AI2UeUpJkSdNJJJqNz0I8esImskBsR0sIUNOiqmQ+lj9kKOOAGB X-Received: by 2002:a17:902:a509:: with SMTP id s9mr5674183plq.134.1644015791650; Fri, 04 Feb 2022 15:03:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644015791; cv=none; d=google.com; s=arc-20160816; b=dlbdYirazgOnUDz4fTKrFcMYgce3AGUin9URglvG3GL3DFs+J2fKpReDyPU38EYtty 79E74IineM675Aj3oI9VwN/KTq8ExKDd3ddxwePfgvujoEEaWqyqAbFHOBX79g5KyW8u E1kKDUkb77bB0GoEgeoat5DltKF2AJ/lgUhzgR15zq6mb+KmOmMtXZbqYn8A74z79gUb EidWjaHQEUrPSbNb57FQApdlbkR1ByhVry5eVEzFrIyNa0uvXsRBnUjWthoRAZZyGo3Y qZ3u27w4MRE90pbl9FKI1MT6kB/Jah3E2DtIhO4IjlG+Y1iBPEtK1s+2Qds9hC9IbEKT /bkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vkWy2p/ndu/o+uwPBWE2Sx+Zio2CCup5AcxLwBsCKIo=; b=WeLcVUYkg/T2d3m58kynA7QKGD99YmUhmlYP3XF5NR5mzuFdBcBnTLZ/KD9++a4iXb e68k/Lm9nmsCNIizI0wiUmolSqCkFWoAh9ADozfaodLLgzraUiBKWFk0qjMmz4kPD3qs MwQWYM9nnj7luDActSupGjm668kzUY+tdpTzT1P3PNu5piSCjcf5jFSgsO0bgztljFqX hN6YBA8qLq6CRfJtaBR8k7cPPxIib1Gh88Uh5jpz5aWvHQE5kpji/0RyuuH6xp38t1Xp jTA1QnXbxVP0zg9wpyDvtLxpPAk982QKrnCn+9NXZu035Gz+an+406co5Dt/j2QdIxny 8wZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="E1DiM/jm"; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1si3348903plh.225.2022.02.04.15.02.59; Fri, 04 Feb 2022 15:03:11 -0800 (PST) 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=@alien8.de header.s=dkim header.b="E1DiM/jm"; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343555AbiBBKfE (ORCPT + 99 others); Wed, 2 Feb 2022 05:35:04 -0500 Received: from mail.skyhub.de ([5.9.137.197]:51348 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245260AbiBBKfD (ORCPT ); Wed, 2 Feb 2022 05:35:03 -0500 Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5C3801EC057F; Wed, 2 Feb 2022 11:34:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1643798097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=vkWy2p/ndu/o+uwPBWE2Sx+Zio2CCup5AcxLwBsCKIo=; b=E1DiM/jmMmw1faOLJ+9vk08hJobgmK5QJeCOlv8fr+flGhrwsbAcAscgJzGskCs2KvjGAc U2AY2ZAy16oscISuR2Hisdaix+fzOE/3vUIwykutoG/w3sY+XqGz+3asWHM3HUbZr4xwTd pycMsV51BhescBJgCvgq/nIwy0PSTNw= Date: Wed, 2 Feb 2022 11:34:48 +0100 From: Borislav Petkov To: Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , "Dr . David Alan Gilbert" , brijesh.ksingh@gmail.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v9 15/43] x86/sev: Register GHCB memory when SEV-SNP is active Message-ID: References: <20220128171804.569796-1-brijesh.singh@amd.com> <20220128171804.569796-16-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220128171804.569796-16-brijesh.singh@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 11:17:36AM -0600, Brijesh Singh wrote: > diff --git a/arch/x86/kernel/sev.c b/arch/x86/kernel/sev.c > index 24df739c9c05..b86b48b66a44 100644 > --- a/arch/x86/kernel/sev.c > +++ b/arch/x86/kernel/sev.c > @@ -41,7 +41,7 @@ static struct ghcb boot_ghcb_page __bss_decrypted __aligned(PAGE_SIZE); > * Needs to be in the .data section because we need it NULL before bss is > * cleared > */ > -static struct ghcb __initdata *boot_ghcb; > +static struct ghcb *boot_ghcb __section(".data"); > > /* Bitmap of SEV features supported by the hypervisor */ > static u64 sev_hv_features __ro_after_init; > @@ -161,55 +161,6 @@ void noinstr __sev_es_ist_exit(void) > this_cpu_write(cpu_tss_rw.x86_tss.ist[IST_INDEX_VC], *(unsigned long *)ist); > } > > -/* > - * Nothing shall interrupt this code path while holding the per-CPU > - * GHCB. The backup GHCB is only for NMIs interrupting this path. > - * > - * Callers must disable local interrupts around it. > - */ > -static noinstr struct ghcb *__sev_get_ghcb(struct ghcb_state *state) That move doesn't look like it's needed anymore, does it? I mean, it builds even without it. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette