All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers
@ 2022-11-03 11:51 Anthony PERARD
  2022-11-03 11:51 ` [XEN PATCH for-4.17 v2 1/6] xen: Add licence information to public/errno.h Anthony PERARD
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Anthony PERARD @ 2022-11-03 11:51 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Anthony PERARD,
	Bertrand Marquis, Petre Pircalabu, Alexandru Isaila,
	Tamas K Lengyel, Volodymyr Babchuk, Roger Pau Monné,
	Juergen Gross, Paul Durrant, Christopher Clark

Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.licences-fix-public-headers-v2

Hi,

Andrew pointed out some licences issue:

https://lore.kernel.org/xen-devel/b58f5340-d4fa-df9d-89de-6137005add77@citrix.com/T/#u
tracked here: https://gitlab.com/xen-project/xen/-/issues/35

So I attempt to fix them with this series.

For 4.17:
    This mostly change "documentation" so little risk for those patch, except
    "xen-foreign: Capture licences from the input headers" which changes
    "mkheader.py" which could generate broken headers.

Anthony PERARD (6):
  xen: Add licence information to public/errno.h
  xen: Used SPDX identifier in some public headers
  tools/include/xen-foreign: Add SPDX identifier to generated headers
  xen: Add licence header to device_tree_defs.h
  Rework COPYING installed in /usr/include/xen/, due to several licences
  xen: Used SPDX identifier in public headers

 tools/include/Makefile                       |  1 -
 xen/include/public/arch-arm.h                | 19 +-------------
 xen/include/public/arch-arm/hvm/save.h       | 19 +-------------
 xen/include/public/arch-arm/smccc.h          | 19 +-------------
 xen/include/public/arch-x86/cpufeatureset.h  | 19 +-------------
 xen/include/public/arch-x86/cpuid.h          | 19 +-------------
 xen/include/public/arch-x86/guest-acpi.h     | 19 +-------------
 xen/include/public/arch-x86/hvm/save.h       | 19 +-------------
 xen/include/public/arch-x86/hvm/start_info.h | 19 +-------------
 xen/include/public/arch-x86/pmu.h            | 19 +-------------
 xen/include/public/arch-x86/xen-mca.h        | 19 +-------------
 xen/include/public/arch-x86/xen-x86_32.h     | 19 +-------------
 xen/include/public/arch-x86/xen-x86_64.h     | 19 +-------------
 xen/include/public/arch-x86/xen.h            | 19 +-------------
 xen/include/public/arch-x86_32.h             | 19 +-------------
 xen/include/public/arch-x86_64.h             | 19 +-------------
 xen/include/public/argo.h                    | 19 +-------------
 xen/include/public/callback.h                | 19 +-------------
 xen/include/public/device_tree_defs.h        |  6 +++++
 xen/include/public/dom0_ops.h                | 19 +-------------
 xen/include/public/domctl.h                  | 19 +-------------
 xen/include/public/elfnote.h                 | 19 +-------------
 xen/include/public/errno.h                   |  2 ++
 xen/include/public/event_channel.h           | 19 +-------------
 xen/include/public/features.h                | 19 +-------------
 xen/include/public/grant_table.h             | 19 +-------------
 xen/include/public/hvm/dm_op.h               | 19 +-------------
 xen/include/public/hvm/e820.h                | 19 +-------------
 xen/include/public/hvm/hvm_info_table.h      | 19 +-------------
 xen/include/public/hvm/hvm_op.h              | 19 +-------------
 xen/include/public/hvm/hvm_vcpu.h            | 19 +-------------
 xen/include/public/hvm/hvm_xs_strings.h      | 19 +-------------
 xen/include/public/hvm/ioreq.h               | 19 +-------------
 xen/include/public/hvm/params.h              | 19 +-------------
 xen/include/public/hvm/pvdrivers.h           | 19 +-------------
 xen/include/public/hvm/save.h                | 19 +-------------
 xen/include/public/hypfs.h                   | 19 +-------------
 xen/include/public/io/9pfs.h                 | 19 +-------------
 xen/include/public/io/blkif.h                | 19 +-------------
 xen/include/public/io/cameraif.h             | 19 +-------------
 xen/include/public/io/console.h              | 19 +-------------
 xen/include/public/io/displif.h              | 19 +-------------
 xen/include/public/io/fbif.h                 | 19 +-------------
 xen/include/public/io/fsif.h                 | 19 +-------------
 xen/include/public/io/kbdif.h                | 19 +-------------
 xen/include/public/io/libxenvchan.h          | 19 +-------------
 xen/include/public/io/netif.h                | 19 +-------------
 xen/include/public/io/pciif.h                | 19 +-------------
 xen/include/public/io/protocols.h            | 19 +-------------
 xen/include/public/io/pvcalls.h              | 19 +-------------
 xen/include/public/io/ring.h                 | 19 +-------------
 xen/include/public/io/sndif.h                | 19 +-------------
 xen/include/public/io/tpmif.h                | 19 +-------------
 xen/include/public/io/usbif.h                | 19 +-------------
 xen/include/public/io/vscsiif.h              | 19 +-------------
 xen/include/public/io/xenbus.h               | 19 +-------------
 xen/include/public/io/xs_wire.h              | 19 +-------------
 xen/include/public/kexec.h                   | 19 +-------------
 xen/include/public/memory.h                  | 19 +-------------
 xen/include/public/nmi.h                     | 19 +-------------
 xen/include/public/physdev.h                 | 19 +-------------
 xen/include/public/platform.h                | 19 +-------------
 xen/include/public/pmu.h                     | 19 +-------------
 xen/include/public/sched.h                   | 19 +-------------
 xen/include/public/sysctl.h                  | 19 +-------------
 xen/include/public/tmem.h                    | 19 +-------------
 xen/include/public/trace.h                   | 19 +-------------
 xen/include/public/vcpu.h                    | 19 +-------------
 xen/include/public/version.h                 | 19 +-------------
 xen/include/public/vm_event.h                | 19 +-------------
 xen/include/public/xen-compat.h              | 19 +-------------
 xen/include/public/xen.h                     | 19 +-------------
 xen/include/public/xencomm.h                 | 19 +-------------
 xen/include/public/xenoprof.h                | 19 +-------------
 xen/include/public/xsm/flask_op.h            | 19 +-------------
 tools/include/xen-foreign/mkheader.py        | 23 ++++++++++++++---
 tools/include/xen/COPYING                    | 26 ++++++++++++++++++++
 77 files changed, 125 insertions(+), 1301 deletions(-)
 create mode 100644 tools/include/xen/COPYING

-- 
Anthony PERARD



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [XEN PATCH for-4.17 v2 1/6] xen: Add licence information to public/errno.h
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
@ 2022-11-03 11:51 ` Anthony PERARD
  2022-11-16  8:12   ` Jan Beulich
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 2/6] xen: Used SPDX identifier in some public headers Anthony PERARD
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Anthony PERARD @ 2022-11-03 11:51 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Anthony PERARD,
	Andrew Cooper

Fixes: 81f559e97974 ("make error codes a formal part of the ABI")
Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/include/public/errno.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/include/public/errno.h b/xen/include/public/errno.h
index 5c53af6af9..6bdc8c5079 100644
--- a/xen/include/public/errno.h
+++ b/xen/include/public/errno.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: MIT */
+
 /*
  * There are two expected ways of including this header.
  *
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [XEN PATCH for-4.17 v2 2/6] xen: Used SPDX identifier in some public headers
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
  2022-11-03 11:51 ` [XEN PATCH for-4.17 v2 1/6] xen: Add licence information to public/errno.h Anthony PERARD
@ 2022-11-03 11:52 ` Anthony PERARD
  2022-11-16  8:12   ` Jan Beulich
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 3/6] tools/include/xen-foreign: Add SPDX identifier to generated headers Anthony PERARD
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Anthony PERARD @ 2022-11-03 11:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Anthony PERARD,
	Bertrand Marquis, Volodymyr Babchuk, Roger Pau Monné

The script "tools/include/xen-foreign/mkheader.py" is going to do a
sanity check on the licences of those headers. To ease this, we will
replace the verbatim copy of the MIT licence by its SPDX identifier
equivalent.

The text of the licence has been check to be the same as the one at
https://spdx.org/licenses/MIT.html, except we don't have "(including
the next paragraph)". The text is also the same as the one in
"xen/include/public/COPYING".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    v2:
    - new patch

 xen/include/public/arch-arm.h            | 19 +------------------
 xen/include/public/arch-x86/xen-x86_32.h | 19 +------------------
 xen/include/public/arch-x86/xen-x86_64.h | 19 +------------------
 xen/include/public/arch-x86/xen.h        | 19 +------------------
 xen/include/public/xen.h                 | 19 +------------------
 5 files changed, 5 insertions(+), 90 deletions(-)

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index c8b6058d3a..1528ced509 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * arch-arm.h
  *
  * Guest OS interface to ARM Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright 2011 (C) Citrix Systems
  */
 
diff --git a/xen/include/public/arch-x86/xen-x86_32.h b/xen/include/public/arch-x86/xen-x86_32.h
index 19d7388633..139438e835 100644
--- a/xen/include/public/arch-x86/xen-x86_32.h
+++ b/xen/include/public/arch-x86/xen-x86_32.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * xen-x86_32.h
  *
  * Guest OS interface to x86 32-bit Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004-2007, K A Fraser
  */
 
diff --git a/xen/include/public/arch-x86/xen-x86_64.h b/xen/include/public/arch-x86/xen-x86_64.h
index 40aed14366..5d9035ed22 100644
--- a/xen/include/public/arch-x86/xen-x86_64.h
+++ b/xen/include/public/arch-x86/xen-x86_64.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * xen-x86_64.h
  *
  * Guest OS interface to x86 64-bit Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004-2006, K A Fraser
  */
 
