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/x86.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/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 916e89515210..e4ed85e07a01 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5569,7 +5569,7 @@ static void kvm_set_mmio_spte_mask(void) * entry to generate page fault with PFER.RSV = 1. */ /* Mask the reserved physical address bits. */ - mask = ((1ull << (51 - maxphyaddr + 1)) - 1) << maxphyaddr; + mask = rsvd_bits(maxphyaddr, 51); /* Bit 62 is always reserved for 32bit host. */ mask |= 0x3ull << 62; |