Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4.11-rc7 108 lines 4.3 kB view raw
1FLIC (floating interrupt controller) 2==================================== 3 4FLIC handles floating (non per-cpu) interrupts, i.e. I/O, service and some 5machine check interruptions. All interrupts are stored in a per-vm list of 6pending interrupts. FLIC performs operations on this list. 7 8Only one FLIC instance may be instantiated. 9 10FLIC provides support to 11- add interrupts (KVM_DEV_FLIC_ENQUEUE) 12- inspect currently pending interrupts (KVM_FLIC_GET_ALL_IRQS) 13- purge all pending floating interrupts (KVM_DEV_FLIC_CLEAR_IRQS) 14- purge one pending floating I/O interrupt (KVM_DEV_FLIC_CLEAR_IO_IRQ) 15- enable/disable for the guest transparent async page faults 16- register and modify adapter interrupt sources (KVM_DEV_FLIC_ADAPTER_*) 17 18Groups: 19 KVM_DEV_FLIC_ENQUEUE 20 Passes a buffer and length into the kernel which are then injected into 21 the list of pending interrupts. 22 attr->addr contains the pointer to the buffer and attr->attr contains 23 the length of the buffer. 24 The format of the data structure kvm_s390_irq as it is copied from userspace 25 is defined in usr/include/linux/kvm.h. 26 27 KVM_DEV_FLIC_GET_ALL_IRQS 28 Copies all floating interrupts into a buffer provided by userspace. 29 When the buffer is too small it returns -ENOMEM, which is the indication 30 for userspace to try again with a bigger buffer. 31 -ENOBUFS is returned when the allocation of a kernelspace buffer has 32 failed. 33 -EFAULT is returned when copying data to userspace failed. 34 All interrupts remain pending, i.e. are not deleted from the list of 35 currently pending interrupts. 36 attr->addr contains the userspace address of the buffer into which all 37 interrupt data will be copied. 38 attr->attr contains the size of the buffer in bytes. 39 40 KVM_DEV_FLIC_CLEAR_IRQS 41 Simply deletes all elements from the list of currently pending floating 42 interrupts. No interrupts are injected into the guest. 43 44 KVM_DEV_FLIC_CLEAR_IO_IRQ 45 Deletes one (if any) I/O interrupt for a subchannel identified by the 46 subsystem identification word passed via the buffer specified by 47 attr->addr (address) and attr->attr (length). 48 49 KVM_DEV_FLIC_APF_ENABLE 50 Enables async page faults for the guest. So in case of a major page fault 51 the host is allowed to handle this async and continues the guest. 52 53 KVM_DEV_FLIC_APF_DISABLE_WAIT 54 Disables async page faults for the guest and waits until already pending 55 async page faults are done. This is necessary to trigger a completion interrupt 56 for every init interrupt before migrating the interrupt list. 57 58 KVM_DEV_FLIC_ADAPTER_REGISTER 59 Register an I/O adapter interrupt source. Takes a kvm_s390_io_adapter 60 describing the adapter to register: 61 62struct kvm_s390_io_adapter { 63 __u32 id; 64 __u8 isc; 65 __u8 maskable; 66 __u8 swap; 67 __u8 pad; 68}; 69 70 id contains the unique id for the adapter, isc the I/O interruption subclass 71 to use, maskable whether this adapter may be masked (interrupts turned off) 72 and swap whether the indicators need to be byte swapped. 73 74 75 KVM_DEV_FLIC_ADAPTER_MODIFY 76 Modifies attributes of an existing I/O adapter interrupt source. Takes 77 a kvm_s390_io_adapter_req specifying the adapter and the operation: 78 79struct kvm_s390_io_adapter_req { 80 __u32 id; 81 __u8 type; 82 __u8 mask; 83 __u16 pad0; 84 __u64 addr; 85}; 86 87 id specifies the adapter and type the operation. The supported operations 88 are: 89 90 KVM_S390_IO_ADAPTER_MASK 91 mask or unmask the adapter, as specified in mask 92 93 KVM_S390_IO_ADAPTER_MAP 94 perform a gmap translation for the guest address provided in addr, 95 pin a userspace page for the translated address and add it to the 96 list of mappings 97 Note: A new mapping will be created unconditionally; therefore, 98 the calling code should avoid making duplicate mappings. 99 100 KVM_S390_IO_ADAPTER_UNMAP 101 release a userspace page for the translated address specified in addr 102 from the list of mappings 103 104Note: The KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR device ioctls executed on 105FLIC with an unknown group or attribute gives the error code EINVAL (instead of 106ENXIO, as specified in the API documentation). It is not possible to conclude 107that a FLIC operation is unavailable based on the error code resulting from a 108usage attempt.