diff --git a/xen/include/public/arch-x86/xen.h b/xen/include/public/arch-x86/xen.h
index 546dd4496a..93b9d600b0 100644
--- a/xen/include/public/arch-x86/xen.h
+++ b/xen/include/public/arch-x86/xen.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * arch-x86/xen.h
  *
  * Guest OS interface to x86 Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004-2006, K A Fraser
  */
 
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index e373592c33..920567e006 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * xen.h
  *
  * Guest OS interface to Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004, K A Fraser
  */
 
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [XEN PATCH for-4.17 v2 3/6] tools/include/xen-foreign: Add SPDX identifier to generated headers
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
  2022-11-03 11:51 ` [XEN PATCH for-4.17 v2 1/6] xen: Add licence information to public/errno.h Anthony PERARD
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 2/6] xen: Used SPDX identifier in some public headers Anthony PERARD
@ 2022-11-03 11:52 ` Anthony PERARD
  2022-11-16 14:59   ` Andrew Cooper
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 4/6] xen: Add licence header to device_tree_defs.h Anthony PERARD
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Anthony PERARD @ 2022-11-03 11:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Anthony PERARD,
	Andrew Cooper

The headers install in "/usr/include/xen/foreign/" are missing a
licence header. This patch adds a SPDX identifier to clarify that
the MIT licence is used.

The script now check that the licence of the input file is also MIT,
by checking for the presence of the SPDX identifier.

Also add information about which files are used to generate the
headers.

Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    v2:
    - Add a SPDX identifier instead of trying to capture the original
      licence text.
    - Check the SPDX identifier of the input headers.
    - Add information about which headers are used as input.

 tools/include/xen-foreign/mkheader.py | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py
index fb268f0dce..ec8a321395 100644
--- a/tools/include/xen-foreign/mkheader.py
+++ b/tools/include/xen-foreign/mkheader.py
@@ -1,5 +1,6 @@
 #!/usr/bin/python
 
+from __future__ import print_function
 import sys, re;
 from structs import unions, structs, defines;
 
@@ -114,23 +115,37 @@ input  = "";
 output = "";
 fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % outfile.upper());
 
-# read input header files
 for name in infiles:
     f = open(name, "r");
+    # Check the licence of the input file, only SPDX identifier is accepted by
+    # this script.
+    line = f.readline()
+    if not line == "/* SPDX-License-Identifier: MIT */\n":
+        print("%s: Error: %s is missing SPDX identifier" % (sys.argv[0], name), file=sys.stderr)
+        exit(1)
     input += f.read();
     f.close();
 
+# replace path in "infiles" by path in '/usr/include' to avoid exposing the
+# build directory path in the generated headers.
+headers_name_list = ""
+public_headers_location = 'xen/include/public/'
+for name in infiles:
+    i = name.rindex(public_headers_location)
+    i += len(public_headers_location)
+    headers_name_list += " xen/%s" % (name[i:])
+
 # add header
-output += """
+output += """/* SPDX-License-Identifier: MIT */
 /*
  * public xen defines and struct for %s
- * generated by %s -- DO NOT EDIT
+ * generated from%s by %s -- DO NOT EDIT
  */
 
 #ifndef %s
 #define %s 1
 
-""" % (arch, sys.argv[0], fileid, fileid)
+""" % (arch, headers_name_list, sys.argv[0], fileid, fileid)
 
 if arch in header:
     output += header[arch];
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [XEN PATCH for-4.17 v2 4/6] xen: Add licence header to device_tree_defs.h
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
                   ` (2 preceding siblings ...)
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 3/6] tools/include/xen-foreign: Add SPDX identifier to generated headers Anthony PERARD
@ 2022-11-03 11:52 ` Anthony PERARD
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences Anthony PERARD
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 19+ messages in thread
From: Anthony PERARD @ 2022-11-03 11:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Anthony PERARD,
	Andrew Cooper

This header have been created by moving code from other part of the
project and miss a licence header. The original source code was some
version of GPL or LGPL but we intend to have the public header to be
MIT so they can be included easily in other projects.

Part of device_tree_defs.h were moved from libxl_arm.c which is
LGPL-2.1-only. And part were moved from device_tree.h that is
GPL-2.0-only.

Part of the original code were added by Julien Grall @ Linaro in
commits c3ba52a84dd8 and 405c167f0ec9 and 886f34045bf0. The other part
were added by Ian Campbell @ Citrix, with commit 0c64527e7fc9.

Resolves: xen-project/xen#35
Fixes: 1c898a9fec7e ("xen/arm: move a few DT related defines to public/device_tree_defs.h")
Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---

Notes:
    Probably needs an ack from Linaro:
        https://lore.kernel.org/r/fad0265d-a736-5135-b5ea-3735a8bc72da@xen.org/
    
    v2:
    - ack from Citrix
    - rewrite message to say "Julian @ Linaro" instead of "Julian with a
      Linaro hat".

 xen/include/public/device_tree_defs.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/include/public/device_tree_defs.h b/xen/include/public/device_tree_defs.h
index 228daafe81..9e80d0499d 100644
--- a/xen/include/public/device_tree_defs.h
+++ b/xen/include/public/device_tree_defs.h
@@ -1,3 +1,9 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright (c) 2013 Linaro Limited
+ * Copyright (c) 2015 Citrix Systems, Inc
+ */
+
 #ifndef __XEN_DEVICE_TREE_DEFS_H__
 #define __XEN_DEVICE_TREE_DEFS_H__
 
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
                   ` (3 preceding siblings ...)
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 4/6] xen: Add licence header to device_tree_defs.h Anthony PERARD
@ 2022-11-03 11:52 ` Anthony PERARD
  2022-11-16 15:01   ` Anthony PERARD
  2022-11-16 15:26   ` Andrew Cooper
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers Anthony PERARD
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 19+ messages in thread
From: Anthony PERARD @ 2022-11-03 11:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Anthony PERARD,
	Andrew Cooper

The notice in the COPYING file in "xen/include/public/COPYING" doesn't
really apply to the files that ultimately are been install at
"/usr/include/xen". The issue are headers in the "sys/" subdirectory
that comes from other projects such as Linux or FreeBSD.

The main issue is that there are two headers that have a different
licence than the MIT licence:

- xen-sys/Linux/gntalloc.h (installed as "sys/gntalloc.h") is public
  domain.
- xen-sys/FreeBSD/gntdev.h (installed as "sys/gntdev.h") is BSD-2.

To clarify this, we'll install a COPYING file with a different notice.

Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    v2:
    - change notice to be more generic and allow more headers and more
      licence exception without having to rewrite the notice.

 tools/include/Makefile    |  1 -
 tools/include/xen/COPYING | 26 ++++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 tools/include/xen/COPYING

diff --git a/tools/include/Makefile b/tools/include/Makefile
index 81c3d09039..f838171e8c 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -24,7 +24,6 @@ xen-foreign:
 xen-dir:
 	mkdir -p xen/libelf acpi
 	find xen/ acpi/ -type l -exec rm '{}' +
-	ln -s $(XEN_ROOT)/xen/include/public/COPYING xen/
 	ln -s $(XEN_ROOT)/xen/include/public/*.h xen/
 	ln -s $(XEN_ROOT)/xen/include/public/*/ xen/
 	ln -s ../xen-sys/$(XEN_OS) xen/sys
diff --git a/tools/include/xen/COPYING b/tools/include/xen/COPYING
new file mode 100644
index 0000000000..fe3f9b7557
--- /dev/null
+++ b/tools/include/xen/COPYING
@@ -0,0 +1,26 @@
+XEN NOTICE
+==========
+
+This licence applies to all files within this subdirectory ("/usr/include/xen")
+with the exception of "sys/" which may include headers under different
+licences.
+
+=====================================================================
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
                   ` (4 preceding siblings ...)
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences Anthony PERARD
@ 2022-11-03 11:52 ` Anthony PERARD
  2022-11-03 14:16   ` Juergen Gross
  2022-11-16  8:15   ` Jan Beulich
  2022-11-10 23:17 ` [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue " Stefano Stabellini
  2022-11-16  0:35 ` Henry Wang
  7 siblings, 2 replies; 19+ messages in thread
From: Anthony PERARD @ 2022-11-03 11:52 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Anthony PERARD,
	Bertrand Marquis, Volodymyr Babchuk, Roger Pau Monné,
	Christopher Clark, Paul Durrant, Juergen Gross, Tamas K Lengyel,
	Alexandru Isaila, Petre Pircalabu

The text of the licence has been check to be the same as the one at
https://spdx.org/licenses/MIT.html, except we don't have "(including
the next paragraph)".

Mecanical change done with a script.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---

Notes:
    v2:
    - new patch
    
    This patch could be squashed into
    "xen: Used SPDX identifier in some public headers", if both are
    acceptable for the 4.17 release.
    
    python script
    -------------
    
    import sys
    
    mit_licence = """ * Permission is hereby granted, free of charge, to any person obtaining a copy
     * of this software and associated documentation files (the "Software"), to
     * deal in the Software without restriction, including without limitation the
     * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
     * sell copies of the Software, and to permit persons to whom the Software is
     * furnished to do so, subject to the following conditions:
     *
     * The above copyright notice and this permission notice shall be included in
     * all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
     * DEALINGS IN THE SOFTWARE.
    """
    
    mit_spdx = "/* SPDX-License-Identifier: MIT */\n"
    
    print(f"reading {sys.argv[1]}")
    with open(sys.argv[1], 'r') as f:
        whole_file = f.read()
    
    try:
        licence_loc = whole_file.index(mit_licence)
    except ValueError:
        print(". mit licence not found")
        exit(1)
    
    whole_file = whole_file.replace(mit_licence + ' *\n', '')
    whole_file = whole_file.replace(' *\n' + mit_licence, '')
    with open('%s' % sys.argv[1], 'w') as f:
        f.write(mit_spdx)
        f.write(whole_file)

 xen/include/public/arch-arm/hvm/save.h       | 19 +------------------
 xen/include/public/arch-arm/smccc.h          | 19 +------------------
 xen/include/public/arch-x86/cpufeatureset.h  | 19 +------------------
 xen/include/public/arch-x86/cpuid.h          | 19 +------------------
 xen/include/public/arch-x86/guest-acpi.h     | 19 +------------------
 xen/include/public/arch-x86/hvm/save.h       | 19 +------------------
 xen/include/public/arch-x86/hvm/start_info.h | 19 +------------------
 xen/include/public/arch-x86/pmu.h            | 19 +------------------
 xen/include/public/arch-x86/xen-mca.h        | 19 +------------------
 xen/include/public/arch-x86_32.h             | 19 +------------------
 xen/include/public/arch-x86_64.h             | 19 +------------------
 xen/include/public/argo.h                    | 19 +------------------
 xen/include/public/callback.h                | 19 +------------------
 xen/include/public/dom0_ops.h                | 19 +------------------
 xen/include/public/domctl.h                  | 19 +------------------
 xen/include/public/elfnote.h                 | 19 +------------------
 xen/include/public/event_channel.h           | 19 +------------------
 xen/include/public/features.h                | 19 +------------------
 xen/include/public/grant_table.h             | 19 +------------------
 xen/include/public/hvm/dm_op.h               | 19 +------------------
 xen/include/public/hvm/e820.h                | 19 +------------------
 xen/include/public/hvm/hvm_info_table.h      | 19 +------------------
 xen/include/public/hvm/hvm_op.h              | 19 +------------------
 xen/include/public/hvm/hvm_vcpu.h            | 19 +------------------
 xen/include/public/hvm/hvm_xs_strings.h      | 19 +------------------
 xen/include/public/hvm/ioreq.h               | 19 +------------------
 xen/include/public/hvm/params.h              | 19 +------------------
 xen/include/public/hvm/pvdrivers.h           | 19 +------------------
 xen/include/public/hvm/save.h                | 19 +------------------
 xen/include/public/hypfs.h                   | 19 +------------------
 xen/include/public/io/9pfs.h                 | 19 +------------------
 xen/include/public/io/blkif.h                | 19 +------------------
 xen/include/public/io/cameraif.h             | 19 +------------------
 xen/include/public/io/console.h              | 19 +------------------
 xen/include/public/io/displif.h              | 19 +------------------
 xen/include/public/io/fbif.h                 | 19 +------------------
 xen/include/public/io/fsif.h                 | 19 +------------------
 xen/include/public/io/kbdif.h                | 19 +------------------
 xen/include/public/io/libxenvchan.h          | 19 +------------------
 xen/include/public/io/netif.h                | 19 +------------------
 xen/include/public/io/pciif.h                | 19 +------------------
 xen/include/public/io/protocols.h            | 19 +------------------
 xen/include/public/io/pvcalls.h              | 19 +------------------
 xen/include/public/io/ring.h                 | 19 +------------------
 xen/include/public/io/sndif.h                | 19 +------------------
 xen/include/public/io/tpmif.h                | 19 +------------------
 xen/include/public/io/usbif.h                | 19 +------------------
 xen/include/public/io/vscsiif.h              | 19 +------------------
 xen/include/public/io/xenbus.h               | 19 +------------------
 xen/include/public/io/xs_wire.h              | 19 +------------------
 xen/include/public/kexec.h                   | 19 +------------------
 xen/include/public/memory.h                  | 19 +------------------
 xen/include/public/nmi.h                     | 19 +------------------
 xen/include/public/physdev.h                 | 19 +------------------
 xen/include/public/platform.h                | 19 +------------------
 xen/include/public/pmu.h                     | 19 +------------------
 xen/include/public/sched.h                   | 19 +------------------
 xen/include/public/sysctl.h                  | 19 +------------------
 xen/include/public/tmem.h                    | 19 +------------------
 xen/include/public/trace.h                   | 19 +------------------
 xen/include/public/vcpu.h                    | 19 +------------------
 xen/include/public/version.h                 | 19 +------------------
 xen/include/public/vm_event.h                | 19 +------------------
 xen/include/public/xen-compat.h              | 19 +------------------
 xen/include/public/xencomm.h                 | 19 +------------------
 xen/include/public/xenoprof.h                | 19 +------------------
 xen/include/public/xsm/flask_op.h            | 19 +------------------
 67 files changed, 67 insertions(+), 1206 deletions(-)

diff --git a/xen/include/public/arch-arm/hvm/save.h b/xen/include/public/arch-arm/hvm/save.h
index 75b8e65bcb..fc1b28f59b 100644
--- a/xen/include/public/arch-arm/hvm/save.h
+++ b/xen/include/public/arch-arm/hvm/save.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * Structure definitions for HVM state that is held by Xen and must
  * be saved along with the domain's memory and device-model state.
  *
  * Copyright (c) 2012 Citrix Systems Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_HVM_SAVE_ARM_H__
diff --git a/xen/include/public/arch-arm/smccc.h b/xen/include/public/arch-arm/smccc.h
index 17dc6d8829..802d800aad 100644
--- a/xen/include/public/arch-arm/smccc.h
+++ b/xen/include/public/arch-arm/smccc.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * smccc.h
  *
  * SMC/HVC interface in accordance with SMC Calling Convention.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright 2017 (C) EPAM Systems
  */
 
diff --git a/xen/include/public/arch-x86/cpufeatureset.h b/xen/include/public/arch-x86/cpufeatureset.h
index 42f48a8ae2..80f44df73f 100644
--- a/xen/include/public/arch-x86/cpufeatureset.h
+++ b/xen/include/public/arch-x86/cpufeatureset.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * arch-x86/cpufeatureset.h
  *
  * CPU featureset definitions
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2015, 2016 Citrix Systems, Inc.
  */
 
diff --git a/xen/include/public/arch-x86/cpuid.h b/xen/include/public/arch-x86/cpuid.h
index c49eefeaf8..7ecd16ae05 100644
--- a/xen/include/public/arch-x86/cpuid.h
+++ b/xen/include/public/arch-x86/cpuid.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * arch-x86/cpuid.h
  *
  * CPUID interface to Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2007 Citrix Systems, Inc.
  *
  * Authors:
diff --git a/xen/include/public/arch-x86/guest-acpi.h b/xen/include/public/arch-x86/guest-acpi.h
index 3d79a31fd8..de40259b6a 100644
--- a/xen/include/public/arch-x86/guest-acpi.h
+++ b/xen/include/public/arch-x86/guest-acpi.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * arch-x86/guest-acpi.h
  *
  * Guest ACPI interface to x86 Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  */
 
 #ifndef __XEN_PUBLIC_ARCH_X86_GUEST_ACPI_H__
diff --git a/xen/include/public/arch-x86/hvm/save.h b/xen/include/public/arch-x86/hvm/save.h
index 773a380bc2..7ecacadde1 100644
--- a/xen/include/public/arch-x86/hvm/save.h
+++ b/xen/include/public/arch-x86/hvm/save.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * Structure definitions for HVM state that is held by Xen and must
  * be saved along with the domain's memory and device-model state.
  *
  * Copyright (c) 2007 XenSource Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_HVM_SAVE_X86_H__
diff --git a/xen/include/public/arch-x86/hvm/start_info.h b/xen/include/public/arch-x86/hvm/start_info.h
index 50af9ea2ff..e33557c0b4 100644
--- a/xen/include/public/arch-x86/hvm/start_info.h
+++ b/xen/include/public/arch-x86/hvm/start_info.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2016, Citrix Systems, Inc.
  */
 
diff --git a/xen/include/public/arch-x86/pmu.h b/xen/include/public/arch-x86/pmu.h
index 464c65dac1..d0a99268af 100644
--- a/xen/include/public/arch-x86/pmu.h
+++ b/xen/include/public/arch-x86/pmu.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
  */
 
diff --git a/xen/include/public/arch-x86/xen-mca.h b/xen/include/public/arch-x86/xen-mca.h
index d930c344c0..b897536ec5 100644
--- a/xen/include/public/arch-x86/xen-mca.h
+++ b/xen/include/public/arch-x86/xen-mca.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * arch-x86/mca.h
  *
@@ -5,24 +6,6 @@
  * Author: Christoph Egger <Christoph.Egger@amd.com>
  *
  * Guest OS machine check interface to x86 Xen.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 /* Full MCA functionality has the following Usecases from the guest side:
diff --git a/xen/include/public/arch-x86_32.h b/xen/include/public/arch-x86_32.h
index dfabdcc345..c0cf8c7bcd 100644
--- a/xen/include/public/arch-x86_32.h
+++ b/xen/include/public/arch-x86_32.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * arch-x86_32.h
  *
  * Guest OS interface to x86 32-bit Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004-2006, K A Fraser
  */
 
diff --git a/xen/include/public/arch-x86_64.h b/xen/include/public/arch-x86_64.h
index c40b3f9651..5db52de695 100644
--- a/xen/include/public/arch-x86_64.h
+++ b/xen/include/public/arch-x86_64.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * arch-x86_64.h
  *
  * Guest OS interface to x86 64-bit Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004-2006, K A Fraser
  */
 
diff --git a/xen/include/public/argo.h b/xen/include/public/argo.h
index 3397a3a33f..84a4cb118b 100644
--- a/xen/include/public/argo.h
+++ b/xen/include/public/argo.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * Argo : Hypervisor-Mediated data eXchange
  *
@@ -6,24 +7,6 @@
  * Copyright (c) 2010, Citrix Systems
  * Copyright (c) 2018-2019, BAE Systems
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  */
 
 #ifndef __XEN_PUBLIC_ARGO_H__
diff --git a/xen/include/public/callback.h b/xen/include/public/callback.h
index 8f937880e2..7f13be66f3 100644
--- a/xen/include/public/callback.h
+++ b/xen/include/public/callback.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * callback.h
  *
  * Register guest OS callbacks with Xen.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2006, Ian Campbell
  */
 
diff --git a/xen/include/public/dom0_ops.h b/xen/include/public/dom0_ops.h
index 76598dda18..9fba71d3a8 100644
--- a/xen/include/public/dom0_ops.h
+++ b/xen/include/public/dom0_ops.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * dom0_ops.h
  *
  * Process command requests from domain-0 guest OS.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2002-2003, B Dragovic
  * Copyright (c) 2002-2006, K Fraser
  */
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index b2ae839c36..966bf4323c 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * domctl.h
  *
  * Domain management operations. For use by node control stack.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2002-2003, B Dragovic
  * Copyright (c) 2002-2006, K Fraser
  */
diff --git a/xen/include/public/elfnote.h b/xen/include/public/elfnote.h
index 181cbc4ec7..8bf54d035b 100644
--- a/xen/include/public/elfnote.h
+++ b/xen/include/public/elfnote.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * elfnote.h
  *
  * Definitions used for the Xen ELF notes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2006, Ian Campbell, XenSource Ltd.
  */
 
diff --git a/xen/include/public/event_channel.h b/xen/include/public/event_channel.h
index 73c9f38ce1..0d91a1c4af 100644
--- a/xen/include/public/event_channel.h
+++ b/xen/include/public/event_channel.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * event_channel.h
  *
  * Event channels between domains.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2003-2004, K A Fraser.
  */
 
diff --git a/xen/include/public/features.h b/xen/include/public/features.h
index 9ee2f760ef..d2a9175aae 100644
--- a/xen/include/public/features.h
+++ b/xen/include/public/features.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * features.h
  *
  * Feature flags, reported by XENVER_get_features.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2006, Keir Fraser <keir@xensource.com>
  */
 
diff --git a/xen/include/public/grant_table.h b/xen/include/public/grant_table.h
index 7934d7b718..1dfa17a6d0 100644
--- a/xen/include/public/grant_table.h
+++ b/xen/include/public/grant_table.h
@@ -1,27 +1,10 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * grant_table.h
  *
  * Interface for granting foreign access to page frames, and receiving
  * page-ownership transfers.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004, K A Fraser
  */
 
diff --git a/xen/include/public/hvm/dm_op.h b/xen/include/public/hvm/dm_op.h
index fa3f083fed..acdf91693d 100644
--- a/xen/include/public/hvm/dm_op.h
+++ b/xen/include/public/hvm/dm_op.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * Copyright (c) 2016, Citrix Systems Inc
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  */
 
 #ifndef __XEN_PUBLIC_HVM_DM_OP_H__
diff --git a/xen/include/public/hvm/e820.h b/xen/include/public/hvm/e820.h
index 4c42f3341e..5879b8ff7b 100644
--- a/xen/include/public/hvm/e820.h
+++ b/xen/include/public/hvm/e820.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2006, Keir Fraser
  */
 
diff --git a/xen/include/public/hvm/hvm_info_table.h b/xen/include/public/hvm/hvm_info_table.h
index c46e03ef17..a885f356db 100644
--- a/xen/include/public/hvm/hvm_info_table.h
+++ b/xen/include/public/hvm/hvm_info_table.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * hvm/hvm_info_table.h
  *
  * HVM parameter and information table, written into guest memory map.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2006, Keir Fraser
  */
 
diff --git a/xen/include/public/hvm/hvm_op.h b/xen/include/public/hvm/hvm_op.h
index 870ec52060..e22adf0319 100644
--- a/xen/include/public/hvm/hvm_op.h
+++ b/xen/include/public/hvm/hvm_op.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2007, Keir Fraser
  */
 
diff --git a/xen/include/public/hvm/hvm_vcpu.h b/xen/include/public/hvm/hvm_vcpu.h
index 661cf89e1e..4a43401144 100644
--- a/xen/include/public/hvm/hvm_vcpu.h
+++ b/xen/include/public/hvm/hvm_vcpu.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2015, Roger Pau Monne <roger.pau@citrix.com>
  */
 
diff --git a/xen/include/public/hvm/hvm_xs_strings.h b/xen/include/public/hvm/hvm_xs_strings.h
index fba2546424..e1ed078628 100644
--- a/xen/include/public/hvm/hvm_xs_strings.h
+++ b/xen/include/public/hvm/hvm_xs_strings.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * hvm/hvm_xs_strings.h
  *
  * HVM xenstore strings used in HVMLOADER.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2013, Citrix Systems
  */
 
diff --git a/xen/include/public/hvm/ioreq.h b/xen/include/public/hvm/ioreq.h
index c511fae8e7..7a6bc760d0 100644
--- a/xen/include/public/hvm/ioreq.h
+++ b/xen/include/public/hvm/ioreq.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * ioreq.h: I/O request definitions for device models
  * Copyright (c) 2004, Intel Corporation.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef _IOREQ_H_
diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h
index c9d6e70d7b..a22b4ed45d 100644
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2007, Keir Fraser
  */
 
diff --git a/xen/include/public/hvm/pvdrivers.h b/xen/include/public/hvm/pvdrivers.h
index 3241f94eb9..62252db626 100644
--- a/xen/include/public/hvm/pvdrivers.h
+++ b/xen/include/public/hvm/pvdrivers.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * pvdrivers.h: Register of PV drivers product numbers.
  * Copyright (c) 2012, Citrix Systems Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef _XEN_PUBLIC_PVDRIVERS_H_
diff --git a/xen/include/public/hvm/save.h b/xen/include/public/hvm/save.h
index bea5e9f50f..464ebdb0da 100644
--- a/xen/include/public/hvm/save.h
+++ b/xen/include/public/hvm/save.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * hvm/save.h
  *
@@ -5,24 +6,6 @@
  * be saved along with the domain's memory and device-model state.
  *
  * Copyright (c) 2007 XenSource Ltd.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_HVM_SAVE_H__
diff --git a/xen/include/public/hypfs.h b/xen/include/public/hypfs.h
index 2b7a66d68d..70047e1762 100644
--- a/xen/include/public/hypfs.h
+++ b/xen/include/public/hypfs.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * Xen Hypervisor Filesystem
  *
  * Copyright (c) 2019, SUSE Software Solutions Germany GmbH
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  */
 
 #ifndef __XEN_PUBLIC_HYPFS_H__
diff --git a/xen/include/public/io/9pfs.h b/xen/include/public/io/9pfs.h
index 4bfd5d48b1..ad26bd69eb 100644
--- a/xen/include/public/io/9pfs.h
+++ b/xen/include/public/io/9pfs.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * 9pfs.h -- Xen 9PFS transport
  *
  * Refer to docs/misc/9pfs.markdown for the specification
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2017 Stefano Stabellini <stefano@aporeto.com>
  */
 
diff --git a/xen/include/public/io/blkif.h b/xen/include/public/io/blkif.h
index ab863f175a..22f1eef0c0 100644
--- a/xen/include/public/io/blkif.h
+++ b/xen/include/public/io/blkif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * blkif.h
  *
  * Unified block-device I/O interface for Xen guest OSes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2003-2004, Keir Fraser
  * Copyright (c) 2012, Spectra Logic Corporation
  */
diff --git a/xen/include/public/io/cameraif.h b/xen/include/public/io/cameraif.h
index acbcbf3bd4..13763abef9 100644
--- a/xen/include/public/io/cameraif.h
+++ b/xen/include/public/io/cameraif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * cameraif.h
  *
  * Unified camera device I/O interface for Xen guest OSes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2018-2019 EPAM Systems Inc.
  *
  * Author: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
diff --git a/xen/include/public/io/console.h b/xen/include/public/io/console.h
index 4811f47220..4509b4b689 100644
--- a/xen/include/public/io/console.h
+++ b/xen/include/public/io/console.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * console.h
  *
  * Console I/O interface for Xen guest OSes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2005, Keir Fraser
  */
 
diff --git a/xen/include/public/io/displif.h b/xen/include/public/io/displif.h
index 0055895510..73d0cbdf15 100644
--- a/xen/include/public/io/displif.h
+++ b/xen/include/public/io/displif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * displif.h
  *
  * Unified display device I/O interface for Xen guest OSes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2016-2017 EPAM Systems Inc.
  *
  * Authors: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
diff --git a/xen/include/public/io/fbif.h b/xen/include/public/io/fbif.h
index cc25aab32e..93c73195d8 100644
--- a/xen/include/public/io/fbif.h
+++ b/xen/include/public/io/fbif.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * fbif.h -- Xen virtual frame buffer device
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
  * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com>
  */
diff --git a/xen/include/public/io/fsif.h b/xen/include/public/io/fsif.h
index a8bea193b5..ec57850233 100644
--- a/xen/include/public/io/fsif.h
+++ b/xen/include/public/io/fsif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * fsif.h
  *
  * Interface to FS level split device drivers.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2007, Grzegorz Milos, <gm281@cam.ac.uk>.
  */
 
diff --git a/xen/include/public/io/kbdif.h b/xen/include/public/io/kbdif.h
index a6b01c52c7..4bde6b3821 100644
--- a/xen/include/public/io/kbdif.h
+++ b/xen/include/public/io/kbdif.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * kbdif.h -- Xen virtual keyboard/mouse
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com>
  * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com>
  */
diff --git a/xen/include/public/io/libxenvchan.h b/xen/include/public/io/libxenvchan.h
index 44284f437a..2eab65cb19 100644
--- a/xen/include/public/io/libxenvchan.h
+++ b/xen/include/public/io/libxenvchan.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
 /**
  * @file
  * @section AUTHORS
@@ -10,24 +11,6 @@
  *
  * @section LICENSE
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * @section DESCRIPTION
  *
  *  Originally borrowed from the Qubes OS Project, http://www.qubes-os.org,
diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h
index 3509b096f8..c13b85061d 100644
--- a/xen/include/public/io/netif.h
+++ b/xen/include/public/io/netif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * netif.h
  *
  * Unified network-device I/O interface for Xen guest OSes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2003-2004, Keir Fraser
  */
 
diff --git a/xen/include/public/io/pciif.h b/xen/include/public/io/pciif.h
index a4ba13cc13..dbe825ecc3 100644
--- a/xen/include/public/io/pciif.h
+++ b/xen/include/public/io/pciif.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * PCI Backend/Frontend Common Data Structures & Macros
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  *   Author: Ryan Wilson <hap9@epoch.ncsc.mil>
  */
 #ifndef __XEN_PCI_COMMON_H__
diff --git a/xen/include/public/io/protocols.h b/xen/include/public/io/protocols.h
index 52b4de0f81..7815e1ff0f 100644
--- a/xen/include/public/io/protocols.h
+++ b/xen/include/public/io/protocols.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * protocols.h
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2008, Keir Fraser
  */
 
diff --git a/xen/include/public/io/pvcalls.h b/xen/include/public/io/pvcalls.h
index 6da6b5533a..230b0719e3 100644
--- a/xen/include/public/io/pvcalls.h
+++ b/xen/include/public/io/pvcalls.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * pvcalls.h -- Xen PV Calls Protocol
  *
@@ -6,24 +7,6 @@
  * The header is provided as a C reference for the specification. In
  * case of conflict, the specification is authoritative.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2017 Stefano Stabellini <stefano@aporeto.com>
  */
 
diff --git a/xen/include/public/io/ring.h b/xen/include/public/io/ring.h
index ab3439bd58..025939278b 100644
--- a/xen/include/public/io/ring.h
+++ b/xen/include/public/io/ring.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * ring.h
  *
  * Shared producer-consumer ring macros.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Tim Deegan and Andrew Warfield November 2004.
  */
 
diff --git a/xen/include/public/io/sndif.h b/xen/include/public/io/sndif.h
index 402033cf49..4234a47c87 100644
--- a/xen/include/public/io/sndif.h
+++ b/xen/include/public/io/sndif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * sndif.h
  *
  * Unified sound-device I/O interface for Xen guest OSes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2013-2015 GlobalLogic Inc.
  * Copyright (C) 2016-2017 EPAM Systems Inc.
  *
diff --git a/xen/include/public/io/tpmif.h b/xen/include/public/io/tpmif.h
index 9743dc9369..ad02dbaf1a 100644
--- a/xen/include/public/io/tpmif.h
+++ b/xen/include/public/io/tpmif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * tpmif.h
  *
  * TPM I/O interface for Xen guest OSes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2005, IBM Corporation
  *
  * Author: Stefan Berger, stefanb@us.ibm.com
diff --git a/xen/include/public/io/usbif.h b/xen/include/public/io/usbif.h
index c0a552e195..875af0dc7c 100644
--- a/xen/include/public/io/usbif.h
+++ b/xen/include/public/io/usbif.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * usbif.h
  *
@@ -5,24 +6,6 @@
  *
  * Copyright (C) 2009, FUJITSU LABORATORIES LTD.
  * Author: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_IO_USBIF_H__
diff --git a/xen/include/public/io/vscsiif.h b/xen/include/public/io/vscsiif.h
index 8553b17cc6..f5fc7de725 100644
--- a/xen/include/public/io/vscsiif.h
+++ b/xen/include/public/io/vscsiif.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * vscsiif.h
  *
  * Based on the blkif.h code.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright(c) FUJITSU Limited 2008.
  */
 
diff --git a/xen/include/public/io/xenbus.h b/xen/include/public/io/xenbus.h
index 927f9db552..9cd0cd7c67 100644
--- a/xen/include/public/io/xenbus.h
+++ b/xen/include/public/io/xenbus.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /*****************************************************************************
  * xenbus.h
  *
  * Xenbus protocol details.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2005 XenSource Ltd.
  */
 
diff --git a/xen/include/public/io/xs_wire.h b/xen/include/public/io/xs_wire.h
index 05d3069e63..04e6849feb 100644
--- a/xen/include/public/io/xs_wire.h
+++ b/xen/include/public/io/xs_wire.h
@@ -1,25 +1,8 @@
+/* SPDX-License-Identifier: MIT */
 /*
  * Details of the "wire" protocol between Xen Store Daemon and client
  * library or guest kernel.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2005 Rusty Russell IBM Corporation
  */
 
diff --git a/xen/include/public/kexec.h b/xen/include/public/kexec.h
index 3f2a118381..a6c5fc8d13 100644
--- a/xen/include/public/kexec.h
+++ b/xen/include/public/kexec.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * kexec.h - Public portion
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Xen port written by:
  * - Simon 'Horms' Horman <horms@verge.net.au>
  * - Magnus Damm <magnus@valinux.co.jp>
diff --git a/xen/include/public/memory.h b/xen/include/public/memory.h
index f8d26fb77d..29cf5c8239 100644
--- a/xen/include/public/memory.h
+++ b/xen/include/public/memory.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * memory.h
  *
  * Memory reservation and information.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
  */
 
diff --git a/xen/include/public/nmi.h b/xen/include/public/nmi.h
index 4dd7294d72..5900703f5f 100644
--- a/xen/include/public/nmi.h
+++ b/xen/include/public/nmi.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * nmi.h
  *
  * NMI callback registration and reason codes.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
  */
 
diff --git a/xen/include/public/physdev.h b/xen/include/public/physdev.h
index f8d1905e30..f0c0d4727c 100644
--- a/xen/include/public/physdev.h
+++ b/xen/include/public/physdev.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2006, Keir Fraser
  */
 
diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h
index 8100133509..5e1494fe9a 100644
--- a/xen/include/public/platform.h
+++ b/xen/include/public/platform.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * platform.h
  *
  * Hardware platform operations. Intended for use by domain-0 kernel.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2002-2006, K Fraser
  */
 
diff --git a/xen/include/public/pmu.h b/xen/include/public/pmu.h
index cc2fcf8816..eb87a81e7b 100644
--- a/xen/include/public/pmu.h
+++ b/xen/include/public/pmu.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
  */
 
diff --git a/xen/include/public/sched.h b/xen/include/public/sched.h
index 811bd87c82..b4362c6a1d 100644
--- a/xen/include/public/sched.h
+++ b/xen/include/public/sched.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * sched.h
  *
  * Scheduler state interactions
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
  */
 
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index 5672906729..051bff39b3 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * sysctl.h
  *
  * System management operations. For use by node control stack.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2002-2006, K Fraser
  */
 
diff --git a/xen/include/public/tmem.h b/xen/include/public/tmem.h
index 362ba45d5a..da68de76fe 100644
--- a/xen/include/public/tmem.h
+++ b/xen/include/public/tmem.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * tmem.h
  *
  * Guest OS interface to Xen Transcendent Memory.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2004, K A Fraser
  */
 
diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h
index d5fa4aea8d..62a179971d 100644
--- a/xen/include/public/trace.h
+++ b/xen/include/public/trace.h
@@ -1,24 +1,7 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * include/public/trace.h
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Mark Williamson, (C) 2004 Intel Research Cambridge
  * Copyright (C) 2005 Bin Ren
  */
diff --git a/xen/include/public/vcpu.h b/xen/include/public/vcpu.h
index 3623af932f..81a3b3a743 100644
--- a/xen/include/public/vcpu.h
+++ b/xen/include/public/vcpu.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * vcpu.h
  *
  * VCPU initialisation, query, and hotplug.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
  */
 
diff --git a/xen/include/public/version.h b/xen/include/public/version.h
index 17a81e23cd..9c78b4f3b6 100644
--- a/xen/include/public/version.h
+++ b/xen/include/public/version.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * version.h
  *
  * Xen version, type, and compile information.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
  * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
  */
diff --git a/xen/include/public/vm_event.h b/xen/include/public/vm_event.h
index 56b429a975..0035c26e12 100644
--- a/xen/include/public/vm_event.h
+++ b/xen/include/public/vm_event.h
@@ -1,27 +1,10 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * vm_event.h
  *
  * Memory event common structures.
  *
  * Copyright (c) 2009 by Citrix Systems, Inc. (Patrick Colp)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef _XEN_PUBLIC_VM_EVENT_H
diff --git a/xen/include/public/xen-compat.h b/xen/include/public/xen-compat.h
index e1c027a95c..97fe698498 100644
--- a/xen/include/public/xen-compat.h
+++ b/xen/include/public/xen-compat.h
@@ -1,26 +1,9 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * xen-compat.h
  *
  * Guest OS interface to Xen.  Compatibility layer.
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (c) 2006, Christian Limpach
  */
 
diff --git a/xen/include/public/xencomm.h b/xen/include/public/xencomm.h
index ac45e0712a..a441f3e270 100644
--- a/xen/include/public/xencomm.h
+++ b/xen/include/public/xencomm.h
@@ -1,22 +1,5 @@
+/* SPDX-License-Identifier: MIT */
 /*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) IBM Corp. 2006
  */
 
diff --git a/xen/include/public/xenoprof.h b/xen/include/public/xenoprof.h
index 9f5ca87d9e..2298b6759e 100644
--- a/xen/include/public/xenoprof.h
+++ b/xen/include/public/xenoprof.h
@@ -1,27 +1,10 @@
+/* SPDX-License-Identifier: MIT */
 /******************************************************************************
  * xenoprof.h
  *
  * Interface for enabling system wide profiling based on hardware performance
  * counters
  *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
  * Copyright (C) 2005 Hewlett-Packard Co.
  * Written by Aravind Menon & Jose Renato Santos
  */
diff --git a/xen/include/public/xsm/flask_op.h b/xen/include/public/xsm/flask_op.h
index b41dd6dac8..7185e80621 100644
--- a/xen/include/public/xsm/flask_op.h
+++ b/xen/include/public/xsm/flask_op.h
@@ -1,25 +1,8 @@
+/* SPDX-License-Identifier: MIT */
 /*
  *  This file contains the flask_op hypercall commands and definitions.
  *
  *  Author:  George Coker, <gscoker@alpha.ncsc.mil>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to
- * deal in the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __FLASK_OP_H__
-- 
Anthony PERARD



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers Anthony PERARD
@ 2022-11-03 14:16   ` Juergen Gross
  2022-11-16  8:15   ` Jan Beulich
  1 sibling, 0 replies; 19+ messages in thread
From: Juergen Gross @ 2022-11-03 14:16 UTC (permalink / raw)
  To: Anthony PERARD, xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper, Bertrand Marquis,
	Volodymyr Babchuk, Roger Pau Monné,
	Christopher Clark, Paul Durrant, Tamas K Lengyel,
	Alexandru Isaila, Petre Pircalabu


[-- Attachment #1.1.1: Type: text/plain, Size: 382 bytes --]

On 03.11.22 12:52, Anthony PERARD wrote:
> The text of the licence has been check to be the same as the one at
> https://spdx.org/licenses/MIT.html, except we don't have "(including
> the next paragraph)".
> 
> Mecanical change done with a script.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3149 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
                   ` (5 preceding siblings ...)
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers Anthony PERARD
@ 2022-11-10 23:17 ` Stefano Stabellini
  2022-11-11 11:28   ` Henry Wang
  2022-11-16  0:35 ` Henry Wang
  7 siblings, 1 reply; 19+ messages in thread
From: Stefano Stabellini @ 2022-11-10 23:17 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: xen-devel, Wei Liu, Stefano Stabellini, George Dunlap,
	Julien Grall, Jan Beulich, Henry Wang, Andrew Cooper,
	Bertrand Marquis, Petre Pircalabu, Alexandru Isaila,
	Tamas K Lengyel, Volodymyr Babchuk, Roger Pau Monné,
	Juergen Gross, Paul Durrant, Christopher Clark

Hi Anthony,

Thank you for doing this, it was much needed!


Hi all,

I think if we are going to commit this series for 4.17 then I would
suggest to also commit patches 1-3 of my "introduce SPDX" series:

https://marc.info/?l=xen-devel&m=166562222522996

They are already acked/reviewed and are zero risk as they don't actually
change any of the headers.


For clarify, I don't mean to cause any trouble to this series. I am also
happy to have this series committed in 4.17 without "introduce SPDX".

Cheers,

Stefano



On Thu, 3 Nov 2022, Anthony PERARD wrote:
> Patch series available in this git branch:
> https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.licences-fix-public-headers-v2
> 
> Hi,
> 
> Andrew pointed out some licences issue:
> 
> https://lore.kernel.org/xen-devel/b58f5340-d4fa-df9d-89de-6137005add77@citrix.com/T/#u
> tracked here: https://gitlab.com/xen-project/xen/-/issues/35
> 
> So I attempt to fix them with this series.
> 
> For 4.17:
>     This mostly change "documentation" so little risk for those patch, except
>     "xen-foreign: Capture licences from the input headers" which changes
>     "mkheader.py" which could generate broken headers.
> 
> Anthony PERARD (6):
>   xen: Add licence information to public/errno.h
>   xen: Used SPDX identifier in some public headers
>   tools/include/xen-foreign: Add SPDX identifier to generated headers
>   xen: Add licence header to device_tree_defs.h
>   Rework COPYING installed in /usr/include/xen/, due to several licences
>   xen: Used SPDX identifier in public headers
> 
>  tools/include/Makefile                       |  1 -
>  xen/include/public/arch-arm.h                | 19 +-------------
>  xen/include/public/arch-arm/hvm/save.h       | 19 +-------------
>  xen/include/public/arch-arm/smccc.h          | 19 +-------------
>  xen/include/public/arch-x86/cpufeatureset.h  | 19 +-------------
>  xen/include/public/arch-x86/cpuid.h          | 19 +-------------
>  xen/include/public/arch-x86/guest-acpi.h     | 19 +-------------
>  xen/include/public/arch-x86/hvm/save.h       | 19 +-------------
>  xen/include/public/arch-x86/hvm/start_info.h | 19 +-------------
>  xen/include/public/arch-x86/pmu.h            | 19 +-------------
>  xen/include/public/arch-x86/xen-mca.h        | 19 +-------------
>  xen/include/public/arch-x86/xen-x86_32.h     | 19 +-------------
>  xen/include/public/arch-x86/xen-x86_64.h     | 19 +-------------
>  xen/include/public/arch-x86/xen.h            | 19 +-------------
>  xen/include/public/arch-x86_32.h             | 19 +-------------
>  xen/include/public/arch-x86_64.h             | 19 +-------------
>  xen/include/public/argo.h                    | 19 +-------------
>  xen/include/public/callback.h                | 19 +-------------
>  xen/include/public/device_tree_defs.h        |  6 +++++
>  xen/include/public/dom0_ops.h                | 19 +-------------
>  xen/include/public/domctl.h                  | 19 +-------------
>  xen/include/public/elfnote.h                 | 19 +-------------
>  xen/include/public/errno.h                   |  2 ++
>  xen/include/public/event_channel.h           | 19 +-------------
>  xen/include/public/features.h                | 19 +-------------
>  xen/include/public/grant_table.h             | 19 +-------------
>  xen/include/public/hvm/dm_op.h               | 19 +-------------
>  xen/include/public/hvm/e820.h                | 19 +-------------
>  xen/include/public/hvm/hvm_info_table.h      | 19 +-------------
>  xen/include/public/hvm/hvm_op.h              | 19 +-------------
>  xen/include/public/hvm/hvm_vcpu.h            | 19 +-------------
>  xen/include/public/hvm/hvm_xs_strings.h      | 19 +-------------
>  xen/include/public/hvm/ioreq.h               | 19 +-------------
>  xen/include/public/hvm/params.h              | 19 +-------------
>  xen/include/public/hvm/pvdrivers.h           | 19 +-------------
>  xen/include/public/hvm/save.h                | 19 +-------------
>  xen/include/public/hypfs.h                   | 19 +-------------
>  xen/include/public/io/9pfs.h                 | 19 +-------------
>  xen/include/public/io/blkif.h                | 19 +-------------
>  xen/include/public/io/cameraif.h             | 19 +-------------
>  xen/include/public/io/console.h              | 19 +-------------
>  xen/include/public/io/displif.h              | 19 +-------------
>  xen/include/public/io/fbif.h                 | 19 +-------------
>  xen/include/public/io/fsif.h                 | 19 +-------------
>  xen/include/public/io/kbdif.h                | 19 +-------------
>  xen/include/public/io/libxenvchan.h          | 19 +-------------
>  xen/include/public/io/netif.h                | 19 +-------------
>  xen/include/public/io/pciif.h                | 19 +-------------
>  xen/include/public/io/protocols.h            | 19 +-------------
>  xen/include/public/io/pvcalls.h              | 19 +-------------
>  xen/include/public/io/ring.h                 | 19 +-------------
>  xen/include/public/io/sndif.h                | 19 +-------------
>  xen/include/public/io/tpmif.h                | 19 +-------------
>  xen/include/public/io/usbif.h                | 19 +-------------
>  xen/include/public/io/vscsiif.h              | 19 +-------------
>  xen/include/public/io/xenbus.h               | 19 +-------------
>  xen/include/public/io/xs_wire.h              | 19 +-------------
>  xen/include/public/kexec.h                   | 19 +-------------
>  xen/include/public/memory.h                  | 19 +-------------
>  xen/include/public/nmi.h                     | 19 +-------------
>  xen/include/public/physdev.h                 | 19 +-------------
>  xen/include/public/platform.h                | 19 +-------------
>  xen/include/public/pmu.h                     | 19 +-------------
>  xen/include/public/sched.h                   | 19 +-------------
>  xen/include/public/sysctl.h                  | 19 +-------------
>  xen/include/public/tmem.h                    | 19 +-------------
>  xen/include/public/trace.h                   | 19 +-------------
>  xen/include/public/vcpu.h                    | 19 +-------------
>  xen/include/public/version.h                 | 19 +-------------
>  xen/include/public/vm_event.h                | 19 +-------------
>  xen/include/public/xen-compat.h              | 19 +-------------
>  xen/include/public/xen.h                     | 19 +-------------
>  xen/include/public/xencomm.h                 | 19 +-------------
>  xen/include/public/xenoprof.h                | 19 +-------------
>  xen/include/public/xsm/flask_op.h            | 19 +-------------
>  tools/include/xen-foreign/mkheader.py        | 23 ++++++++++++++---
>  tools/include/xen/COPYING                    | 26 ++++++++++++++++++++
>  77 files changed, 125 insertions(+), 1301 deletions(-)
>  create mode 100644 tools/include/xen/COPYING
> 
> -- 
> Anthony PERARD
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers
  2022-11-10 23:17 ` [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue " Stefano Stabellini
@ 2022-11-11 11:28   ` Henry Wang
  2022-11-11 22:18     ` Stefano Stabellini
  0 siblings, 1 reply; 19+ messages in thread
From: Henry Wang @ 2022-11-11 11:28 UTC (permalink / raw)
  To: Stefano Stabellini, Anthony PERARD
  Cc: xen-devel, Wei Liu, George Dunlap, Julien Grall, Jan Beulich,
	Andrew Cooper, Bertrand Marquis, Petre Pircalabu,
	Alexandru Isaila, Tamas K Lengyel, Volodymyr Babchuk,
	Roger Pau Monné,
	Juergen Gross, Paul Durrant, Christopher Clark

Hi Stefano,

> -----Original Message-----
> From: Stefano Stabellini <sstabellini@kernel.org>
> Hi all,
> 
> I think if we are going to commit this series for 4.17 then I would
> suggest to also commit patches 1-3 of my "introduce SPDX" series:
> 
> https://marc.info/?l=xen-devel&m=166562222522996
> 
> They are already acked/reviewed and are zero risk as they don't actually
> change any of the headers.

After some thinking and discussion I would like to follow your suggestion in
here. So for the first 3 patches from your "introduce SPDX" series:

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

I will need some more time to figure out some uncertain part from Anthony's
series about the relicensing of device_tree_defs.h [1] before providing my
release ack there.

[1] https://lore.kernel.org/xen-devel/fad0265d-a736-5135-b5ea-3735a8bc72da@xen.org/

Kind regards,
Henry



^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers
  2022-11-11 11:28   ` Henry Wang
@ 2022-11-11 22:18     ` Stefano Stabellini
  0 siblings, 0 replies; 19+ messages in thread
From: Stefano Stabellini @ 2022-11-11 22:18 UTC (permalink / raw)
  To: Henry Wang
  Cc: Stefano Stabellini, Anthony PERARD, xen-devel, Wei Liu,
	George Dunlap, Julien Grall, Jan Beulich, Andrew Cooper,
	Bertrand Marquis, Petre Pircalabu, Alexandru Isaila,
	Tamas K Lengyel, Volodymyr Babchuk, Roger Pau Monné,
	Juergen Gross, Paul Durrant, Christopher Clark

On Fri, 11 Nov 2022, Henry Wang wrote:
> Hi Stefano,
> 
> > -----Original Message-----
> > From: Stefano Stabellini <sstabellini@kernel.org>
> > Hi all,
> > 
> > I think if we are going to commit this series for 4.17 then I would
> > suggest to also commit patches 1-3 of my "introduce SPDX" series:
> > 
> > https://marc.info/?l=xen-devel&m=166562222522996
> > 
> > They are already acked/reviewed and are zero risk as they don't actually
> > change any of the headers.
> 
> After some thinking and discussion I would like to follow your suggestion in
> here. So for the first 3 patches from your "introduce SPDX" series:
> 
> Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Thanks, I pushed the first 3 patches.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers
  2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
                   ` (6 preceding siblings ...)
  2022-11-10 23:17 ` [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue " Stefano Stabellini
@ 2022-11-16  0:35 ` Henry Wang
  7 siblings, 0 replies; 19+ messages in thread
From: Henry Wang @ 2022-11-16  0:35 UTC (permalink / raw)
  To: Anthony PERARD, xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Andrew Cooper, Bertrand Marquis, Petre Pircalabu,
	Alexandru Isaila, Tamas K Lengyel, Volodymyr Babchuk,
	Roger Pau Monné,
	Juergen Gross, Paul Durrant, Christopher Clark

Hi Anthony,

> -----Original Message-----
> From: Anthony PERARD <anthony.perard@citrix.com>
> Subject: [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public
> headers
> 
> Patch series available in this git branch:
> https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git
> br.licences-fix-public-headers-v2
> 
> Hi,
> 
> Andrew pointed out some licences issue:
> 
> https://lore.kernel.org/xen-devel/b58f5340-d4fa-df9d-89de-
> 6137005add77@citrix.com/T/#u
> tracked here: https://gitlab.com/xen-project/xen/-/issues/35
> 
> So I attempt to fix them with this series.
> 
> For 4.17:
>     This mostly change "documentation" so little risk for those patch, except
>     "xen-foreign: Capture licences from the input headers" which changes
>     "mkheader.py" which could generate broken headers.

Yes, and I agree this series should go into the 4.17 to resolve one of the
release blocker pointed out by Andrew:
https://gitlab.com/xen-project/xen/-/issues/35

> 
> Anthony PERARD (6):
>   xen: Add licence information to public/errno.h
>   xen: Used SPDX identifier in some public headers
>   tools/include/xen-foreign: Add SPDX identifier to generated headers
>   xen: Add licence header to device_tree_defs.h

As Grant Likely from Linaro has confirmed the license change, for the
whole series:

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Great thanks for taking care of this issue.

Kind regards,
Henry


>   Rework COPYING installed in /usr/include/xen/, due to several licences
>   xen: Used SPDX identifier in public headers
> 
>  tools/include/Makefile                       |  1 -
>  xen/include/public/arch-arm.h                | 19 +-------------
>  xen/include/public/arch-arm/hvm/save.h       | 19 +-------------
>  xen/include/public/arch-arm/smccc.h          | 19 +-------------
>  xen/include/public/arch-x86/cpufeatureset.h  | 19 +-------------
>  xen/include/public/arch-x86/cpuid.h          | 19 +-------------
>  xen/include/public/arch-x86/guest-acpi.h     | 19 +-------------
>  xen/include/public/arch-x86/hvm/save.h       | 19 +-------------
>  xen/include/public/arch-x86/hvm/start_info.h | 19 +-------------
>  xen/include/public/arch-x86/pmu.h            | 19 +-------------
>  xen/include/public/arch-x86/xen-mca.h        | 19 +-------------
>  xen/include/public/arch-x86/xen-x86_32.h     | 19 +-------------
>  xen/include/public/arch-x86/xen-x86_64.h     | 19 +-------------
>  xen/include/public/arch-x86/xen.h            | 19 +-------------
>  xen/include/public/arch-x86_32.h             | 19 +-------------
>  xen/include/public/arch-x86_64.h             | 19 +-------------
>  xen/include/public/argo.h                    | 19 +-------------
>  xen/include/public/callback.h                | 19 +-------------
>  xen/include/public/device_tree_defs.h        |  6 +++++
>  xen/include/public/dom0_ops.h                | 19 +-------------
>  xen/include/public/domctl.h                  | 19 +-------------
>  xen/include/public/elfnote.h                 | 19 +-------------
>  xen/include/public/errno.h                   |  2 ++
>  xen/include/public/event_channel.h           | 19 +-------------
>  xen/include/public/features.h                | 19 +-------------
>  xen/include/public/grant_table.h             | 19 +-------------
>  xen/include/public/hvm/dm_op.h               | 19 +-------------
>  xen/include/public/hvm/e820.h                | 19 +-------------
>  xen/include/public/hvm/hvm_info_table.h      | 19 +-------------
>  xen/include/public/hvm/hvm_op.h              | 19 +-------------
>  xen/include/public/hvm/hvm_vcpu.h            | 19 +-------------
>  xen/include/public/hvm/hvm_xs_strings.h      | 19 +-------------
>  xen/include/public/hvm/ioreq.h               | 19 +-------------
>  xen/include/public/hvm/params.h              | 19 +-------------
>  xen/include/public/hvm/pvdrivers.h           | 19 +-------------
>  xen/include/public/hvm/save.h                | 19 +-------------
>  xen/include/public/hypfs.h                   | 19 +-------------
>  xen/include/public/io/9pfs.h                 | 19 +-------------
>  xen/include/public/io/blkif.h                | 19 +-------------
>  xen/include/public/io/cameraif.h             | 19 +-------------
>  xen/include/public/io/console.h              | 19 +-------------
>  xen/include/public/io/displif.h              | 19 +-------------
>  xen/include/public/io/fbif.h                 | 19 +-------------
>  xen/include/public/io/fsif.h                 | 19 +-------------
>  xen/include/public/io/kbdif.h                | 19 +-------------
>  xen/include/public/io/libxenvchan.h          | 19 +-------------
>  xen/include/public/io/netif.h                | 19 +-------------
>  xen/include/public/io/pciif.h                | 19 +-------------
>  xen/include/public/io/protocols.h            | 19 +-------------
>  xen/include/public/io/pvcalls.h              | 19 +-------------
>  xen/include/public/io/ring.h                 | 19 +-------------
>  xen/include/public/io/sndif.h                | 19 +-------------
>  xen/include/public/io/tpmif.h                | 19 +-------------
>  xen/include/public/io/usbif.h                | 19 +-------------
>  xen/include/public/io/vscsiif.h              | 19 +-------------
>  xen/include/public/io/xenbus.h               | 19 +-------------
>  xen/include/public/io/xs_wire.h              | 19 +-------------
>  xen/include/public/kexec.h                   | 19 +-------------
>  xen/include/public/memory.h                  | 19 +-------------
>  xen/include/public/nmi.h                     | 19 +-------------
>  xen/include/public/physdev.h                 | 19 +-------------
>  xen/include/public/platform.h                | 19 +-------------
>  xen/include/public/pmu.h                     | 19 +-------------
>  xen/include/public/sched.h                   | 19 +-------------
>  xen/include/public/sysctl.h                  | 19 +-------------
>  xen/include/public/tmem.h                    | 19 +-------------
>  xen/include/public/trace.h                   | 19 +-------------
>  xen/include/public/vcpu.h                    | 19 +-------------
>  xen/include/public/version.h                 | 19 +-------------
>  xen/include/public/vm_event.h                | 19 +-------------
>  xen/include/public/xen-compat.h              | 19 +-------------
>  xen/include/public/xen.h                     | 19 +-------------
>  xen/include/public/xencomm.h                 | 19 +-------------
>  xen/include/public/xenoprof.h                | 19 +-------------
>  xen/include/public/xsm/flask_op.h            | 19 +-------------
>  tools/include/xen-foreign/mkheader.py        | 23 ++++++++++++++---
>  tools/include/xen/COPYING                    | 26 ++++++++++++++++++++
>  77 files changed, 125 insertions(+), 1301 deletions(-)
>  create mode 100644 tools/include/xen/COPYING
> 
> --
> Anthony PERARD



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 1/6] xen: Add licence information to public/errno.h
  2022-11-03 11:51 ` [XEN PATCH for-4.17 v2 1/6] xen: Add licence information to public/errno.h Anthony PERARD
@ 2022-11-16  8:12   ` Jan Beulich
  0 siblings, 0 replies; 19+ messages in thread
From: Jan Beulich @ 2022-11-16  8:12 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Henry Wang, Andrew Cooper, xen-devel

On 03.11.2022 12:51, Anthony PERARD wrote:
> Fixes: 81f559e97974 ("make error codes a formal part of the ABI")
> Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 2/6] xen: Used SPDX identifier in some public headers
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 2/6] xen: Used SPDX identifier in some public headers Anthony PERARD
@ 2022-11-16  8:12   ` Jan Beulich
  0 siblings, 0 replies; 19+ messages in thread
From: Jan Beulich @ 2022-11-16  8:12 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Henry Wang, Andrew Cooper, Bertrand Marquis, Volodymyr Babchuk,
	Roger Pau Monné,
	xen-devel

On 03.11.2022 12:52, Anthony PERARD wrote:
> The script "tools/include/xen-foreign/mkheader.py" is going to do a
> sanity check on the licences of those headers. To ease this, we will
> replace the verbatim copy of the MIT licence by its SPDX identifier
> equivalent.
> 
> The text of the licence has been check to be the same as the one at
> https://spdx.org/licenses/MIT.html, except we don't have "(including
> the next paragraph)". The text is also the same as the one in
> "xen/include/public/COPYING".
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers Anthony PERARD
  2022-11-03 14:16   ` Juergen Gross
@ 2022-11-16  8:15   ` Jan Beulich
  1 sibling, 0 replies; 19+ messages in thread
From: Jan Beulich @ 2022-11-16  8:15 UTC (permalink / raw)
  To: Anthony PERARD
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Henry Wang, Andrew Cooper, Bertrand Marquis, Volodymyr Babchuk,
	Roger Pau Monné,
	Christopher Clark, Paul Durrant, Juergen Gross, Tamas K Lengyel,
	Alexandru Isaila, Petre Pircalabu, xen-devel

On 03.11.2022 12:52, Anthony PERARD wrote:
> The text of the licence has been check to be the same as the one at
> https://spdx.org/licenses/MIT.html, except we don't have "(including
> the next paragraph)".
> 
> Mecanical change done with a script.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 3/6] tools/include/xen-foreign: Add SPDX identifier to generated headers
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 3/6] tools/include/xen-foreign: Add SPDX identifier to generated headers Anthony PERARD
@ 2022-11-16 14:59   ` Andrew Cooper
  0 siblings, 0 replies; 19+ messages in thread
From: Andrew Cooper @ 2022-11-16 14:59 UTC (permalink / raw)
  To: Anthony Perard, xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang

On 03/11/2022 11:52, Anthony PERARD wrote:
> diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py
> index fb268f0dce..ec8a321395 100644
> --- a/tools/include/xen-foreign/mkheader.py
> +++ b/tools/include/xen-foreign/mkheader.py
> @@ -1,5 +1,6 @@
>  #!/usr/bin/python
>  
> +from __future__ import print_function
>  import sys, re;
>  from structs import unions, structs, defines;
>  
> @@ -114,23 +115,37 @@ input  = "";
>  output = "";
>  fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % outfile.upper());
>  
> -# read input header files
>  for name in infiles:
>      f = open(name, "r");
> +    # Check the licence of the input file, only SPDX identifier is accepted by
> +    # this script.
> +    line = f.readline()
> +    if not line == "/* SPDX-License-Identifier: MIT */\n":

!=

> +        print("%s: Error: %s is missing SPDX identifier" % (sys.argv[0], name), file=sys.stderr)

I've reworked this a little to provide more information in the case that
something actually goes wrong.

xen.git/tools/include/xen-foreign$ make all
python3 mkheader.py arm32 arm32.h.tmp
/local/xen.git/tools/include/xen-foreign/../../../xen/include/public/arch-arm.h
/local/xen.git/tools/include/xen-foreign/../../../xen/include/public/xen.h
mkheader.py
/local/xen.git/tools/include/xen-foreign/../../../xen/include/public/xen.h:
Error: Missing or unexpected SPDX tag '/* SPDX-Licens-Identifier: MIT */'
Makefile:29: recipe for target 'arm32.h' failed
make: *** [arm32.h] Error 1

~Andrew

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences Anthony PERARD
@ 2022-11-16 15:01   ` Anthony PERARD
  2022-11-16 15:26   ` Andrew Cooper
  1 sibling, 0 replies; 19+ messages in thread
From: Anthony PERARD @ 2022-11-16 15:01 UTC (permalink / raw)
  To: xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang, Andrew Cooper

On Thu, Nov 03, 2022 at 11:52:03AM +0000, Anthony PERARD wrote:
> The notice in the COPYING file in "xen/include/public/COPYING" doesn't
> really apply to the files that ultimately are been install at
> "/usr/include/xen". The issue are headers in the "sys/" subdirectory
> that comes from other projects such as Linux or FreeBSD.
> 
> The main issue is that there are two headers that have a different
> licence than the MIT licence:
> 
> - xen-sys/Linux/gntalloc.h (installed as "sys/gntalloc.h") is public
>   domain.
> - xen-sys/FreeBSD/gntdev.h (installed as "sys/gntdev.h") is BSD-2.
> 
> To clarify this, we'll install a COPYING file with a different notice.
> 
> Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---

So the COPYING file is currently listed to be "ignored" by git (at least
when untracked) and that seems to bother someone or something. So I
guess an extra hunk to this patch is wanted:

diff --git a/.gitignore b/.gitignore
index 418bdfaebf..4eb602480a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -195,6 +195,7 @@ tools/hotplug/NetBSD/rc.d/xendriverdomain
 tools/include/acpi
 tools/include/_libxl*.h
 tools/include/xen/*
+!tools/include/xen/COPYING
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker

Cheers,

-- 
Anthony PERARD


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences
  2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences Anthony PERARD
  2022-11-16 15:01   ` Anthony PERARD
