Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202271
b: refs/heads/master
c: b923e62
h: refs/heads/master
i:
  202269: aea8b83
  202267: 98d3774
  202263: ceafd17
  202255: d642747
  202239: 87e0a68
v: v3
  • Loading branch information
Dongxiao Xu authored and Avi Kivity committed Aug 1, 2010
1 parent cf84ea5 commit e69e511
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 92fe13be74303a7b80dc3c99e22e12a87d41bd5f
refs/heads/master: b923e62e4d48bc5242b32a6ef5ba0f886137668a
7 changes: 6 additions & 1 deletion trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ module_param_named(unrestricted_guest,
static int __read_mostly emulate_invalid_guest_state = 0;
module_param(emulate_invalid_guest_state, bool, S_IRUGO);

static int __read_mostly vmm_exclusive = 1;
module_param(vmm_exclusive, bool, S_IRUGO);

#define KVM_GUEST_CR0_MASK_UNRESTRICTED_GUEST \
(X86_CR0_WP | X86_CR0_NE | X86_CR0_NW | X86_CR0_CD)
#define KVM_GUEST_CR0_MASK \
Expand Down Expand Up @@ -845,7 +848,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
struct vcpu_vmx *vmx = to_vmx(vcpu);
u64 tsc_this, delta, new_offset;

if (vcpu->cpu != cpu)
if (vmm_exclusive && vcpu->cpu != cpu)
vcpu_clear(vmx);

if (per_cpu(current_vmcs, cpu) != vmx->vmcs) {
Expand Down Expand Up @@ -891,6 +894,8 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
static void vmx_vcpu_put(struct kvm_vcpu *vcpu)
{
__vmx_load_host_state(to_vmx(vcpu));
if (!vmm_exclusive)
__vcpu_clear(to_vmx(vcpu));
}

static void vmx_fpu_activate(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit e69e511

Please sign in to comment.