diff mbox series

[1/2] softmmu: move more files to softmmu/

Message ID 20201006091922.331832-2-pbonzini@redhat.com
State New
Headers show
Series Move more code to softmmu/ | expand

Commit Message

Paolo Bonzini Oct. 6, 2020, 9:19 a.m. UTC
Keep most softmmu_ss files into the system-emulation-specific
directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build                              | 10 ----------
 bootdevice.c => softmmu/bootdevice.c     |  0
 device_tree.c => softmmu/device_tree.c   |  0
 dma-helpers.c => softmmu/dma-helpers.c   |  0
 softmmu/meson.build                      | 10 ++++++++++
 qdev-monitor.c => softmmu/qdev-monitor.c |  0
 qemu-seccomp.c => softmmu/qemu-seccomp.c |  0
 tpm.c => softmmu/tpm.c                   |  0
 8 files changed, 10 insertions(+), 10 deletions(-)
 rename bootdevice.c => softmmu/bootdevice.c (100%)
 rename device_tree.c => softmmu/device_tree.c (100%)
 rename dma-helpers.c => softmmu/dma-helpers.c (100%)
 rename qdev-monitor.c => softmmu/qdev-monitor.c (100%)
 rename qemu-seccomp.c => softmmu/qemu-seccomp.c (100%)
 rename tpm.c => softmmu/tpm.c (100%)

Comments

Philippe Mathieu-Daudé Oct. 6, 2020, 9:34 a.m. UTC | #1
On 10/6/20 11:19 AM, Paolo Bonzini wrote:
> Keep most softmmu_ss files into the system-emulation-specific

> directory.

> 

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

> ---

>  meson.build                              | 10 ----------

>  bootdevice.c => softmmu/bootdevice.c     |  0

>  device_tree.c => softmmu/device_tree.c   |  0

>  dma-helpers.c => softmmu/dma-helpers.c   |  0

>  softmmu/meson.build                      | 10 ++++++++++

>  qdev-monitor.c => softmmu/qdev-monitor.c |  0

>  qemu-seccomp.c => softmmu/qemu-seccomp.c |  0

>  tpm.c => softmmu/tpm.c                   |  0

>  8 files changed, 10 insertions(+), 10 deletions(-)

>  rename bootdevice.c => softmmu/bootdevice.c (100%)

>  rename device_tree.c => softmmu/device_tree.c (100%)

>  rename dma-helpers.c => softmmu/dma-helpers.c (100%)

>  rename qdev-monitor.c => softmmu/qdev-monitor.c (100%)


TIL qdev-monitor.c :)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>


>  rename qemu-seccomp.c => softmmu/qemu-seccomp.c (100%)

>  rename tpm.c => softmmu/tpm.c (100%)
Philippe Mathieu-Daudé Oct. 6, 2020, 9:38 a.m. UTC | #2
On 10/6/20 11:34 AM, Philippe Mathieu-Daudé wrote:
> On 10/6/20 11:19 AM, Paolo Bonzini wrote:
>> Keep most softmmu_ss files into the system-emulation-specific
>> directory.

Oops, you forgot to update MAINTAINERS.

>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  meson.build                              | 10 ----------
>>  bootdevice.c => softmmu/bootdevice.c     |  0
>>  device_tree.c => softmmu/device_tree.c   |  0
>>  dma-helpers.c => softmmu/dma-helpers.c   |  0
>>  softmmu/meson.build                      | 10 ++++++++++
>>  qdev-monitor.c => softmmu/qdev-monitor.c |  0
>>  qemu-seccomp.c => softmmu/qemu-seccomp.c |  0
>>  tpm.c => softmmu/tpm.c                   |  0
>>  8 files changed, 10 insertions(+), 10 deletions(-)
>>  rename bootdevice.c => softmmu/bootdevice.c (100%)

"Gonglei (Arei)" <arei.gonglei@huawei.com> (maintainer:Bootdevice)

>>  rename device_tree.c => softmmu/device_tree.c (100%)

Alistair Francis <alistair.francis@wdc.com> (maintainer:Device Tree)
David Gibson <david@gibson.dropbear.id.au> (reviewer:Device Tree)

>>  rename dma-helpers.c => softmmu/dma-helpers.c (100%)

No maintainers.

>>  rename qdev-monitor.c => softmmu/qdev-monitor.c (100%)

