Skip to contentSkip to conversation

KVM: Document KVM_NMI

PATCH In review Sasha Levin 2 participants 2 messages Dec 6, 2011 – Dec 7, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: Document KVM_NMI

---
 Documentation/virtual/kvm/api.txt |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Documentation/virtual/kvm/api.txt +13 -0
index 7945b0b..0b7b8f2 100644
@@ -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
Signature · 1 line
1.7.8
#1 lore raw
Quoted 3 lines · Sasha Levin
Cc Avi Kivity <[email protected]>
Cc Marcelo Tosatti <[email protected]>

Somehow, the changelog became the place where people manage their cc lists.

Quoted 4 lines

+4.64 KVM_NMI

Documentation/virtual/kvm/api.txt +2 -0
+
+Capability: basic

Documentation/virtual/kvm/api.txt is supported; 2 if the processor requires all virtual machines to have · line 1465

Quoted 10 lines
Documentation/virtual/kvm/api.txt +10 -0
+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.
+

I'm nitpicking, but this is too strongly worded. It's completely up to the guest how to interpret the NMI.

It's also subtly broken with kernel irqchip - it injects an NMI unconditionally even though LINT1 can be configured to mask NMIs, or to do something other than queue an NMI (for example, queue a regular interrupt). Please note this.

On second thoughts, I'll just document this instead of telling you what to write.

Signature · 1 line
error compiling committee.c: too many arguments to function