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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jun 2020 14:40:25 +0000 (16:40 +0200)
commitaf718119061f8a9b39360b3ce8685359de1b2902
tree7910358a433f9e5f9dc208cfab9c3e759f655f9c
parentd872f174218de94d99a6d1d1910dbf960bbe48f5
KVM: x86/mmu: Set mmio_value to '0' if reserved #PF can't be generated

commit 6129ed877d409037b79866327102c9dc59a302fe upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu.c