ia64/linux-2.6.18-xen.hg

changeset 472:3983b041fc51

xen, x86: get_phys_id hypercall interface change.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 10 22:53:07 2008 +0000 (2008-03-10)
parents ba72914de93a
children 14818545121d
files include/xen/interface/vcpu.h
line diff
     1.1 --- a/include/xen/interface/vcpu.h	Wed Mar 05 17:29:05 2008 +0000
     1.2 +++ b/include/xen/interface/vcpu.h	Mon Mar 10 22:53:07 2008 +0000
     1.3 @@ -185,8 +185,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_register_vc
     1.4  /* 
     1.5   * Get the physical ID information for a pinned vcpu's underlying physical
     1.6   * processor.  The physical ID informmation is architecture-specific.
     1.7 - * On x86: id[7:0]=apic_id, id[15:8]=acpi_id, id[63:16]=mbz,
     1.8 - *         and an unavailable identifier is returned as 0xff.
     1.9 + * On x86: id[31:0]=apic_id, id[63:32]=acpi_id, and all values 0xff and
    1.10 + *         greater are reserved.
    1.11   * This command returns -EINVAL if it is not a valid operation for this VCPU.
    1.12   */
    1.13  #define VCPUOP_get_physid           12 /* arg == vcpu_get_physid_t */
    1.14 @@ -195,8 +195,10 @@ struct vcpu_get_physid {
    1.15  };
    1.16  typedef struct vcpu_get_physid vcpu_get_physid_t;
    1.17  DEFINE_XEN_GUEST_HANDLE(vcpu_get_physid_t);
    1.18 -#define xen_vcpu_physid_to_x86_apicid(physid) ((uint8_t)((physid)>>0))
    1.19 -#define xen_vcpu_physid_to_x86_acpiid(physid) ((uint8_t)((physid)>>8))
    1.20 +#define xen_vcpu_physid_to_x86_apicid(physid) \
    1.21 +    ((((uint32_t)(physid)) >= 0xff) ? 0xff : ((uint8_t)(physid)))
    1.22 +#define xen_vcpu_physid_to_x86_acpiid(physid) \
    1.23 +    ((((uint32_t)((physid)>>32)) >= 0xff) ? 0xff : ((uint8_t)((physid)>>32)))
    1.24  
    1.25  #endif /* __XEN_PUBLIC_VCPU_H__ */
    1.26