Re: [PATCH] Move translate_gpa() initialization for the nested context into init_kvm_nested_mmu()

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

 



On Mon, Dec 30, 2013 at 08:22:21PM -0500, Zhihui Zhang wrote:
> This is the right place to set the function pointer. In addition, change function name
> from translate_nested_gpa() to translate_gpa_nested() to match the naming convention of
> other functions (e.g., paging64_gva_to_gpa_nested()).
> 
> Signed-off-by: Zhihui Zhang <zzhsuny@xxxxxxxxx>

Why is it the right place? The assignment was executed once per
VM-creation, now its executed once per kvm_mmu_reset_context
(which is a downside). Another downside is that 

  	vcpu->arch.mmu.translate_gpa = translate_gpa;
	vcpu->arch.nested_mmu.translate_gpa = translate_nested_gpa;

You lose this proximity.

--
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