Re: [PATCH 3/3] KVM MMU: Take sp level into account when calculating quadran

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

 



Gui Jianfeng wrote:
> Take sp level into account when calculating quadrant, because only when
> level == PT_PAGE_TABLE_LEVEL, quadrant is needed.

Please ignore this patch, Sorry for the noise.

Gui

> 
> Signed-off-by: Gui Jianfeng <guijianfeng@xxxxxxxxxxxxxx>
> ---
>  arch/x86/kvm/mmu.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
> index 640b82d..2a35a65 100644
> --- a/arch/x86/kvm/mmu.c
> +++ b/arch/x86/kvm/mmu.c
> @@ -1324,7 +1324,8 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
>  	if (role.direct)
>  		role.cr4_pae = 0;
>  	role.access = access;
> -	if (vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL) {
> +	if (vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL &&
> +	    level == PT_PAGE_TABLE_LEVEL) {
>  		quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level));
>  		quadrant &= (1 << ((PT32_PT_BITS - PT64_PT_BITS) * level)) - 1;
>  		role.quadrant = quadrant;

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