KVM: x86/mmu: Set mmio_value to '0' if reserved #PF can't be generated
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 27 May 2020 08:49:09 +0000 (01:49 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 27 May 2020 17:06:45 +0000 (13:06 -0400)
commit6129ed877d409037b79866327102c9dc59a302fe
tree436caffb190c60cc761564da81bf40bb89159652
parentd43e2675e96fc6ae1a633b6a69d296394448cc32
KVM: x86/mmu: Set mmio_value to '0' if reserved #PF can't be generated

Set the mmio_value to '0' instead of simply clearing the present bit to
squash a benign warning in kvm_mmu_set_mmio_spte_mask() that complains
about the mmio_value overlapping the lower GFN mask on systems with 52
bits of PA space.

Opportunistically clean up the code and comments.

Cc: stable@vger.kernel.org
Fixes: d43e2675e96fc ("KVM: x86: only do L1TF workaround on affected processors")
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200527084909.23492-1-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c