From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH v4 00/75] x86: SEV-ES Guest Support Date: Tue, 21 Jul 2020 14:49:57 +0200 Message-ID: <20200721124957.GD6132@suse.de> References: <20200714120917.11253-1-joro@8bytes.org> <20200715092456.GE10769@hirez.programming.kicks-ass.net> <20200715093426.GK16200@suse.de> <20200715095556.GI10769@hirez.programming.kicks-ass.net> <20200715101034.GM16200@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" To: Erdem Aktas Cc: Juergen Gross , Tom Lendacky , Dave Hansen , Mike Stunes , Kees Cook , kvm@vger.kernel.org, Peter Zijlstra , Cfir Cohen , Joerg Roedel , x86@kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , virtualization@lists.linux-foundation.org, Martin Radev , Masami Hiramatsu , Andy Lutomirski , hpa@zytor.com, David Rientjes , Dan Williams , Jiri Slaby List-Id: virtualization@lists.linuxfoundation.org Hi, On Mon, Jul 20, 2020 at 06:09:19PM -0700, Erdem Aktas wrote: > It looks like there is an expectation that the bootloader will start > from the 64bit entry point in header_64.S. With the current patch > series, it will not boot up if the bootloader jumps to the startup_32 > entry, which might break some default distro images. > What are supported bootloaders and configurations? > I am using grub ( 2.02-2ubuntu8.15) and it fails to boot because of > this reason. I am not a grub expert, so I would appreciate any > pointers on this. This is right, the only supported boot path is via the 64bit EFI entry point. The reason is that SEV-ES requires support in the firmware too, and currently only OVMF is supported in that regard. The firmware needs to setup the AP jump-table, for example. Other boot-paths have not been implemented. Booting via startup_32 would require exception handling in the 32bit-part of the boot-strap code, because verify_cpu is called there. Also an AMD specific MSR can't be accessed there because this would #GP on non-AMD/SEV-ES machines and, as I said, there is no way yet to handle them. How did you get into the startup_32 entry-point, do you have an SEV-ES BIOS supporting this? If it is really needed it could be implemented at a later point. Regards, Joerg 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=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 A88D2C433E1 for ; Tue, 21 Jul 2020 12:50:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9250A22C9C for ; Tue, 21 Jul 2020 12:50:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726769AbgGUMuC (ORCPT ); Tue, 21 Jul 2020 08:50:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:59146 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbgGUMuC (ORCPT ); Tue, 21 Jul 2020 08:50:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4EEBDAC22; Tue, 21 Jul 2020 12:50:07 +0000 (UTC) Date: Tue, 21 Jul 2020 14:49:57 +0200 From: Joerg Roedel To: Erdem Aktas Cc: Peter Zijlstra , Joerg Roedel , x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v4 00/75] x86: SEV-ES Guest Support Message-ID: <20200721124957.GD6132@suse.de> References: <20200714120917.11253-1-joro@8bytes.org> <20200715092456.GE10769@hirez.programming.kicks-ass.net> <20200715093426.GK16200@suse.de> <20200715095556.GI10769@hirez.programming.kicks-ass.net> <20200715101034.GM16200@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi, On Mon, Jul 20, 2020 at 06:09:19PM -0700, Erdem Aktas wrote: > It looks like there is an expectation that the bootloader will start > from the 64bit entry point in header_64.S. With the current patch > series, it will not boot up if the bootloader jumps to the startup_32 > entry, which might break some default distro images. > What are supported bootloaders and configurations? > I am using grub ( 2.02-2ubuntu8.15) and it fails to boot because of > this reason. I am not a grub expert, so I would appreciate any > pointers on this. This is right, the only supported boot path is via the 64bit EFI entry point. The reason is that SEV-ES requires support in the firmware too, and currently only OVMF is supported in that regard. The firmware needs to setup the AP jump-table, for example. Other boot-paths have not been implemented. Booting via startup_32 would require exception handling in the 32bit-part of the boot-strap code, because verify_cpu is called there. Also an AMD specific MSR can't be accessed there because this would #GP on non-AMD/SEV-ES machines and, as I said, there is no way yet to handle them. How did you get into the startup_32 entry-point, do you have an SEV-ES BIOS supporting this? If it is really needed it could be implemented at a later point. Regards, Joerg