mbox

[PULL,00/71] HW core patches for 2024-01-05

Message ID 20240105154307.21385-1-philmd@linaro.org
State New
Headers show

Pull-request

https://github.com/philmd/qemu.git tags/hw-cpus-20240105

Message

Philippe Mathieu-Daudé Jan. 5, 2024, 3:41 p.m. UTC
The following changes since commit 05470c3979d5485003e129ff4b0c2ef98af91d86:

  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-01-04 19:55:20 +0000)

are available in the Git repository at:

  https://github.com/philmd/qemu.git tags/hw-cpus-20240105

for you to fetch changes up to a318da6b3f6a88e6cfd6953c519def9457e8962f:

  target/sparc: Simplify qemu_irq_ack (2024-01-05 16:20:15 +0100)

----------------------------------------------------------------
HW core patch queue

- Unify CPU QOM type checks (Gavin)
- Simplify uses of some CPU related property (Philippe)
  (start-powered-off, ARM reset-cbar and mp-affinity)
- Header and documentation cleanups (Zhao, Philippe)
- Have Memory API return boolean indicating possible error
- Fix frame filter mask in CAN sja1000 model (Pavel)
- QOM embed MCF5206 timer into SoC (Thomas)
- Simplify LEON3 qemu_irq_ack handler (Clément)

----------------------------------------------------------------

Clément Chigot (1):
  target/sparc: Simplify qemu_irq_ack

Gavin Shan (29):
  target/alpha: Remove fallback to ev67 cpu class
  target/hppa: Remove object_class_is_abstract()
  cpu: Add helper cpu_model_from_type()
  cpu: Add generic cpu_list()
  target/alpha: Use generic cpu_list()
  target/arm: Use generic cpu_list()
  target/avr: Use generic cpu_list()
  target/cris: Use generic cpu_list()
  target/hexagon: Use generic cpu_list()
  target/hppa: Use generic cpu_list()
  target/loongarch: Use generic cpu_list()
  target/m68k: Use generic cpu_list()
  target/mips: Use generic cpu_list()
  target/openrisc: Use generic cpu_list()
  target/riscv: Use generic cpu_list()
  target/rx: Use generic cpu_list()
  target/sh4: Use generic cpu_list()
  target/tricore: Use generic cpu_list()
  target/xtensa: Use generic cpu_list()
  target: Use generic cpu_model_from_type()
  machine: Use error handling when CPU type is checked
  machine: Introduce helper is_cpu_type_supported()
  machine: Improve is_cpu_type_supported()
  machine: Print CPU model name instead of CPU type
  hw/arm/virt: Hide host CPU model for tcg
  hw/arm/virt: Check CPU type in machine_run_board_init()
  hw/arm/sbsa-ref: Check CPU type in machine_run_board_init()
  hw/arm: Check CPU type in machine_run_board_init()
  hw/riscv/shakti_c: Check CPU type in machine_run_board_init()

Pavel Pisa (1):
  hw/net/can/sja1000: fix bug for single acceptance filter and standard
    frame

Philippe Mathieu-Daudé (37):
  meson: Allow building binary with no target-specific files in hw/
  cpu: Call object_class_dynamic_cast() once in cpu_class_by_name()
  hw/core: Add machine_class_default_cpu_type()
  hw/core/cpu: Remove final vestiges of dynamic state tracing
  hw/core/cpu: Update description of CPUState::node
  hw/audio/sb16: Do not migrate qdev properties
  hw/arm/bcm2836: Simplify use of 'reset-cbar' property
  hw/arm/bcm2836: Use ARM_CPU 'mp-affinity' property
  hw/ppc/spapr_cpu_core: Access QDev properties with proper API
  hw: Simplify accesses to the CPUState::'start-powered-off' property
  hw/ppc/xive2_regs: Remove unnecessary 'cpu.h' inclusion
  hw/mips: Inline 'bios.h' definitions
  memory: Have memory_region_init_ram_flags_nomigrate() return a boolean
  memory: Have memory_region_init_ram_nomigrate() handler return a
    boolean
  memory: Have memory_region_init_rom_nomigrate() handler return a
    boolean
  memory: Simplify memory_region_init_rom_nomigrate() calls
  memory: Simplify memory_region_init_ram_from_fd() calls
  memory: Have memory_region_init_ram() handler return a boolean
  memory: Have memory_region_init_rom() handler return a boolean
  memory: Have memory_region_init_rom_device_nomigrate() return a
    boolean
  memory: Simplify memory_region_init_rom_device_nomigrate() calls
  memory: Have memory_region_init_rom_device() handler return a boolean
  memory: Have memory_region_init_resizeable_ram() return a boolean
  memory: Have memory_region_init_ram_from_file() handler return a
    boolean
  memory: Have memory_region_init_ram_from_fd() handler return a boolean
  backends: Use g_autofree in HostMemoryBackendClass::alloc() handlers
  backends: Simplify host_memory_backend_memory_complete()
  backends: Have HostMemoryBackendClass::alloc() handler return a
    boolean
  backends: Reduce variable scope in host_memory_backend_memory_complete
  util/oslib: Have qemu_prealloc_mem() handler return a boolean
  misc: Simplify qemu_prealloc_mem() calls
  hw: Simplify memory_region_init_ram() calls
  hw/arm: Simplify memory_region_init_rom() calls
  hw/sparc: Simplify memory_region_init_ram_nomigrate() calls
  hw/misc: Simplify memory_region_init_ram_from_fd() calls
  hw/nvram: Simplify memory_region_init_rom_device() calls
  hw/pci-host/raven: Propagate error in raven_realize()

