Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp660181ybh; Wed, 22 Jul 2020 09:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmqynLgGR22dyX4l4Vh829ojyxdK/1zSgEXhQqZLRJ52uWzeV5lNGdbQdEAtGS5Gj7/auW X-Received: by 2002:a17:907:395:: with SMTP id ss21mr440334ejb.181.1595436923514; Wed, 22 Jul 2020 09:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595436923; cv=none; d=google.com; s=arc-20160816; b=D7XUYU0XQP5h3TuzSy1eiat8z1JQaIRpHnG/4tZsOyuf6A4dahpZFzyEP253jEN8gP mWxRTZsQh6eNhQUwAya4fRvaVuT2fmqSkz38e51NhJYo4BZ5HWbi7r/lYOwZkZZPbPmd /3Ad2p92YUVoo0kak1l1HxKUTZQnTSg10exsi+c5EtclABnz5fNgyXCkfg8gw1vdvfp2 QPTAoJhRcteiQXfx3pxRhx9mwf8EDgAL94fKLCDgv4kNN58go/UeZYQJP8UOdwts1cq+ 0CAUO3rgldcCdG4F2A+h/zMC99BKcfcVcmvX7M77MsPe6Qh6wBciNeP4a/D1NScV7XAg kfvA== 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=QUxmdpqhygtgKfzN8W9vujh+GzdOa2S0bqyvDwXYyhA=; b=bfDiI54c4RnuHlxMCh2I5edtyetke7jAR6M1ZMeiOU94QHfMdepBdxK89Tl4SGSE07 nS3twB77dFqZp8soILFQAhxV74gVxFV6M3taQ3n93kg7tJZcFxoROGsRVZsGy1QZYVkg qtiZmmKGnj30UaJcH11CL0zRUS+ONqIwXM0XAxw2dOFIKnojyBtVAGybA46k8sPpYqdv Bsfj99xKWe+dYMFj6MiWGOI79zRP9SE1tG1sHzFBJrgS2GZx7uhfv9ypkxu9vJotrvGc nB/k0NzZFDAxYPt6mkbGFz8VrlH8ipscc6UzItmwzqUoXX4Bw0MPGgMQ8eu/9w8iO8q1 PjnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wV+co3N+; 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 dr6si460137ejc.638.2020.07.22.09.55.00; Wed, 22 Jul 2020 09:55:23 -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=wV+co3N+; 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 S1730901AbgGVQyz (ORCPT + 99 others); Wed, 22 Jul 2020 12:54:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726535AbgGVQyy (ORCPT ); Wed, 22 Jul 2020 12:54:54 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD970C0619E0 for ; Wed, 22 Jul 2020 09:54:53 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id i19so1703177lfj.8 for ; Wed, 22 Jul 2020 09:54:53 -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=QUxmdpqhygtgKfzN8W9vujh+GzdOa2S0bqyvDwXYyhA=; b=wV+co3N+GbqN/y0oexAFRRgA4x0zoc2MLgnobj+GtwIikjfaAX3O4tJp9+0E/QTE4a IBadGE3VzIlg/ZGN7ZdALOZfaOpWX+rFiBDJg++rJ9tbsdMABK7FuX5Ap8bNtP4kzCDk /tzLC4ZuQYtp3U9M0KzBCdHy9w2fhLm+ebpnJjmmCedEGqGKFyiwvNfxx8I6D3QozfXc 7sA12yOo1tyb1vrs3KuCTZ+izv3FeBPQoWTTOD//8QCbEhSvhep5x4qulR1Tx9H8i8Cw 3ApnTAVI2Of8xOV4GDoZTPTAl9H9G+sqlsZvPvejhMnpxeyZ5xCqSaLCZk8WoU2ORf6k Yfpg== 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=QUxmdpqhygtgKfzN8W9vujh+GzdOa2S0bqyvDwXYyhA=; b=k4NZVKjdhv+xIcmGfRJ/dCW0DzubWSnpVn++xl10j0+giu9kGD0EBs3vt7KUuqIWKV aqqAJTgXVwXL//HkPeZDIWEqp0kZOGaGBoCH4jdXEZQyiJ+bZak+0Tp+FfRI4zXUmjLj rRvCvUvTPz8J70WmVvwAfhcVsRe42NSK/MeFpNNLyE0ZH9ekiCFcx/yqs+bfaCmH+//S Skvaa22APecnfwO+5p9C6vnMkhImqQoJV3YDHEQFkdO1VJTILMhMLWS1prYRh+AInSmh bTqIngQVZ9KAkvA5hA2lSlMVVZd3wNKtwY3AZWhedkeanZ8KYKlb7UN7rE6N1cKRJ413 L29Q== X-Gm-Message-State: AOAM530GOFeHfXtly+o4NzRoWN8C/utOztu3cPjWlDsdeg6trhXupseW bAn61NGslr/7n+V589hUhS4VCBhU03PuQ+PSQKG53A== X-Received: by 2002:a05:6512:1182:: with SMTP id g2mr150606lfr.126.1595436891943; Wed, 22 Jul 2020 09:54:51 -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> <20200722090442.GI6132@suse.de> In-Reply-To: <20200722090442.GI6132@suse.de> From: Erdem Aktas Date: Wed, 22 Jul 2020 09:54:40 -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 I am using a custom, optimized and stripped down version, OVMF build. Do you think it is because of the OVMF or grub? In my case, there are 2 places where the CPUID is called: the first one is to decide if long mode is supported, along with few other features like SSE support and the second one is to retrieve the encryption bit location. -Erdem On Wed, Jul 22, 2020 at 2:04 AM Joerg Roedel wrote: > > Hi Erdem, > > On Tue, Jul 21, 2020 at 09:48:51AM -0700, Erdem Aktas wrote: > > 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. > > I havn't heard from anyone else that the startup_32 boot-path is being > used for SEV-ES. What OVMF binary do you use for your guest? > > In general it is not that difficult to support that boot-path too, but > I'd like to keep that as a future addition, as the patch-set is already > quite large. In the startup_32 path there is already a GDT set up, so > whats needed is an IDT and a 32-bit #VC handler using the MRS-based > protocol (and hoping that there will only be CPUID intercepts until it > reaches long-mode). > > Regards, > > Joerg >