KVM: MMU: move FNAME(is_rsvd_bits_set) to mmu.c
FNAME(is_rsvd_bits_set) does not depend on guest mmu mode, move it to mmu.c to stop being compiled multiple times Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:

committed by
Paolo Bonzini

parent
6f691251c0
commit
d2b0f98125
@@ -3546,6 +3546,14 @@ static inline bool is_last_gpte(struct kvm_mmu *mmu, unsigned level, unsigned gp
|
||||
return mmu->last_pte_bitmap & (1 << index);
|
||||
}
|
||||
|
||||
static bool is_rsvd_bits_set(struct kvm_mmu *mmu, u64 gpte, int level)
|
||||
{
|
||||
int bit7 = (gpte >> 7) & 1, low6 = gpte & 0x3f;
|
||||
|
||||
return (gpte & mmu->rsvd_bits_mask[bit7][level-1]) |
|
||||
((mmu->bad_mt_xwr & (1ull << low6)) != 0);
|
||||
}
|
||||
|
||||
#define PTTYPE_EPT 18 /* arbitrary */
|
||||
#define PTTYPE PTTYPE_EPT
|
||||
#include "paging_tmpl.h"
|
||||
|
Reference in New Issue
Block a user