aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-02-02 19:56:51 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-09 11:32:44 -0500
commit14c1bf8a8920f36f6e0603a2ff920b48eec14387 (patch)
tree8e461c20788b2939d98f3898fd4a8e4fa634337c /drivers/hv/hv.c
parent2640335438ca4d7b139e114dae5f0d80e740e106 (diff)
drivers: hv: Increase the number of VCPUs supported in the guest
The current code arbirarily limited the number of CPUs the guest could have. Change that so that we can support the maximum number of CPUs the guest can support. While we use NR_CPUS to size the per-cpu state all we are allocating based on NR_CPUS are the pointers to per-cpu state that will be allocatted in the context of the initializing CPU. This patch triggers a checkpatch warning for the usage of NR_CPU and since all we are allocating a couple of pointers per CPU, it should be ok. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv.c')
-rw-r--r--drivers/hv/hv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 12aa97f31f93..15956bd48b48 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -155,9 +155,9 @@ int hv_init(void)
155 union hv_x64_msr_hypercall_contents hypercall_msr; 155 union hv_x64_msr_hypercall_contents hypercall_msr;
156 void *virtaddr = NULL; 156 void *virtaddr = NULL;
157 157
158 memset(hv_context.synic_event_page, 0, sizeof(void *) * MAX_NUM_CPUS); 158 memset(hv_context.synic_event_page, 0, sizeof(void *) * NR_CPUS);
159 memset(hv_context.synic_message_page, 0, 159 memset(hv_context.synic_message_page, 0,
160 sizeof(void *) * MAX_NUM_CPUS); 160 sizeof(void *) * NR_CPUS);
161 161
162 if (!query_hypervisor_presence()) 162 if (!query_hypervisor_presence())
163 goto cleanup; 163 goto cleanup;