diff options
author | Tiejun Chen <tiejun.chen@intel.com> | 2014-09-01 18:44:04 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-03 10:04:10 +0200 |
commit | d143148383d0395539073dd6c2f25ddf6656bdcc (patch) | |
tree | 122881b4567d4a8279cb27793ce5542b976268df /arch/x86/kvm/mmu.c | |
parent | 56f17dd3fbc44adcdbc3340fe3988ddb833a47a7 (diff) | |
download | lwn-d143148383d0395539073dd6c2f25ddf6656bdcc.tar.gz lwn-d143148383d0395539073dd6c2f25ddf6656bdcc.zip |
KVM: mmio: cleanup kvm_set_mmio_spte_mask
Just reuse rsvd_bits() inside kvm_set_mmio_spte_mask()
for slightly better code.
Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r-- | arch/x86/kvm/mmu.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 1cd2a5fbde07..6b6df0c5be3d 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -295,11 +295,6 @@ static bool check_mmio_spte(struct kvm *kvm, u64 spte) return likely(kvm_gen == spte_gen); } -static inline u64 rsvd_bits(int s, int e) -{ - return ((1ULL << (e - s + 1)) - 1) << s; -} - void kvm_mmu_set_mask_ptes(u64 user_mask, u64 accessed_mask, u64 dirty_mask, u64 nx_mask, u64 x_mask) { |