This exit code means that this vCPU wants to inject an interrupt using
userspace-emulated controller.

The code is designed to be as much arch-agnostic as possible. Therefore,
it has IRQ number and level as parameters (encoded in struct kvm_irq_level).

Currently it will be used only by ARM architecture, whose implementation of
virtual timer works as if it was edge-sensitive (despite on real hardware
timer IRQ is level-sensitive). Therefore, level value is actually reserved
for implementing hypothetical level-sensitive IRQs. In this case this exit
code would indicate transition of the line to the specified level.

Signed-off-by: Pavel Fedin <[email protected]>
---
 include/uapi/linux/kvm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 4b60056..57f6fb7 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -183,6 +183,7 @@ struct kvm_s390_skeys {
 #define KVM_EXIT_EPR              23
 #define KVM_EXIT_SYSTEM_EVENT     24
 #define KVM_EXIT_S390_STSI        25
+#define KVM_EXIT_IRQ              26
 
 /* For KVM_EXIT_INTERNAL_ERROR */
 /* Emulate instruction failed. */
@@ -329,6 +330,8 @@ struct kvm_run {
                        __u8 sel1;
                        __u16 sel2;
                } s390_stsi;
+               /* KVM_EXIT_IRQ */
+               struct kvm_irq_level irq;
                /* Fix the size of the union. */
                char padding[256];
        };
-- 
2.4.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to