diff options
author | Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> | 2013-08-26 04:48:36 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-08-26 05:47:49 -0400 |
commit | 9bc6cbebfe006bcf0f83b10221cd4b893a130d10 (patch) | |
tree | 957ba8780239c78fdea13ceb78327c3652a9303f /Documentation/virtual | |
parent | 24d2166beb2f0be7dd29ab6a0841c27bd669eae9 (diff) |
Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock
KVM_HC_KICK_CPU hypercall added to wakeup halted vcpu in paravirtual spinlock
enabled guest.
KVM_FEATURE_PV_UNHALT enables guest to check whether pv spinlock can be enabled
in guest.
Thanks Vatsa for rewriting KVM_HC_KICK_CPU
Cc: Rob Landley <rob@landley.net>
Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Acked-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'Documentation/virtual')
-rw-r--r-- | Documentation/virtual/kvm/cpuid.txt | 4 | ||||
-rw-r--r-- | Documentation/virtual/kvm/hypercalls.txt | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/virtual/kvm/cpuid.txt b/Documentation/virtual/kvm/cpuid.txt index 83afe65d4966..22ff659bc0fb 100644 --- a/Documentation/virtual/kvm/cpuid.txt +++ b/Documentation/virtual/kvm/cpuid.txt | |||
@@ -43,6 +43,10 @@ KVM_FEATURE_CLOCKSOURCE2 || 3 || kvmclock available at msrs | |||
43 | KVM_FEATURE_ASYNC_PF || 4 || async pf can be enabled by | 43 | KVM_FEATURE_ASYNC_PF || 4 || async pf can be enabled by |
44 | || || writing to msr 0x4b564d02 | 44 | || || writing to msr 0x4b564d02 |
45 | ------------------------------------------------------------------------------ | 45 | ------------------------------------------------------------------------------ |
46 | KVM_FEATURE_PV_UNHALT || 7 || guest checks this feature bit | ||
47 | || || before enabling paravirtualized | ||
48 | || || spinlock support. | ||
49 | ------------------------------------------------------------------------------ | ||
46 | KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side | 50 | KVM_FEATURE_CLOCKSOURCE_STABLE_BIT || 24 || host will warn if no guest-side |
47 | || || per-cpu warps are expected in | 51 | || || per-cpu warps are expected in |
48 | || || kvmclock. | 52 | || || kvmclock. |
diff --git a/Documentation/virtual/kvm/hypercalls.txt b/Documentation/virtual/kvm/hypercalls.txt index ea113b5d87a4..022198e389d7 100644 --- a/Documentation/virtual/kvm/hypercalls.txt +++ b/Documentation/virtual/kvm/hypercalls.txt | |||
@@ -64,3 +64,17 @@ Purpose: To enable communication between the hypervisor and guest there is a | |||
64 | shared page that contains parts of supervisor visible register state. | 64 | shared page that contains parts of supervisor visible register state. |
65 | The guest can map this shared page to access its supervisor register through | 65 | The guest can map this shared page to access its supervisor register through |
66 | memory using this hypercall. | 66 | memory using this hypercall. |
67 | |||
68 | 5. KVM_HC_KICK_CPU | ||
69 | ------------------------ | ||
70 | Architecture: x86 | ||
71 | Status: active | ||
72 | Purpose: Hypercall used to wakeup a vcpu from HLT state | ||
73 | Usage example : A vcpu of a paravirtualized guest that is busywaiting in guest | ||
74 | kernel mode for an event to occur (ex: a spinlock to become available) can | ||
75 | execute HLT instruction once it has busy-waited for more than a threshold | ||
76 | time-interval. Execution of HLT instruction would cause the hypervisor to put | ||
77 | the vcpu to sleep until occurence of an appropriate event. Another vcpu of the | ||
78 | same guest can wakeup the sleeping vcpu by issuing KVM_HC_KICK_CPU hypercall, | ||
79 | specifying APIC ID (a1) of the vcpu to be woken up. An additional argument (a0) | ||
80 | is used in the hypercall for future use. | ||