[PATCH for-10.2] hw/arm/virt: Include 'system/system.h'

Cédric Le Goater posted 1 patch 3 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250731144019.1403591-1-clg@redhat.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>
hw/arm/virt.c | 1 +
1 file changed, 1 insertion(+)
[PATCH for-10.2] hw/arm/virt: Include 'system/system.h'
Posted by Cédric Le Goater 3 months, 2 weeks ago
hw/arm/virt.c should include 'system/system.h' for :

  serial_hd()
  qemu_add_machine_init_done_notifier()

Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
 hw/arm/virt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -50,6 +50,7 @@
 #include "system/kvm.h"
 #include "system/hvf.h"
 #include "system/qtest.h"
+#include "system/system.h"
 #include "hw/loader.h"
 #include "qapi/error.h"
 #include "qemu/bitops.h"
-- 
2.50.1


Re: [PATCH for-10.2] hw/arm/virt: Include 'system/system.h'
Posted by Philippe Mathieu-Daudé 3 months, 1 week ago
On 31/7/25 16:40, Cédric Le Goater wrote:
> hw/arm/virt.c should include 'system/system.h' for :
> 
>    serial_hd()

3 other files miss it:

$ git grep -L system/system $(git grep -wl serial_hd)
hw/arm/virt.c
hw/isa/isa-superio.c
hw/mips/loongson3_virt.c
hw/mips/malta.c
include/system/system.h

Anyhow,
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>    qemu_add_machine_init_done_notifier()
> 
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>   hw/arm/virt.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -50,6 +50,7 @@
>   #include "system/kvm.h"
>   #include "system/hvf.h"
>   #include "system/qtest.h"
> +#include "system/system.h"
>   #include "hw/loader.h"
>   #include "qapi/error.h"
>   #include "qemu/bitops.h"


Re: [PATCH for-10.2] hw/arm/virt: Include 'system/system.h'
Posted by Cédric Le Goater 3 months, 1 week ago
On 8/5/25 16:16, Philippe Mathieu-Daudé wrote:
> On 31/7/25 16:40, Cédric Le Goater wrote:
>> hw/arm/virt.c should include 'system/system.h' for :
>>
>>    serial_hd()
> 
> 3 other files miss it:
> 
> $ git grep -L system/system $(git grep -wl serial_hd)
> hw/arm/virt.c
> hw/isa/isa-superio.c
> hw/mips/loongson3_virt.c
> hw/mips/malta.c
> include/system/system.h

OK. This deserves a v2. Will work on it.

Thanks,

C.


Re: [PATCH for-10.2] hw/arm/virt: Include 'system/system.h'
Posted by Peter Maydell 3 months, 2 weeks ago
On Thu, 31 Jul 2025 at 15:40, Cédric Le Goater <clg@redhat.com> wrote:
>
> hw/arm/virt.c should include 'system/system.h' for :
>
>   serial_hd()
>   qemu_add_machine_init_done_notifier()
>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>  hw/arm/virt.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -50,6 +50,7 @@
>  #include "system/kvm.h"
>  #include "system/hvf.h"
>  #include "system/qtest.h"
> +#include "system/system.h"
>  #include "hw/loader.h"
>  #include "qapi/error.h"
>  #include "qemu/bitops.h"

Presumably we're currently pulling in this header
indirectly via some other header (the vfio ones)?
Might be helpful to say which.

If this is a dependency for your vfio-platform removal
patches, feel free to include it in there.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM
Re: [PATCH for-10.2] hw/arm/virt: Include 'system/system.h'
Posted by Cédric Le Goater 3 months, 2 weeks ago
On 7/31/25 16:55, Peter Maydell wrote:
> On Thu, 31 Jul 2025 at 15:40, Cédric Le Goater <clg@redhat.com> wrote:
>>
>> hw/arm/virt.c should include 'system/system.h' for :
>>
>>    serial_hd()
>>    qemu_add_machine_init_done_notifier()
>>
>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>> ---
>>   hw/arm/virt.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
>> index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644
>> --- a/hw/arm/virt.c
>> +++ b/hw/arm/virt.c
>> @@ -50,6 +50,7 @@
>>   #include "system/kvm.h"
>>   #include "system/hvf.h"
>>   #include "system/qtest.h"
>> +#include "system/system.h"
>>   #include "hw/loader.h"
>>   #include "qapi/error.h"
>>   #include "qemu/bitops.h"
> 
> Presumably we're currently pulling in this header
> indirectly via some other header (the vfio ones)?

yes.

> Might be helpful to say which.
> 
> If this is a dependency for your vfio-platform removal
> patches, feel free to include it in there.

I will do that and improve the commit log.

> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 
> -- PMM
> 



Thanks,

C.