Skip to contentSkip to conversation

xen/x86: add a comment regarding how to get the VCPU ID on HVM

PATCH Superseded Roger Pau Monne 2 participants 2 messages Sep 23, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/x86: add a comment regarding how to get the VCPU ID on HVM

Add a note to the public headers regarding how to get the VCPU ID for HVM guests (on x86).

Cc Jan Beulich <[email protected]>
Cc Keir Fraser <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Matt Wilson <[email protected]>

---
This is what Linux PVHVM does AFAIK, and also what I've been using in my FreeBSD PVHVM series, but it's not written anywere.

---
 xen/include/public/vcpu.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
xen/include/public/vcpu.h +3 -0
index e888daf..a5ca44d 100644
@@ -35,6 +35,9 @@
  * @cmd        == VCPUOP_??? (VCPU operation).
  * @vcpuid     == VCPU to operate on.
  * @extra_args == Operation-specific extra arguments (NULL if none).
+ *
+ * For x86 HVM domains that use VCPU operations the VCPU ID is the ACPI ID
+ * of the CPU, as fetched from the MADT table.
  */
 
 /*
Signature · 7 lines
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Roger Pau Monne

Add a note to the public headers regarding how to get the VCPU ID for HVM guests (on x86).

Cc Jan Beulich <[email protected]>
Cc Keir Fraser <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Matt Wilson <[email protected]>

---
This is what Linux PVHVM does AFAIK, and also what I've been using in my FreeBSD PVHVM series, but it's not written anywere.

What about rewording slightly to:

For x86 HVM domains that use VCPU operations the VCPU ID is the ACPI Processor ID of the CPU (not to be confused with the APIC ID), as fetched from the MADT table.

The field is "ACPI Processor ID" in the spec.

Otherwise:

--msw

Quoted 18 lines
---
 xen/include/public/vcpu.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
xen/include/public/vcpu.h +3 -0
index e888daf..a5ca44d 100644
@@ -35,6 +35,9 @@
  * @cmd        == VCPUOP_??? (VCPU operation).
  * @vcpuid     == VCPU to operate on.
  * @extra_args == Operation-specific extra arguments (NULL if none).
+ *
+ * For x86 HVM domains that use VCPU operations the VCPU ID is the ACPI ID
+ * of the CPU, as fetched from the MADT table.
  */
 
 /*