Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp870683ybh; Tue, 21 Jul 2020 09:49:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTkgzLbW6GlobsEbYHVYJklECTOMeUcWX0k1FpEe+WOajSnHMARqOttEwbfBPWlGaIhQyc X-Received: by 2002:a17:906:fb81:: with SMTP id lr1mr25515022ejb.104.1595350176100; Tue, 21 Jul 2020 09:49:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595350176; cv=none; d=google.com; s=arc-20160816; b=FlUmTRCw8WuD4qN/DnFn15TqqAi1y2lGviiRMa11cRgdWGalExcDOp9AUD1JtG+Gwy 2kofzg0d1gyZCnymRdqtFv8qAN+I0vaMUc5TVJ3n0MtB61uwkQMWnfy3AMXWeJW86PnG cyHg8/Ha2XPs2fVE0t/WanwFVT25u3511jq9fJP3U4txti/3FV1IJEOAOeks/OWlHo6L 7KaHXkJH/l/cOpfO6D3E5xqe9Du5k3qNYIPRUUcJ9UDPBtU40kBo4o87QY6Rw3kNA5cf PrrFTLMNsYqCMsWDP99qxLfmhF9oqfT5EeAWgfPZrPUJVXP4agtx8PmWKAE/oJOW83Gw cxVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Od+zTycOXgLO8KxOLxcSpm14nyLCP4jZwV8jGWRnKLg=; b=gaCL7Zxe8WRfRDQRll5gImddQqa5BtwE401PYaRwwZ7Tqb8Kt7Rt4pwxnU1pegdB2S Ssnt8+AY61MEttpoSiW7hAlDzuocMCYuKDzyfXd4qWuJAm3sM3FIfV/0RnDHTiLzLiZc KKlol1JDZLEYvhQVdhdY0cSHGwvjKXORjSsBGxfgPr2OsTjVqg2vz5h1SbvITYeBmhzN 2NgAJYk2safcf8yXzKcY0Q5E/LI1OmOTkD7QwU2BI0p6N0Yl+SkpZWkANqttA8EJuYF5 pJxrY/wORRfFfq4cJ6wXO2YI+6g2CSPi8L8pRz7vw8u0W90NIo8Dv47xvUI8n5DUuXJC 93WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lpFuK9OA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hh3si13037106ejb.490.2020.07.21.09.49.12; Tue, 21 Jul 2020 09:49:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=lpFuK9OA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726029AbgGUQtG (ORCPT + 99 others); Tue, 21 Jul 2020 12:49:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727778AbgGUQtG (ORCPT ); Tue, 21 Jul 2020 12:49:06 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03B21C0619DA for ; Tue, 21 Jul 2020 09:49:05 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id q4so24894514lji.2 for ; Tue, 21 Jul 2020 09:49:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Od+zTycOXgLO8KxOLxcSpm14nyLCP4jZwV8jGWRnKLg=; b=lpFuK9OAa+wE2Ulyz7amAwN9pME8grhLmFBJmxuxYbgbyPwDqYiXKVlZRutm696IoP CucdkfpNKHu1dC6W5osl2PoysYrfTz7tKtBYUJCzu/VlEh9Xe5pnjhL6A8Cwyk99gIy7 /fnpKlTDy7dEKz6P6+g8l78OCPsXrP6qVBwQWim0bZpWZ87T1RLAAGbdcvZAgGOdCF/e ky3e+cJQeznHXmg0f781bisBn+BB/dgYXYmeLaQp/82EeSVX6mt9LJW/Ss77Xm4nEnwa PZNKC7fb+OnbHqgP5oKOtxA45slZ5xFazzEC5V/m4kiZiIMelPi1u1zWTbpxfr2o5W9Q JaGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Od+zTycOXgLO8KxOLxcSpm14nyLCP4jZwV8jGWRnKLg=; b=nTBhanwO572bkio7IKgLawvFmiOWBJsjLKwGQiRh/M2mzntcXzZBCz7rWnE+oCL0Jl +/8NXbEfT2cYALwd8KjyLfJztojVNFRwljVsX1LzbfEDkzMFdyrCf+tpYChvDi9azTFd nYg2+QVY6HS2v0ZbhtT/M667AT5sE1eXGVWXt3ep72uUB991nEb2o2fX3IKh7BSe8Ux3 eY9R6j178iZQWt4kZ9wMWCoTvEJOKjx3J+fslHcJheCObqrePiVCWzHnKz0wBR1TGPSY Yr/feyHJz2qpLx+No4fYFyJ8UJWpA5fJnKRsGCMJR48Ht8GuByHDavJydcCLHOP+uPXk nepA== X-Gm-Message-State: AOAM530ieggHx4a8cudg84yrTP0H5FE3aRr4P/lwYjdmDkDokapds3tX U+sWXaYxg/2JQ3QhaSzkhv2RUFonoaCHwCUZ6z+wqQ== X-Received: by 2002:a2e:8851:: with SMTP id z17mr13816631ljj.225.1595350143051; Tue, 21 Jul 2020 09:49:03 -0700 (PDT) MIME-Version: 1.0 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> <20200721124957.GD6132@suse.de> In-Reply-To: <20200721124957.GD6132@suse.de> From: Erdem Aktas Date: Tue, 21 Jul 2020 09:48:51 -0700 Message-ID: Subject: Re: [PATCH v4 00/75] x86: SEV-ES Guest Support To: Joerg Roedel 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yes, I am using OVMF with SEV-ES (sev-es-v12 patches applied). I am running Ubuntu 18.04 distro. My grub target is x86_64-efi. I also tried installing the grub-efi-amd64 package. In all cases, the grub is running in 64bit but enters the startup_32 in 32 bit mode. I think there should be a 32bit #VC handler just something very similar in the OVMF patches to handle the cpuid when the CPU is still in 32bit mode. As it is now, it will be a huge problem to support different distro images. I wonder if I am the only one having this problem. -Erdem On Tue, Jul 21, 2020 at 5:50 AM Joerg Roedel wrote: > > 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 >