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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 0E694C433DB for ; Tue, 9 Mar 2021 10:03:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C175A65257 for ; Tue, 9 Mar 2021 10:03:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229553AbhCIKC7 (ORCPT ); Tue, 9 Mar 2021 05:02:59 -0500 Received: from 8bytes.org ([81.169.241.247]:58086 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbhCIKCl (ORCPT ); Tue, 9 Mar 2021 05:02:41 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id B07012E2; Tue, 9 Mar 2021 11:02:39 +0100 (CET) Date: Tue, 9 Mar 2021 11:02:36 +0100 From: Joerg Roedel To: Borislav Petkov Cc: x86@kernel.org, Joerg Roedel , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , Arvind Sankar , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 6/7] x86/boot/compressed/64: Check SEV encryption in 32-bit boot-path Message-ID: References: <20210210102135.30667-1-joro@8bytes.org> <20210210102135.30667-7-joro@8bytes.org> <20210302194353.GH15469@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210302194353.GH15469@zn.tnic> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Tue, Mar 02, 2021 at 08:43:53PM +0100, Borislav Petkov wrote: > On Wed, Feb 10, 2021 at 11:21:34AM +0100, Joerg Roedel wrote: > > + /* > > + * Store the sme_me_mask as an indicator that SEV is active. It will be > > + * set again in startup_64(). > > So why bother? Or does something needs it before that? This was actually a bug. The startup32_check_sev_cbit() needs something to skip the check when SEV is not active. Therefore the value is set here in sme_me_mask, but the function later checks sev_status. I fixed it by setting sev_status to 1 here (indicates SEV is active). Regards, Joerg