xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86, hvm: document the de facto policy for vCPU ids
@ 2016-07-12 11:44 Vitaly Kuznetsov
  2016-07-12 16:28 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Kuznetsov @ 2016-07-12 11:44 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich

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>
---
 xen/include/public/hvm/hvm_info_table.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/xen/include/public/hvm/hvm_info_table.h b/xen/include/public/hvm/hvm_info_table.h
index 9e3f807..08c252e 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;
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, hvm: document the de facto policy for vCPU ids
  2016-07-12 11:44 [PATCH] x86, hvm: document the de facto policy for vCPU ids Vitaly Kuznetsov
@ 2016-07-12 16:28 ` Konrad Rzeszutek Wilk
  2016-07-13 13:28   ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-07-12 16:28 UTC (permalink / raw)
  To: Vitaly Kuznetsov
  Cc: Tim Deegan, Stefano Stabellini, Wei Liu, George Dunlap,
	Andrew Cooper, Ian Jackson, Xen Devel Mailing list, Jan Beulich

On Tue, Jul 12, 2016 at 7:44 AM, Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
> 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>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86, hvm: document the de facto policy for vCPU ids
  2016-07-12 16:28 ` Konrad Rzeszutek Wilk
@ 2016-07-13 13:28   ` Andrew Cooper
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2016-07-13 13:28 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Vitaly Kuznetsov
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Ian Jackson,
	Tim Deegan, Xen Devel Mailing list, Jan Beulich

On 12/07/16 17:28, Konrad Rzeszutek Wilk wrote:
> On Tue, Jul 12, 2016 at 7:44 AM, Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>> 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 and committed.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-13 13:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-12 11:44 [PATCH] x86, hvm: document the de facto policy for vCPU ids Vitaly Kuznetsov
2016-07-12 16:28 ` Konrad Rzeszutek Wilk
2016-07-13 13:28   ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).