@ 2022-11-16 15:26   ` Andrew Cooper
  2022-11-16 16:36     ` Andrew Cooper
  1 sibling, 1 reply; 19+ messages in thread
From: Andrew Cooper @ 2022-11-16 15:26 UTC (permalink / raw)
  To: Anthony Perard, xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang

On 03/11/2022 11:52, Anthony PERARD wrote:
> diff --git a/tools/include/xen/COPYING b/tools/include/xen/COPYING
> new file mode 100644
> index 0000000000..fe3f9b7557
> --- /dev/null
> +++ b/tools/include/xen/COPYING
> @@ -0,0 +1,26 @@
> +XEN NOTICE
> +==========
> +
> +This licence applies to all files within this subdirectory ("/usr/include/xen")

This wants to be $includedir, which means the file needs to be
COPYING.in and processed by ./configure

I'll see about spinning a new patch.

~Andrew

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences
  2022-11-16 15:26   ` Andrew Cooper
@ 2022-11-16 16:36     ` Andrew Cooper
  0 siblings, 0 replies; 19+ messages in thread
From: Andrew Cooper @ 2022-11-16 16:36 UTC (permalink / raw)
  To: Anthony Perard, xen-devel
  Cc: Wei Liu, Stefano Stabellini, George Dunlap, Julien Grall,
	Jan Beulich, Henry Wang