Paolo Bonzini <pbonzini@redhat.com> (supporter:QOM)
"Daniel P. Berrangé" <berrange@redhat.com> (reviewer:QOM)
Eduardo Habkost <ehabkost@redhat.com> (reviewer:QOM)

> 
> TIL qdev-monitor.c :)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
>>  rename qemu-seccomp.c => softmmu/qemu-seccomp.c (100%)

Eduardo Otubo <otubo@redhat.com> (supporter:Seccomp)

>>  rename tpm.c => softmmu/tpm.c (100%)

Stefan Berger <stefanb@linux.ibm.com> (maintainer:TPM)
Gonglei (Arei)" via Oct. 6, 2020, 9:43 a.m. UTC | #3
On Tue, 6 Oct 2020, Paolo Bonzini wrote:
> Keep most softmmu_ss files into the system-emulation-specific
> directory.

The name of this dir may be misleading. I think it originally stood for 
the actual MMU emulation but now it seems everything related to system 
emulation is dumped here. Is it better to keep MMU emulation separate and 
put other files in a "sysemu" dir or rename this dir if it keeps mixing 
MMU emulation and system emulation parts? (I think the MMU emulation is a 
weak part of QEMU regarding performance so it would be better to keep that 
cleanly separated so that it's easier to analyse and optimise it in the 
future, which is more difficult if it's mixed with other parts where it's 
not even clear what constitutes the actual MMU emulation. So I vote for 
keeping it separate.)

Regards,
BALATON Zoltan

>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> meson.build                              | 10 ----------
> bootdevice.c => softmmu/bootdevice.c     |  0
> device_tree.c => softmmu/device_tree.c   |  0
> dma-helpers.c => softmmu/dma-helpers.c   |  0
> softmmu/meson.build                      | 10 ++++++++++
> qdev-monitor.c => softmmu/qdev-monitor.c |  0
> qemu-seccomp.c => softmmu/qemu-seccomp.c |  0
> tpm.c => softmmu/tpm.c                   |  0
> 8 files changed, 10 insertions(+), 10 deletions(-)
> rename bootdevice.c => softmmu/bootdevice.c (100%)
> rename device_tree.c => softmmu/device_tree.c (100%)
> rename dma-helpers.c => softmmu/dma-helpers.c (100%)
> rename qdev-monitor.c => softmmu/qdev-monitor.c (100%)
> rename qemu-seccomp.c => softmmu/qemu-seccomp.c (100%)
> rename tpm.c => softmmu/tpm.c (100%)
>
> diff --git a/meson.build b/meson.build
> index 17c89c87c6..0e0577e81e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1360,17 +1360,7 @@ blockdev_ss.add(files(
> # os-win32.c does not
> blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
> softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
> -
> softmmu_ss.add_all(blockdev_ss)
> -softmmu_ss.add(files(
> -  'bootdevice.c',
> -  'dma-helpers.c',
> -  'qdev-monitor.c',
> -), sdl)
> -
> -softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
> -softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp])
> -softmmu_ss.add(when: fdt, if_true: files('device_tree.c'))
>
> common_ss.add(files('cpus-common.c'))
>
> diff --git a/bootdevice.c b/softmmu/bootdevice.c
> similarity index 100%
> rename from bootdevice.c
> rename to softmmu/bootdevice.c
> diff --git a/device_tree.c b/softmmu/device_tree.c
> similarity index 100%
> rename from device_tree.c
> rename to softmmu/device_tree.c
> diff --git a/dma-helpers.c b/softmmu/dma-helpers.c
> similarity index 100%
> rename from dma-helpers.c
> rename to softmmu/dma-helpers.c
> diff --git a/softmmu/meson.build b/softmmu/meson.build
> index 36c96e7b15..862ab24878 100644
> --- a/softmmu/meson.build
> +++ b/softmmu/meson.build
> @@ -14,3 +14,13 @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files(
> specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: [files(
>   'icount.c'
> )])
> +
> +softmmu_ss.add(files(
> +  'bootdevice.c',
> +  'dma-helpers.c',
> +  'qdev-monitor.c',
> +), sdl)
> +
> +softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
> +softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp])
> +softmmu_ss.add(when: fdt, if_true: files('device_tree.c'))
> diff --git a/qdev-monitor.c b/softmmu/qdev-monitor.c
> similarity index 100%
> rename from qdev-monitor.c
> rename to softmmu/qdev-monitor.c
> diff --git a/qemu-seccomp.c b/softmmu/qemu-seccomp.c
> similarity index 100%
> rename from qemu-seccomp.c
> rename to softmmu/qemu-seccomp.c
> diff --git a/tpm.c b/softmmu/tpm.c
> similarity index 100%
> rename from tpm.c
> rename to softmmu/tpm.c
>
Paolo Bonzini Oct. 6, 2020, 9:54 a.m. UTC | #4
On 06/10/20 11:43, BALATON Zoltan wrote:
> 
> The name of this dir may be misleading. I think it originally stood
> for the actual MMU emulation but now it seems everything related to
> system emulation is dumped here. Is it better to keep MMU emulation
> separate and put other files in a "sysemu" dir or rename this dir if
> it keeps mixing MMU emulation and system emulation parts? (I think
> the MMU emulation is a weak part of QEMU regarding performance so it
> would be better to keep that cleanly separated so that it's easier to
> analyse and optimise it in the future, which is more difficult if
> it's mixed with other parts where it's not even clear what
> constitutes the actual MMU emulation. So I vote for keeping it
> separate.)

