kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: Document KVM_NMI
@ 2011-12-06 20:50 Sasha Levin
  2011-12-07 10:21 ` Avi Kivity
  0 siblings, 1 reply; 10+ messages in thread
From: Sasha Levin @ 2011-12-06 20:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Sasha Levin, Avi Kivity, Marcelo Tosatti, kvm

Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 Documentation/virtual/kvm/api.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 7945b0b..0b7b8f2 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1450,6 +1450,19 @@ is supported; 2 if the processor requires all virtual machines to have
 an RMA, or 1 if the processor can use an RMA but doesn't require it,
 because it supports the Virtual RMA (VRMA) facility.
 
+4.64 KVM_NMI
+
+Capability: basic
+Architectures: none
+Type: vcpu ioctl
+Parameters: none
+Returns: 0 on success, -1 on error
+
+Trigger an NMI on the specified VCPU.
+
+This can be used to cause a panic in the guest, which in turn would result
+in a backtrace/dump.
+
 5. The kvm_run structure
 
 Application code obtains a pointer to the kvm_run structure by
-- 
1.7.8

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] KVM: Document KVM_NMI
@ 2011-12-07 10:43 Avi Kivity
  2011-12-07 11:02 ` Sasha Levin
  2011-12-14 18:07 ` Marcelo Tosatti
  0 siblings, 2 replies; 10+ messages in thread
From: Avi Kivity @ 2011-12-07 10:43 UTC (permalink / raw)
  To: Marcelo Tosatti, kvm; +Cc: Sasha Levin

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 Documentation/virtual/kvm/api.txt |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 7945b0b..38f68ca 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1450,6 +1450,31 @@ is supported; 2 if the processor requires all virtual machines to have
 an RMA, or 1 if the processor can use an RMA but doesn't require it,
 because it supports the Virtual RMA (VRMA) facility.
 
+4.64 KVM_NMI
+
+Capability: KVM_CAP_USER_NMI
+Architectures: x86
+Type: vcpu ioctl
+Parameters: none
+Returns: 0 on success, -1 on error
+
+Queues an NMI on the thread's vcpu.  Note this is well defined only
+when KVM_CREATE_IRQCHIP has not been called, since this is an interface
+between the virtual cpu core and virtual local APIC.  After KVM_CREATE_IRQCHIP
+has been called, this interface is completely emulated within the kernel.
+
+To use this to emulate the LINT1 input with KVM_CREATE_IRQCHIP, use the
+following algorithm:
+
+  - pause the vpcu
+  - read the local APIC's state (KVM_GET_LAPIC)
+  - check whether changing LINT1 will queue an NMI (see the LVT entry for LINT1)
+  - if so, issue KVM_NMI
+  - resume the vcpu
+
+Some guests configure the LINT1 NMI input to cause a panic, aiding in
+debugging.
+
 5. The kvm_run structure
 
 Application code obtains a pointer to the kvm_run structure by
-- 
1.7.7.1


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

end of thread, other threads:[~2011-12-14 18:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 20:50 [PATCH] KVM: Document KVM_NMI Sasha Levin
2011-12-07 10:21 ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2011-12-07 10:43 Avi Kivity
2011-12-07 11:02 ` Sasha Levin
2011-12-07 12:12   ` Avi Kivity
2011-12-07 12:20     ` Sasha Levin
2011-12-07 12:31       ` Avi Kivity
2011-12-07 12:37         ` Sasha Levin
2011-12-07 12:42           ` Avi Kivity
2011-12-14 18:07 ` Marcelo Tosatti

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).