Skip to contentSkip to conversation

vfio: add license tag to some files

PATCH Applied John Levon 4 participants 13 messages Jun 23, 2025 – Jun 24, 2025 Arm/Amlogic Meson SoC support

lore
Share & tools
lore

John Levon

author
#0 lore raw

PATCH 1/1 vfio: add license tag to some files

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
 hw/vfio/trace.h      | 3 +++
 hw/vfio/Kconfig      | 2 ++
 hw/vfio/meson.build  | 2 ++
 hw/vfio/trace-events | 2 ++
 4 files changed, 9 insertions(+)
hw/vfio/trace.h +3 -0
index 5a343aa59c..b34b61ddb2 100644
@@ -1 +1,4 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
 #include "trace/trace-hw_vfio.h"
hw/vfio/Kconfig +2 -0
index 7cdba0560a..91d9023b79 100644
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
 config VFIO
     bool
     depends on LINUX
hw/vfio/meson.build +2 -0
index 73d29f925f..63ea393076 100644
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
 vfio_ss = ss.source_set()
 vfio_ss.add(files(
   'listener.c',
hw/vfio/trace-events +2 -0
index f06236f37b..e1728c4ef6 100644
@@ -1,4 +1,6 @@
 # See docs/devel/tracing.rst for syntax documentation.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
 
 # pci.c
 vfio_intx_interrupt(const char *name, char line) " (%s) Pin %c"
Signature · 1 line
2.43.0
#1 lore raw

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
  hw/vfio/trace.h      | 3 +++
  hw/vfio/Kconfig      | 2 ++
  hw/vfio/meson.build  | 2 ++
  hw/vfio/trace-events | 2 ++
  4 files changed, 9 insertions(+)

I think that's OK to add a GPL-2.0-or-later SPDX tag on these files because they are simple infrastructure files, and we know when they come from. How useful it is ? that I don't know.

For other source files, without a license, if we have any, I think the answer would be much more complex.

Daniel, What would be our position on such files ?

Thanks,

C.

Quoted 40 lines
hw/vfio/trace.h +3 -0
index 5a343aa59c..b34b61ddb2 100644
@@ -1 +1,4 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
  #include "trace/trace-hw_vfio.h"
hw/vfio/Kconfig +2 -0
index 7cdba0560a..91d9023b79 100644
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
  config VFIO
      bool
      depends on LINUX
hw/vfio/meson.build +2 -0
index 73d29f925f..63ea393076 100644
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
  vfio_ss = ss.source_set()
  vfio_ss.add(files(
    'listener.c',
hw/vfio/trace-events +2 -0
index f06236f37b..e1728c4ef6 100644
@@ -1,4 +1,6 @@
  # See docs/devel/tracing.rst for syntax documentation.
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
 
  # pci.c
  vfio_intx_interrupt(const char *name, char line) " (%s) Pin %c"
#2 lore raw
Quoted 13 lines · Cédric Le Goater

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
  hw/vfio/trace.h      | 3 +++
  hw/vfio/Kconfig      | 2 ++
  hw/vfio/meson.build  | 2 ++
  hw/vfio/trace-events | 2 ++
  4 files changed, 9 insertions(+)
Quoted 8 lines

I think that's OK to add a GPL-2.0-or-later SPDX tag on these files because they are simple infrastructure files, and we know when they come from. How useful it is ? that I don't know.

For other source files, without a license, if we have any, I think the answer would be much more complex.

Daniel, What would be our position on such files ?

The only hard requirement we have stated is that all /newly/ created files ("new" as in git patch reports it as a new file) must have the SPDX tag, and must NOT have license boilerplate. This is enforced by checkpatch.

We are NOT expecting SPDX tags to be added to existing files in general, whether they have a license boilerplate or not.

Adding SPDX tags to existing files without any boilerplate text at all is likely the more interesting & beneficial scenario though.

If adding SPDX tags to existing files, you must do due diligence over the history of the file, in order to validate the implicit license it would have had based on QEMU's rules when the file was first created. We can't just blindly assume it was GPL-2.0-or-later, as it might have been copied from elsewhere when first created and thus inherit terms from another file.

For the specific 4 files in this patch, I think it is unlikely there will be any surprises in their license history though. They all post-date our top level statement that new contributions are implicitly GPL2.0-or-later, and also won't have been copied from elsewhere.

TL;DR: this patch looks reasonable, and we might as well take it, but there is no expectation that people need to extend this work across the code tree unless they love doing historical code tracing :-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
author
#3 lore raw
Quoted 14 lines · Daniel P. Berrangé
Quoted 13 lines · Cédric Le Goater

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
  hw/vfio/trace.h      | 3 +++
  hw/vfio/Kconfig      | 2 ++
  hw/vfio/meson.build  | 2 ++
  hw/vfio/trace-events | 2 ++
  4 files changed, 9 insertions(+)
Quoted 5 lines
Quoted 1 line

Daniel, What would be our position on such files ?

TL;DR: this patch looks reasonable, and we might as well take it, but there is no expectation that people need to extend this work across the code tree unless they love doing historical code tracing :-)

I was required to send this patch, as Cédric wanted the same files in hw/vfio-user/ to have the identifier.

thanks
john

#4 lore raw
Quoted 16 lines · John Levon
Quoted 14 lines · Daniel P. Berrangé
Quoted 13 lines · Cédric Le Goater

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
   hw/vfio/trace.h      | 3 +++
   hw/vfio/Kconfig      | 2 ++
   hw/vfio/meson.build  | 2 ++
   hw/vfio/trace-events | 2 ++
   4 files changed, 9 insertions(+)
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Daniel, What would be our position on such files ?

TL;DR: this patch looks reasonable, and we might as well take it, but there is no expectation that people need to extend this work across the code tree unless they love doing historical code tracing :-)

I was required to send this patch,

?

Quoted 2 lines

as Cédric wanted the same files in
hw/vfio-user/ to have the identifier.

SPDX tags are required for newly created files, the ones introduced under hw/vfio-user/.

Old files don't have to be changed. It would require a legal due diligence which is a complex process.

Thanks,

C.

author
#5 lore raw
Quoted 27 lines · Cédric Le Goater
Quoted 16 lines · John Levon
Quoted 14 lines · Daniel P. Berrangé
Quoted 13 lines · Cédric Le Goater

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
   hw/vfio/trace.h      | 3 +++
   hw/vfio/Kconfig      | 2 ++
   hw/vfio/meson.build  | 2 ++
   hw/vfio/trace-events | 2 ++
   4 files changed, 9 insertions(+)
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Daniel, What would be our position on such files ?

TL;DR: this patch looks reasonable, and we might as well take it, but there is no expectation that people need to extend this work across the code tree unless they love doing historical code tracing :-)

I was required to send this patch,

?

Quoted 8 lines
Quoted 2 lines

as Cédric wanted the same files in
hw/vfio-user/ to have the identifier.

SPDX tags are required for newly created files, the ones introduced under hw/vfio-user/.

Old files don't have to be changed. It would require a legal due diligence which is a complex process.

These files came from hw/vfio/ and were then modified so would carry the same license. Please let me know what you'd like me to do.

regards
john

#6 lore raw
Quoted 32 lines · John Levon
Quoted 30 lines · Cédric Le Goater
Quoted 16 lines · John Levon
Quoted 14 lines · Daniel P. Berrangé
Quoted 13 lines · Cédric Le Goater

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
    hw/vfio/trace.h      | 3 +++
    hw/vfio/Kconfig      | 2 ++
    hw/vfio/meson.build  | 2 ++
    hw/vfio/trace-events | 2 ++
    4 files changed, 9 insertions(+)
Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Daniel, What would be our position on such files ?

TL;DR: this patch looks reasonable, and we might as well take it, but there is no expectation that people need to extend this work across the code tree unless they love doing historical code tracing :-)

