From 06bed89b7c155f218b98f609d4421b16a627ed88 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 7 Dec 2011 12:42:47 +0200 Subject: [PATCH] --- yaml --- r: 282041 b: refs/heads/master c: 3f745f1e224e05e845a15760a55f3fd323f7a753 h: refs/heads/master i: 282039: 8a9b991adedb55842318e7b8404c7dd0a72880d8 v: v3 --- [refs] | 2 +- trunk/Documentation/virtual/kvm/api.txt | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 394d79315fc4..0a496d5b620d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 234b639206a7d9d5ca362cff64ceddd4f27e4a46 +refs/heads/master: 3f745f1e224e05e845a15760a55f3fd323f7a753 diff --git a/trunk/Documentation/virtual/kvm/api.txt b/trunk/Documentation/virtual/kvm/api.txt index e2a4b5287361..e1d94bf4056e 100644 --- a/trunk/Documentation/virtual/kvm/api.txt +++ b/trunk/Documentation/virtual/kvm/api.txt @@ -1466,6 +1466,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