xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Vcpu hotplug: change HVM_MAX_VCPUS to 15, and fix a small bug
@ 2010-02-11 17:40 Liu, Jinsong
  2010-02-11 17:59 ` Christoph Egger
  2010-02-11 18:27 ` Keir Fraser
  0 siblings, 2 replies; 6+ messages in thread
From: Liu, Jinsong @ 2010-02-11 17:40 UTC (permalink / raw)
  To: xen-devel; +Cc: Jiang, Yunhong, Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 293 bytes --]

Vcpu hotplug: change HVM_MAX_VCPUS to 15, and fix a small bug

Win2000 will BSOD if cpus > 15, in order to compatible support win2000 HVM, this patch change HVM_MAX_VCPUS to 15.
This patch also fix a small bug related to HVM_MAX_VCPUS.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>

[-- Attachment #2: ras_vcpuhotplug_2.patch --]
[-- Type: application/octet-stream, Size: 1802 bytes --]

Vcpu hotplug: change HVM_MAX_VCPUS to 15, and fix a small bug

Win2000 will BSOD if cpus > 15, in order to compatible support win2000 HVM, this patch change HVM_MAX_VCPUS to 15.
This patch also fix a small bug related to HVM_MAX_VCPUS.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>

diff -r fa4d31ee800f tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c	Thu Feb 11 14:38:39 2010 +0800
+++ b/tools/python/xen/lowlevel/xc/xc.c	Thu Feb 11 21:44:13 2010 +0800
@@ -916,7 +916,7 @@ static PyObject *pyxc_hvm_build(XcObject
     char *image;
     int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1;
     PyObject *vcpu_avail_handle = NULL;
-    uint8_t vcpu_avail[HVM_MAX_VCPUS/8];
+    uint8_t vcpu_avail[(HVM_MAX_VCPUS + 7)/8];
 
     static char *kwd_list[] = { "domid",
                                 "memsize", "image", "target", "vcpus", 
diff -r fa4d31ee800f xen/include/public/hvm/hvm_info_table.h
--- a/xen/include/public/hvm/hvm_info_table.h	Thu Feb 11 14:38:39 2010 +0800
+++ b/xen/include/public/hvm/hvm_info_table.h	Thu Feb 11 21:44:13 2010 +0800
@@ -29,8 +29,8 @@
 #define HVM_INFO_OFFSET      0x800
 #define HVM_INFO_PADDR       ((HVM_INFO_PFN << 12) + HVM_INFO_OFFSET)
 
-/* Maximum we can support with current vLAPIC ID mapping. */
-#define HVM_MAX_VCPUS        128
+/* Maximum vcpu supported, limited by win2000 */
+#define HVM_MAX_VCPUS        15
 
 struct hvm_info_table {
     char        signature[8]; /* "HVM INFO" */
@@ -69,7 +69,7 @@ struct hvm_info_table {
     uint32_t    high_mem_pgend;
 
     /* Bitmap of which CPUs are online at boot time. */
-    uint8_t     vcpu_online[HVM_MAX_VCPUS/8];
+    uint8_t     vcpu_online[(HVM_MAX_VCPUS + 7)/8];
 };
 
 #endif /* __XEN_PUBLIC_HVM_HVM_INFO_TABLE_H__ */

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-12  8:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 17:40 [PATCH 2/2] Vcpu hotplug: change HVM_MAX_VCPUS to 15, and fix a small bug Liu, Jinsong
2010-02-11 17:59 ` Christoph Egger
2010-02-12  1:51   ` Jiang, Yunhong
2010-02-12  8:05     ` Christoph Egger
2010-02-11 18:27 ` Keir Fraser
2010-02-11 22:48   ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).