Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1213961pxy; Thu, 6 May 2021 03:08:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhS1NL4cZh2eGsbEGUIxJtAH+aoJKMN5UEqCzk5cHp1ZkXoaoaFKGqDqY3b86XU4AJje0p X-Received: by 2002:a17:906:4c8c:: with SMTP id q12mr3539398eju.254.1620295722891; Thu, 06 May 2021 03:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620295722; cv=none; d=google.com; s=arc-20160816; b=Tj2PwSZZUhgx0u5ygkKF9vC5rU3hU4wnbl9jTg1rko6QXoMU7QXTF5RVMe+UxEEaeq EYWS7NdjBPK6hrOuKdSQYDTCzsgWypQmgHOJB92iQP4+8KPHujMHoeS3spQgf+qQabNc 3jOJUB0vT6ihvMSM6yEB0AM7hfp5TRd5ZcuZL4bFiZjWdMnx+wkxT83kVNDqRQOMeeZk XxcUHa7uDC9rmb7QKtRhpbgkpdnfMLtN8Rx29FTwFwoXxZqcZbeMn5m0wS40wdHSfeGJ IqMnUicBZiofUoPj1qgw3mosJfvitmd1NfDLE1iTwb9ytEkuXnvGfhF1gBfjm7WGuAhl c94Q== 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; bh=q+CWwsKHHMqI2ibpQx63/5Sb/gDz7DdWonORRE7jn44=; b=JoseRSMiZsJrCeonROszjYW/gBd2kL/UxBsEhjMgByALzgBXp2zwk91Q+/xZ0NM2ei uR/P5DWOBTF8+DLmguUIjA6bp0cpA2uDH1xvy6Cqbq53M1zt2vONd8y9jbafrrc5f9Kt QohgZb1M9StAWHesH64QGwK2zUlbTuGD6RSN3LvRuEvQMhq/sZPnMcEK/d+Ty9bnJXWE 2aQk2yfDEm1WrkS6aDp6RV05dSEFMd9LShGEqxK/i0kyrsAh4b3KWjF9gWyLpi2pDr4x UoWCyzGEAE5z09imN3g9yV3EWnqd+w0z3vfYmpgxr56q27Rjxj/1FKMYD6bt9ewG+xBl K3+w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si1873029edv.51.2021.05.06.03.08.19; Thu, 06 May 2021 03:08:42 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234014AbhEFJN7 (ORCPT + 99 others); Thu, 6 May 2021 05:13:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233765AbhEFJN6 (ORCPT ); Thu, 6 May 2021 05:13:58 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24423C061574 for ; Thu, 6 May 2021 02:12:59 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 25BCE379; Thu, 6 May 2021 11:12:57 +0200 (CEST) Date: Thu, 6 May 2021 11:12:54 +0200 From: Joerg Roedel To: Borislav Petkov Cc: X86 ML , LKML Subject: Re: [PATCH] x86/cpu: Init exception handling from cpu_init() Message-ID: References: <20210504171745.2249-1-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210504171745.2249-1-bp@alien8.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 07:17:45PM +0200, Borislav Petkov wrote: > From: Borislav Petkov > > SEV-ES guests require properly setup task register with which the TSS > descriptor in the GDT can be located so that the IST-type #VC exception > handler which they need to function properly, can be executed. > > This setup needs to happen before attempting to load microcode in > ucode_cpu_init() which can cause such #VC exceptions. > > Simplify the machinery by running that exception setup from cpu_init() > directly. > > There should be no functional changes resulting from this patch. > > Signed-off-by: Borislav Petkov > --- > arch/x86/include/asm/processor.h | 1 - > arch/x86/kernel/cpu/common.c | 14 +++----------- > arch/x86/kernel/smpboot.c | 1 - > 3 files changed, 3 insertions(+), 13 deletions(-) Acked-by: Joerg Roedel