I was required to send this patch,

?

Quoted 2 lines

as Cédric wanted the same files in
hw/vfio-user/ to have the identifier.

Quoted 8 lines
Quoted 5 lines

SPDX tags are required for newly created files, the ones introduced under hw/vfio-user/.

Old files don't have to be changed. It would require a legal due diligence which is a complex process.

These files came from hw/vfio/ and were then modified so would carry the same license. Please let me know what you'd like me to do.

Ah. Please consider them as new. These are infrastructure files which are all similar across the QEMU project.

Thanks,

C.

author
#7 lore raw
Quoted 5 lines · Cédric Le Goater
Quoted 2 lines

These files came from hw/vfio/ and were then modified so would carry the same license. Please let me know what you'd like me to do.

Ah. Please consider them as new. These are infrastructure files which are all similar across the QEMU project.

OK thanks, happy to drop this patch then

regards
john

#8 lore raw
Quoted 9 lines · John Levon
Quoted 5 lines · Cédric Le Goater
Quoted 2 lines

These files came from hw/vfio/ and were then modified so would carry the same license. Please let me know what you'd like me to do.

Ah. Please consider them as new. These are infrastructure files which are all similar across the QEMU project.

OK thanks, happy to drop this patch then

It's a simple case and Daniel added his R-b. I will take it.

Thanks,

C.

#9 lore raw
In reply to Daniel P. Berrangé
Quoted 42 lines · Daniel P. Berrangé
Quoted 13 lines · Cédric Le Goater

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
   hw/vfio/trace.h      | 3 +++
   hw/vfio/Kconfig      | 2 ++
   hw/vfio/meson.build  | 2 ++
   hw/vfio/trace-events | 2 ++
   4 files changed, 9 insertions(+)