I agree that softmmu/ should have been called sysemu/.  But I think it's
unnecessary churn to do that now.

Paolo
Philippe Mathieu-Daudé Oct. 6, 2020, 10:02 a.m. UTC | #5
On 10/6/20 11:54 AM, Paolo Bonzini wrote:
> On 06/10/20 11:43, BALATON Zoltan wrote:
>>
>> The name of this dir may be misleading. I think it originally stood
>> for the actual MMU emulation but now it seems everything related to
>> system emulation is dumped here. Is it better to keep MMU emulation
>> separate and put other files in a "sysemu" dir or rename this dir if
>> it keeps mixing MMU emulation and system emulation parts? (I think
>> the MMU emulation is a weak part of QEMU regarding performance so it
>> would be better to keep that cleanly separated so that it's easier to
>> analyse and optimise it in the future, which is more difficult if
>> it's mixed with other parts where it's not even clear what
>> constitutes the actual MMU emulation. So I vote for keeping it
>> separate.)
> 
> I agree that softmmu/ should have been called sysemu/.  But I think it's
> unnecessary churn to do that now.

It is not necessary, but there are so many files moved around recently
so it is not a bad time to clarify it neither :)

OTOH yes many files have been moved around recently, so we might wait
for the next release before attacking this cleanup.

> 
> Paolo
> 
>
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 17c89c87c6..0e0577e81e 100644
--- a/meson.build
+++ b/meson.build
@@ -1360,17 +1360,7 @@  blockdev_ss.add(files(
 # os-win32.c does not
 blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
 softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
-
 softmmu_ss.add_all(blockdev_ss)
-softmmu_ss.add(files(
-  'bootdevice.c',
-  'dma-helpers.c',
-  'qdev-monitor.c',
-), sdl)
-
-softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
-softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp])
-softmmu_ss.add(when: fdt, if_true: files('device_tree.c'))
 
 common_ss.add(files('cpus-common.c'))
 
diff --git a/bootdevice.c b/softmmu/bootdevice.c
similarity index 100%
rename from bootdevice.c
rename to softmmu/bootdevice.c
diff --git a/device_tree.c b/softmmu/device_tree.c
similarity index 100%
rename from device_tree.c
rename to softmmu/device_tree.c
diff --git a/dma-helpers.c b/softmmu/dma-helpers.c
similarity index 100%
rename from dma-helpers.c
rename to softmmu/dma-helpers.c
diff --git a/softmmu/meson.build b/softmmu/meson.build
index 36c96e7b15..862ab24878 100644
--- a/softmmu/meson.build
+++ b/softmmu/meson.build
@@ -14,3 +14,13 @@  specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files(
 specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: [files(
   'icount.c'
 )])
+
+softmmu_ss.add(files(
+  'bootdevice.c',
+  'dma-helpers.c',
+  'qdev-monitor.c',
+), sdl)
+
+softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
+softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp])
+softmmu_ss.add(when: fdt, if_true: files('device_tree.c'))
diff --git a/qdev-monitor.c b/softmmu/qdev-monitor.c
similarity index 100%
rename from qdev-monitor.c
rename to softmmu/qdev-monitor.c
diff --git a/qemu-seccomp.c b/softmmu/qemu-seccomp.c
similarity index 100%
rename from qemu-seccomp.c
rename to softmmu/qemu-seccomp.c
diff --git a/tpm.c b/softmmu/tpm.c
similarity index 100%
rename from tpm.c
rename to softmmu/tpm.c