aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2007-07-12 05:33:56 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:17 -0400
commitdad3795d2baa4e02cbfd161d9089c73dea16b4ba (patch)
tree56bedc042a5ba0a2b92eecc4e488b0328a35db54 /drivers/kvm/kvm.h
parentcd0d91379776cb6850c7b11c0a8843ca75967558 (diff)
KVM: SMP: Add vcpu_id field in struct vcpu
This patch adds a `vcpu_id' field in `struct vcpu', so we can differentiate BSP and APs without pointer comparison or arithmetic. Signed-off-by: Qing He <qing.he@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 336be86c6f5a..b629a83eb82d 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -328,6 +328,7 @@ void kvm_io_bus_register_dev(struct kvm_io_bus *bus,
328 328
329struct kvm_vcpu { 329struct kvm_vcpu {
330 struct kvm *kvm; 330 struct kvm *kvm;
331 int vcpu_id;
331 union { 332 union {
332 struct vmcs *vmcs; 333 struct vmcs *vmcs;
333 struct vcpu_svm *svm; 334 struct vcpu_svm *svm;