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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 1AACCC433B4 for ; Thu, 6 May 2021 09:13:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D87B3611AD for ; Thu, 6 May 2021 09:13:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234043AbhEFJOA (ORCPT ); Thu, 6 May 2021 05:14:00 -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