From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A5EAC433FE for ; Tue, 21 Sep 2021 14:51:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1852861178 for ; Tue, 21 Sep 2021 14:51:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233760AbhIUOxG (ORCPT ); Tue, 21 Sep 2021 10:53:06 -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