x86, hvm: document the de facto policy for vCPU ids
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 12 Jul 2016 11:44:42 +0000 (13:44 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 Jul 2016 13:26:26 +0000 (14:26 +0100)
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.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/public/hvm/hvm_info_table.h

index 9e3f8077a4236a0b4f777045b77914ac922e550e..08c252e822ebe1d04c9c2ec5e5881cf217c39d18 100644 (file)
 /* 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;