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

docs: kvm: convert devices/s390_flic.txt to ReST

- Use standard markup for document title;
- Adjust indentation and add blank lines as needed;
- use the notes markup;
- mark code blocks as such.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Mauro Carvalho Chehab and committed by
Paolo Bonzini
e9447430 05c47036

+41 -30
+1
Documentation/virt/kvm/devices/index.rst
··· 11 11 arm-vgic 12 12 arm-vgic-v3 13 13 mpic 14 + s390_flic
+40 -30
Documentation/virt/kvm/devices/s390_flic.txt Documentation/virt/kvm/devices/s390_flic.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ==================================== 1 4 FLIC (floating interrupt controller) 2 5 ==================================== 3 6 ··· 34 31 Copies all floating interrupts into a buffer provided by userspace. 35 32 When the buffer is too small it returns -ENOMEM, which is the indication 36 33 for userspace to try again with a bigger buffer. 34 + 37 35 -ENOBUFS is returned when the allocation of a kernelspace buffer has 38 36 failed. 37 + 39 38 -EFAULT is returned when copying data to userspace failed. 40 39 All interrupts remain pending, i.e. are not deleted from the list of 41 40 currently pending interrupts. ··· 65 60 66 61 KVM_DEV_FLIC_ADAPTER_REGISTER 67 62 Register an I/O adapter interrupt source. Takes a kvm_s390_io_adapter 68 - describing the adapter to register: 63 + describing the adapter to register:: 69 64 70 - struct kvm_s390_io_adapter { 71 - __u32 id; 72 - __u8 isc; 73 - __u8 maskable; 74 - __u8 swap; 75 - __u8 flags; 76 - }; 65 + struct kvm_s390_io_adapter { 66 + __u32 id; 67 + __u8 isc; 68 + __u8 maskable; 69 + __u8 swap; 70 + __u8 flags; 71 + }; 77 72 78 73 id contains the unique id for the adapter, isc the I/O interruption subclass 79 74 to use, maskable whether this adapter may be masked (interrupts turned off), 80 75 swap whether the indicators need to be byte swapped, and flags contains 81 76 further characteristics of the adapter. 77 + 82 78 Currently defined values for 'flags' are: 79 + 83 80 - KVM_S390_ADAPTER_SUPPRESSIBLE: adapter is subject to AIS 84 81 (adapter-interrupt-suppression) facility. This flag only has an effect if 85 82 the AIS capability is enabled. 83 + 86 84 Unknown flag values are ignored. 87 85 88 86 89 87 KVM_DEV_FLIC_ADAPTER_MODIFY 90 88 Modifies attributes of an existing I/O adapter interrupt source. Takes 91 - a kvm_s390_io_adapter_req specifying the adapter and the operation: 89 + a kvm_s390_io_adapter_req specifying the adapter and the operation:: 92 90 93 - struct kvm_s390_io_adapter_req { 94 - __u32 id; 95 - __u8 type; 96 - __u8 mask; 97 - __u16 pad0; 98 - __u64 addr; 99 - }; 91 + struct kvm_s390_io_adapter_req { 92 + __u32 id; 93 + __u8 type; 94 + __u8 mask; 95 + __u16 pad0; 96 + __u64 addr; 97 + }; 100 98 101 99 id specifies the adapter and type the operation. The supported operations 102 100 are: ··· 111 103 perform a gmap translation for the guest address provided in addr, 112 104 pin a userspace page for the translated address and add it to the 113 105 list of mappings 114 - Note: A new mapping will be created unconditionally; therefore, 115 - the calling code should avoid making duplicate mappings. 106 + 107 + .. note:: A new mapping will be created unconditionally; therefore, 108 + the calling code should avoid making duplicate mappings. 116 109 117 110 KVM_S390_IO_ADAPTER_UNMAP 118 111 release a userspace page for the translated address specified in addr ··· 121 112 122 113 KVM_DEV_FLIC_AISM 123 114 modify the adapter-interruption-suppression mode for a given isc if the 124 - AIS capability is enabled. Takes a kvm_s390_ais_req describing: 115 + AIS capability is enabled. Takes a kvm_s390_ais_req describing:: 125 116 126 - struct kvm_s390_ais_req { 127 - __u8 isc; 128 - __u16 mode; 129 - }; 117 + struct kvm_s390_ais_req { 118 + __u8 isc; 119 + __u16 mode; 120 + }; 130 121 131 122 isc contains the target I/O interruption subclass, mode the target 132 123 adapter-interruption-suppression mode. The following modes are 133 124 currently supported: 125 + 134 126 - KVM_S390_AIS_MODE_ALL: ALL-Interruptions Mode, i.e. airq injection 135 127 is always allowed; 136 128 - KVM_S390_AIS_MODE_SINGLE: SINGLE-Interruption Mode, i.e. airq ··· 149 139 150 140 KVM_DEV_FLIC_AISM_ALL 151 141 Gets or sets the adapter-interruption-suppression mode for all ISCs. Takes 152 - a kvm_s390_ais_all describing: 142 + a kvm_s390_ais_all describing:: 153 143 154 - struct kvm_s390_ais_all { 155 - __u8 simm; /* Single-Interruption-Mode mask */ 156 - __u8 nimm; /* No-Interruption-Mode mask * 157 - }; 144 + struct kvm_s390_ais_all { 145 + __u8 simm; /* Single-Interruption-Mode mask */ 146 + __u8 nimm; /* No-Interruption-Mode mask * 147 + }; 158 148 159 149 simm contains Single-Interruption-Mode mask for all ISCs, nimm contains 160 150 No-Interruption-Mode mask for all ISCs. Each bit in simm and nimm corresponds ··· 169 159 that a FLIC operation is unavailable based on the error code resulting from a 170 160 usage attempt. 171 161 172 - Note: The KVM_DEV_FLIC_CLEAR_IO_IRQ ioctl will return EINVAL in case a zero 173 - schid is specified. 162 + .. note:: The KVM_DEV_FLIC_CLEAR_IO_IRQ ioctl will return EINVAL in case a 163 + zero schid is specified.