Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133671
b: refs/heads/master
c: a770f6f
h: refs/heads/master
i:
  133669: ae993d6
  133667: b82b2a2
  133663: 5d8988e
v: v3
  • Loading branch information
Avi Kivity committed Mar 24, 2009
1 parent 339e3d6 commit fcc1809
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22ccb14203d59a8bcf6f3fea76b3594d710569fa
refs/heads/master: a770f6f28b1a9287189f3dc8333eb694d9a2f0ab
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ struct kvm_mmu {
hpa_t root_hpa;
int root_level;
int shadow_root_level;
union kvm_mmu_page_role base_role;

u64 *pae_root;
};
Expand Down
17 changes: 11 additions & 6 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,8 +1204,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
struct kvm_mmu_page *sp;
struct hlist_node *node, *tmp;

role.word = 0;
role.glevels = vcpu->arch.mmu.root_level;
role = vcpu->arch.mmu.base_role;
role.level = level;
role.metaphysical = metaphysical;
role.access = access;
Expand Down Expand Up @@ -2251,17 +2250,23 @@ static int init_kvm_tdp_mmu(struct kvm_vcpu *vcpu)

static int init_kvm_softmmu(struct kvm_vcpu *vcpu)
{
int r;

ASSERT(vcpu);
ASSERT(!VALID_PAGE(vcpu->arch.mmu.root_hpa));

if (!is_paging(vcpu))
return nonpaging_init_context(vcpu);
r = nonpaging_init_context(vcpu);
else if (is_long_mode(vcpu))
return paging64_init_context(vcpu);
r = paging64_init_context(vcpu);
else if (is_pae(vcpu))
return paging32E_init_context(vcpu);
r = paging32E_init_context(vcpu);
else
return paging32_init_context(vcpu);
r = paging32_init_context(vcpu);

vcpu->arch.mmu.base_role.glevels = vcpu->arch.mmu.root_level;

return r;
}

static int init_kvm_mmu(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit fcc1809

Please sign in to comment.