ia64/xen-unstable

changeset 13022:2fc3392d0889

[IA64][HVM] Use vcpu info from getdomaininfo

This replaces the get/set_param using HVM_PARAM_VCPUS

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild2.aw
date Thu Dec 14 09:56:41 2006 -0700 (2006-12-14)
parents 4762d73ced42
children 9f09cbe84629
files tools/libxc/ia64/xc_ia64_hvm_build.c tools/python/xen/lowlevel/xc/xc.c xen/include/public/arch-ia64.h
line diff
     1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c	Thu Dec 14 08:57:36 2006 -0700
     1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c	Thu Dec 14 09:56:41 2006 -0700
     1.3 @@ -660,8 +660,14 @@ setup_guest(int xc_handle, uint32_t dom,
     1.4          goto error_out;
     1.5      }
     1.6  
     1.7 -    // Get number of vcpus, stored by pyxc_hvm_build()
     1.8 -    xc_get_hvm_param(xc_handle, dom, HVM_PARAM_VCPUS, &vcpus);
     1.9 +    domctl.cmd = XEN_DOMCTL_getdomaininfo;
    1.10 +    domctl.domain = (domid_t)dom;
    1.11 +    if (xc_domctl(xc_handle, &domctl) < 0) {
    1.12 +        PERROR("Could not get info on domain");
    1.13 +        goto error_out;
    1.14 +    }
    1.15 +
    1.16 +    vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1;
    1.17  
    1.18      // Hand-off state passed to guest firmware 
    1.19      if (xc_ia64_build_hob(xc_handle, dom, dom_memsize, vcpus) < 0) {
     2.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Thu Dec 14 08:57:36 2006 -0700
     2.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Thu Dec 14 09:56:41 2006 -0700
     2.3 @@ -408,10 +408,6 @@ static PyObject *pyxc_hvm_build(XcObject
     2.4                                        &image, &vcpus, &pae, &acpi, &apic) )
     2.5          return NULL;
     2.6  
     2.7 -#if defined(__ia64__)
     2.8 -    /* Set vcpus to later be retrieved in setup_guest() */
     2.9 -    xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_VCPUS, vcpus);
    2.10 -#endif
    2.11      if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
    2.12          return pyxc_error_to_exception();
    2.13  
     3.1 --- a/xen/include/public/arch-ia64.h	Thu Dec 14 08:57:36 2006 -0700
     3.2 +++ b/xen/include/public/arch-ia64.h	Thu Dec 14 09:56:41 2006 -0700
     3.3 @@ -66,13 +66,6 @@ DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
     3.4  /* WARNING: before changing this, check that shared_info fits on a page */
     3.5  #define MAX_VIRT_CPUS 64
     3.6  
     3.7 -/*
     3.8 - * HVM_PARAM_PAE_ENABLED is meaningless on ia64, so we overload this
     3.9 - * entry to store the number of vCPUs.  XXX Need arch-specific extentions
    3.10 - * for xc_get/set_hvm_param().
    3.11 - */
    3.12 -#define HVM_PARAM_VCPUS    HVM_PARAM_PAE_ENABLED
    3.13 -
    3.14  #ifndef __ASSEMBLY__
    3.15  
    3.16  typedef unsigned long xen_ulong_t;