From: Vitaly Kuznetsov Date: Tue, 12 Jul 2016 11:44:42 +0000 (+0200) Subject: x86, hvm: document the de facto policy for vCPU ids X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~790 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ea210c52abb6458e39f5365f7f2c3abb9c191c47;p=xen.git 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. Signed-off-by: Vitaly Kuznetsov Acked-by: Konrad Rzeszutek Wilk Reviewed-by: Andrew Cooper --- diff --git a/xen/include/public/hvm/hvm_info_table.h b/xen/include/public/hvm/hvm_info_table.h index 9e3f8077a4..08c252e822 100644 --- a/xen/include/public/hvm/hvm_info_table.h +++ b/xen/include/public/hvm/hvm_info_table.h @@ -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;