Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48043
b: refs/heads/master
c: 8d0be2b
h: refs/heads/master
i:
  48041: a16b39a
  48039: 2097658
v: v3
  • Loading branch information
Avi Kivity authored and Linus Torvalds committed Feb 12, 2007
1 parent 4ef5e45 commit 37bbdad
Show file tree
Hide file tree
Showing 2 changed files with 12 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: 133de9021d2988f3fbdad84c2d26484c7a757526
refs/heads/master: 8d0be2b3bf4a55606967d7d84e56c52521e94333
15 changes: 11 additions & 4 deletions trunk/drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ static void __vcpu_clear(void *arg)
per_cpu(current_vmcs, cpu) = NULL;
}

static void vcpu_clear(struct kvm_vcpu *vcpu)
{
if (vcpu->cpu != raw_smp_processor_id() && vcpu->cpu != -1)
smp_call_function_single(vcpu->cpu, __vcpu_clear, vcpu, 0, 1);
else
__vcpu_clear(vcpu);
vcpu->launched = 0;
}

static unsigned long vmcs_readl(unsigned long field)
{
unsigned long value;
Expand Down Expand Up @@ -202,10 +211,8 @@ static struct kvm_vcpu *vmx_vcpu_load(struct kvm_vcpu *vcpu)

cpu = get_cpu();

if (vcpu->cpu != cpu) {
smp_call_function(__vcpu_clear, vcpu, 0, 1);
vcpu->launched = 0;
}
if (vcpu->cpu != cpu)
vcpu_clear(vcpu);

if (per_cpu(current_vmcs, cpu) != vcpu->vmcs) {
u8 error;
Expand Down

0 comments on commit 37bbdad

Please sign in to comment.