* [PATCH 3/3] KVM MMU: Take sp level into account when calculating quadran
@ 2010-04-22 9:34 Gui Jianfeng
2010-04-23 8:10 ` Gui Jianfeng
0 siblings, 1 reply; 2+ messages in thread
From: Gui Jianfeng @ 2010-04-22 9:34 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Take sp level into account when calculating quadrant, because only when
level == PT_PAGE_TABLE_LEVEL, quadrant is needed.
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
---
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;
--
1.6.5.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/3] KVM MMU: Take sp level into account when calculating quadran
2010-04-22 9:34 [PATCH 3/3] KVM MMU: Take sp level into account when calculating quadran Gui Jianfeng
@ 2010-04-23 8:10 ` Gui Jianfeng
0 siblings, 0 replies; 2+ messages in thread
From: Gui Jianfeng @ 2010-04-23 8:10 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm, Xiao Guangrong
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@cn.fujitsu.com>
> ---
> 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-23 8:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-22 9:34 [PATCH 3/3] KVM MMU: Take sp level into account when calculating quadran Gui Jianfeng
2010-04-23 8:10 ` Gui Jianfeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox