Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2796310pxb; Tue, 21 Sep 2021 07:52:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2YX7RqHwtcj0VGXCMgH4wGD/SjzzXGlsPKBq/s6omQKttqBY3ywqM0+f/iDUV8txOV77W X-Received: by 2002:a05:6638:204c:: with SMTP id t12mr317982jaj.9.1632235968287; Tue, 21 Sep 2021 07:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632235968; cv=none; d=google.com; s=arc-20160816; b=teYsc8lis0qOWkCKWlO8GDVWUItq+/D91HWyEzVjulziFeJ1LRiBteWriZjq7whtjD x4YK27i5QxjneWnXo5feDvqQNpHC8lz2fysknsmxD8kgIDvT03ynTGhhf12FhPUq5LUk 1wFvrpMVe2OVvz0LmYdvE6phcxT5qz5wMLUmo4WQ4sW3mm87k3cY/IIqEZjnc8FvBwna tZNRtBNsWpCfNP2aRT+LYQMGQ3Eyl8zOE/O68Fbgp62QCfTBu0qanPKnudi42A+GSl1v 6IbBIZkZfEipjOQ1i2y88ExUv8w+w2ucv3n/S+ZgYwDx/8CgiopCMUfufY4OpP7vhrmC 6ICA== 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=0tySSr94j0qUYtXGolsce93msuCdyyz2sqwhXQ9+Bes=; b=F5NDmy4aYB8NxuOULhNKw5Kgj1Hj8ubCL27xAD3lV/CpUJ3fP1pXny/T7+yi0HzQOk 70/lVBE45hlKAKUB9Pbsyi7M3lEcXrvELHJkiIJCobB16I1njIy/uFWiXLItYcwGGHr/ J8hJOejni8p4pVagO8Mk6jULz0Kt6M3bcwu3gYFVtHNwEnbBE9MGq/ahTN4N6eFQBD7n v0R8aKrTyTyTARr3lyQ5LOaT+cmFt8RcDlEFUu09CtyEdd77/OTHSqgCmxbwmtkxFn2A 9Gvz48Xb3KE20hIQZVyiR8xgJJv+MtR3wnxbbQ/qML5sG9nFfnIRqwKJuqXNbXOQSPDy J8Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=EJQOmTG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a7si5220542ilv.9.2021.09.21.07.52.27; Tue, 21 Sep 2021 07:52:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=EJQOmTG5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233747AbhIUOxE (ORCPT + 99 others); Tue, 21 Sep 2021 10:53:04 -0400 Received: from mail.skyhub.de ([5.9.137.197]:54178 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233689AbhIUOxD (ORCPT ); Tue, 21 Sep 2021 10:53:03 -0400 Received: from zn.tnic (p200300ec2f0d060045983051645feb8a.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:600:4598:3051:645f:eb8a]) (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 F0F071EC0298; Tue, 21 Sep 2021 16:51:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1632235890; 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=0tySSr94j0qUYtXGolsce93msuCdyyz2sqwhXQ9+Bes=; b=EJQOmTG5tVchKBo5DTrA4Ye/B7/qnkYFKoZYsbAmqoVHquC1gOD6Ue85L5Nk3mPnbCuSt+ XVWyfwqisvYxlyGp7A6hlETsfCrCo6HVdwIeRZyKKlb5XqbO9Bv2Gp9Jpgo71EmXD8loCC MhyUvHntAC/Z2r8QmsoXEED+q8Q8DSU= Date: Tue, 21 Sep 2021 16:51:23 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Ashish Kalra , Steve Rutherford , pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, joro@8bytes.org, thomas.lendacky@amd.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, brijesh.singh@amd.com, dovmurik@linux.ibm.com, tobin@linux.ibm.com, jejb@linux.ibm.com, dgilbert@redhat.com Subject: Re: [PATCH v6 1/5] x86/kvm: Add AMD SEV specific Hypercall3 Message-ID: References: <6fd25c749205dd0b1eb492c60d41b124760cc6ae.1629726117.git.ashish.kalra@amd.com> <20210921095838.GA17357@ashkalra_ubuntu_server> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 21, 2021 at 01:50:09PM +0000, Sean Christopherson wrote: > apply_alternatives() is a generic helper that can work on any struct alt_instr > array, e.g. KVM_HYPERCALL can put its alternative into a different section that's > patched as soon as the VMM is identified. Where exactly in the boot process you wanna move it? As Ashish says, you need the boot_cpu_data bits properly set before it runs. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette