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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FDE6EC8759 for ; Thu, 7 Sep 2023 22:45:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbjIGWpY (ORCPT ); Thu, 7 Sep 2023 18:45:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjIGWpX (ORCPT ); Thu, 7 Sep 2023 18:45:23 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2560C1BC8 for ; Thu, 7 Sep 2023 15:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694126718; x=1725662718; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=7Q8u27xA4tbsVDLbPtOoS7PmjHKgBsW2v3Sas3J1+Bk=; b=T97t7kEM0Rkk65Rrc3eXOgvRShUUbDBPp836u3C45rXgqiaeve4Y1dWs u9hxNyfpiSOjkRz5cuaav8N2rqHDL9qpQiVr/pwuGlpe2jORCVW36l8DM 830O8AzItNLbZdSV9ISdfRcCyzt67p39RLpbn/zjRcGKcFD4sQYQkqCsb wKgTNMVm6PedzLVy+DbnWQTmzPAEb6JzVahpQ3VXafvd3qJpQHqgsa3MX 4KJAc1pr7zP6CA1Q7CoCIa9iRE689mJTXeufHW8+U4Or3uX3wumIp9/0k hwjFl1jyd8pn1jHCw+jP5In5j53kZshkel+DW2yXm3EjWZQQGQi6xzYDw Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="356962354" X-IronPort-AV: E=Sophos;i="6.02,236,1688454000"; d="scan'208";a="356962354" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 15:45:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10826"; a="885386415" X-IronPort-AV: E=Sophos;i="6.02,236,1688454000"; d="scan'208";a="885386415" Received: from ningle-mobl2.amr.corp.intel.com (HELO [10.209.13.77]) ([10.209.13.77]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2023 15:44:47 -0700 Message-ID: Date: Thu, 7 Sep 2023 15:45:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] x86/sev-es: Do not use copy_from_kernel_nofault in early #VC handler Content-Language: en-US To: Adam Dunlap Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Tom Lendacky , David Hildenbrand , Mike Rapoport , "Kirill A. Shutemov" , Nikunj A Dadhania , Dionna Glaze , "Peter Zijlstra (Intel)" , Joerg Roedel , Jacob Xu References: <20230906224541.2778523-1-acdunlap@google.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/7/23 15:30, Adam Dunlap wrote: >> In any case, the most straightforward way out of this mess is to >> just move boot_cpu_data out of .bss and explicitly initialize it >> along with some documentation explaining the situation. > That seems totally reasonable. I tried applying the two patches that > you sent plus boot_cpu_data.x86_virt_bits = 0; in early_setup_idt(), Let's just initialize boot_cpu_data to zero and get it out of .bss entirely. > and that fixes the problems that we can see. Do you want me to send > out a new patch with these changes together? Well, ideally broken out in a couple of patches, but yeah, please resend also with some revised changelogs based on what you've learned.