Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp715436pxb; Fri, 8 Jan 2021 16:51:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUgXn02FRMqg0MURyBt5l6/hnjCUsgD+/7pBQL6j/b9xuqQwlbW9k9Lst2yUDb/UF93tWY X-Received: by 2002:a17:906:d0c1:: with SMTP id bq1mr4169850ejb.202.1610153504170; Fri, 08 Jan 2021 16:51:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610153504; cv=none; d=google.com; s=arc-20160816; b=UCsMH9DeoHQCAAk7x6XzKGjAhJbLZtDFepb1SUqqtBHsla4xgzswj7+mLZicIVbbDv zmgyty0Cs44kwFOxJwhsLPuIGN5yUwGIYmEVrV04BZlfhiMyBxzTL34jmkk2Pxv2+BFF 7NAq7LSWN4IxHRiW6dFELmXIjAA7HY/SI9bE24bzYwG6h5rLgJSoGeHiceOwupO0GgGF bOHjxPXHiG6e2VSnL+iHGHTOEFn+k30Q0ik2ck9opp0s5SPFZxES8AeYAGr46AFIhui3 pZdA7wBB1AMlMn/r8hpB8C6ceGFenym6cCpjI/51M8kKu+jSCfH9yrRkpH84xhBJxiky VTDg== 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:sender:dkim-signature; bh=292fZgTlFSUh9sat6hWygwmIzdDrAIVyQe5fuEoV9fw=; b=w7b8QQocj0ykO6vC1OiihyOPha5+xQTiGK6J5mVl5MF1idLa8hjQOJYZyJbp8UY9GT wT/PPYefDOF0fT8kaWUC/+54sggRvyJJWmYoFodB4RqnhGOHgW2MCgx5u9suF0XNITed inuUiThBSWay8MMr573+dpzkmAVPProXMzxCL1Xva5dl/u9EgyTOtDGaM7MFuuJFBJTM iH5a3AHtXrCE5jDCS4sVeED4DZ1UjE93Urm5oNtDjSGa4uokpJX/sl2MlpaLzM+LYjnE ZaL3htOwMAK5Ukg0/bpqhvatV7YmLb9OeLmQvGnsA1GEmTdmJkMmyVTAp6cJHeDXmpRX /8Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hR96DdZV; 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 n7si4068262ejz.458.2021.01.08.16.51.20; Fri, 08 Jan 2021 16:51:44 -0800 (PST) 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=hR96DdZV; 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 S1726812AbhAIAtN (ORCPT + 99 others); Fri, 8 Jan 2021 19:49:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726749AbhAIAtL (ORCPT ); Fri, 8 Jan 2021 19:49:11 -0500 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 C8A60C06179E for ; Fri, 8 Jan 2021 16:47:55 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id a206so17358418ybg.0 for ; Fri, 08 Jan 2021 16:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:reply-to:date:in-reply-to:message-id:mime-version:references :subject:from:to:cc; bh=292fZgTlFSUh9sat6hWygwmIzdDrAIVyQe5fuEoV9fw=; b=hR96DdZVhDK+6qksQXwJIuiZ/+XOj3ixyaTOVgExtrmCRA9k9BiJ8s3YgNFLU3xKuU fWsRiWw1w1gvEMoYm/4WwT2wYvA/XzG2nxmCkgdQN5lEU2o7K8hCtDpjCtGO+NTumXRP uplxJLr4QbseEMJyzcTJM6Q79qZ9JbZZ4t3fZakIvTFj+eHpG3u+xWYc795ob+Fklal2 v1ZYK++qgNSSeAcaV1RbXR+IIrS7iZfwAe9eYOQ39xfL4eyYQxA0lnKKwIlQ1poZJRtD CXIharTpYAkcZdwr3+0lweYIN+Vul/f/q7ZrGWHMQPR5tLgWCzd/9snJlJ8sjvSsBIAk YwOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:date:in-reply-to:message-id :mime-version:references:subject:from:to:cc; bh=292fZgTlFSUh9sat6hWygwmIzdDrAIVyQe5fuEoV9fw=; b=RFn/WzFAF9SL/lXjL4DZa0LS9oGQkQrAEr/HErjXklZg26eMgBHbryy54uEtCA3ADk t4p0IeaTJkN9fouMH0CGQ/2NYr5DqYykhf1ghGBNd/Nbra62dt29ABJjV8yqeWqhNmlU kA+NpEqiRnBc8pRDmWwI521WcFxjVXmPymSqe8YnczVhjl0aXcu+mRMzY9C1Kq9NRYA+ dRm+6AZBajA4x5vOgAC0yYXgX0mTe4ovV6LYTFH49MlUqOcy7XLT8/KWcmKnQRUvvfd+ 1xhF6LCKg6st/NoMqB5BEiD+nmE/DhGLHhyQ5oUuGTKWR7L/IQMi5Bzo7nb78p2cOCAA LC2Q== X-Gm-Message-State: AOAM531+Edx3fREDGUPyMS8DCQUp9V77y4zveo7426Yi+OoD0o2iQ/6H b3+aCKj3Gi2rvd2EA1Y+G3+MM7YdA+0= Sender: "seanjc via sendgmr" X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:f:10:1ea0:b8ff:fe73:50f5]) (user=seanjc job=sendgmr) by 2002:a25:5:: with SMTP id 5mr9415276yba.478.1610153275053; Fri, 08 Jan 2021 16:47:55 -0800 (PST) Reply-To: Sean Christopherson Date: Fri, 8 Jan 2021 16:47:09 -0800 In-Reply-To: <20210109004714.1341275-1-seanjc@google.com> Message-Id: <20210109004714.1341275-9-seanjc@google.com> Mime-Version: 1.0 References: <20210109004714.1341275-1-seanjc@google.com> X-Mailer: git-send-email 2.30.0.284.gd98b1dd5eaa7-goog Subject: [PATCH 08/13] 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, Tom Lendacky , Borislav Petkov , 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. 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 f89f702b2a58..bb7b99743bea 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -887,8 +887,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.30.0.284.gd98b1dd5eaa7-goog