Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp92900pxu; Tue, 6 Oct 2020 20:08:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHvlX9zM7w850rkvOEfiejllxI7XdEn8rMvmKjDmMtFoHkjcCJVIzXWLIvG12V/iN/JXLf X-Received: by 2002:a17:906:1a0b:: with SMTP id i11mr1206838ejf.472.1602040111321; Tue, 06 Oct 2020 20:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602040111; cv=none; d=google.com; s=arc-20160816; b=SxgKEt/vdYl6LHy0eWZ76ZzDk9IMD6ACDjpgvfRgztieoO0497zXzzdUL3en5J9Asc +Yk9omE6tr2RZKJGW496hgbhtD6raQjuH8kWiNxwQm3c8BVkVrbGdnyx+mesRM28YSER zRtE4ojVDUzlYVf6LhAnvbg4xeQItXNBxJxprquhsxN3MmD0IwLdL8HqZwYPGLBFATJ2 9AFNQ8l55FSaD1F2KrwZhL735ZKZEWxkr+fNpCZEonfy+EANS1ghX3yBqCGX0ed51mWu vaqrZJZK2Yr5maDniWQa/X5NMNoSrvVAvxqLqDu7QRhsD3mPQ0dFi1CmHiKK265S1mLG 2lIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=6f4iYtFJj+JMMFRGVMs5aQNmMbgsFSys/0k7N0tmUCw=; b=uEn6/IhzVfXWwZZeJt6VypjojAVUGbK81fJcPnRsnMC85tjhR8kUfxzQv7PYvlouKW Is3aGA1Res5FnM+18i9dwhufS2GRqdoxpBT4mZV+/QqZsF436ad7bPhPKy/l1IcG3AxG dz6B3WuIUoCGg1eMN+ne4uCtp66x9R9AHn5gRz3zeAMHk+koSxbqHO8XZs9qedWQ5ooB gBqK+kobXQRog1h/SBmp/rj+rtYJ0oP7d6LKQ6gMTRjgbDxfpFlY8tPgkupo8GIWEm59 +m9sWLvmXA2mfpoPKOMkE8QagLMlkw874yqq6SmQnAZv7DRXT5vi7QsP+VsoxB/lZ52u V8Bw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si531461edv.314.2020.10.06.20.08.08; Tue, 06 Oct 2020 20:08:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727463AbgJGBor (ORCPT + 99 others); Tue, 6 Oct 2020 21:44:47 -0400 Received: from mga09.intel.com ([134.134.136.24]:7792 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727208AbgJGBoU (ORCPT ); Tue, 6 Oct 2020 21:44:20 -0400 IronPort-SDR: Au1hPQApfOCzEuH3sxeuJdUITPOj/7Z8dPsFrIscKp74Vs1NaullLInJN26nnJ0GUYSRYUW2lz 2PQsXaDGm3rQ== X-IronPort-AV: E=McAfee;i="6000,8403,9766"; a="164914600" X-IronPort-AV: E=Sophos;i="5.77,344,1596524400"; d="scan'208";a="164914600" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 18:44:18 -0700 IronPort-SDR: SHL5sLPz2PGABQSabKsQ23HJaX9Pd5X8W0q1U7vvh4HGnHy9Gb2ThVzIbVPDxifOgP6aFejoIl CFNfEFoldAsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,344,1596524400"; d="scan'208";a="297410303" Received: from sjchrist-coffee.jf.intel.com ([10.54.74.160]) by fmsmga008.fm.intel.com with ESMTP; 06 Oct 2020 18:44:18 -0700 From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Stas Sergeev Subject: [PATCH 3/6] KVM: SVM: Drop VMXE check from svm_set_cr4() Date: Tue, 6 Oct 2020 18:44:14 -0700 Message-Id: <20201007014417.29276-4-sean.j.christopherson@intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201007014417.29276-1-sean.j.christopherson@intel.com> References: <20201007014417.29276-1-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drop svm_set_cr4()'s explicit check CR4.VMXE now that common x86 handles the check by incorporating VMXE into the CR4 reserved bits, via kvm_cpu_caps. SVM obviously does not set X86_FEATURE_VMX. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/svm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 4f401fc6a05d..f92a19b77da3 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1684,9 +1684,6 @@ int svm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) unsigned long host_cr4_mce = cr4_read_shadow() & X86_CR4_MCE; unsigned long old_cr4 = to_svm(vcpu)->vmcb->save.cr4; - if (cr4 & X86_CR4_VMXE) - return 1; - if (npt_enabled && ((old_cr4 ^ cr4) & X86_CR4_PGE)) svm_flush_tlb(vcpu); -- 2.28.0