Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp417620pxy; Thu, 22 Apr 2021 05:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP28yUdoOVmOXK//B77exwIoZJwv7SvGi1kPFPfKDiXbfMP0n4+25iu3OVb8KZ9WEXA9rz X-Received: by 2002:a50:e848:: with SMTP id k8mr3443744edn.179.1619093868706; Thu, 22 Apr 2021 05:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619093868; cv=none; d=google.com; s=arc-20160816; b=FFNocuJod+LjSpapXdonryF6s/EKaR4+txFyJ5tUjAmZ/HbjXCJoiICMx/nhM1E9VK q/jNsdPBhpx/+Roh1NCc71H5yVWeSYFFaWeCI8g/L4zQQs6PB4qvxZ7h0qajAvVgYAJe xZTD6GMNeXoppLOerbz2kWyCDfIeEZuacmjvVhaqCK2qHqV8BnXXVkIYvgvC4HqCF1pa vy0fb6MLFh4GjUjLQTWKT1dgqqdReMwUKk1XpGlMXN7+BGkQ6gHafMMhQlqB9eGtKdXE wgaHOgig/smlkj4aGOREUKS5mXq4L/Kfh9s4mGbLdvO5IOKNgT5gRZ4MxUDJbgoa8eM5 5+aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=iqEJr/a65ze0uPmy0eHa7hvRf/7WnfTErVesY9nYCgg=; b=MWVsdzg+BVeBZGAREg4W3EOOF3eGIA7XSspPnyPlRIuPGhAJP785/LFqKbEosTpxQ/ cyNWWxNhapQoSjAFMPgFEittlQIjWyfU/7qnLwsw1o0ISsl2hizFBZLlx1Jt1gqfbbBv eZcLXvj7IKtAgG5mPGGhhVXNoa/WrYGGVhmzFtvPmKqxD61/ncvFNXDrHLy0y30fpJ91 ptdqSMTxAx9kpZEnn9PRn5yXNVZPr1wQXSJbP626rTqDFgMVT80KbNbl6UE56MfE3V3s +QsAcgfLgQMtyh8mTCk8ROFL+1HNWuKvPmJYuxp5h7eaofoDwi9LJ+9CLTcvGOEMc59u 6EPg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nd5si1944028ejc.395.2021.04.22.05.17.23; Thu, 22 Apr 2021 05:17:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236008AbhDVMQ7 (ORCPT + 99 others); Thu, 22 Apr 2021 08:16:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:57988 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235232AbhDVMQ7 (ORCPT ); Thu, 22 Apr 2021 08:16:59 -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 AC4C1AF03; Thu, 22 Apr 2021 12:16:23 +0000 (UTC) Date: Thu, 22 Apr 2021 14:16:18 +0200 From: Borislav Petkov To: Sean Christopherson Cc: Paolo Bonzini , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Tom Lendacky , Brijesh Singh Subject: Re: [PATCH v5 06/15] x86/sev: Drop redundant and potentially misleading 'sev_enabled' Message-ID: <20210422121618.GC6361@zn.tnic> References: <20210422021125.3417167-1-seanjc@google.com> <20210422021125.3417167-7-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210422021125.3417167-7-seanjc@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 21, 2021 at 07:11:16PM -0700, Sean Christopherson wrote: > Drop the sev_enabled flag and switch its one user over to sev_active(). > sev_enabled was made redundant with the introduction of sev_status in > commit b57de6cd1639 ("x86/sev-es: Add SEV-ES Feature Detection"). > sev_enabled and sev_active() are guaranteed to be equivalent, as each is > true iff 'sev_status & MSR_AMD64_SEV_ENABLED' is true, and are only ever > written in tandem (ignoring compressed boot's version of sev_status). > > Removing sev_enabled avoids confusion over whether it refers to the guest > or the host, and will also allow KVM to usurp "sev_enabled" for its own > purposes. > > No functional change intended. > > Reviewed-by: Tom Lendacky > Reviewed-by: Brijesh Singh > Signed-off-by: Sean Christopherson > --- > arch/x86/include/asm/mem_encrypt.h | 1 - > arch/x86/mm/mem_encrypt.c | 12 +++++------- > arch/x86/mm/mem_encrypt_identity.c | 1 - > 3 files changed, 5 insertions(+), 9 deletions(-) Acked-by: Borislav Petkov Thx. -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg