]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MTRR: introduce fixed_mtrr_addr_* functions
authorXiao Guangrong <guangrong.xiao@linux.intel.com>
Mon, 15 Jun 2015 08:55:32 +0000 (16:55 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Jun 2015 15:16:28 +0000 (17:16 +0200)
commitd49d09f3056ae7c0fcbeee2bbae1d86748b18eba
treea27ab306e80b1d48705a61335122f4aa30175324
parent5e4aa7df24e5d7cb9f2626314a0643098348c089
KVM: MTRR: introduce fixed_mtrr_addr_* functions

Two functions are introduced:
- fixed_mtrr_addr_to_seg() translates the address to the fixed
  MTRR segment

- fixed_mtrr_addr_seg_to_range_index() translates the address to
  the index of kvm_mtrr.fixed_ranges[]

They will be used in the later patch

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
[Adjust for range_size->range_shift change. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mtrr.c