From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753406AbeAJVPC (ORCPT + 1 other); Wed, 10 Jan 2018 16:15:02 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:46804 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753397AbeAJVO6 (ORCPT ); Wed, 10 Jan 2018 16:14:58 -0500 X-Google-Smtp-Source: ACJfBotf5gM2tNEzgfOFJCICTudq+yfMjZ1isKNcpacFprcS6n9S8BAJ6iSMkT1fHNPOYXOcy/FmYQ== Subject: Re: [PATCH v3 0/5] x86: SME: BSP/SME microcode update fix To: Tom Lendacky , x86@kernel.org Cc: Brijesh Singh , linux-kernel@vger.kernel.org, Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Thomas Gleixner References: <20180110192544.6026.17285.stgit@tlendack-t1.amdoffice.net> From: Gabriel C Message-ID: Date: Wed, 10 Jan 2018 22:14:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180110192544.6026.17285.stgit@tlendack-t1.amdoffice.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 10.01.2018 20:25, Tom Lendacky wrote: Hi Tom , > This patch series addresses an issue when SME is active and the BSP > is attempting to check for and load microcode during load_ucode_bsp(). > Since the initrd has not been decrypted (yet) and the virtual address > of the initrd treats the memory as encrypted, the CPIO archive parsing > fails to locate the microcode. > > This series moves the encryption of the initrd into the early boot code > and encrypts it at the same time that the kernel is encrypted. Since > the initrd is now encrypted, the CPIO archive parsing succeeds in > properly locating the microcode. > > The following patches are included in this fix: > - Cleanup register saving in arch/x86/mm/mem_encrypt_boot.S > - Reduce parameters and complexity for creating the SME PGD mappings > - Centralize the use of the PMD flags used in sme_encrypt_kernel() in > preparation for using PTE flags also. > - Prepare sme_encrypt_kernel() to handle PAGE aligned encryption, not > just 2MB large page aligned encryption. > - Encrypt the initrd in sme_encrypt_kernel() when the kernel is being > encrypted. > > This patch series is based on tip/master. Is something in tip/master the patch serie need ? I would like to test the serie however tip/master breaks my box.. On tip/master there is no way to boot with mem_crypt=on with or without your patches. With mem_crypt=off the box at least boots to a point , seems APCI breaks on tip/master. If someone want to take a look , a dmesg of the broken boot can be found there: http://sigsegv.24-7.ro/~crazy/tip-master/dmesg-tip-master.txt Regards, Gabriel C