KVM: x86/mmu: WARN on any reserved SPTE value when making a valid SPTE
authorSean Christopherson <seanjc@google.com>
Tue, 22 Jun 2021 17:57:33 +0000 (10:57 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:46 +0000 (18:00 -0400)
commit3b77daa5efe1cb343ee498ade6ee58c8ada58074
tree9b20932ca3bc47a9d728cb7f73c8390923e205ef
parent961f84457cd4e2fc479e59d015f1d292ec30373b
KVM: x86/mmu: WARN on any reserved SPTE value when making a valid SPTE

Replace make_spte()'s WARN on a collision with the magic MMIO value with
a generic WARN on reserved bits being set (including EPT's reserved WX
combination).  Warning on any reserved bits covers MMIO, A/D tracking
bits with PAE paging, and in theory any future goofs that are introduced.

Opportunistically convert to ONCE behavior to avoid spamming the kernel
log, odds are very good that if KVM screws up one SPTE, it will botch all
SPTEs for the same MMU.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210622175739.3610207-49-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/spte.c