forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KVM: s390: add floating irq controller
This patch adds a floating irq controller as a kvm_device. It will be necessary for migration of floating interrupts as well as for hardening the reset code by allowing user space to explicitly remove all pending floating interrupts. Signed-off-by: Jens Freimann <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]>
1 parent
81aa8ef
commit c05c418
Showing
8 changed files
with
312 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FLIC (floating interrupt controller) | ||
==================================== | ||
|
||
FLIC handles floating (non per-cpu) interrupts, i.e. I/O, service and some | ||
machine check interruptions. All interrupts are stored in a per-vm list of | ||
pending interrupts. FLIC performs operations on this list. | ||
|
||
Only one FLIC instance may be instantiated. | ||
|
||
FLIC provides support to | ||
- add interrupts (KVM_DEV_FLIC_ENQUEUE) | ||
- inspect currently pending interrupts (KVM_FLIC_GET_ALL_IRQS) | ||
- purge all pending floating interrupts (KVM_DEV_FLIC_CLEAR_IRQS) | ||
|
||
Groups: | ||
KVM_DEV_FLIC_ENQUEUE | ||
Passes a buffer and length into the kernel which are then injected into | ||
the list of pending interrupts. | ||
attr->addr contains the pointer to the buffer and attr->attr contains | ||
the length of the buffer. | ||
The format of the data structure kvm_s390_irq as it is copied from userspace | ||
is defined in usr/include/linux/kvm.h. | ||
|
||
KVM_DEV_FLIC_GET_ALL_IRQS | ||
Copies all floating interrupts into a buffer provided by userspace. | ||
When the buffer is too small it returns -ENOMEM, which is the indication | ||
for userspace to try again with a bigger buffer. | ||
All interrupts remain pending, i.e. are not deleted from the list of | ||
currently pending interrupts. | ||
attr->addr contains the userspace address of the buffer into which all | ||
interrupt data will be copied. | ||
attr->attr contains the size of the buffer in bytes. | ||
|
||
KVM_DEV_FLIC_CLEAR_IRQS | ||
Simply deletes all elements from the list of currently pending floating | ||
interrupts. No interrupts are injected into the guest. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.