Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68422
b: refs/heads/master
c: 81f50e3
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Avi Kivity committed Oct 13, 2007
1 parent 99b02d4 commit 1224cf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: b85b9ee9259917f248ee1507d7d1f575f4fc27dd
refs/heads/master: 81f50e3bfdf864103ef890ca156e7a9c922c7089
8 changes: 4 additions & 4 deletions trunk/drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@ void set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
return;
}
kvm_arch_ops->set_cr4(vcpu, cr4);
vcpu->cr4 = cr4;
mutex_lock(&vcpu->kvm->lock);
kvm_mmu_reset_context(vcpu);
mutex_unlock(&vcpu->kvm->lock);
Expand Down Expand Up @@ -1238,10 +1239,8 @@ int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address)

int emulate_clts(struct kvm_vcpu *vcpu)
{
unsigned long cr0;

cr0 = vcpu->cr0 & ~X86_CR0_TS;
kvm_arch_ops->set_cr0(vcpu, cr0);
vcpu->cr0 &= ~X86_CR0_TS;
kvm_arch_ops->set_cr0(vcpu, vcpu->cr0);
return X86EMUL_CONTINUE;
}

Expand Down Expand Up @@ -2226,6 +2225,7 @@ static int kvm_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
kvm_arch_ops->decache_cr4_guest_bits(vcpu);

mmu_reset_needed |= vcpu->cr0 != sregs->cr0;
vcpu->cr0 = sregs->cr0;
kvm_arch_ops->set_cr0(vcpu, sregs->cr0);

mmu_reset_needed |= vcpu->cr4 != sregs->cr4;
Expand Down

0 comments on commit 1224cf7

Please sign in to comment.