Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68339
b: refs/heads/master
c: dad3795
h: refs/heads/master
i:
  68337: 00f6e2b
  68335: d97c4a9
v: v3
  • Loading branch information
Qing He authored and Avi Kivity committed Oct 13, 2007
1 parent 48061a5 commit 39c412e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 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: cd0d91379776cb6850c7b11c0a8843ca75967558
refs/heads/master: dad3795d2baa4e02cbfd161d9089c73dea16b4ba
1 change: 1 addition & 0 deletions trunk/drivers/kvm/kvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ void kvm_io_bus_register_dev(struct kvm_io_bus *bus,

struct kvm_vcpu {
struct kvm *kvm;
int vcpu_id;
union {
struct vmcs *vmcs;
struct vcpu_svm *svm;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2355,6 +2355,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n)
goto out;

vcpu = &kvm->vcpus[n];
vcpu->vcpu_id = n;

mutex_lock(&vcpu->mutex);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ static int svm_create_vcpu(struct kvm_vcpu *vcpu)
fx_init(vcpu);
vcpu->fpu_active = 1;
vcpu->apic_base = 0xfee00000 | MSR_IA32_APICBASE_ENABLE;
if (vcpu == &vcpu->kvm->vcpus[0])
if (vcpu->vcpu_id == 0)
vcpu->apic_base |= MSR_IA32_APICBASE_BSP;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
vcpu->regs[VCPU_REGS_RDX] = get_rdx_init_val();
vcpu->cr8 = 0;
vcpu->apic_base = 0xfee00000 | MSR_IA32_APICBASE_ENABLE;
if (vcpu == &vcpu->kvm->vcpus[0])
if (vcpu->vcpu_id == 0)
vcpu->apic_base |= MSR_IA32_APICBASE_BSP;

fx_init(vcpu);
Expand Down

0 comments on commit 39c412e

Please sign in to comment.