On 16/11/2022 15:26, Andrew Cooper wrote:
> On 03/11/2022 11:52, Anthony PERARD wrote:
>> diff --git a/tools/include/xen/COPYING b/tools/include/xen/COPYING
>> new file mode 100644
>> index 0000000000..fe3f9b7557
>> --- /dev/null
>> +++ b/tools/include/xen/COPYING
>> @@ -0,0 +1,26 @@
>> +XEN NOTICE
>> +==========
>> +
>> +This licence applies to all files within this subdirectory ("/usr/include/xen")
> This wants to be $includedir, which means the file needs to be
> COPYING.in and processed by ./configure
>
> I'll see about spinning a new patch.

FAOD, I've discarded this plan.  Anthony points out that $includedir
uses a shell variable so can't be processed by ./configure.

If anyone actually notices, we can revisit fixing it when we're not in
severe code freeze.

~Andrew

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-11-16 16:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 11:51 [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue in public headers Anthony PERARD
2022-11-03 11:51 ` [XEN PATCH for-4.17 v2 1/6] xen: Add licence information to public/errno.h Anthony PERARD
2022-11-16  8:12   ` Jan Beulich
2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 2/6] xen: Used SPDX identifier in some public headers Anthony PERARD
2022-11-16  8:12   ` Jan Beulich
2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 3/6] tools/include/xen-foreign: Add SPDX identifier to generated headers Anthony PERARD
2022-11-16 14:59   ` Andrew Cooper
2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 4/6] xen: Add licence header to device_tree_defs.h Anthony PERARD
2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 5/6] Rework COPYING installed in /usr/include/xen/, due to several licences Anthony PERARD
2022-11-16 15:01   ` Anthony PERARD
2022-11-16 15:26   ` Andrew Cooper
2022-11-16 16:36     ` Andrew Cooper
2022-11-03 11:52 ` [XEN PATCH for-4.17 v2 6/6] xen: Used SPDX identifier in public headers Anthony PERARD
2022-11-03 14:16   ` Juergen Gross
2022-11-16  8:15   ` Jan Beulich
2022-11-10 23:17 ` [XEN PATCH for-4.17 v2 0/6] Fixing some licences issue " Stefano Stabellini
2022-11-11 11:28   ` Henry Wang
2022-11-11 22:18     ` Stefano Stabellini
2022-11-16  0:35 ` Henry Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.