Thomas Huth (1):
  hw/m68k/mcf5206: Embed m5206_timer_state in m5206_mbar_state

Zhao Liu (2):
  hw/cpu/core: Cleanup unused included header in core.c
  hw/cpu/cluster: Cleanup unused included header in cluster.c

 meson.build                           |   8 +-
 include/exec/memory.h                 |  40 +++++--
 include/hw/boards.h                   |   6 ++
 include/hw/core/cpu.h                 |  18 +++-
 include/hw/mips/bios.h                |  14 ---
 include/hw/ppc/xive2_regs.h           |   2 +-
 include/qemu/osdep.h                  |   4 +-
 include/sysemu/hostmem.h              |  10 +-
 linux-user/alpha/target_elf.h         |   2 +-
 target/alpha/cpu.h                    |   3 -
 target/arm/cpu.h                      |   3 -
 target/avr/cpu.h                      |   2 -
 target/cris/cpu.h                     |   3 -
 target/hexagon/cpu.h                  |   3 -
 target/hppa/cpu.h                     |   3 -
 target/loongarch/cpu.h                |   4 -
 target/m68k/cpu.h                     |   4 -
 target/mips/cpu.h                     |   4 -
 target/openrisc/cpu.h                 |   3 -
 target/riscv/cpu.h                    |   2 -
 target/rx/cpu.h                       |   3 -
 target/sh4/cpu.h                      |   3 -
 target/sparc/cpu.h                    |   2 +-
 target/tricore/cpu.h                  |   4 -
 target/xtensa/cpu.h                   |   3 -
 backends/hostmem-epc.c                |  14 ++-
 backends/hostmem-file.c               |  22 ++--
 backends/hostmem-memfd.c              |  13 ++-
 backends/hostmem-ram.c                |  12 +--
 backends/hostmem.c                    | 144 ++++++++++++--------------
 bsd-user/main.c                       |   5 +-
 cpu-target.c                          |  44 +++++++-
 hw/arm/armsse.c                       |   6 +-
 hw/arm/armv7m.c                       |   8 +-
 hw/arm/aspeed_ast2400.c               |   6 +-
 hw/arm/aspeed_ast2600.c               |   6 +-
 hw/arm/bananapi_m2u.c                 |  12 +--
 hw/arm/bcm2836.c                      |  18 ++--
 hw/arm/cubieboard.c                   |  12 +--
 hw/arm/fsl-imx25.c                    |  19 ++--
 hw/arm/fsl-imx31.c                    |  19 ++--
 hw/arm/fsl-imx6.c                     |  19 ++--
 hw/arm/integratorcp.c                 |   7 +-
 hw/arm/mps2-tz.c                      |  26 +++--
 hw/arm/mps2.c                         |  26 +++--
 hw/arm/msf2-som.c                     |  12 +--
 hw/arm/musca.c                        |  12 +--
 hw/arm/npcm7xx_boards.c               |  12 +--
 hw/arm/nrf51_soc.c                    |   7 +-
 hw/arm/orangepi.c                     |  12 +--
 hw/arm/sbsa-ref.c                     |  36 ++-----
 hw/arm/virt.c                         |  60 ++++-------
 hw/audio/sb16.c                       |  10 +-
 hw/core/cpu-common.c                  |   8 +-
 hw/core/machine.c                     | 103 +++++++++++-------
 hw/cpu/cluster.c                      |   5 +-
 hw/cpu/core.c                         |   9 +-
 hw/m68k/mcf5206.c                     |  20 ++--
 hw/mips/cps.c                         |   7 +-
 hw/mips/jazz.c                        |  10 +-
 hw/mips/malta.c                       |   9 +-
 hw/mips/mipssim.c                     |  10 +-
 hw/misc/ivshmem.c                     |   8 +-
 hw/net/can/can_sja1000.c              |   2 +-
 hw/nvram/nrf51_nvm.c                  |   7 +-
 hw/pci-host/raven.c                   |   6 +-
 hw/ppc/e500.c                         |   2 +-
 hw/ppc/rs6000_mc.c                    |   7 +-
 hw/ppc/spapr_cpu_core.c               |   2 +-
 hw/riscv/shakti_c.c                   |  13 ++-
 hw/sparc/leon3.c                      |   8 +-
 hw/sparc/sun4m.c                      |  23 ++--
 hw/sparc64/sun4u.c                    |   7 +-
 hw/virtio/virtio-mem.c                |   6 +-
 system/memory.c                       |  69 +++++++-----
 system/vl.c                           |   2 +-
 target/alpha/cpu.c                    |  23 ----
 target/arm/arm-qmp-cmds.c             |   3 +-
 target/arm/cpu.c                      |   4 +-
 target/arm/helper.c                   |  46 --------
 target/avr/cpu.c                      |  23 +---
 target/cris/cpu.c                     |  42 +-------
 target/hexagon/cpu.c                  |  24 +----
 target/hppa/cpu.c                     |  32 +-----
 target/i386/cpu.c                     |   3 +-
 target/loongarch/cpu.c                |  23 +---
 target/loongarch/loongarch-qmp-cmds.c |   3 +-
 target/m68k/cpu.c                     |   4 +-
 target/m68k/helper.c                  |  40 -------
 target/mips/sysemu/mips-qmp-cmds.c    |   3 +-
 target/openrisc/cpu.c                 |  46 +-------
 target/ppc/cpu_init.c                 |   3 +-
 target/ppc/ppc-qmp-cmds.c             |   3 +-
 target/riscv/cpu.c                    |  36 +------
 target/riscv/riscv-qmp-cmds.c         |   3 +-
 target/rx/cpu.c                       |  16 ---
 target/sh4/cpu.c                      |  17 ---
 target/sparc/int32_helper.c           |   2 +-
 target/tricore/cpu.c                  |   4 +-
 target/tricore/helper.c               |  22 ----
 target/xtensa/cpu.c                   |   4 +-
 target/xtensa/helper.c                |   9 --
 util/oslib-posix.c                    |   7 +-
 util/oslib-win32.c                    |   4 +-
 target/mips/cpu-defs.c.inc            |   9 --
 105 files changed, 576 insertions(+), 977 deletions(-)
 delete mode 100644 include/hw/mips/bios.h

