]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
xen, x86: get_phys_id hypercall interface change.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 10 Mar 2008 22:53:07 +0000 (22:53 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 10 Mar 2008 22:53:07 +0000 (22:53 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
include/xen/interface/vcpu.h

index b7173c6024f7637e0d2f701c224d14b2abd358ef..ab6549370ec18e10bf4db48c2efeeb77024bd280 100644 (file)
@@ -185,8 +185,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_register_vcpu_info_t);
 /* 
  * Get the physical ID information for a pinned vcpu's underlying physical
  * processor.  The physical ID informmation is architecture-specific.
- * On x86: id[7:0]=apic_id, id[15:8]=acpi_id, id[63:16]=mbz,
- *         and an unavailable identifier is returned as 0xff.
+ * On x86: id[31:0]=apic_id, id[63:32]=acpi_id, and all values 0xff and
+ *         greater are reserved.
  * This command returns -EINVAL if it is not a valid operation for this VCPU.
  */
 #define VCPUOP_get_physid           12 /* arg == vcpu_get_physid_t */
@@ -195,8 +195,10 @@ struct vcpu_get_physid {
 };
 typedef struct vcpu_get_physid vcpu_get_physid_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_get_physid_t);
-#define xen_vcpu_physid_to_x86_apicid(physid) ((uint8_t)((physid)>>0))
-#define xen_vcpu_physid_to_x86_acpiid(physid) ((uint8_t)((physid)>>8))
+#define xen_vcpu_physid_to_x86_apicid(physid) \
+    ((((uint32_t)(physid)) >= 0xff) ? 0xff : ((uint8_t)(physid)))
+#define xen_vcpu_physid_to_x86_acpiid(physid) \
+    ((((uint32_t)((physid)>>32)) >= 0xff) ? 0xff : ((uint8_t)((physid)>>32)))
 
 #endif /* __XEN_PUBLIC_VCPU_H__ */