]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: Derive EPT violation RWX bits from EPTE RWX bits
authorSean Christopherson <seanjc@google.com>
Tue, 29 Mar 2022 03:01:07 +0000 (11:01 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Apr 2022 17:37:37 +0000 (13:37 -0400)
commit577bdffa6f09e4acd461e78d91e7efd26e6dd8a4
tree681a5d27637010cc10786ca7e7a1f53da61dbb5f
parenta4f00959579202c43089f55873e604c374d7e445
KVM: x86/mmu: Derive EPT violation RWX bits from EPTE RWX bits

Derive the mask of RWX bits reported on EPT violations from the mask of
RWX bits that are shoved into EPT entries; the layout is the same, the
EPT violation bits are simply shifted by three.  Use the new shift and a
slight copy-paste of the mask derivation instead of completely open
coding the same to convert between the EPT entry bits and the exit
qualification when synthesizing a nested EPT Violation.

No functional change intended.

Cc: SU Hang <darcy.sh@antgroup.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220329030108.97341-3-darcy.sh@antgroup.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/vmx.h
arch/x86/kvm/mmu/paging_tmpl.h
arch/x86/kvm/vmx/vmx.c