Comments

Philippe Mathieu-Daudé Jan. 5, 2024, 5:05 p.m. UTC | #1
On 5/1/24 16:41, Philippe Mathieu-Daudé wrote:
> The following changes since commit 05470c3979d5485003e129ff4b0c2ef98af91d86:
> 
>    Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-01-04 19:55:20 +0000)
> 
> are available in the Git repository at:
> 
>    https://github.com/philmd/qemu.git tags/hw-cpus-20240105
> 
> for you to fetch changes up to a318da6b3f6a88e6cfd6953c519def9457e8962f:
> 
>    target/sparc: Simplify qemu_irq_ack (2024-01-05 16:20:15 +0100)
> 
> ----------------------------------------------------------------
> HW core patch queue
> 
> - Unify CPU QOM type checks (Gavin)
> - Simplify uses of some CPU related property (Philippe)
>    (start-powered-off, ARM reset-cbar and mp-affinity)
> - Header and documentation cleanups (Zhao, Philippe)
> - Have Memory API return boolean indicating possible error
> - Fix frame filter mask in CAN sja1000 model (Pavel)
> - QOM embed MCF5206 timer into SoC (Thomas)
> - Simplify LEON3 qemu_irq_ack handler (Clément)
> 
> ----------------------------------------------------------------


> Philippe Mathieu-Daudé (37):

>    backends: Simplify host_memory_backend_memory_complete()

I neglected to run checkpatch.pl on this patch, so it lacks:

-- >8 --
diff --git a/backends/hostmem.c b/backends/hostmem.c
index 30f69b2cb5..987f6f591e 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -346,5 +346,7 @@ host_memory_backend_memory_complete(UserCreatable 
*uc, Error **errp)
      unsigned long maxnode = (lastbit + 1) % (MAX_NODES + 1);
