[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64][HVM] Use vcpu info from getdomaininfo



# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Node ID 2fc3392d0889684c80675b29f9bde0f63cfc3cb9
# Parent  4762d73ced42da37b957cd465b191b4f9c8ea3b7
[IA64][HVM] Use vcpu info from getdomaininfo

This replaces the get/set_param using HVM_PARAM_VCPUS

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 tools/libxc/ia64/xc_ia64_hvm_build.c |   10 ++++++++--
 tools/python/xen/lowlevel/xc/xc.c    |    4 ----
 xen/include/public/arch-ia64.h       |    7 -------
 3 files changed, 8 insertions(+), 13 deletions(-)

diff -r 4762d73ced42 -r 2fc3392d0889 tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c      Thu Dec 14 08:57:36 2006 -0700
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c      Thu Dec 14 09:56:41 2006 -0700
@@ -660,8 +660,14 @@ setup_guest(int xc_handle, uint32_t dom,
         goto error_out;
     }
 
-    // Get number of vcpus, stored by pyxc_hvm_build()
-    xc_get_hvm_param(xc_handle, dom, HVM_PARAM_VCPUS, &vcpus);
+    domctl.cmd = XEN_DOMCTL_getdomaininfo;
+    domctl.domain = (domid_t)dom;
+    if (xc_domctl(xc_handle, &domctl) < 0) {
+        PERROR("Could not get info on domain");
+        goto error_out;
+    }
+
+    vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1;
 
     // Hand-off state passed to guest firmware 
     if (xc_ia64_build_hob(xc_handle, dom, dom_memsize, vcpus) < 0) {
diff -r 4762d73ced42 -r 2fc3392d0889 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Dec 14 08:57:36 2006 -0700
+++ b/tools/python/xen/lowlevel/xc/xc.c Thu Dec 14 09:56:41 2006 -0700
@@ -408,10 +408,6 @@ static PyObject *pyxc_hvm_build(XcObject
                                       &image, &vcpus, &pae, &acpi, &apic) )
         return NULL;
 
-#if defined(__ia64__)
-    /* Set vcpus to later be retrieved in setup_guest() */
-    xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_VCPUS, vcpus);
-#endif
     if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
         return pyxc_error_to_exception();
 
diff -r 4762d73ced42 -r 2fc3392d0889 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Thu Dec 14 08:57:36 2006 -0700
+++ b/xen/include/public/arch-ia64.h    Thu Dec 14 09:56:41 2006 -0700
@@ -65,13 +65,6 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
 /* Maximum number of virtual CPUs in multi-processor guests. */
 /* WARNING: before changing this, check that shared_info fits on a page */
 #define MAX_VIRT_CPUS 64
-
-/*
- * HVM_PARAM_PAE_ENABLED is meaningless on ia64, so we overload this
- * entry to store the number of vCPUs.  XXX Need arch-specific extentions
- * for xc_get/set_hvm_param().
- */
-#define HVM_PARAM_VCPUS    HVM_PARAM_PAE_ENABLED
 
 #ifndef __ASSEMBLY__
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.