summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@linux.alibaba.com>2021-11-18 19:08:12 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-12-08 04:25:09 -0500
commit41e35604eaff2266ba8523787ebe99c5ca4c4045 (patch)
tree547d2cf6c27939672b08631db0a4a38cd1d2427e
parent42f34c20a11333d031560bbb17d5e13e3bfcd44b (diff)
downloadlinux-41e35604eaff2266ba8523787ebe99c5ca4c4045.tar.gz
linux-41e35604eaff2266ba8523787ebe99c5ca4c4045.tar.bz2
linux-41e35604eaff2266ba8523787ebe99c5ca4c4045.zip
KVM: X86: Remove useless code to set role.gpte_is_8_bytes when role.direct
role.gpte_is_8_bytes is unused when role.direct; there is no point in changing a bit in the role, the value that was set when the MMU is initialized is just fine. Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com> Message-Id: <20211118110814.2568-14-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--arch/x86/kvm/mmu/mmu.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 740e9f52d324..c1b6ade6b4a7 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -2086,8 +2086,6 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
role = vcpu->arch.mmu->mmu_role.base;
role.level = level;
role.direct = direct;
- if (role.direct)
- role.gpte_is_8_bytes = true;
role.access = access;
if (!direct_mmu && vcpu->arch.mmu->root_level <= PT32_ROOT_LEVEL) {
quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level));