Quoted 8 lines

I think that's OK to add a GPL-2.0-or-later SPDX tag on these files because they are simple infrastructure files, and we know when they come from. How useful it is ? that I don't know.

For other source files, without a license, if we have any, I think the answer would be much more complex.

Daniel, What would be our position on such files ?

The only hard requirement we have stated is that all /newly/ created files ("new" as in git patch reports it as a new file) must have the SPDX tag, and must NOT have license boilerplate. This is enforced by checkpatch.

We are NOT expecting SPDX tags to be added to existing files in general, whether they have a license boilerplate or not.

Adding SPDX tags to existing files without any boilerplate text at all is likely the more interesting & beneficial scenario though.

If adding SPDX tags to existing files, you must do due diligence over the history of the file, in order to validate the implicit license it would have had based on QEMU's rules when the file was first created. We can't just blindly assume it was GPL-2.0-or-later, as it might have been copied from elsewhere when first created and thus inherit terms from another file.

Quoted 4 lines

For the specific 4 files in this patch, I think it is unlikely there will be any surprises in their license history though. They all post-date our top level statement that new contributions are implicitly GPL2.0-or-later, and also won't have been copied from elsewhere.

Commit 6b620ca3b05 ("prepare for future GPLv2+ relicensing") from 2012-01-13 (and 8571fa57cd0 "LICENSE: clarify"):

Author: Paolo Bonzini <[email protected]> 2012-01-13 17:44:23
Committer: Anthony Liguori <[email protected]> 2012-01-13 17:55:56

All files under GPLv2 will get GPLv2+ changes starting tomorrow.

added:

+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.

IANAL but IIUC we could add "SPDX-License-Identifier: GPL-2.0-or-later" to all files added after 2012-01-13 which don't contain any license...

So if these files were added after 2012-01-13, then the patch would be OK IMHO.

#10 lore raw
Quoted 56 lines · Philippe Mathieu-Daudé
Quoted 42 lines · Daniel P. Berrangé
Quoted 13 lines · Cédric Le Goater

+ Daniel

Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
   hw/vfio/trace.h      | 3 +++
   hw/vfio/Kconfig      | 2 ++
   hw/vfio/meson.build  | 2 ++
   hw/vfio/trace-events | 2 ++
   4 files changed, 9 insertions(+)
Quoted 8 lines

I think that's OK to add a GPL-2.0-or-later SPDX tag on these files because they are simple infrastructure files, and we know when they come from. How useful it is ? that I don't know.

For other source files, without a license, if we have any, I think the answer would be much more complex.

Daniel, What would be our position on such files ?

The only hard requirement we have stated is that all /newly/ created files ("new" as in git patch reports it as a new file) must have the SPDX tag, and must NOT have license boilerplate. This is enforced by checkpatch.

We are NOT expecting SPDX tags to be added to existing files in general, whether they have a license boilerplate or not.

Adding SPDX tags to existing files without any boilerplate text at all is likely the more interesting & beneficial scenario though.

If adding SPDX tags to existing files, you must do due diligence over the history of the file, in order to validate the implicit license it would have had based on QEMU's rules when the file was first created. We can't just blindly assume it was GPL-2.0-or-later, as it might have been copied from elsewhere when first created and thus inherit terms from another file.

Quoted 4 lines

For the specific 4 files in this patch, I think it is unlikely there will be any surprises in their license history though. They all post-date our top level statement that new contributions are implicitly GPL2.0-or-later, and also won't have been copied from elsewhere.

Commit 6b620ca3b05 ("prepare for future GPLv2+ relicensing") from 2012-01-13 (and 8571fa57cd0 "LICENSE: clarify"):

Author: Paolo Bonzini <[email protected]> 2012-01-13 17:44:23
Committer: Anthony Liguori <[email protected]> 2012-01-13 17:55:56

All files under GPLv2 will get GPLv2+ changes starting tomorrow.

Quoted 7 lines

added:

+ * Contributions after 2012-01-13 are licensed under the terms of the
+ * GNU GPL, version 2 or (at your option) any later version.

IANAL but IIUC we could add "SPDX-License-Identifier: GPL-2.0-or-later" to all files added after 2012-01-13 which don't contain any license...

Nope, a reasonable number of new files since that date will have been split off from files that existed prior to that date.

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 1/1
#11 lore raw
In reply to John Levon
Quoted 9 lines · John Levon

Add SPDX-License-Identifier to some files missing it in hw/vfio/.

---
 hw/vfio/trace.h      | 3 +++
 hw/vfio/Kconfig      | 2 ++
 hw/vfio/meson.build  | 2 ++
 hw/vfio/trace-events | 2 ++
 4 files changed, 9 insertions(+)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|