Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp80838pxy; Wed, 21 Apr 2021 19:13:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4+iMwRrg7rbs6yFATwtJmH4ai8doHp0C6Ts/yI8qabghldQ8fnjSts671UyMQ0IvaaI5K X-Received: by 2002:a63:5b5c:: with SMTP id l28mr1097326pgm.363.1619057614602; Wed, 21 Apr 2021 19:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619057614; cv=none; d=google.com; s=arc-20160816; b=RMXlR7r5PES7+9XR57TTEAnnXYDz2WhS2W7LuaQWayiwSCvsF01y1pcuvrgh+6Cu+H NyJbeWbgRBuSonJBOfaqcUpJxnTxTWOpF+AsLpitioNAOrQ9q/qBT63eR4969sfyLmem 8KU0pYFBBG2fdWMxB0NHMA8NOdjXScllMZ8QpetKSRiy+tLKh+CJUSgEphc//2eix3ut 32Bj+nKybICLco5A4B/AZ+ySWaMFSNiq46jw3Ao7j9nl0kqWxASXnnYN/cxhCChbYd3K RL+QqkU3w0nWBRHA0cYouxTsw8hSahMtDgypis7xeSoN11GEzp2mCrxee8smBM6QXa2L Vl2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:reply-to:dkim-signature; bh=9BiWISFCcixYKtSXmCvhEquE6FSPh7cPiu0dynjovJc=; b=JVdj0FTBS3Xf8g3/usX2A0MsuscwlcRyVqquX93ZlWRnZKmXI8ChYoYIzilcKgpzdD TNqIBdEWtljYpuhGDoUKx7uZQnkxQihCnD4CHLEpmJfMVonJNnXhy6ooXq75i5odKvTV Gaf4e7ZtSBYqv58g0oKCjWgvVY5Bu+dvei8aMsq27Y0PUUd/g3sqa4YZHUNqh+7buadV BFMgQ+qUM0ekqUbjeSrxPT/XHaJkpjSI/sFb4NG+jbjLS2kQBNekWvUx0ekRgOat0n8F RPZzYt5M62RKcoLGJZa6FPgXcQZAWla2Le9uUgClRI3nczTOSmCXbUc1Tqq/LdhC/ZtS H4jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MuwM5Cse; 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 p5si1824937pgh.232.2021.04.21.19.13.21; Wed, 21 Apr 2021 19:13:34 -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=MuwM5Cse; 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 S234861AbhDVCMw (ORCPT + 99 others); Wed, 21 Apr 2021 22:12:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234632AbhDVCMb (ORCPT ); Wed, 21 Apr 2021 22:12:31 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32BC7C061342 for ; Wed, 21 Apr 2021 19:11:51 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id c1-20020a5b0bc10000b02904e7c6399b20so18227384ybr.12 for ; Wed, 21 Apr 2021 19:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=9BiWISFCcixYKtSXmCvhEquE6FSPh7cPiu0dynjovJc=; b=MuwM5CseSgqeEDzoWHzpoCmV2nW49DwExJhMKTCZlG3NYzsHgXIqlXoAMZcdZAtNZv j60C69rDGH3oF3fZbzlYQKRpcOVx+8/dbmMEyNEsa6f5HZuGMDLxFDbLt/jFDl1lnMZg 1vy8ShI07gkPP3TBnlWSq0DfMGaQahNoSkQsoPIzF3srupZpD5RRM2CcC/hUxerJRcGj Ics4x9gqpkCqngZoOCL435CYrD0ITSgX/t+njaAleF6jDSLU6cIGgP6Wkl/PTwpJzOTw c3GOAGz3m11NOfFU4cbeU75a6AKCioiPjSEBbzqB9dbzK7n0u874ArYajSuGGa2ggraA xuRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=9BiWISFCcixYKtSXmCvhEquE6FSPh7cPiu0dynjovJc=; b=fwwDLOSR9FG8Z0HHg+vqzxLQBIkqxUpkf3o3Cfa3ST0HNp8pN5JC5J4jOeeEcwafcn Dgqm65m/v8fz4IdqLr5llyU+AChFyuxOjye+mXPT5qgn6WKqFhw0fZyvvW2NSYZOS8Kb v2exxsE69VKBm9YyBLm79uIIZMz5FgQfDvp8Eu9vm7CJL5+NDkrWyceoXS/zFvLvgyXm op5vCLts/moXlq380GXJHTcfNJW/z8Fqmef0X/fbKjMXd44TGhIpc8VIkIr+42R+62aT r4o7r4W8jmUhjBfabOpl3d1l2+iMHr7+0THTWmTcMJTM4KazIcWn8j3ExhTZI7Xf4zbD tbJA== X-Gm-Message-State: AOAM532EEnTgLt+9vVWZdu7Ovwunf6KU8RKW4mOgAW1KfqKA4NF/RDfw IVwYYKP7W2vB9ihe1ZCWSzXw2VTmnhw= X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:f:10:e012:374c:592:6194]) (user=seanjc job=sendgmr) by 2002:a25:4946:: with SMTP id w67mr1389908yba.141.1619057510250; Wed, 21 Apr 2021 19:11:50 -0700 (PDT) Reply-To: Sean Christopherson Date: Wed, 21 Apr 2021 19:11:20 -0700 In-Reply-To: <20210422021125.3417167-1-seanjc@google.com> Message-Id: <20210422021125.3417167-11-seanjc@google.com> Mime-Version: 1.0 References: <20210422021125.3417167-1-seanjc@google.com> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog Subject: [PATCH v5 10/15] KVM: SVM: Unconditionally invoke sev_hardware_teardown() From: Sean Christopherson To: Paolo Bonzini , Dave Hansen , Andy Lutomirski , Peter Zijlstra Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Borislav Petkov , Tom Lendacky , Brijesh Singh Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the redundant svm_sev_enabled() check when calling sev_hardware_teardown(), the teardown helper itself does the check. Removing the check from svm.c will eventually allow dropping svm_sev_enabled() entirely. No functional change intended. Reviewed by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/svm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index cb227e90dffb..f5684d24e333 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -879,8 +879,7 @@ static void svm_hardware_teardown(void) { int cpu; - if (svm_sev_enabled()) - sev_hardware_teardown(); + sev_hardware_teardown(); for_each_possible_cpu(cpu) svm_cpu_uninit(cpu); -- 2.31.1.498.g6c1eba8ee3d-goog