ia64/xen-unstable

changeset 17210:f33328217eee

x86: Reserve 32 bits for each of acpiid and apicid in new phys_id vcpu hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 10 22:51:57 2008 +0000 (2008-03-10)
parents 59b8768d0d0d
children af33f2054f47
files xen/arch/x86/domain.c xen/include/public/vcpu.h
line diff
     1.1 --- a/xen/arch/x86/domain.c	Wed Mar 05 11:18:25 2008 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Mon Mar 10 22:51:57 2008 +0000
     1.3 @@ -961,8 +961,9 @@ arch_do_vcpu_op(
     1.4          if ( !v->domain->is_pinned )
     1.5              break;
     1.6  
     1.7 -        cpu_id.phys_id = (x86_cpu_to_apicid[v->vcpu_id] |
     1.8 -                          (acpi_get_processor_id(v->vcpu_id) << 8));
     1.9 +        cpu_id.phys_id =
    1.10 +            (uint64_t)x86_cpu_to_apicid[v->vcpu_id] |
    1.11 +            ((uint64_t)acpi_get_processor_id(v->vcpu_id) << 32);
    1.12  
    1.13          rc = -EFAULT;
    1.14          if ( copy_to_guest(arg, &cpu_id, 1) )
     2.1 --- a/xen/include/public/vcpu.h	Wed Mar 05 11:18:25 2008 +0000
     2.2 +++ b/xen/include/public/vcpu.h	Mon Mar 10 22:51:57 2008 +0000
     2.3 @@ -185,8 +185,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_register_vc
     2.4  /* 
     2.5   * Get the physical ID information for a pinned vcpu's underlying physical
     2.6   * processor.  The physical ID informmation is architecture-specific.
     2.7 - * On x86: id[7:0]=apic_id, id[15:8]=acpi_id, id[63:16]=mbz,
     2.8 - *         and an unavailable identifier is returned as 0xff.
     2.9 + * On x86: id[31:0]=apic_id, id[63:32]=acpi_id, and all values 0xff and
    2.10 + *         greater are reserved.
    2.11   * This command returns -EINVAL if it is not a valid operation for this VCPU.
    2.12   */
    2.13  #define VCPUOP_get_physid           12 /* arg == vcpu_get_physid_t */
    2.14 @@ -195,8 +195,10 @@ struct vcpu_get_physid {
    2.15  };
    2.16  typedef struct vcpu_get_physid vcpu_get_physid_t;
    2.17  DEFINE_XEN_GUEST_HANDLE(vcpu_get_physid_t);
    2.18 -#define xen_vcpu_physid_to_x86_apicid(physid) ((uint8_t)((physid)>>0))
    2.19 -#define xen_vcpu_physid_to_x86_acpiid(physid) ((uint8_t)((physid)>>8))
    2.20 +#define xen_vcpu_physid_to_x86_apicid(physid) \
    2.21 +    ((((uint32_t)(physid)) >= 0xff) ? 0xff : ((uint8_t)(physid)))
    2.22 +#define xen_vcpu_physid_to_x86_acpiid(physid) \
    2.23 +    ((((uint32_t)((physid)>>32)) >= 0xff) ? 0xff : ((uint8_t)((physid)>>32)))
    2.24  
    2.25  #endif /* __XEN_PUBLIC_VCPU_H__ */
    2.26