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

[Xen-changelog] [xen-3.2-testing] x86: Reserve 32 bits for each of acpiid and apicid in new phys_id vcpu hypercall.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206014792 0
# Node ID 42120250d67ade3f60d41d23c6fa69ce2eca4052
# Parent  9972eb777b605ee4dd6b42da2aee9032262fc1cf
x86: Reserve 32 bits for each of acpiid and apicid in new phys_id vcpu 
hypercall.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   17193:f33328217eee1a66bf2a874ff1a42b62c21e42bc
xen-unstable date:        Mon Mar 10 22:51:57 2008 +0000
---
 xen/arch/x86/domain.c     |    5 +++--
 xen/include/public/vcpu.h |   10 ++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff -r 9972eb777b60 -r 42120250d67a xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Thu Mar 20 12:04:51 2008 +0000
+++ b/xen/arch/x86/domain.c     Thu Mar 20 12:06:32 2008 +0000
@@ -957,8 +957,9 @@ arch_do_vcpu_op(
         if ( !v->domain->is_pinned )
             break;
 
-        cpu_id.phys_id = (x86_cpu_to_apicid[v->vcpu_id] |
-                          (acpi_get_processor_id(v->vcpu_id) << 8));
+        cpu_id.phys_id =
+            (uint64_t)x86_cpu_to_apicid[v->vcpu_id] |
+            ((uint64_t)acpi_get_processor_id(v->vcpu_id) << 32);
 
         rc = -EFAULT;
         if ( copy_to_guest(arg, &cpu_id, 1) )
diff -r 9972eb777b60 -r 42120250d67a xen/include/public/vcpu.h
--- a/xen/include/public/vcpu.h Thu Mar 20 12:04:51 2008 +0000
+++ b/xen/include/public/vcpu.h Thu Mar 20 12:06:32 2008 +0000
@@ -185,8 +185,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_register_vc
 /* 
  * 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__ */
 

_______________________________________________
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®.