Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202277
b: refs/heads/master
c: 62ad075
h: refs/heads/master
i:
  202275: d482d50
v: v3
  • Loading branch information
Sheng Yang authored and Avi Kivity committed Aug 1, 2010
1 parent ebb9b74 commit d6cafdf
Show file tree
Hide file tree
Showing 3 changed files with 4 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: 222b7c52c33bdef721248bfeba992af495800d30
refs/heads/master: 62ad07551a2ace89e35604d1c55fdae1dd3359a8
5 changes: 2 additions & 3 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2478,10 +2478,9 @@ static int init_kvm_mmu(struct kvm_vcpu *vcpu)
static void destroy_kvm_mmu(struct kvm_vcpu *vcpu)
{
ASSERT(vcpu);
if (VALID_PAGE(vcpu->arch.mmu.root_hpa)) {
if (VALID_PAGE(vcpu->arch.mmu.root_hpa))
/* mmu.free() should set root_hpa = INVALID_PAGE */
vcpu->arch.mmu.free(vcpu);
vcpu->arch.mmu.root_hpa = INVALID_PAGE;
}
}

int kvm_mmu_reset_context(struct kvm_vcpu *vcpu)
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ int __kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
return 1;

kvm_x86_ops->set_cr4(vcpu, cr4);
vcpu->arch.cr4 = cr4;

kvm_mmu_reset_context(vcpu);

return 0;
Expand Down Expand Up @@ -721,8 +721,6 @@ static int set_efer(struct kvm_vcpu *vcpu, u64 efer)

kvm_x86_ops->set_efer(vcpu, efer);

vcpu->arch.efer = efer;

vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled;
kvm_mmu_reset_context(vcpu);

Expand Down

0 comments on commit d6cafdf

Please sign in to comment.