Re: [PATCH 09/15] KVM: MTRR: introduce var_mtrr_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Thanks for your review, David!


On 06/09/2015 08:36 AM, David Matlack wrote:

  static void update_mtrr(struct kvm_vcpu *vcpu, u32 msr)
  {
         struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state;
-       gfn_t start, end, mask;
+       gfn_t start, end;
         int index;

         if (msr == MSR_IA32_CR_PAT || !tdp_enabled ||
@@ -244,11 +255,7 @@ static void update_mtrr(struct kvm_vcpu *vcpu, u32 msr)
         default:
                 /* variable range MTRRs. */
                 index = (msr - 0x200) / 2;
-               start = mtrr_state->var_ranges[index].base & PAGE_MASK;
-               mask = mtrr_state->var_ranges[index].mask & PAGE_MASK;
-               mask |= ~0ULL << cpuid_maxphyaddr(vcpu);

Why did you drop this in favor of boot_cpu_data.x86_phys_bits?


It can make the code more generic, @vcpu is not needed anymore.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux