]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: VMX: Remove the unused variable "gpa" in __invept()
authorYan Zhao <yan.y.zhao@intel.com>
Mon, 14 Oct 2024 04:59:31 +0000 (12:59 +0800)
committerSean Christopherson <seanjc@google.com>
Wed, 30 Oct 2024 19:28:37 +0000 (12:28 -0700)
commitbc17fccb37c8c100e3390e429e952330fd7cab1e
tree6c2d935fa12c1e27c823a938a5814d231453a9e2
parent5cb1659f412041e4780f2e8ee49b2e03728a2ba6
KVM: VMX: Remove the unused variable "gpa" in __invept()

Remove the unused variable "gpa" in __invept().

The INVEPT instruction only supports two types: VMX_EPT_EXTENT_CONTEXT (1)
and VMX_EPT_EXTENT_GLOBAL (2). Neither of these types requires a third
variable "gpa".

The "gpa" variable for __invept() is always set to 0 and was originally
introduced for the old non-existent type VMX_EPT_EXTENT_INDIVIDUAL_ADDR
(0). This type was removed by commit 2b3c5cbc0d81 ("kvm: don't use bit24
for detecting address-specific invalidation capability") and
commit 63f3ac48133a ("KVM: VMX: clean up declaration of VPID/EPT
invalidation types").

Since this variable is not useful for error handling either, remove it to
avoid confusion.

No functional changes expected.

Cc: Yuan Yao <yuan.yao@intel.com>
Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
Link: https://lore.kernel.org/r/20241014045931.1061-1-yan.y.zhao@intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx_ops.h