aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2009-01-21 09:16:43 -0500
committerAvi Kivity <avi@redhat.com>2009-03-24 05:03:07 -0400
commit934d534f8a5a39e20d5682b3a3a45ff351706b59 (patch)
treef1e6ce5330028a9aa942623c6706af8ca2ce2130 /arch/ia64/include/asm/kvm_host.h
parentb7e6e4d3602c738b8f61225d9f4514945df52f07 (diff)
KVM: ia64: dynamic nr online cpus
Account for number of online cpus and use that in loops iterating over the list of vpus instead of scanning the full array unconditionally. This patch is a building block to facilitate allowing to bump up the size of MAX_VCPUS significantly. Signed-off-by: Jes Sorensen <jes@sgi.com> Acked-by : Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/ia64/include/asm/kvm_host.h')
-rw-r--r--arch/ia64/include/asm/kvm_host.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h
index 46f8b0eb5684..4542651e6acb 100644
--- a/arch/ia64/include/asm/kvm_host.h
+++ b/arch/ia64/include/asm/kvm_host.h
@@ -157,10 +157,10 @@ struct kvm_vm_data {
157 struct kvm_vcpu_data vcpu_data[KVM_MAX_VCPUS]; 157 struct kvm_vcpu_data vcpu_data[KVM_MAX_VCPUS];
158}; 158};
159 159
160#define VCPU_BASE(n) KVM_VM_DATA_BASE + \ 160#define VCPU_BASE(n) (KVM_VM_DATA_BASE + \
161 offsetof(struct kvm_vm_data, vcpu_data[n]) 161 offsetof(struct kvm_vm_data, vcpu_data[n]))
162#define VM_BASE KVM_VM_DATA_BASE + \ 162#define KVM_VM_BASE (KVM_VM_DATA_BASE + \
163 offsetof(struct kvm_vm_data, kvm_vm_struct) 163 offsetof(struct kvm_vm_data, kvm_vm_struct))
164#define KVM_MEM_DIRTY_LOG_BASE KVM_VM_DATA_BASE + \ 164#define KVM_MEM_DIRTY_LOG_BASE KVM_VM_DATA_BASE + \
165 offsetof(struct kvm_vm_data, kvm_mem_dirty_log) 165 offsetof(struct kvm_vm_data, kvm_mem_dirty_log)
166 166
@@ -464,6 +464,8 @@ struct kvm_arch {
464 unsigned long metaphysical_rr4; 464 unsigned long metaphysical_rr4;
465 unsigned long vmm_init_rr; 465 unsigned long vmm_init_rr;
466 466
467 int online_vcpus;
468
467 struct kvm_ioapic *vioapic; 469 struct kvm_ioapic *vioapic;
468 struct kvm_vm_stat stat; 470 struct kvm_vm_stat stat;
469 struct kvm_sal_data rdv_sal_data; 471 struct kvm_sal_data rdv_sal_data;