[PATCH 4/4] hw/ppc/spapr: Rename 'softmmu' -> 'tcg'

Philippe Mathieu-Daudé posted 4 patches 2 years, 4 months ago
Maintainers: Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, "Cédric Le Goater" <clg@kaod.org>, David Gibson <david@gibson.dropbear.id.au>, Harsh Prateek Bora <harshpb@linux.ibm.com>
[PATCH 4/4] hw/ppc/spapr: Rename 'softmmu' -> 'tcg'
Posted by Philippe Mathieu-Daudé 2 years, 4 months ago
spapr_softmmu.c isn't related to having a soft MMU, but having
the TCG accelerator. Rename it using the 'tcg' suffix.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/ppc/{spapr_softmmu.c => spapr_tcg.c} | 0
 hw/ppc/meson.build                      | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename hw/ppc/{spapr_softmmu.c => spapr_tcg.c} (100%)

diff --git a/hw/ppc/spapr_softmmu.c b/hw/ppc/spapr_tcg.c
similarity index 100%
rename from hw/ppc/spapr_softmmu.c
rename to hw/ppc/spapr_tcg.c
diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
index 7c2c52434a..281100a58d 100644
--- a/hw/ppc/meson.build
+++ b/hw/ppc/meson.build
@@ -31,7 +31,7 @@ ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files(
   'pef.c',
 ))
 ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_TCG'], if_true: files(
-  'spapr_softmmu.c',
+  'spapr_tcg.c',
 ))
 ppc_ss.add(when: 'CONFIG_SPAPR_RNG', if_true: files('spapr_rng.c'))
 ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_LINUX'], if_true: files(
-- 
2.41.0


Re: [PATCH 4/4] hw/ppc/spapr: Rename 'softmmu' -> 'tcg'
Posted by David Gibson 2 years, 4 months ago
On Mon, Oct 02, 2023 at 04:38:54PM +0200, Philippe Mathieu-Daudé wrote:
> spapr_softmmu.c isn't related to having a soft MMU, but having
> the TCG accelerator. Rename it using the 'tcg' suffix.

That's not really accurate.  The functions in there absolutely are
about the emulated MMU.  They're not needed for KVM, because KVM has
its own MMU emulation, but they're not strictly speaking related to TCG.

> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  hw/ppc/{spapr_softmmu.c => spapr_tcg.c} | 0
>  hw/ppc/meson.build                      | 2 +-
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename hw/ppc/{spapr_softmmu.c => spapr_tcg.c} (100%)
> 
> diff --git a/hw/ppc/spapr_softmmu.c b/hw/ppc/spapr_tcg.c
> similarity index 100%
> rename from hw/ppc/spapr_softmmu.c
> rename to hw/ppc/spapr_tcg.c
> diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
> index 7c2c52434a..281100a58d 100644
> --- a/hw/ppc/meson.build
> +++ b/hw/ppc/meson.build
> @@ -31,7 +31,7 @@ ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files(
>    'pef.c',
>  ))
>  ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_TCG'], if_true: files(
> -  'spapr_softmmu.c',
> +  'spapr_tcg.c',
>  ))
>  ppc_ss.add(when: 'CONFIG_SPAPR_RNG', if_true: files('spapr_rng.c'))
>  ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_LINUX'], if_true: files(

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Re: [PATCH 4/4] hw/ppc/spapr: Rename 'softmmu' -> 'tcg'
Posted by Nicholas Piggin 2 years, 3 months ago
On Tue Oct 3, 2023 at 12:07 PM AEST, David Gibson wrote:
> On Mon, Oct 02, 2023 at 04:38:54PM +0200, Philippe Mathieu-Daudé wrote:
> > spapr_softmmu.c isn't related to having a soft MMU, but having
> > the TCG accelerator. Rename it using the 'tcg' suffix.
>
> That's not really accurate.  The functions in there absolutely are
> about the emulated MMU.  They're not needed for KVM, because KVM has
> its own MMU emulation, but they're not strictly speaking related to TCG.

Not sure what to do with these.

The spapr facilities names AFAIK don't really differentiate between
when they are supplied for KVM vs TCG, so we could use spapr_mmu.c
or spapr_hpt.c. Or leave as softmmu? Anyone have preferences? I like
hpt.

softmmu_resize_hpt_* could go to spapr_resize_hpt_*

Thanks,
Nick

>
> > 
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > ---
> >  hw/ppc/{spapr_softmmu.c => spapr_tcg.c} | 0
> >  hw/ppc/meson.build                      | 2 +-
> >  2 files changed, 1 insertion(+), 1 deletion(-)
> >  rename hw/ppc/{spapr_softmmu.c => spapr_tcg.c} (100%)
> > 
> > diff --git a/hw/ppc/spapr_softmmu.c b/hw/ppc/spapr_tcg.c
> > similarity index 100%
> > rename from hw/ppc/spapr_softmmu.c
> > rename to hw/ppc/spapr_tcg.c
> > diff --git a/hw/ppc/meson.build b/hw/ppc/meson.build
> > index 7c2c52434a..281100a58d 100644
> > --- a/hw/ppc/meson.build
> > +++ b/hw/ppc/meson.build
> > @@ -31,7 +31,7 @@ ppc_ss.add(when: 'CONFIG_PSERIES', if_true: files(
> >    'pef.c',
> >  ))
> >  ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_TCG'], if_true: files(
> > -  'spapr_softmmu.c',
> > +  'spapr_tcg.c',
> >  ))
> >  ppc_ss.add(when: 'CONFIG_SPAPR_RNG', if_true: files('spapr_rng.c'))
> >  ppc_ss.add(when: ['CONFIG_PSERIES', 'CONFIG_LINUX'], if_true: files(