-    /* ensure policy won't be ignored in case memory is preallocated
+    /*
+     * Ensure policy won't be ignored in case memory is preallocated
       * before mbind(). note: MPOL_MF_STRICT is ignored on hugepages so
-     * this doesn't catch hugepage case. */
+     * this doesn't catch hugepage case.
+     */
      unsigned flags = MPOL_MF_STRICT | MPOL_MF_MOVE;
@@ -365,3 +367,4 @@ host_memory_backend_memory_complete(UserCreatable 
*uc, Error **errp)

-    /* We can have up to MAX_NODES nodes, but we need to pass maxnode+1
+    /*
+     * We can have up to MAX_NODES nodes, but we need to pass maxnode+1
       * as argument to mbind() due to an old Linux bug (feature?) which
@@ -393,3 +396,4 @@ host_memory_backend_memory_complete(UserCreatable 
*uc, Error **errp)
  #endif
-    /* Preallocate memory after the NUMA policy has been instantiated.
+    /*
+     * Preallocate memory after the NUMA policy has been instantiated.
       * This is necessary to guarantee memory is allocated with
---

Since the PR is already in the testing pipeline:
- if it get merged, I'll send a cleanup patch
- otherwise if it fails I'll fix it.

Sorry for missing that.

Phil.
Peter Maydell Jan. 5, 2024, 6:43 p.m. UTC | #2
On Fri, 5 Jan 2024 at 17:05, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 5/1/24 16:41, Philippe Mathieu-Daudé wrote:
> > The following changes since commit 05470c3979d5485003e129ff4b0c2ef98af91d86:
> >
> >    Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-01-04 19:55:20 +0000)
> >
> > are available in the Git repository at:
> >
> >    https://github.com/philmd/qemu.git tags/hw-cpus-20240105
> >
> > for you to fetch changes up to a318da6b3f6a88e6cfd6953c519def9457e8962f:
> >
> >    target/sparc: Simplify qemu_irq_ack (2024-01-05 16:20:15 +0100)
> >
> > ----------------------------------------------------------------
> > HW core patch queue
> >
> > - Unify CPU QOM type checks (Gavin)
> > - Simplify uses of some CPU related property (Philippe)
> >    (start-powered-off, ARM reset-cbar and mp-affinity)
> > - Header and documentation cleanups (Zhao, Philippe)
> > - Have Memory API return boolean indicating possible error
> > - Fix frame filter mask in CAN sja1000 model (Pavel)
> > - QOM embed MCF5206 timer into SoC (Thomas)
> > - Simplify LEON3 qemu_irq_ack handler (Clément)
> >
> > ----------------------------------------------------------------
>
>
> > Philippe Mathieu-Daudé (37):
>
> >    backends: Simplify host_memory_backend_memory_complete()
>
> I neglected to run checkpatch.pl on this patch, so it lacks:
>
> -- >8 --
> diff --git a/backends/hostmem.c b/backends/hostmem.c
> index 30f69b2cb5..987f6f591e 100644
> --- a/backends/hostmem.c
> +++ b/backends/hostmem.c
> @@ -346,5 +346,7 @@ host_memory_backend_memory_complete(UserCreatable
> *uc, Error **errp)
>       unsigned long maxnode = (lastbit + 1) % (MAX_NODES + 1);
> -    /* ensure policy won't be ignored in case memory is preallocated
> +    /*
> +     * Ensure policy won't be ignored in case memory is preallocated
>        * before mbind(). note: MPOL_MF_STRICT is ignored on hugepages so
> -     * this doesn't catch hugepage case. */
> +     * this doesn't catch hugepage case.
> +     */
>       unsigned flags = MPOL_MF_STRICT | MPOL_MF_MOVE;
> @@ -365,3 +367,4 @@ host_memory_backend_memory_complete(UserCreatable
> *uc, Error **errp)
>
> -    /* We can have up to MAX_NODES nodes, but we need to pass maxnode+1
> +    /*
> +     * We can have up to MAX_NODES nodes, but we need to pass maxnode+1
>        * as argument to mbind() due to an old Linux bug (feature?) which
> @@ -393,3 +396,4 @@ host_memory_backend_memory_complete(UserCreatable
> *uc, Error **errp)
>   #endif
> -    /* Preallocate memory after the NUMA policy has been instantiated.
> +    /*
> +     * Preallocate memory after the NUMA policy has been instantiated.
>        * This is necessary to guarantee memory is allocated with
> ---
>
> Since the PR is already in the testing pipeline:
> - if it get merged, I'll send a cleanup patch
> - otherwise if it fails I'll fix it.

It just passed the last CI job on a retry, so please send a
followup patch.


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0
for any user-visible changes.

-- PMM