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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 3973CC433E0 for ; Tue, 2 Jun 2020 15:46:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A6A320674 for ; Tue, 2 Jun 2020 15:46:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alien8.de header.i=@alien8.de header.b="IanehJAf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726817AbgFBPqS (ORCPT ); Tue, 2 Jun 2020 11:46:18 -0400 Received: from mail.skyhub.de ([5.9.137.197]:47778 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbgFBPqR (ORCPT ); Tue, 2 Jun 2020 11:46:17 -0400 Received: from zn.tnic (p200300ec2f0bbb004c909b752ca088bd.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:bb00:4c90:9b75:2ca0:88bd]) (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 303AB1EC02AD; Tue, 2 Jun 2020 17:46:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1591112776; 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=aqTOey7lAwfFOOz0eCqZ1k0RUPC1agJXCDXNB7/wiy0=; b=IanehJAf2DVbBOdtt56W8cK/KgxhHEC6KyZdpOQTRY40yZZQTanJL347jcXvB8KRRfjWKT NXAdY3KM27iCMQ9b0+UuFgpLlEVSkPMbjz8+bRo6Q3/x/QCEUd3sRyGaeqNpePiAGmL3SY cpwTYnKqZ6NdOJLRlQwcDmFA7VCfZwU= Date: Tue, 2 Jun 2020 17:46:11 +0200 From: Borislav Petkov To: Joerg Roedel Cc: x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Joerg Roedel , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v3 70/75] x86/head/64: Setup TSS early for secondary CPUs Message-ID: <20200602154611.GC11634@zn.tnic> References: <20200428151725.31091-1-joro@8bytes.org> <20200428151725.31091-71-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200428151725.31091-71-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 05:17:20PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > The #VC exception will trigger very early in head_64.S, when the first > CPUID instruction is executed. When secondary CPUs boot, they already > load the real system IDT, which has the #VC handler configured to be > using an IST stack. IST stacks require a TSS to be loaded, to set up the > TSS early for bringing up the secondary CPUs. Use the RW version of > early, until cpu_init() switches to the RO mapping. I think you wanna say "Use the read-write version of the per-CPU TSS struct early." here. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette