• Avi Kivity's avatar
    KVM: MMU: Set nx bit correctly on shadow ptes · 8d87a03a
    Avi Kivity authored
    While the page table walker correctly generates a guest page fault
    if a guest tries to execute a non-executable page, the shadow code does
    not mark it non-executable.  This means that if a guest accesses an nx
    page first with a read access, then subsequent code fetch accesses will
    succeed.
    
    Fix by setting the nx bit on shadow ptes.
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    8d87a03a
paging_tmpl.h 13.3 KB