hw/vfio/trace.h | 3 +++ hw/vfio/Kconfig | 2 ++ hw/vfio/meson.build | 2 ++ hw/vfio/trace-events | 2 ++ 4 files changed, 9 insertions(+)
Add SPDX-License-Identifier to some files missing it in hw/vfio/.
Signed-off-by: John Levon <john.levon@nutanix.com>
---
hw/vfio/trace.h | 3 +++
hw/vfio/Kconfig | 2 ++
hw/vfio/meson.build | 2 ++
hw/vfio/trace-events | 2 ++
4 files changed, 9 insertions(+)
diff --git a/hw/vfio/trace.h b/hw/vfio/trace.h
index 5a343aa59c..b34b61ddb2 100644
--- a/hw/vfio/trace.h
+++ b/hw/vfio/trace.h
@@ -1 +1,4 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
#include "trace/trace-hw_vfio.h"
diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig
index 7cdba0560a..91d9023b79 100644
--- a/hw/vfio/Kconfig
+++ b/hw/vfio/Kconfig
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
config VFIO
bool
depends on LINUX
diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build
index 73d29f925f..63ea393076 100644
--- a/hw/vfio/meson.build
+++ b/hw/vfio/meson.build
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
vfio_ss = ss.source_set()
vfio_ss.add(files(
'listener.c',
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events
index f06236f37b..e1728c4ef6 100644
--- a/hw/vfio/trace-events
+++ b/hw/vfio/trace-events
@@ -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.43.0
On 6/23/25 11:30, John Levon wrote: > Add SPDX-License-Identifier to some files missing it in hw/vfio/. > > Signed-off-by: John Levon <john.levon@nutanix.com> Applied to vfio-next. Thanks, C.
On Mon, Jun 23, 2025 at 10:30:53AM +0100, John Levon wrote: > Add SPDX-License-Identifier to some files missing it in hw/vfio/. > > Signed-off-by: John Levon <john.levon@nutanix.com> > --- > hw/vfio/trace.h | 3 +++ > hw/vfio/Kconfig | 2 ++ > hw/vfio/meson.build | 2 ++ > hw/vfio/trace-events | 2 ++ > 4 files changed, 9 insertions(+) Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> With regards, Daniel -- |: 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 :|
+ Daniel On 6/23/25 11:30, John Levon wrote: > Add SPDX-License-Identifier to some files missing it in hw/vfio/. > > Signed-off-by: John Levon <john.levon@nutanix.com> > --- > 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. > diff --git a/hw/vfio/trace.h b/hw/vfio/trace.h > index 5a343aa59c..b34b61ddb2 100644 > --- a/hw/vfio/trace.h > +++ b/hw/vfio/trace.h > @@ -1 +1,4 @@ > +/* > + * SPDX-License-Identifier: GPL-2.0-or-later > + */ > #include "trace/trace-hw_vfio.h" > diff --git a/hw/vfio/Kconfig b/hw/vfio/Kconfig > index 7cdba0560a..91d9023b79 100644 > --- a/hw/vfio/Kconfig > +++ b/hw/vfio/Kconfig > @@ -1,3 +1,5 @@ > +# SPDX-License-Identifier: GPL-2.0-or-later > + > config VFIO > bool > depends on LINUX > diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build > index 73d29f925f..63ea393076 100644 > --- a/hw/vfio/meson.build > +++ b/hw/vfio/meson.build > @@ -1,3 +1,5 @@ > +# SPDX-License-Identifier: GPL-2.0-or-later > + > vfio_ss = ss.source_set() > vfio_ss.add(files( > 'listener.c', > diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events > index f06236f37b..e1728c4ef6 100644 > --- a/hw/vfio/trace-events > +++ b/hw/vfio/trace-events > @@ -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"
On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote:
> + Daniel
>
> On 6/23/25 11:30, John Levon wrote:
> > Add SPDX-License-Identifier to some files missing it in hw/vfio/.
> >
> > Signed-off-by: John Levon <john.levon@nutanix.com>
> > ---
> > 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 ?
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
--
|: 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 :|
On 24/6/25 11:05, Daniel P. Berrangé wrote:
> On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote:
>> + Daniel
>>
>> On 6/23/25 11:30, John Levon wrote:
>>> Add SPDX-License-Identifier to some files missing it in hw/vfio/.
>>>
>>> Signed-off-by: John Levon <john.levon@nutanix.com>
>>> ---
>>> 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 ?
>
> 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.
Commit 6b620ca3b05 ("prepare for future GPLv2+ relicensing") from
2012-01-13 (and 8571fa57cd0 "LICENSE: clarify"):
Author: Paolo Bonzini <pbonzini@redhat.com> 2012-01-13 17:44:23
Committer: Anthony Liguori <aliguori@us.ibm.com> 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.
On Tue, Jun 24, 2025 at 11:41:11AM +0200, Philippe Mathieu-Daudé wrote:
> On 24/6/25 11:05, Daniel P. Berrangé wrote:
> > On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote:
> > > + Daniel
> > >
> > > On 6/23/25 11:30, John Levon wrote:
> > > > Add SPDX-License-Identifier to some files missing it in hw/vfio/.
> > > >
> > > > Signed-off-by: John Levon <john.levon@nutanix.com>
> > > > ---
> > > > 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 ?
> >
> > 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.
>
> Commit 6b620ca3b05 ("prepare for future GPLv2+ relicensing") from
> 2012-01-13 (and 8571fa57cd0 "LICENSE: clarify"):
>
> Author: Paolo Bonzini <pbonzini@redhat.com> 2012-01-13 17:44:23
> Committer: Anthony Liguori <aliguori@us.ibm.com> 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...
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
--
|: 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 :|
On Tue, Jun 24, 2025 at 10:05:44AM +0100, Daniel P. Berrangé wrote: > On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote: > > + Daniel > > > > On 6/23/25 11:30, John Levon wrote: > > > Add SPDX-License-Identifier to some files missing it in hw/vfio/. > > > > > > Signed-off-by: John Levon <john.levon@nutanix.com> > > > --- > > > hw/vfio/trace.h | 3 +++ > > > hw/vfio/Kconfig | 2 ++ > > > hw/vfio/meson.build | 2 ++ > > > hw/vfio/trace-events | 2 ++ > > > 4 files changed, 9 insertions(+) > > > > 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
On 6/24/25 11:19, John Levon wrote: > On Tue, Jun 24, 2025 at 10:05:44AM +0100, Daniel P. Berrangé wrote: > >> On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote: >>> + Daniel >>> >>> On 6/23/25 11:30, John Levon wrote: >>>> Add SPDX-License-Identifier to some files missing it in hw/vfio/. >>>> >>>> Signed-off-by: John Levon <john.levon@nutanix.com> >>>> --- >>>> hw/vfio/trace.h | 3 +++ >>>> hw/vfio/Kconfig | 2 ++ >>>> hw/vfio/meson.build | 2 ++ >>>> hw/vfio/trace-events | 2 ++ >>>> 4 files changed, 9 insertions(+) >>> >>> 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. 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.
On Tue, Jun 24, 2025 at 11:27:57AM +0200, Cédric Le Goater wrote: > On 6/24/25 11:19, John Levon wrote: > > On Tue, Jun 24, 2025 at 10:05:44AM +0100, Daniel P. Berrangé wrote: > > > > > On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote: > > > > + Daniel > > > > > > > > On 6/23/25 11:30, John Levon wrote: > > > > > Add SPDX-License-Identifier to some files missing it in hw/vfio/. > > > > > > > > > > Signed-off-by: John Levon <john.levon@nutanix.com> > > > > > --- > > > > > hw/vfio/trace.h | 3 +++ > > > > > hw/vfio/Kconfig | 2 ++ > > > > > hw/vfio/meson.build | 2 ++ > > > > > hw/vfio/trace-events | 2 ++ > > > > > 4 files changed, 9 insertions(+) > > > > > > > > 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. > > 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
On 6/24/25 11:32, John Levon wrote: > On Tue, Jun 24, 2025 at 11:27:57AM +0200, Cédric Le Goater wrote: > >> On 6/24/25 11:19, John Levon wrote: >>> On Tue, Jun 24, 2025 at 10:05:44AM +0100, Daniel P. Berrangé wrote: >>> >>>> On Tue, Jun 24, 2025 at 10:34:40AM +0200, Cédric Le Goater wrote: >>>>> + Daniel >>>>> >>>>> On 6/23/25 11:30, John Levon wrote: >>>>>> Add SPDX-License-Identifier to some files missing it in hw/vfio/. >>>>>> >>>>>> Signed-off-by: John Levon <john.levon@nutanix.com> >>>>>> --- >>>>>> hw/vfio/trace.h | 3 +++ >>>>>> hw/vfio/Kconfig | 2 ++ >>>>>> hw/vfio/meson.build | 2 ++ >>>>>> hw/vfio/trace-events | 2 ++ >>>>>> 4 files changed, 9 insertions(+) >>>>> >>>>> 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. >> >> 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.
On Tue, Jun 24, 2025 at 11:35:52AM +0200, Cédric Le Goater wrote: > > 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
On 6/24/25 11:41, John Levon wrote: > On Tue, Jun 24, 2025 at 11:35:52AM +0200, Cédric Le Goater wrote: > >>> 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.
© 2016 - 2025 Red Hat, Inc.