qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Update Linux headers to 4.17-rc6

Update our copy of the Linux headers to upstream 4.17-rc6
(kernel commit 771c577c23bac90597c68).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180525132755.21839-6-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Peter Maydell and committed by
Paolo Bonzini
65a6d8dd 2af1acad

+628 -389
-1
include/standard-headers/asm-x86/hyperv.h
··· 1 - /* this is a temporary placeholder until kvm_para.h stops including it */
+1 -1
include/standard-headers/asm-x86/kvm_para.h
··· 29 29 #define KVM_FEATURE_PV_TLB_FLUSH 9 30 30 #define KVM_FEATURE_ASYNC_PF_VMEXIT 10 31 31 32 - #define KVM_HINTS_DEDICATED 0 32 + #define KVM_HINTS_REALTIME 0 33 33 34 34 /* The last 8 bits are used to indicate how to interpret the flags field 35 35 * in pvclock structure. If no bits are set, all flags are ignored.
+30 -6
include/standard-headers/linux/ethtool.h
··· 217 217 uint32_t data; 218 218 }; 219 219 220 + #define PFC_STORM_PREVENTION_AUTO 0xffff 221 + #define PFC_STORM_PREVENTION_DISABLE 0 222 + 220 223 enum tunable_id { 221 224 ETHTOOL_ID_UNSPEC, 222 225 ETHTOOL_RX_COPYBREAK, 223 226 ETHTOOL_TX_COPYBREAK, 227 + ETHTOOL_PFC_PREVENTION_TOUT, /* timeout in msecs */ 224 228 /* 225 229 * Add your fresh new tubale attribute above and remember to update 226 230 * tunable_strings[] in net/core/ethtool.c ··· 914 918 * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW 915 919 * @data: Command-dependent value 916 920 * @fs: Flow classification rule 921 + * @rss_context: RSS context to be affected 917 922 * @rule_cnt: Number of rules to be affected 918 923 * @rule_locs: Array of used rule locations 919 924 * 920 925 * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating 921 926 * the fields included in the flow hash, e.g. %RXH_IP_SRC. The following 922 - * structure fields must not be used. 927 + * structure fields must not be used, except that if @flow_type includes 928 + * the %FLOW_RSS flag, then @rss_context determines which RSS context to 929 + * act on. 923 930 * 924 931 * For %ETHTOOL_GRXRINGS, @data is set to the number of RX rings/queues 925 932 * on return. ··· 931 938 * set in @data then special location values should not be used. 932 939 * 933 940 * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the location of an 934 - * existing rule on entry and @fs contains the rule on return. 941 + * existing rule on entry and @fs contains the rule on return; if 942 + * @fs.@flow_type includes the %FLOW_RSS flag, then @rss_context is 943 + * filled with the RSS context ID associated with the rule. 935 944 * 936 945 * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the 937 946 * user buffer for @rule_locs on entry. On return, @data is the size ··· 942 951 * For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update. 943 952 * @fs.@location either specifies the location to use or is a special 944 953 * location value with %RX_CLS_LOC_SPECIAL flag set. On return, 945 - * @fs.@location is the actual rule location. 954 + * @fs.@location is the actual rule location. If @fs.@flow_type 955 + * includes the %FLOW_RSS flag, @rss_context is the RSS context ID to 956 + * use for flow spreading traffic which matches this rule. The value 957 + * from the rxfh indirection table will be added to @fs.@ring_cookie 958 + * to choose which ring to deliver to. 946 959 * 947 960 * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an 948 961 * existing rule on entry. ··· 963 976 uint32_t flow_type; 964 977 uint64_t data; 965 978 struct ethtool_rx_flow_spec fs; 966 - uint32_t rule_cnt; 979 + union { 980 + uint32_t rule_cnt; 981 + uint32_t rss_context; 982 + }; 967 983 uint32_t rule_locs[0]; 968 984 }; 969 985 ··· 990 1006 /** 991 1007 * struct ethtool_rxfh - command to get/set RX flow hash indir or/and hash key. 992 1008 * @cmd: Specific command number - %ETHTOOL_GRSSH or %ETHTOOL_SRSSH 993 - * @rss_context: RSS context identifier. 1009 + * @rss_context: RSS context identifier. Context 0 is the default for normal 1010 + * traffic; other contexts can be referenced as the destination for RX flow 1011 + * classification rules. %ETH_RXFH_CONTEXT_ALLOC is used with command 1012 + * %ETHTOOL_SRSSH to allocate a new RSS context; on return this field will 1013 + * contain the ID of the newly allocated context. 994 1014 * @indir_size: On entry, the array size of the user buffer for the 995 1015 * indirection table, which may be zero, or (for %ETHTOOL_SRSSH), 996 1016 * %ETH_RXFH_INDIR_NO_CHANGE. On return from %ETHTOOL_GRSSH, ··· 1009 1029 * size should be returned. For %ETHTOOL_SRSSH, an @indir_size of 1010 1030 * %ETH_RXFH_INDIR_NO_CHANGE means that indir table setting is not requested 1011 1031 * and a @indir_size of zero means the indir table should be reset to default 1012 - * values. An hfunc of zero means that hash function setting is not requested. 1032 + * values (if @rss_context == 0) or that the RSS context should be deleted. 1033 + * An hfunc of zero means that hash function setting is not requested. 1013 1034 */ 1014 1035 struct ethtool_rxfh { 1015 1036 uint32_t cmd; ··· 1021 1042 uint32_t rsvd32; 1022 1043 uint32_t rss_config[0]; 1023 1044 }; 1045 + #define ETH_RXFH_CONTEXT_ALLOC 0xffffffff 1024 1046 #define ETH_RXFH_INDIR_NO_CHANGE 0xffffffff 1025 1047 1026 1048 /** ··· 1635 1657 /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ 1636 1658 #define FLOW_EXT 0x80000000 1637 1659 #define FLOW_MAC_EXT 0x40000000 1660 + /* Flag to enable RSS spreading of traffic matching rule (nfc only) */ 1661 + #define FLOW_RSS 0x20000000 1638 1662 1639 1663 /* L3-L4 network traffic flow hash options */ 1640 1664 #define RXH_L2DA (1 << 1)
+2 -2
include/standard-headers/linux/input.h
··· 28 28 #define input_event_sec time.tv_sec 29 29 #define input_event_usec time.tv_usec 30 30 #else 31 - __kernel_ulong_t __sec; 32 - __kernel_ulong_t __usec; 31 + unsigned long __sec; 32 + unsigned long __usec; 33 33 #define input_event_sec __sec 34 34 #define input_event_usec __usec 35 35 #endif
+5 -2
include/standard-headers/linux/pci_regs.h
··· 520 520 #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ 521 521 #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ 522 522 #define PCI_EXP_LNKCAP_SLS_8_0GB 0x00000003 /* LNKCAP2 SLS Vector bit 2 */ 523 + #define PCI_EXP_LNKCAP_SLS_16_0GB 0x00000004 /* LNKCAP2 SLS Vector bit 3 */ 523 524 #define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */ 524 525 #define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */ 525 526 #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ ··· 547 548 #define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ 548 549 #define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ 549 550 #define PCI_EXP_LNKSTA_CLS_8_0GB 0x0003 /* Current Link Speed 8.0GT/s */ 551 + #define PCI_EXP_LNKSTA_CLS_16_0GB 0x0004 /* Current Link Speed 16.0GT/s */ 550 552 #define PCI_EXP_LNKSTA_NLW 0x03f0 /* Negotiated Link Width */ 551 553 #define PCI_EXP_LNKSTA_NLW_X1 0x0010 /* Current Link Width x1 */ 552 554 #define PCI_EXP_LNKSTA_NLW_X2 0x0020 /* Current Link Width x2 */ ··· 648 650 #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints without link end here */ 649 651 #define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */ 650 652 #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ 651 - #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5.0GT/s */ 652 - #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008 /* Supported Speed 8.0GT/s */ 653 + #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5GT/s */ 654 + #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008 /* Supported Speed 8GT/s */ 655 + #define PCI_EXP_LNKCAP2_SLS_16_0GB 0x00000010 /* Supported Speed 16GT/s */ 653 656 #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ 654 657 #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ 655 658 #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */
+15
include/standard-headers/linux/virtio_balloon.h
··· 57 57 #define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */ 58 58 #define VIRTIO_BALLOON_S_NR 10 59 59 60 + #define VIRTIO_BALLOON_S_NAMES_WITH_PREFIX(VIRTIO_BALLOON_S_NAMES_prefix) { \ 61 + VIRTIO_BALLOON_S_NAMES_prefix "swap-in", \ 62 + VIRTIO_BALLOON_S_NAMES_prefix "swap-out", \ 63 + VIRTIO_BALLOON_S_NAMES_prefix "major-faults", \ 64 + VIRTIO_BALLOON_S_NAMES_prefix "minor-faults", \ 65 + VIRTIO_BALLOON_S_NAMES_prefix "free-memory", \ 66 + VIRTIO_BALLOON_S_NAMES_prefix "total-memory", \ 67 + VIRTIO_BALLOON_S_NAMES_prefix "available-memory", \ 68 + VIRTIO_BALLOON_S_NAMES_prefix "disk-caches", \ 69 + VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-allocations", \ 70 + VIRTIO_BALLOON_S_NAMES_prefix "hugetlb-failures" \ 71 + } 72 + 73 + #define VIRTIO_BALLOON_S_NAMES VIRTIO_BALLOON_S_NAMES_WITH_PREFIX("") 74 + 60 75 /* 61 76 * Memory statistics structure. 62 77 * Driver fills an array of these structures and passes to device.
-1
include/standard-headers/linux/virtio_gpu.h
··· 260 260 }; 261 261 262 262 #define VIRTIO_GPU_CAPSET_VIRGL 1 263 - #define VIRTIO_GPU_CAPSET_VIRGL2 2 264 263 265 264 /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ 266 265 struct virtio_gpu_get_capset_info {
+25 -24
include/standard-headers/rdma/vmw_pvrdma-abi.h
··· 143 143 }; 144 144 145 145 struct pvrdma_create_cq { 146 - uint64_t buf_addr; 146 + uint64_t __attribute__((aligned(8))) buf_addr; 147 147 uint32_t buf_size; 148 148 uint32_t reserved; 149 149 }; ··· 154 154 }; 155 155 156 156 struct pvrdma_resize_cq { 157 - uint64_t buf_addr; 157 + uint64_t __attribute__((aligned(8))) buf_addr; 158 158 uint32_t buf_size; 159 159 uint32_t reserved; 160 160 }; 161 161 162 162 struct pvrdma_create_srq { 163 - uint64_t buf_addr; 163 + uint64_t __attribute__((aligned(8))) buf_addr; 164 164 uint32_t buf_size; 165 165 uint32_t reserved; 166 166 }; ··· 171 171 }; 172 172 173 173 struct pvrdma_create_qp { 174 - uint64_t rbuf_addr; 175 - uint64_t sbuf_addr; 174 + uint64_t __attribute__((aligned(8))) rbuf_addr; 175 + uint64_t __attribute__((aligned(8))) sbuf_addr; 176 176 uint32_t rbuf_size; 177 177 uint32_t sbuf_size; 178 - uint64_t qp_addr; 178 + uint64_t __attribute__((aligned(8))) qp_addr; 179 179 }; 180 180 181 181 /* PVRDMA masked atomic compare and swap */ 182 182 struct pvrdma_ex_cmp_swap { 183 - uint64_t swap_val; 184 - uint64_t compare_val; 185 - uint64_t swap_mask; 186 - uint64_t compare_mask; 183 + uint64_t __attribute__((aligned(8))) swap_val; 184 + uint64_t __attribute__((aligned(8))) compare_val; 185 + uint64_t __attribute__((aligned(8))) swap_mask; 186 + uint64_t __attribute__((aligned(8))) compare_mask; 187 187 }; 188 188 189 189 /* PVRDMA masked atomic fetch and add */ 190 190 struct pvrdma_ex_fetch_add { 191 - uint64_t add_val; 192 - uint64_t field_boundary; 191 + uint64_t __attribute__((aligned(8))) add_val; 192 + uint64_t __attribute__((aligned(8))) field_boundary; 193 193 }; 194 194 195 195 /* PVRDMA address vector. */ ··· 207 207 208 208 /* PVRDMA scatter/gather entry */ 209 209 struct pvrdma_sge { 210 - uint64_t addr; 210 + uint64_t __attribute__((aligned(8))) addr; 211 211 uint32_t length; 212 212 uint32_t lkey; 213 213 }; 214 214 215 215 /* PVRDMA receive queue work request */ 216 216 struct pvrdma_rq_wqe_hdr { 217 - uint64_t wr_id; /* wr id */ 217 + uint64_t __attribute__((aligned(8))) wr_id; /* wr id */ 218 218 uint32_t num_sge; /* size of s/g array */ 219 219 uint32_t total_len; /* reserved */ 220 220 }; ··· 222 222 223 223 /* PVRDMA send queue work request */ 224 224 struct pvrdma_sq_wqe_hdr { 225 - uint64_t wr_id; /* wr id */ 225 + uint64_t __attribute__((aligned(8))) wr_id; /* wr id */ 226 226 uint32_t num_sge; /* size of s/g array */ 227 227 uint32_t total_len; /* reserved */ 228 228 uint32_t opcode; /* operation type */ ··· 234 234 uint32_t reserved; 235 235 union { 236 236 struct { 237 - uint64_t remote_addr; 237 + uint64_t __attribute__((aligned(8))) remote_addr; 238 238 uint32_t rkey; 239 239 uint8_t reserved[4]; 240 240 } rdma; 241 241 struct { 242 - uint64_t remote_addr; 243 - uint64_t compare_add; 244 - uint64_t swap; 242 + uint64_t __attribute__((aligned(8))) remote_addr; 243 + uint64_t __attribute__((aligned(8))) compare_add; 244 + uint64_t __attribute__((aligned(8))) swap; 245 245 uint32_t rkey; 246 246 uint32_t reserved; 247 247 } atomic; 248 248 struct { 249 - uint64_t remote_addr; 249 + uint64_t __attribute__((aligned(8))) remote_addr; 250 250 uint32_t log_arg_sz; 251 251 uint32_t rkey; 252 252 union { ··· 255 255 } wr_data; 256 256 } masked_atomics; 257 257 struct { 258 - uint64_t iova_start; 259 - uint64_t pl_pdir_dma; 258 + uint64_t __attribute__((aligned(8))) iova_start; 259 + uint64_t __attribute__((aligned(8))) pl_pdir_dma; 260 260 uint32_t page_shift; 261 261 uint32_t page_list_len; 262 262 uint32_t length; 263 263 uint32_t access_flags; 264 264 uint32_t rkey; 265 + uint32_t reserved; 265 266 } fast_reg; 266 267 struct { 267 268 uint32_t remote_qpn; ··· 274 275 275 276 /* Completion queue element. */ 276 277 struct pvrdma_cqe { 277 - uint64_t wr_id; 278 - uint64_t qp; 278 + uint64_t __attribute__((aligned(8))) wr_id; 279 + uint64_t __attribute__((aligned(8))) qp; 279 280 uint32_t opcode; 280 281 uint32_t status; 281 282 uint32_t byte_len;
+10 -348
linux-headers/COPYING
··· 1 - 2 - NOTE! This copyright does *not* cover user programs that use kernel 3 - services by normal system calls - this is merely considered normal use 4 - of the kernel, and does *not* fall under the heading of "derived work". 5 - Also note that the GPL below is copyrighted by the Free Software 6 - Foundation, but the instance of code that it refers to (the Linux 7 - kernel) is copyrighted by me and others who actually wrote it. 8 - 9 - Also note that the only valid version of the GPL as far as the kernel 10 - is concerned is _this_ particular version of the license (ie v2, not 11 - v2.2 or v3.x or whatever), unless explicitly otherwise stated. 12 - 13 - Linus Torvalds 14 - 15 - ---------------------------------------- 16 - 17 - GNU GENERAL PUBLIC LICENSE 18 - Version 2, June 1991 19 - 20 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. 21 - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 - Everyone is permitted to copy and distribute verbatim copies 23 - of this license document, but changing it is not allowed. 24 - 25 - Preamble 26 - 27 - The licenses for most software are designed to take away your 28 - freedom to share and change it. By contrast, the GNU General Public 29 - License is intended to guarantee your freedom to share and change free 30 - software--to make sure the software is free for all its users. This 31 - General Public License applies to most of the Free Software 32 - Foundation's software and to any other program whose authors commit to 33 - using it. (Some other Free Software Foundation software is covered by 34 - the GNU Library General Public License instead.) You can apply it to 35 - your programs, too. 36 - 37 - When we speak of free software, we are referring to freedom, not 38 - price. Our General Public Licenses are designed to make sure that you 39 - have the freedom to distribute copies of free software (and charge for 40 - this service if you wish), that you receive source code or can get it 41 - if you want it, that you can change the software or use pieces of it 42 - in new free programs; and that you know you can do these things. 43 - 44 - To protect your rights, we need to make restrictions that forbid 45 - anyone to deny you these rights or to ask you to surrender the rights. 46 - These restrictions translate to certain responsibilities for you if you 47 - distribute copies of the software, or if you modify it. 48 - 49 - For example, if you distribute copies of such a program, whether 50 - gratis or for a fee, you must give the recipients all the rights that 51 - you have. You must make sure that they, too, receive or can get the 52 - source code. And you must show them these terms so they know their 53 - rights. 54 - 55 - We protect your rights with two steps: (1) copyright the software, and 56 - (2) offer you this license which gives you legal permission to copy, 57 - distribute and/or modify the software. 58 - 59 - Also, for each author's protection and ours, we want to make certain 60 - that everyone understands that there is no warranty for this free 61 - software. If the software is modified by someone else and passed on, we 62 - want its recipients to know that what they have is not the original, so 63 - that any problems introduced by others will not reflect on the original 64 - authors' reputations. 65 - 66 - Finally, any free program is threatened constantly by software 67 - patents. We wish to avoid the danger that redistributors of a free 68 - program will individually obtain patent licenses, in effect making the 69 - program proprietary. To prevent this, we have made it clear that any 70 - patent must be licensed for everyone's free use or not licensed at all. 71 - 72 - The precise terms and conditions for copying, distribution and 73 - modification follow. 74 - 75 - GNU GENERAL PUBLIC LICENSE 76 - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 77 - 78 - 0. This License applies to any program or other work which contains 79 - a notice placed by the copyright holder saying it may be distributed 80 - under the terms of this General Public License. The "Program", below, 81 - refers to any such program or work, and a "work based on the Program" 82 - means either the Program or any derivative work under copyright law: 83 - that is to say, a work containing the Program or a portion of it, 84 - either verbatim or with modifications and/or translated into another 85 - language. (Hereinafter, translation is included without limitation in 86 - the term "modification".) Each licensee is addressed as "you". 87 - 88 - Activities other than copying, distribution and modification are not 89 - covered by this License; they are outside its scope. The act of 90 - running the Program is not restricted, and the output from the Program 91 - is covered only if its contents constitute a work based on the 92 - Program (independent of having been made by running the Program). 93 - Whether that is true depends on what the Program does. 94 - 95 - 1. You may copy and distribute verbatim copies of the Program's 96 - source code as you receive it, in any medium, provided that you 97 - conspicuously and appropriately publish on each copy an appropriate 98 - copyright notice and disclaimer of warranty; keep intact all the 99 - notices that refer to this License and to the absence of any warranty; 100 - and give any other recipients of the Program a copy of this License 101 - along with the Program. 102 - 103 - You may charge a fee for the physical act of transferring a copy, and 104 - you may at your option offer warranty protection in exchange for a fee. 105 - 106 - 2. You may modify your copy or copies of the Program or any portion 107 - of it, thus forming a work based on the Program, and copy and 108 - distribute such modifications or work under the terms of Section 1 109 - above, provided that you also meet all of these conditions: 110 - 111 - a) You must cause the modified files to carry prominent notices 112 - stating that you changed the files and the date of any change. 113 - 114 - b) You must cause any work that you distribute or publish, that in 115 - whole or in part contains or is derived from the Program or any 116 - part thereof, to be licensed as a whole at no charge to all third 117 - parties under the terms of this License. 118 - 119 - c) If the modified program normally reads commands interactively 120 - when run, you must cause it, when started running for such 121 - interactive use in the most ordinary way, to print or display an 122 - announcement including an appropriate copyright notice and a 123 - notice that there is no warranty (or else, saying that you provide 124 - a warranty) and that users may redistribute the program under 125 - these conditions, and telling the user how to view a copy of this 126 - License. (Exception: if the Program itself is interactive but 127 - does not normally print such an announcement, your work based on 128 - the Program is not required to print an announcement.) 129 - 130 - These requirements apply to the modified work as a whole. If 131 - identifiable sections of that work are not derived from the Program, 132 - and can be reasonably considered independent and separate works in 133 - themselves, then this License, and its terms, do not apply to those 134 - sections when you distribute them as separate works. But when you 135 - distribute the same sections as part of a whole which is a work based 136 - on the Program, the distribution of the whole must be on the terms of 137 - this License, whose permissions for other licensees extend to the 138 - entire whole, and thus to each and every part regardless of who wrote it. 139 - 140 - Thus, it is not the intent of this section to claim rights or contest 141 - your rights to work written entirely by you; rather, the intent is to 142 - exercise the right to control the distribution of derivative or 143 - collective works based on the Program. 144 - 145 - In addition, mere aggregation of another work not based on the Program 146 - with the Program (or with a work based on the Program) on a volume of 147 - a storage or distribution medium does not bring the other work under 148 - the scope of this License. 149 - 150 - 3. You may copy and distribute the Program (or a work based on it, 151 - under Section 2) in object code or executable form under the terms of 152 - Sections 1 and 2 above provided that you also do one of the following: 153 - 154 - a) Accompany it with the complete corresponding machine-readable 155 - source code, which must be distributed under the terms of Sections 156 - 1 and 2 above on a medium customarily used for software interchange; or, 157 - 158 - b) Accompany it with a written offer, valid for at least three 159 - years, to give any third party, for a charge no more than your 160 - cost of physically performing source distribution, a complete 161 - machine-readable copy of the corresponding source code, to be 162 - distributed under the terms of Sections 1 and 2 above on a medium 163 - customarily used for software interchange; or, 164 - 165 - c) Accompany it with the information you received as to the offer 166 - to distribute corresponding source code. (This alternative is 167 - allowed only for noncommercial distribution and only if you 168 - received the program in object code or executable form with such 169 - an offer, in accord with Subsection b above.) 170 - 171 - The source code for a work means the preferred form of the work for 172 - making modifications to it. For an executable work, complete source 173 - code means all the source code for all modules it contains, plus any 174 - associated interface definition files, plus the scripts used to 175 - control compilation and installation of the executable. However, as a 176 - special exception, the source code distributed need not include 177 - anything that is normally distributed (in either source or binary 178 - form) with the major components (compiler, kernel, and so on) of the 179 - operating system on which the executable runs, unless that component 180 - itself accompanies the executable. 1 + The Linux Kernel is provided under: 181 2 182 - If distribution of executable or object code is made by offering 183 - access to copy from a designated place, then offering equivalent 184 - access to copy the source code from the same place counts as 185 - distribution of the source code, even though third parties are not 186 - compelled to copy the source along with the object code. 187 - 188 - 4. You may not copy, modify, sublicense, or distribute the Program 189 - except as expressly provided under this License. Any attempt 190 - otherwise to copy, modify, sublicense or distribute the Program is 191 - void, and will automatically terminate your rights under this License. 192 - However, parties who have received copies, or rights, from you under 193 - this License will not have their licenses terminated so long as such 194 - parties remain in full compliance. 3 + SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 195 4 196 - 5. You are not required to accept this License, since you have not 197 - signed it. However, nothing else grants you permission to modify or 198 - distribute the Program or its derivative works. These actions are 199 - prohibited by law if you do not accept this License. Therefore, by 200 - modifying or distributing the Program (or any work based on the 201 - Program), you indicate your acceptance of this License to do so, and 202 - all its terms and conditions for copying, distributing or modifying 203 - the Program or works based on it. 204 - 205 - 6. Each time you redistribute the Program (or any work based on the 206 - Program), the recipient automatically receives a license from the 207 - original licensor to copy, distribute or modify the Program subject to 208 - these terms and conditions. You may not impose any further 209 - restrictions on the recipients' exercise of the rights granted herein. 210 - You are not responsible for enforcing compliance by third parties to 211 - this License. 212 - 213 - 7. If, as a consequence of a court judgment or allegation of patent 214 - infringement or for any other reason (not limited to patent issues), 215 - conditions are imposed on you (whether by court order, agreement or 216 - otherwise) that contradict the conditions of this License, they do not 217 - excuse you from the conditions of this License. If you cannot 218 - distribute so as to satisfy simultaneously your obligations under this 219 - License and any other pertinent obligations, then as a consequence you 220 - may not distribute the Program at all. For example, if a patent 221 - license would not permit royalty-free redistribution of the Program by 222 - all those who receive copies directly or indirectly through you, then 223 - the only way you could satisfy both it and this License would be to 224 - refrain entirely from distribution of the Program. 5 + Being under the terms of the GNU General Public License version 2 only, 6 + according with: 225 7 226 - If any portion of this section is held invalid or unenforceable under 227 - any particular circumstance, the balance of the section is intended to 228 - apply and the section as a whole is intended to apply in other 229 - circumstances. 8 + LICENSES/preferred/GPL-2.0 230 9 231 - It is not the purpose of this section to induce you to infringe any 232 - patents or other property right claims or to contest validity of any 233 - such claims; this section has the sole purpose of protecting the 234 - integrity of the free software distribution system, which is 235 - implemented by public license practices. Many people have made 236 - generous contributions to the wide range of software distributed 237 - through that system in reliance on consistent application of that 238 - system; it is up to the author/donor to decide if he or she is willing 239 - to distribute software through any other system and a licensee cannot 240 - impose that choice. 10 + With an explicit syscall exception, as stated at: 241 11 242 - This section is intended to make thoroughly clear what is believed to 243 - be a consequence of the rest of this License. 244 - 245 - 8. If the distribution and/or use of the Program is restricted in 246 - certain countries either by patents or by copyrighted interfaces, the 247 - original copyright holder who places the Program under this License 248 - may add an explicit geographical distribution limitation excluding 249 - those countries, so that distribution is permitted only in or among 250 - countries not thus excluded. In such case, this License incorporates 251 - the limitation as if written in the body of this License. 12 + LICENSES/exceptions/Linux-syscall-note 252 13 253 - 9. The Free Software Foundation may publish revised and/or new versions 254 - of the General Public License from time to time. Such new versions will 255 - be similar in spirit to the present version, but may differ in detail to 256 - address new problems or concerns. 14 + In addition, other licenses may also apply. Please see: 257 15 258 - Each version is given a distinguishing version number. If the Program 259 - specifies a version number of this License which applies to it and "any 260 - later version", you have the option of following the terms and conditions 261 - either of that version or of any later version published by the Free 262 - Software Foundation. If the Program does not specify a version number of 263 - this License, you may choose any version ever published by the Free Software 264 - Foundation. 16 + Documentation/process/license-rules.rst 265 17 266 - 10. If you wish to incorporate parts of the Program into other free 267 - programs whose distribution conditions are different, write to the author 268 - to ask for permission. For software which is copyrighted by the Free 269 - Software Foundation, write to the Free Software Foundation; we sometimes 270 - make exceptions for this. Our decision will be guided by the two goals 271 - of preserving the free status of all derivatives of our free software and 272 - of promoting the sharing and reuse of software generally. 273 - 274 - NO WARRANTY 275 - 276 - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 277 - FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 278 - OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 279 - PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 280 - OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 281 - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 282 - TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 283 - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 284 - REPAIR OR CORRECTION. 285 - 286 - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 287 - WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 288 - REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 289 - INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 290 - OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 291 - TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 292 - YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 293 - PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 294 - POSSIBILITY OF SUCH DAMAGES. 295 - 296 - END OF TERMS AND CONDITIONS 297 - 298 - How to Apply These Terms to Your New Programs 299 - 300 - If you develop a new program, and you want it to be of the greatest 301 - possible use to the public, the best way to achieve this is to make it 302 - free software which everyone can redistribute and change under these terms. 303 - 304 - To do so, attach the following notices to the program. It is safest 305 - to attach them to the start of each source file to most effectively 306 - convey the exclusion of warranty; and each file should have at least 307 - the "copyright" line and a pointer to where the full notice is found. 308 - 309 - <one line to give the program's name and a brief idea of what it does.> 310 - Copyright (C) <year> <name of author> 311 - 312 - This program is free software; you can redistribute it and/or modify 313 - it under the terms of the GNU General Public License as published by 314 - the Free Software Foundation; either version 2 of the License, or 315 - (at your option) any later version. 316 - 317 - This program is distributed in the hope that it will be useful, 318 - but WITHOUT ANY WARRANTY; without even the implied warranty of 319 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 320 - GNU General Public License for more details. 321 - 322 - You should have received a copy of the GNU General Public License 323 - along with this program; if not, write to the Free Software 324 - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 325 - 326 - 327 - Also add information on how to contact you by electronic and paper mail. 328 - 329 - If the program is interactive, make it output a short notice like this 330 - when it starts in an interactive mode: 331 - 332 - Gnomovision version 69, Copyright (C) year name of author 333 - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 334 - This is free software, and you are welcome to redistribute it 335 - under certain conditions; type `show c' for details. 336 - 337 - The hypothetical commands `show w' and `show c' should show the appropriate 338 - parts of the General Public License. Of course, the commands you use may 339 - be called something other than `show w' and `show c'; they could even be 340 - mouse-clicks or menu items--whatever suits your program. 341 - 342 - You should also get your employer (if you work as a programmer) or your 343 - school, if any, to sign a "copyright disclaimer" for the program, if 344 - necessary. Here is a sample; alter the names: 345 - 346 - Yoyodyne, Inc., hereby disclaims all copyright interest in the program 347 - `Gnomovision' (which makes passes at compilers) written by James Hacker. 348 - 349 - <signature of Ty Coon>, 1 April 1989 350 - Ty Coon, President of Vice 351 - 352 - This General Public License does not permit incorporating your program into 353 - proprietary programs. If your program is a subroutine library, you may 354 - consider it more useful to permit linking proprietary applications with the 355 - library. If this is what you want to do, use the GNU Library General 356 - Public License instead of this License. 18 + for more details.
+25
linux-headers/LICENSES/exceptions/Linux-syscall-note
··· 1 + SPDX-Exception-Identifier: Linux-syscall-note 2 + SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html 3 + SPDX-Licenses: GPL-2.0, GPL-2.0+, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+ 4 + Usage-Guide: 5 + This exception is used together with one of the above SPDX-Licenses 6 + to mark user space API (uapi) header files so they can be included 7 + into non GPL compliant user space application code. 8 + To use this exception add it with the keyword WITH to one of the 9 + identifiers in the SPDX-Licenses tag: 10 + SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note 11 + License-Text: 12 + 13 + NOTE! This copyright does *not* cover user programs that use kernel 14 + services by normal system calls - this is merely considered normal use 15 + of the kernel, and does *not* fall under the heading of "derived work". 16 + Also note that the GPL below is copyrighted by the Free Software 17 + Foundation, but the instance of code that it refers to (the Linux 18 + kernel) is copyrighted by me and others who actually wrote it. 19 + 20 + Also note that the only valid version of the GPL as far as the kernel 21 + is concerned is _this_ particular version of the license (ie v2, not 22 + v2.2 or v3.x or whatever), unless explicitly otherwise stated. 23 + 24 + Linus Torvalds 25 +
+32
linux-headers/LICENSES/preferred/BSD-2-Clause
··· 1 + Valid-License-Identifier: BSD-2-Clause 2 + SPDX-URL: https://spdx.org/licenses/BSD-2-Clause.html 3 + Usage-Guide: 4 + To use the BSD 2-clause "Simplified" License put the following SPDX 5 + tag/value pair into a comment according to the placement guidelines in 6 + the licensing rules documentation: 7 + SPDX-License-Identifier: BSD-2-Clause 8 + License-Text: 9 + 10 + Copyright (c) <year> <owner> . All rights reserved. 11 + 12 + Redistribution and use in source and binary forms, with or without 13 + modification, are permitted provided that the following conditions are met: 14 + 15 + 1. Redistributions of source code must retain the above copyright notice, 16 + this list of conditions and the following disclaimer. 17 + 18 + 2. Redistributions in binary form must reproduce the above copyright 19 + notice, this list of conditions and the following disclaimer in the 20 + documentation and/or other materials provided with the distribution. 21 + 22 + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 + POSSIBILITY OF SUCH DAMAGE.
+36
linux-headers/LICENSES/preferred/BSD-3-Clause
··· 1 + Valid-License-Identifier: BSD-3-Clause 2 + SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html 3 + Usage-Guide: 4 + To use the BSD 3-clause "New" or "Revised" License put the following SPDX 5 + tag/value pair into a comment according to the placement guidelines in 6 + the licensing rules documentation: 7 + SPDX-License-Identifier: BSD-3-Clause 8 + License-Text: 9 + 10 + Copyright (c) <year> <owner> . All rights reserved. 11 + 12 + Redistribution and use in source and binary forms, with or without 13 + modification, are permitted provided that the following conditions are met: 14 + 15 + 1. Redistributions of source code must retain the above copyright notice, 16 + this list of conditions and the following disclaimer. 17 + 18 + 2. Redistributions in binary form must reproduce the above copyright 19 + notice, this list of conditions and the following disclaimer in the 20 + documentation and/or other materials provided with the distribution. 21 + 22 + 3. Neither the name of the copyright holder nor the names of its 23 + contributors may be used to endorse or promote products derived from this 24 + software without specific prior written permission. 25 + 26 + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 30 + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 + POSSIBILITY OF SUCH DAMAGE.
+353
linux-headers/LICENSES/preferred/GPL-2.0
··· 1 + Valid-License-Identifier: GPL-2.0 2 + Valid-License-Identifier: GPL-2.0+ 3 + SPDX-URL: https://spdx.org/licenses/GPL-2.0.html 4 + Usage-Guide: 5 + To use this license in source code, put one of the following SPDX 6 + tag/value pairs into a comment according to the placement 7 + guidelines in the licensing rules documentation. 8 + For 'GNU General Public License (GPL) version 2 only' use: 9 + SPDX-License-Identifier: GPL-2.0 10 + For 'GNU General Public License (GPL) version 2 or any later version' use: 11 + SPDX-License-Identifier: GPL-2.0+ 12 + License-Text: 13 + 14 + GNU GENERAL PUBLIC LICENSE 15 + Version 2, June 1991 16 + 17 + Copyright (C) 1989, 1991 Free Software Foundation, Inc. 18 + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 + Everyone is permitted to copy and distribute verbatim copies 20 + of this license document, but changing it is not allowed. 21 + 22 + Preamble 23 + 24 + The licenses for most software are designed to take away your 25 + freedom to share and change it. By contrast, the GNU General Public 26 + License is intended to guarantee your freedom to share and change free 27 + software--to make sure the software is free for all its users. This 28 + General Public License applies to most of the Free Software 29 + Foundation's software and to any other program whose authors commit to 30 + using it. (Some other Free Software Foundation software is covered by 31 + the GNU Library General Public License instead.) You can apply it to 32 + your programs, too. 33 + 34 + When we speak of free software, we are referring to freedom, not 35 + price. Our General Public Licenses are designed to make sure that you 36 + have the freedom to distribute copies of free software (and charge for 37 + this service if you wish), that you receive source code or can get it 38 + if you want it, that you can change the software or use pieces of it 39 + in new free programs; and that you know you can do these things. 40 + 41 + To protect your rights, we need to make restrictions that forbid 42 + anyone to deny you these rights or to ask you to surrender the rights. 43 + These restrictions translate to certain responsibilities for you if you 44 + distribute copies of the software, or if you modify it. 45 + 46 + For example, if you distribute copies of such a program, whether 47 + gratis or for a fee, you must give the recipients all the rights that 48 + you have. You must make sure that they, too, receive or can get the 49 + source code. And you must show them these terms so they know their 50 + rights. 51 + 52 + We protect your rights with two steps: (1) copyright the software, and 53 + (2) offer you this license which gives you legal permission to copy, 54 + distribute and/or modify the software. 55 + 56 + Also, for each author's protection and ours, we want to make certain 57 + that everyone understands that there is no warranty for this free 58 + software. If the software is modified by someone else and passed on, we 59 + want its recipients to know that what they have is not the original, so 60 + that any problems introduced by others will not reflect on the original 61 + authors' reputations. 62 + 63 + Finally, any free program is threatened constantly by software 64 + patents. We wish to avoid the danger that redistributors of a free 65 + program will individually obtain patent licenses, in effect making the 66 + program proprietary. To prevent this, we have made it clear that any 67 + patent must be licensed for everyone's free use or not licensed at all. 68 + 69 + The precise terms and conditions for copying, distribution and 70 + modification follow. 71 + 72 + GNU GENERAL PUBLIC LICENSE 73 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 74 + 75 + 0. This License applies to any program or other work which contains 76 + a notice placed by the copyright holder saying it may be distributed 77 + under the terms of this General Public License. The "Program", below, 78 + refers to any such program or work, and a "work based on the Program" 79 + means either the Program or any derivative work under copyright law: 80 + that is to say, a work containing the Program or a portion of it, 81 + either verbatim or with modifications and/or translated into another 82 + language. (Hereinafter, translation is included without limitation in 83 + the term "modification".) Each licensee is addressed as "you". 84 + 85 + Activities other than copying, distribution and modification are not 86 + covered by this License; they are outside its scope. The act of 87 + running the Program is not restricted, and the output from the Program 88 + is covered only if its contents constitute a work based on the 89 + Program (independent of having been made by running the Program). 90 + Whether that is true depends on what the Program does. 91 + 92 + 1. You may copy and distribute verbatim copies of the Program's 93 + source code as you receive it, in any medium, provided that you 94 + conspicuously and appropriately publish on each copy an appropriate 95 + copyright notice and disclaimer of warranty; keep intact all the 96 + notices that refer to this License and to the absence of any warranty; 97 + and give any other recipients of the Program a copy of this License 98 + along with the Program. 99 + 100 + You may charge a fee for the physical act of transferring a copy, and 101 + you may at your option offer warranty protection in exchange for a fee. 102 + 103 + 2. You may modify your copy or copies of the Program or any portion 104 + of it, thus forming a work based on the Program, and copy and 105 + distribute such modifications or work under the terms of Section 1 106 + above, provided that you also meet all of these conditions: 107 + 108 + a) You must cause the modified files to carry prominent notices 109 + stating that you changed the files and the date of any change. 110 + 111 + b) You must cause any work that you distribute or publish, that in 112 + whole or in part contains or is derived from the Program or any 113 + part thereof, to be licensed as a whole at no charge to all third 114 + parties under the terms of this License. 115 + 116 + c) If the modified program normally reads commands interactively 117 + when run, you must cause it, when started running for such 118 + interactive use in the most ordinary way, to print or display an 119 + announcement including an appropriate copyright notice and a 120 + notice that there is no warranty (or else, saying that you provide 121 + a warranty) and that users may redistribute the program under 122 + these conditions, and telling the user how to view a copy of this 123 + License. (Exception: if the Program itself is interactive but 124 + does not normally print such an announcement, your work based on 125 + the Program is not required to print an announcement.) 126 + 127 + These requirements apply to the modified work as a whole. If 128 + identifiable sections of that work are not derived from the Program, 129 + and can be reasonably considered independent and separate works in 130 + themselves, then this License, and its terms, do not apply to those 131 + sections when you distribute them as separate works. But when you 132 + distribute the same sections as part of a whole which is a work based 133 + on the Program, the distribution of the whole must be on the terms of 134 + this License, whose permissions for other licensees extend to the 135 + entire whole, and thus to each and every part regardless of who wrote it. 136 + 137 + Thus, it is not the intent of this section to claim rights or contest 138 + your rights to work written entirely by you; rather, the intent is to 139 + exercise the right to control the distribution of derivative or 140 + collective works based on the Program. 141 + 142 + In addition, mere aggregation of another work not based on the Program 143 + with the Program (or with a work based on the Program) on a volume of 144 + a storage or distribution medium does not bring the other work under 145 + the scope of this License. 146 + 147 + 3. You may copy and distribute the Program (or a work based on it, 148 + under Section 2) in object code or executable form under the terms of 149 + Sections 1 and 2 above provided that you also do one of the following: 150 + 151 + a) Accompany it with the complete corresponding machine-readable 152 + source code, which must be distributed under the terms of Sections 153 + 1 and 2 above on a medium customarily used for software interchange; or, 154 + 155 + b) Accompany it with a written offer, valid for at least three 156 + years, to give any third party, for a charge no more than your 157 + cost of physically performing source distribution, a complete 158 + machine-readable copy of the corresponding source code, to be 159 + distributed under the terms of Sections 1 and 2 above on a medium 160 + customarily used for software interchange; or, 161 + 162 + c) Accompany it with the information you received as to the offer 163 + to distribute corresponding source code. (This alternative is 164 + allowed only for noncommercial distribution and only if you 165 + received the program in object code or executable form with such 166 + an offer, in accord with Subsection b above.) 167 + 168 + The source code for a work means the preferred form of the work for 169 + making modifications to it. For an executable work, complete source 170 + code means all the source code for all modules it contains, plus any 171 + associated interface definition files, plus the scripts used to 172 + control compilation and installation of the executable. However, as a 173 + special exception, the source code distributed need not include 174 + anything that is normally distributed (in either source or binary 175 + form) with the major components (compiler, kernel, and so on) of the 176 + operating system on which the executable runs, unless that component 177 + itself accompanies the executable. 178 + 179 + If distribution of executable or object code is made by offering 180 + access to copy from a designated place, then offering equivalent 181 + access to copy the source code from the same place counts as 182 + distribution of the source code, even though third parties are not 183 + compelled to copy the source along with the object code. 184 + 185 + 4. You may not copy, modify, sublicense, or distribute the Program 186 + except as expressly provided under this License. Any attempt 187 + otherwise to copy, modify, sublicense or distribute the Program is 188 + void, and will automatically terminate your rights under this License. 189 + However, parties who have received copies, or rights, from you under 190 + this License will not have their licenses terminated so long as such 191 + parties remain in full compliance. 192 + 193 + 5. You are not required to accept this License, since you have not 194 + signed it. However, nothing else grants you permission to modify or 195 + distribute the Program or its derivative works. These actions are 196 + prohibited by law if you do not accept this License. Therefore, by 197 + modifying or distributing the Program (or any work based on the 198 + Program), you indicate your acceptance of this License to do so, and 199 + all its terms and conditions for copying, distributing or modifying 200 + the Program or works based on it. 201 + 202 + 6. Each time you redistribute the Program (or any work based on the 203 + Program), the recipient automatically receives a license from the 204 + original licensor to copy, distribute or modify the Program subject to 205 + these terms and conditions. You may not impose any further 206 + restrictions on the recipients' exercise of the rights granted herein. 207 + You are not responsible for enforcing compliance by third parties to 208 + this License. 209 + 210 + 7. If, as a consequence of a court judgment or allegation of patent 211 + infringement or for any other reason (not limited to patent issues), 212 + conditions are imposed on you (whether by court order, agreement or 213 + otherwise) that contradict the conditions of this License, they do not 214 + excuse you from the conditions of this License. If you cannot 215 + distribute so as to satisfy simultaneously your obligations under this 216 + License and any other pertinent obligations, then as a consequence you 217 + may not distribute the Program at all. For example, if a patent 218 + license would not permit royalty-free redistribution of the Program by 219 + all those who receive copies directly or indirectly through you, then 220 + the only way you could satisfy both it and this License would be to 221 + refrain entirely from distribution of the Program. 222 + 223 + If any portion of this section is held invalid or unenforceable under 224 + any particular circumstance, the balance of the section is intended to 225 + apply and the section as a whole is intended to apply in other 226 + circumstances. 227 + 228 + It is not the purpose of this section to induce you to infringe any 229 + patents or other property right claims or to contest validity of any 230 + such claims; this section has the sole purpose of protecting the 231 + integrity of the free software distribution system, which is 232 + implemented by public license practices. Many people have made 233 + generous contributions to the wide range of software distributed 234 + through that system in reliance on consistent application of that 235 + system; it is up to the author/donor to decide if he or she is willing 236 + to distribute software through any other system and a licensee cannot 237 + impose that choice. 238 + 239 + This section is intended to make thoroughly clear what is believed to 240 + be a consequence of the rest of this License. 241 + 242 + 8. If the distribution and/or use of the Program is restricted in 243 + certain countries either by patents or by copyrighted interfaces, the 244 + original copyright holder who places the Program under this License 245 + may add an explicit geographical distribution limitation excluding 246 + those countries, so that distribution is permitted only in or among 247 + countries not thus excluded. In such case, this License incorporates 248 + the limitation as if written in the body of this License. 249 + 250 + 9. The Free Software Foundation may publish revised and/or new versions 251 + of the General Public License from time to time. Such new versions will 252 + be similar in spirit to the present version, but may differ in detail to 253 + address new problems or concerns. 254 + 255 + Each version is given a distinguishing version number. If the Program 256 + specifies a version number of this License which applies to it and "any 257 + later version", you have the option of following the terms and conditions 258 + either of that version or of any later version published by the Free 259 + Software Foundation. If the Program does not specify a version number of 260 + this License, you may choose any version ever published by the Free Software 261 + Foundation. 262 + 263 + 10. If you wish to incorporate parts of the Program into other free 264 + programs whose distribution conditions are different, write to the author 265 + to ask for permission. For software which is copyrighted by the Free 266 + Software Foundation, write to the Free Software Foundation; we sometimes 267 + make exceptions for this. Our decision will be guided by the two goals 268 + of preserving the free status of all derivatives of our free software and 269 + of promoting the sharing and reuse of software generally. 270 + 271 + NO WARRANTY 272 + 273 + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 274 + FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 275 + OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 276 + PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 277 + OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 278 + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 279 + TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 280 + PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 281 + REPAIR OR CORRECTION. 282 + 283 + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 284 + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 285 + REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 286 + INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 287 + OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 288 + TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 289 + YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 290 + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 291 + POSSIBILITY OF SUCH DAMAGES. 292 + 293 + END OF TERMS AND CONDITIONS 294 + 295 + How to Apply These Terms to Your New Programs 296 + 297 + If you develop a new program, and you want it to be of the greatest 298 + possible use to the public, the best way to achieve this is to make it 299 + free software which everyone can redistribute and change under these terms. 300 + 301 + To do so, attach the following notices to the program. It is safest 302 + to attach them to the start of each source file to most effectively 303 + convey the exclusion of warranty; and each file should have at least 304 + the "copyright" line and a pointer to where the full notice is found. 305 + 306 + <one line to give the program's name and a brief idea of what it does.> 307 + Copyright (C) <year> <name of author> 308 + 309 + This program is free software; you can redistribute it and/or modify 310 + it under the terms of the GNU General Public License as published by 311 + the Free Software Foundation; either version 2 of the License, or 312 + (at your option) any later version. 313 + 314 + This program is distributed in the hope that it will be useful, 315 + but WITHOUT ANY WARRANTY; without even the implied warranty of 316 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 317 + GNU General Public License for more details. 318 + 319 + You should have received a copy of the GNU General Public License 320 + along with this program; if not, write to the Free Software 321 + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 322 + 323 + 324 + Also add information on how to contact you by electronic and paper mail. 325 + 326 + If the program is interactive, make it output a short notice like this 327 + when it starts in an interactive mode: 328 + 329 + Gnomovision version 69, Copyright (C) year name of author 330 + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 331 + This is free software, and you are welcome to redistribute it 332 + under certain conditions; type `show c' for details. 333 + 334 + The hypothetical commands `show w' and `show c' should show the appropriate 335 + parts of the General Public License. Of course, the commands you use may 336 + be called something other than `show w' and `show c'; they could even be 337 + mouse-clicks or menu items--whatever suits your program. 338 + 339 + You should also get your employer (if you work as a programmer) or your 340 + school, if any, to sign a "copyright disclaimer" for the program, if 341 + necessary. Here is a sample; alter the names: 342 + 343 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program 344 + `Gnomovision' (which makes passes at compilers) written by James Hacker. 345 + 346 + <signature of Ty Coon>, 1 April 1989 347 + Ty Coon, President of Vice 348 + 349 + This General Public License does not permit incorporating your program into 350 + proprietary programs. If your program is a subroutine library, you may 351 + consider it more useful to permit linking proprietary applications with the 352 + library. If this is what you want to do, use the GNU Library General 353 + Public License instead of this License.
+15
linux-headers/asm-arm/kvm.h
··· 135 135 #define KVM_REG_ARM_CRM_SHIFT 7 136 136 #define KVM_REG_ARM_32_CRN_MASK 0x0000000000007800 137 137 #define KVM_REG_ARM_32_CRN_SHIFT 11 138 + /* 139 + * For KVM currently all guest registers are nonsecure, but we reserve a bit 140 + * in the encoding to distinguish secure from nonsecure for AArch32 system 141 + * registers that are banked by security. This is 1 for the secure banked 142 + * register, and 0 for the nonsecure banked register or if the register is 143 + * not banked by security. 144 + */ 145 + #define KVM_REG_ARM_SECURE_MASK 0x0000000010000000 146 + #define KVM_REG_ARM_SECURE_SHIFT 28 138 147 139 148 #define ARM_CP15_REG_SHIFT_MASK(x,n) \ 140 149 (((x) << KVM_REG_ARM_ ## n ## _SHIFT) & KVM_REG_ARM_ ## n ## _MASK) ··· 185 194 #define KVM_REG_ARM_VFP_FPEXC 0x1008 186 195 #define KVM_REG_ARM_VFP_FPINST 0x1009 187 196 #define KVM_REG_ARM_VFP_FPINST2 0x100A 197 + 198 + /* KVM-as-firmware specific pseudo-registers */ 199 + #define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT) 200 + #define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM | KVM_REG_SIZE_U64 | \ 201 + KVM_REG_ARM_FW | ((r) & 0xffff)) 202 + #define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) 188 203 189 204 /* Device Control API: ARM VGIC */ 190 205 #define KVM_DEV_ARM_VGIC_GRP_ADDR 0
+6
linux-headers/asm-arm64/kvm.h
··· 206 206 #define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2) 207 207 #define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2) 208 208 209 + /* KVM-as-firmware specific pseudo-registers */ 210 + #define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT) 211 + #define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \ 212 + KVM_REG_ARM_FW | ((r) & 0xffff)) 213 + #define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) 214 + 209 215 /* Device Control API: ARM VGIC */ 210 216 #define KVM_DEV_ARM_VGIC_GRP_ADDR 0 211 217 #define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1
-1
linux-headers/asm-x86/hyperv.h
··· 1 - #include "standard-headers/asm-x86/hyperv.h"
+18 -1
linux-headers/asm-x86/kvm.h
··· 354 354 __u64 padding[16]; 355 355 }; 356 356 357 - /* definition of registers in kvm_run */ 357 + #define KVM_SYNC_X86_REGS (1UL << 0) 358 + #define KVM_SYNC_X86_SREGS (1UL << 1) 359 + #define KVM_SYNC_X86_EVENTS (1UL << 2) 360 + 361 + #define KVM_SYNC_X86_VALID_FIELDS \ 362 + (KVM_SYNC_X86_REGS| \ 363 + KVM_SYNC_X86_SREGS| \ 364 + KVM_SYNC_X86_EVENTS) 365 + 366 + /* kvm_sync_regs struct included by kvm_run struct */ 358 367 struct kvm_sync_regs { 368 + /* Members of this structure are potentially malicious. 369 + * Care must be taken by code reading, esp. interpreting, 370 + * data fields from them inside KVM to prevent TOCTOU and 371 + * double-fetch types of vulnerabilities. 372 + */ 373 + struct kvm_regs regs; 374 + struct kvm_sregs sregs; 375 + struct kvm_vcpu_events events; 359 376 }; 360 377 361 378 #define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)
+28 -2
linux-headers/linux/kvm.h
··· 396 396 char padding[256]; 397 397 }; 398 398 399 + /* 2048 is the size of the char array used to bound/pad the size 400 + * of the union that holds sync regs. 401 + */ 402 + #define SYNC_REGS_SIZE_BYTES 2048 399 403 /* 400 404 * shared registers between kvm and userspace. 401 405 * kvm_valid_regs specifies the register classes set by the host ··· 407 411 __u64 kvm_dirty_regs; 408 412 union { 409 413 struct kvm_sync_regs regs; 410 - char padding[2048]; 414 + char padding[SYNC_REGS_SIZE_BYTES]; 411 415 } s; 412 416 }; 413 417 ··· 672 676 __u8 pad[36]; 673 677 }; 674 678 679 + #define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0) 680 + #define KVM_X86_DISABLE_EXITS_HTL (1 << 1) 681 + #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) 682 + #define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \ 683 + KVM_X86_DISABLE_EXITS_HTL | \ 684 + KVM_X86_DISABLE_EXITS_PAUSE) 685 + 675 686 /* for KVM_ENABLE_CAP */ 676 687 struct kvm_enable_cap { 677 688 /* in */ ··· 925 936 #define KVM_CAP_S390_GS 140 926 937 #define KVM_CAP_S390_AIS 141 927 938 #define KVM_CAP_SPAPR_TCE_VFIO 142 928 - #define KVM_CAP_X86_GUEST_MWAIT 143 939 + #define KVM_CAP_X86_DISABLE_EXITS 143 929 940 #define KVM_CAP_ARM_USER_IRQ 144 930 941 #define KVM_CAP_S390_CMMA_MIGRATION 145 931 942 #define KVM_CAP_PPC_FWNMI 146 ··· 936 947 #define KVM_CAP_PPC_GET_CPU_CHAR 151 937 948 #define KVM_CAP_S390_BPB 152 938 949 #define KVM_CAP_GET_MSR_FEATURES 153 950 + #define KVM_CAP_HYPERV_EVENTFD 154 939 951 940 952 #ifdef KVM_CAP_IRQ_ROUTING 941 953 ··· 1375 1387 #define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region) 1376 1388 #define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region) 1377 1389 1390 + /* Available with KVM_CAP_HYPERV_EVENTFD */ 1391 + #define KVM_HYPERV_EVENTFD _IOW(KVMIO, 0xbd, struct kvm_hyperv_eventfd) 1392 + 1393 + 1378 1394 /* Secure Encrypted Virtualization command */ 1379 1395 enum sev_cmd_id { 1380 1396 /* Guest initialization commands */ ··· 1514 1530 #define KVM_ARM_DEV_EL1_VTIMER (1 << 0) 1515 1531 #define KVM_ARM_DEV_EL1_PTIMER (1 << 1) 1516 1532 #define KVM_ARM_DEV_PMU (1 << 2) 1533 + 1534 + struct kvm_hyperv_eventfd { 1535 + __u32 conn_id; 1536 + __s32 fd; 1537 + __u32 flags; 1538 + __u32 padding[3]; 1539 + }; 1540 + 1541 + #define KVM_HYPERV_CONN_ID_MASK 0x00ffffff 1542 + #define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0) 1517 1543 1518 1544 #endif /* __LINUX_KVM_H */
+27
linux-headers/linux/vfio.h
··· 575 575 576 576 #define VFIO_DEVICE_GET_GFX_DMABUF _IO(VFIO_TYPE, VFIO_BASE + 15) 577 577 578 + /** 579 + * VFIO_DEVICE_IOEVENTFD - _IOW(VFIO_TYPE, VFIO_BASE + 16, 580 + * struct vfio_device_ioeventfd) 581 + * 582 + * Perform a write to the device at the specified device fd offset, with 583 + * the specified data and width when the provided eventfd is triggered. 584 + * vfio bus drivers may not support this for all regions, for all widths, 585 + * or at all. vfio-pci currently only enables support for BAR regions, 586 + * excluding the MSI-X vector table. 587 + * 588 + * Return: 0 on success, -errno on failure. 589 + */ 590 + struct vfio_device_ioeventfd { 591 + __u32 argsz; 592 + __u32 flags; 593 + #define VFIO_DEVICE_IOEVENTFD_8 (1 << 0) /* 1-byte write */ 594 + #define VFIO_DEVICE_IOEVENTFD_16 (1 << 1) /* 2-byte write */ 595 + #define VFIO_DEVICE_IOEVENTFD_32 (1 << 2) /* 4-byte write */ 596 + #define VFIO_DEVICE_IOEVENTFD_64 (1 << 3) /* 8-byte write */ 597 + #define VFIO_DEVICE_IOEVENTFD_SIZE_MASK (0xf) 598 + __u64 offset; /* device fd offset of write */ 599 + __u64 data; /* data to be written */ 600 + __s32 fd; /* -1 for de-assignment */ 601 + }; 602 + 603 + #define VFIO_DEVICE_IOEVENTFD _IO(VFIO_TYPE, VFIO_BASE + 16) 604 + 578 605 /* -------- API for Type1 VFIO IOMMU -------- */ 579 606 580 607 /**