• Paolo Bonzini's avatar
    KVM: MMU: simplify last_pte_bitmap · 6bb69c9b
    Paolo Bonzini authored
    Branch-free code is fun and everybody knows how much Avi loves it,
    but last_pte_bitmap takes it a bit to the extreme.  Since the code
    is simply doing a range check, like
    
    	(level == 1 ||
    	 ((gpte & PT_PAGE_SIZE_MASK) && level < N)
    
    we can make it branch-free without storing the entire truth table;
    it is enough to cache N.
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    6bb69c9b
mmu.c 126 KB