WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Extend the max vcpu number for HVM guest.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Extend the max vcpu number for HVM guest.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Oct 2009 08:05:16 -0700
Delivery-date: Thu, 29 Oct 2009 08:05:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1256827708 0
# Node ID 059c01d69a0882e9cf428df80a6b300bc6e401d7
# Parent  2d9ff985f8ecf63f54fc57f0371bd9faa662e98b
Extend the max vcpu number for HVM guest.
 - Originally the max vcpu number for HVM guest is 32, this patch
 extend the number to 128 on x86_64 hypervisor. (For i386 hypervisor,
 the max vcpu number  is still 32).
 - This patch extends the mp-table size to fit more vcpus.
 - HVM PV driver should call VCPUOP_register_vcpu_info hypercall to
 initialize the vcpu info if the vcpu number is more than 32.

Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/rombios/rombios.c |   47 ++++++++-------------------------------
 xen/arch/x86/mm/shadow/common.c  |    2 -
 xen/common/domctl.c              |    2 -
 xen/include/asm-ia64/config.h    |    1 
 xen/include/asm-x86/config.h     |    3 ++
 5 files changed, 16 insertions(+), 39 deletions(-)

diff -r 2d9ff985f8ec -r 059c01d69a08 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Thu Oct 29 14:05:46 2009 +0000
+++ b/tools/firmware/rombios/rombios.c  Thu Oct 29 14:48:28 2009 +0000
@@ -10734,11 +10734,19 @@ post_init_pic:
   out  0xa1, AL ;slave  pic: unmask IRQ 12, 13, 14
   ret
 
+
+  .align 16
+smbios_entry_point:
+  db 0,0,0,0,0,0,0,0 ; 8 bytes
+  db 0,0,0,0,0,0,0,0 ; 16 bytes
+  db 0,0,0,0,0,0,0,0 ; 24 bytes
+  db 0,0,0,0,0,0,0   ; 31 bytes
+
 ;; the following area can be used to write dynamically generated tables
   .align 16
 bios_table_area_start:
-  dd 0xaafb4442
-  dd bios_table_area_end - bios_table_area_start - 8;
+  db 0x5F, 0x5F, 0x5F, 0x48, 0x56, 0x4D, 0x4D, 0x50 ;; ___HVMMP
+  dd bios_table_area_end - bios_table_area_start
 
 ;--------
 ;- POST -
@@ -11843,41 +11851,6 @@ static Bit8u vgafont8[128*8]=
  0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00,
 };
 
-#ifdef HVMASSIST
-ASM_START
-
-//
-// MP Tables
-// just carve out some blank space for HVMLOADER to write the MP tables to
-//
-// NOTE: There should be enough space for a 32 processor entry MP table
-//
-.org 0xcc00
-db 0x5F, 0x5F, 0x5F, 0x48, 0x56, 0x4D, 0x4D, 0x50 ;; ___HVMMP
-dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;;  64 bytes
-dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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 ; 16 bytes
-db 0,0,0,0,0,0,0,0 ; 24 bytes
-db 0,0,0,0,0,0,0   ; 31 bytes
-ASM_END
-
-#endif // HVMASSIST
 ASM_START
 .org 0xcff0
 bios_table_area_end:
diff -r 2d9ff985f8ec -r 059c01d69a08 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Thu Oct 29 14:05:46 2009 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Thu Oct 29 14:48:28 2009 +0000
@@ -3098,7 +3098,7 @@ int shadow_enable(struct domain *d, u32 
     {
         unsigned int r;
         shadow_lock(d);                
-        r = sh_set_allocation(d, 256, NULL); /* Use at least 1MB */
+        r = sh_set_allocation(d, 1024, NULL); /* Use at least 4MB */
         if ( r != 0 )
         {
             sh_set_allocation(d, 0, NULL);
diff -r 2d9ff985f8ec -r 059c01d69a08 xen/common/domctl.c
--- a/xen/common/domctl.c       Thu Oct 29 14:05:46 2009 +0000
+++ b/xen/common/domctl.c       Thu Oct 29 14:48:28 2009 +0000
@@ -456,7 +456,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
         ret = -EINVAL;
         if ( (d == current->domain) || /* no domain_pause() */
              (max > MAX_VIRT_CPUS) ||
-             (is_hvm_domain(d) && max > XEN_LEGACY_MAX_VCPUS) )
+             (is_hvm_domain(d) && (max > MAX_HVM_VCPUS)) )
         {
             rcu_unlock_domain(d);
             break;
diff -r 2d9ff985f8ec -r 059c01d69a08 xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Thu Oct 29 14:05:46 2009 +0000
+++ b/xen/include/asm-ia64/config.h     Thu Oct 29 14:48:28 2009 +0000
@@ -32,6 +32,7 @@
 #define NR_CPUS 64
 #endif
 #define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
+#define MAX_HVM_VCPUS MAX_VIRT_CPUS
 #define CONFIG_NUMA
 #define CONFIG_ACPI_NUMA
 #define NODES_SHIFT 8                          /* linux/asm/numnodes.h */
diff -r 2d9ff985f8ec -r 059c01d69a08 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Thu Oct 29 14:05:46 2009 +0000
+++ b/xen/include/asm-x86/config.h      Thu Oct 29 14:48:28 2009 +0000
@@ -56,6 +56,9 @@
 /* Maximum number of virtual CPUs in multi-processor guests. */
 #define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
 #endif
+
+/* Maximum we can support with current vLAPIC ID mapping. */
+#define MAX_HVM_VCPUS 128
 
 #ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
 # define supervisor_mode_kernel (1)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Extend the max vcpu number for HVM guest., Xen patchbot-unstable <=