Skip to contentSkip to conversation

x86, hvm: document the de facto policy for vCPU ids

PATCH In review Vitaly Kuznetsov 3 participants 3 messages Jul 12, 2016 – Jul 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, hvm: document the de facto policy for vCPU ids

PVHVM guests may need to know Xen's idea of vCPU ids they have and the only way they can figure them out is to use ACPI ids from MADT table. Document the de facto policy.

---
 xen/include/public/hvm/hvm_info_table.h | 8 ++++++++
 1 file changed, 8 insertions(+)
xen/include/public/hvm/hvm_info_table.h +8 -0
index 9e3f807..08c252e 100644
@@ -34,6 +34,14 @@
 /* Maximum we can support with current vLAPIC ID mapping. */
 #define HVM_MAX_VCPUS        128
 
+/*
+ * In some cases SMP HVM guests may require knowledge of Xen's idea of vCPU ids
+ * for their vCPUs. For example, HYPERVISOR_vcpu_op and some EVTCHNOP_*
+ * hypercalls take vcpu id as a parameter. It is valid for HVM guests to assume
+ * that Xen's vCPU id always equals to ACPI (not APIC!) id in MADT table which
+ * is always present for SMP guests.
+ */
+
 struct hvm_info_table {
     char        signature[8]; /* "HVM INFO" */
     uint32_t    length;
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Vitaly Kuznetsov

PVHVM guests may need to know Xen's idea of vCPU ids they have and the only way they can figure them out is to use ACPI ids from MADT table. Document the de facto policy.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 5 lines · Vitaly Kuznetsov

PVHVM guests may need to know Xen's idea of vCPU ids they have and the only way they can figure them out is to use ACPI ids from MADT table. Document the de facto policy.

Reviewed and committed.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel