qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] f9a6bc: accel: Restrict sysemu stubs to syste


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] f9a6bc: accel: Restrict sysemu stubs to system emulation
Date: Mon, 07 Mar 2022 11:13:16 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f9a6bcce02e457dadb7288e825cc3c44101afd90
      
https://github.com/qemu/qemu/commit/f9a6bcce02e457dadb7288e825cc3c44101afd90
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/stubs/meson.build

  Log Message:
  -----------
  accel: Restrict sysemu stubs to system emulation

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-2-f4bug@amsat.org>


  Commit: be0d87acae0915766d4790c18c0368b9508398ac
      
https://github.com/qemu/qemu/commit/be0d87acae0915766d4790c18c0368b9508398ac
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/meson.build

  Log Message:
  -----------
  accel/meson: Only build hw virtualization with system emulation

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-3-f4bug@amsat.org>


  Commit: 06445fbdb6fe5b897e9808578cad65ca76a07cad
      
https://github.com/qemu/qemu/commit/06445fbdb6fe5b897e9808578cad65ca76a07cad
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/exec/cpu-common.h
    M include/hw/core/cpu.h

  Log Message:
  -----------
  exec: Declare vaddr as a generic target-agnostic type

Move vaddr type declaration to the generic "exec/cpu-common.h" header.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-4-f4bug@amsat.org>


  Commit: 73842ef04a1fd2eedb2b4031de671dc1a92862bc
      
https://github.com/qemu/qemu/commit/73842ef04a1fd2eedb2b4031de671dc1a92862bc
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M cpu.c
    M include/exec/cpu-all.h
    M include/exec/cpu-common.h
    M softmmu/cpus.c
    M softmmu/physmem.c

  Log Message:
  -----------
  exec: Make cpu_memory_rw_debug() target agnostic

cpu_memory_rw_debug() is declared in "exec/cpu-all.h" which
contains target-specific declarations. To be able to use it
from target agnostic source, move the declaration to the
generic "exec/cpu-common.h" header.

Replace the target-specific 'target_ulong' type by 'vaddr'
which better reflects the argument type, and is target agnostic.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-5-f4bug@amsat.org>


  Commit: 4e27e765419818f3f20d3a86dc1baa6e419ace96
      
https://github.com/qemu/qemu/commit/4e27e765419818f3f20d3a86dc1baa6e419ace96
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/sysemu/memory_mapping.h
    M softmmu/memory_mapping.c

  Log Message:
  -----------
  sysemu/memory_mapping: Become target-agnostic

target_ulong is target-specific, while vaddr isn't.

Remove the unnecessary "exec/cpu-defs.h" target-speficic header
from "memory_mapping.h" and use the target-agnostic "hw/core/cpu.h"
locally in memory_mapping.c.

Remove "exec/memory.h" since MemoryRegion is forward-declared in
"qemu/typedefs.h".

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-6-f4bug@amsat.org>


  Commit: 82bd4ca37cb0dfa65e00dc54ca103940279d98b5
      
https://github.com/qemu/qemu/commit/82bd4ca37cb0dfa65e00dc54ca103940279d98b5
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/sysemu/kvm.h

  Log Message:
  -----------
  sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target agnostic

kvm_on_sigbus() and kvm_on_sigbus_vcpu() prototypes don't have
to be target specific. Remove this limitation to be able to build
softmmu/cpus.c once for all targets.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-7-f4bug@amsat.org>


  Commit: f94bee49d2f391a8bf1b1f9a3353b7b9fdb8ca20
      
https://github.com/qemu/qemu/commit/f94bee49d2f391a8bf1b1f9a3353b7b9fdb8ca20
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/stubs/kvm-stub.c

  Log Message:
  -----------
  accel/kvm: Simplify user-mode #ifdef'ry

Now than we only build this stub with system emulation,
remove the user-mode #ifdef'ry.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-8-f4bug@amsat.org>


  Commit: b04363c24055f3cc9a458bf723ebebdfbabb578c
      
https://github.com/qemu/qemu/commit/b04363c24055f3cc9a458bf723ebebdfbabb578c
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/stubs/hax-stub.c
    M include/sysemu/hax.h
    M target/i386/hax/hax-all.c

  Log Message:
  -----------
  accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE

Mirror "sysemu/kvm.h" #ifdef'ry to define CONFIG_HAX_IS_POSSIBLE,
expose hax_allowed to hax_enabled() macro.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-9-f4bug@amsat.org>


  Commit: 5f74af8bab3978b766bdf78255079da3b8a1a888
      
https://github.com/qemu/qemu/commit/5f74af8bab3978b766bdf78255079da3b8a1a888
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M softmmu/cpus.c

  Log Message:
  -----------
  softmmu/cpus: Code movement

We want cpu_thread_is_idle() to use cpus_accel, so declare this
variable earlier.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-10-f4bug@amsat.org>


  Commit: ad7d684dfde391de6fe5c0680f73097072fbf03a
      
https://github.com/qemu/qemu/commit/ad7d684dfde391de6fe5c0680f73097072fbf03a
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/kvm/kvm-accel-ops.c
    M include/sysemu/accel-ops.h
    M softmmu/cpus.c
    M target/i386/whpx/whpx-accel-ops.c

  Log Message:
  -----------
  accel: Introduce AccelOpsClass::cpu_thread_is_idle()

Add cpu_thread_is_idle() to AccelOps, and implement it for the
KVM / WHPX accelerators.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-11-f4bug@amsat.org>


  Commit: 3919635582856abc7e3702c6af05f04f38b086e9
      
https://github.com/qemu/qemu/commit/3919635582856abc7e3702c6af05f04f38b086e9
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/kvm/kvm-accel-ops.c
    M include/sysemu/accel-ops.h
    M include/sysemu/hw_accel.h
    M softmmu/cpus.c

  Log Message:
  -----------
  accel: Introduce AccelOpsClass::cpus_are_resettable()

Add cpus_are_resettable() to AccelOps, and implement it for the
KVM accelerator.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-12-f4bug@amsat.org>


  Commit: 89ad3e6ad9ad0e40e2c587e6e71ae5a51d420069
      
https://github.com/qemu/qemu/commit/89ad3e6ad9ad0e40e2c587e6e71ae5a51d420069
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M softmmu/globals.c

  Log Message:
  -----------
  softmmu/globals: Remove unused 'hw/i386/*' headers

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-13-f4bug@amsat.org>


  Commit: 464868a343909fde80cfbfe3216212e85218f9a7
      
https://github.com/qemu/qemu/commit/464868a343909fde80cfbfe3216212e85218f9a7
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M softmmu/physmem.c

  Log Message:
  -----------
  softmmu/physmem: Remove unnecessary include

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-14-f4bug@amsat.org>


  Commit: c1747dfd4a2ffad6d9e8067fc41a759ff5efbc1d
      
https://github.com/qemu/qemu/commit/c1747dfd4a2ffad6d9e8067fc41a759ff5efbc1d
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M softmmu/cpu-timers.c

  Log Message:
  -----------
  softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-16-f4bug@amsat.org>


  Commit: b57dfb0f30383facb5469642d70a4ccb1efd2343
      
https://github.com/qemu/qemu/commit/b57dfb0f30383facb5469642d70a4ccb1efd2343
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/qtest/qtest.c
    M target/alpha/translate.c
    M tests/unit/ptimer-test-stubs.c

  Log Message:
  -----------
  misc: Remove unnecessary "sysemu/cpu-timers.h" include

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-17-f4bug@amsat.org>


  Commit: 03ff4f8df9428f8a489f7220976b8533e85e9c15
      
https://github.com/qemu/qemu/commit/03ff4f8df9428f8a489f7220976b8533e85e9c15
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/tcg/tcg-accel-ops-icount.c
    M accel/tcg/tcg-accel-ops-mttcg.c
    M accel/tcg/tcg-accel-ops-rr.c
    M accel/tcg/tcg-accel-ops.c
    M include/exec/exec-all.h
    M target/riscv/csr.c

  Log Message:
  -----------
  misc: Add missing "sysemu/cpu-timers.h" include

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-18-f4bug@amsat.org>


  Commit: e52fc5e15606a270f5961a231b3806b1bba689d5
      
https://github.com/qemu/qemu/commit/e52fc5e15606a270f5961a231b3806b1bba689d5
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/exec/gdbstub.h

  Log Message:
  -----------
  exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic

gdb_exit() and gdb_set_stop_cpu() prototypes don't have to be
target specific. Remove this limitation to be able to build
softmmu/cpus.c and softmmu/runstate.c once for all targets.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-19-f4bug@amsat.org>


  Commit: 1f649fe088fc6ac119ebdffa9a7691f25a02e937
      
https://github.com/qemu/qemu/commit/1f649fe088fc6ac119ebdffa9a7691f25a02e937
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/exec/cpu-common.h
    M include/exec/exec-all.h

  Log Message:
  -----------
  exec/cpu: Make address_space_init/reloading_memory_map target agnostic

cpu_address_space_init() and cpu_reloading_memory_map() are
target-agnostic, but are declared in "exec/exec-all.h" which
contains target-specific declarations. Any target-agnostic
source including "exec/exec-all.h" becomes target-specific and
we have to compile it N times for the N targets built.  In order
to avoid that, move the declarations to "exec/cpu-common.h" which
only contains target-agnostic declarations.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-20-f4bug@amsat.org>


  Commit: c80cafa0c73cafa2d24236913a16eb68d505ab06
      
https://github.com/qemu/qemu/commit/c80cafa0c73cafa2d24236913a16eb68d505ab06
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/sysemu/arch_init.h
    M softmmu/arch_init.c
    M softmmu/vl.c

  Log Message:
  -----------
  softmmu: Add qemu_init_arch_modules()

module_allow_arch() is the single target-specific call in the
whole vl.c file. Move the module initialization out to arch_init.c,
that way we'll be able to build vl.o once for all targets (the
next commit).

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-21-f4bug@amsat.org>


  Commit: e0220bb5b200efab9b8c7f5b1beb4ddd934a3ea9
      
https://github.com/qemu/qemu/commit/e0220bb5b200efab9b8c7f5b1beb4ddd934a3ea9
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M softmmu/meson.build

  Log Message:
  -----------
  softmmu: Build target-agnostic objects once

Various softmmu objects aren't target specific. Move them
to the generic softmmu source set.

For our 31 softmmu targets, this is in total 330 objects
less to build!

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-22-f4bug@amsat.org>


  Commit: c593d841f879d02c589f99c79f1f21c44b789042
      
https://github.com/qemu/qemu/commit/c593d841f879d02c589f99c79f1f21c44b789042
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: Display libfdt as disabled when system emulation is disabled

When configuring QEMU with --disable-system, meson keeps showing
libfdt as "auto". Mark it as disabled instead.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-2-f4bug@amsat.org>


  Commit: f1d4d9fc91ad0a50f50da26717ae783cab071728
      
https://github.com/qemu/qemu/commit/f1d4d9fc91ad0a50f50da26717ae783cab071728
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/exec/cpu_ldst.h

  Log Message:
  -----------
  exec/cpu_ldst: Include 'cpu.h' to get target_ulong definition

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-5-f4bug@amsat.org>


  Commit: 3b04508cceda452a57b4ff1eee53466bdf763d6f
      
https://github.com/qemu/qemu/commit/3b04508cceda452a57b4ff1eee53466bdf763d6f
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M cpu.c

  Log Message:
  -----------
  cpu: Add missing 'exec/exec-all.h' and 'qemu/accel.h' headers

cpu.c requires "exec/exec-all.h" to call tlb_flush() and
"qemu/accel.h" to call accel_cpu_realizefn().

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-6-f4bug@amsat.org>


  Commit: b28b366df6993031812b606cd96a43b077ccf940
      
https://github.com/qemu/qemu/commit/b28b366df6993031812b606cd96a43b077ccf940
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M target/i386/tcg/sysemu/excp_helper.c
    M target/i386/tcg/sysemu/misc_helper.c

  Log Message:
  -----------
  target/i386/tcg/sysemu: Include missing 'exec/exec-all.h' header

excp_helper.c requires "exec/exec-all.h" for tlb_set_page_with_attrs()
and misc_helper.c for tlb_flush().

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-8-f4bug@amsat.org>


  Commit: a38d55705bcd724158dab2db9dabad8b7ddf9a77
      
https://github.com/qemu/qemu/commit/a38d55705bcd724158dab2db9dabad8b7ddf9a77
  Author: Taylor Simpson <tsimpson@quicinc.com>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M target/hexagon/cpu.h

  Log Message:
  -----------
  Hexagon (target/hexagon) convert to OBJECT_DECLARE_TYPE

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220211033034.21107-1-tsimpson@quicinc.com>
[PMD: Add missing "qom/object.h" include]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  Commit: 3cb1a410efb5d246862d7f1c135963fd0a688d70
      
https://github.com/qemu/qemu/commit/3cb1a410efb5d246862d7f1c135963fd0a688d70
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M target/microblaze/mmu.h
    M target/mips/internal.h
    M target/nios2/mmu.h
    M target/riscv/pmp.h

  Log Message:
  -----------
  target: Include missing 'cpu.h'

These target-specific files use the target-specific CPU state
but lack to include "cpu.h"; i.e.:

    ../target/riscv/pmp.h:61:23: error: unknown type name 'CPURISCVState'
    void pmpcfg_csr_write(CPURISCVState *env, uint32_t reg_index,
                          ^
    ../target/nios2/mmu.h:43:18: error: unknown type name 'CPUNios2State'
    void mmu_flip_um(CPUNios2State *env, unsigned int um);
                     ^
    ../target/microblaze/mmu.h:88:19: error: unknown type name 'CPUMBState'; 
did you mean 'CPUState'?
    uint32_t mmu_read(CPUMBState *env, bool ea, uint32_t rn);
                      ^~~~~~~~~~
                      CPUState

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-10-f4bug@amsat.org>


  Commit: a01bab6507fc240a1e1e2f2e456594fc6927c0a5
      
https://github.com/qemu/qemu/commit/a01bab6507fc240a1e1e2f2e456594fc6927c0a5
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M target/hexagon/cpu.h

  Log Message:
  -----------
  target/hexagon: Add missing 'hw/core/cpu.h' include

HexagonCPU field parent_class is of type CPUClass, which
is declared in "hw/core/cpu.h".

Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-11-f4bug@amsat.org>


  Commit: 36861198754af7577c73cdb19e1e385c933bfdc8
      
https://github.com/qemu/qemu/commit/36861198754af7577c73cdb19e1e385c933bfdc8
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M target/arm/hvf_arm.h
    M target/i386/hvf/x86_emu.c
    M target/i386/hvf/x86_emu.h
    M target/i386/nvmm/nvmm-all.c
    M target/i386/whpx/whpx-all.c
    M target/mips/internal.h
    M target/openrisc/cpu.h
    M target/xtensa/cpu.h

  Log Message:
  -----------
  target: Use forward declared type instead of structure type

The CPU / CPU state are forward declared.

  $ git grep -E 'struct [A-Za-z]+CPU\ \*'
  target/arm/hvf_arm.h:16:void hvf_arm_set_cpu_features_from_host(struct ARMCPU 
*cpu);
  target/openrisc/cpu.h:234:    int (*cpu_openrisc_map_address_code)(struct 
OpenRISCCPU *cpu,
  target/openrisc/cpu.h:238:    int (*cpu_openrisc_map_address_data)(struct 
OpenRISCCPU *cpu,

  $ git grep -E 'struct CPU[A-Za-z0-9]+State\ \*'
  target/mips/internal.h:137:    int (*map_address)(struct CPUMIPSState *env, 
hwaddr *physical, int *prot,
  target/mips/internal.h:139:    void (*helper_tlbwi)(struct CPUMIPSState *env);
  target/mips/internal.h:140:    void (*helper_tlbwr)(struct CPUMIPSState *env);
  target/mips/internal.h:141:    void (*helper_tlbp)(struct CPUMIPSState *env);
  target/mips/internal.h:142:    void (*helper_tlbr)(struct CPUMIPSState *env);
  target/mips/internal.h:143:    void (*helper_tlbinv)(struct CPUMIPSState 
*env);
  target/mips/internal.h:144:    void (*helper_tlbinvf)(struct CPUMIPSState 
*env);
  target/xtensa/cpu.h:347:    struct CPUXtensaState *env;
  ...

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-12-f4bug@amsat.org>


  Commit: 1ea4a06af0f6578e5d0ddcea148503290b1c4907
      
https://github.com/qemu/qemu/commit/1ea4a06af0f6578e5d0ddcea148503290b1c4907
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/exec/poison.h
    M include/hw/core/cpu.h
    M include/qemu/typedefs.h
    M target/alpha/cpu.h
    M target/arm/cpu.h
    M target/avr/cpu.h
    M target/cris/cpu.h
    M target/hexagon/cpu.h
    M target/hppa/cpu.h
    M target/i386/cpu.h
    M target/m68k/cpu.h
    M target/microblaze/cpu.h
    M target/mips/cpu.h
    M target/nios2/cpu.h
    M target/openrisc/cpu.h
    M target/ppc/cpu-qom.h
    M target/ppc/cpu.h
    M target/riscv/cpu.h
    M target/rx/cpu-qom.h
    M target/rx/cpu.h
    M target/s390x/cpu-qom.h
    M target/s390x/cpu.h
    M target/sh4/cpu.h
    M target/sparc/cpu.h
    M target/tricore/cpu.h
    M target/xtensa/cpu.h

  Log Message:
  -----------
  target: Use CPUArchState as interface to target-specific CPU state

While CPUState is our interface with generic code, CPUArchState is
our interface with target-specific code. Use CPUArchState as an
abstract type, defined by each target.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-13-f4bug@amsat.org>


  Commit: 9295b1aa92d3efb3c08b71ee751fbfd83ea02f4d
      
https://github.com/qemu/qemu/commit/9295b1aa92d3efb3c08b71ee751fbfd83ea02f4d
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/hw/core/cpu.h
    M target/alpha/cpu-qom.h
    M target/alpha/cpu.h
    M target/arm/cpu-qom.h
    M target/arm/cpu.h
    M target/avr/cpu-qom.h
    M target/avr/cpu.h
    M target/cris/cpu-qom.h
    M target/cris/cpu.h
    M target/hexagon/cpu.h
    M target/hppa/cpu-qom.h
    M target/hppa/cpu.h
    M target/i386/cpu-qom.h
    M target/i386/cpu.h
    M target/m68k/cpu-qom.h
    M target/m68k/cpu.h
    M target/microblaze/cpu-qom.h
    M target/microblaze/cpu.h
    M target/mips/cpu-qom.h
    M target/mips/cpu.h
    M target/nios2/cpu.h
    M target/openrisc/cpu.h
    M target/ppc/cpu-qom.h
    M target/ppc/cpu.h
    M target/riscv/cpu.h
    M target/rx/cpu-qom.h
    M target/rx/cpu.h
    M target/s390x/cpu-qom.h
    M target/s390x/cpu.h
    M target/sh4/cpu-qom.h
    M target/sh4/cpu.h
    M target/sparc/cpu-qom.h
    M target/sparc/cpu.h
    M target/tricore/cpu-qom.h
    M target/tricore/cpu.h
    M target/xtensa/cpu-qom.h
    M target/xtensa/cpu.h

  Log Message:
  -----------
  target: Introduce and use OBJECT_DECLARE_CPU_TYPE() macro

Replace the boilerplate code to declare CPU QOM types
and macros, and forward-declare the CPU instance type.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-14-f4bug@amsat.org>


  Commit: b36e239e08a031025e52c4191198ee8381e2e6de
      
https://github.com/qemu/qemu/commit/b36e239e08a031025e52c4191198ee8381e2e6de
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M include/hw/core/cpu.h
    M include/qemu/typedefs.h
    M target/alpha/cpu.h
    M target/arm/cpu.h
    M target/avr/cpu.h
    M target/cris/cpu.h
    M target/hexagon/cpu.h
    M target/hppa/cpu.h
    M target/i386/cpu.h
    M target/m68k/cpu.h
    M target/microblaze/cpu.h
    M target/mips/cpu.h
    M target/nios2/cpu.h
    M target/openrisc/cpu.h
    M target/ppc/cpu.h
    M target/riscv/cpu.h
    M target/rx/cpu.h
    M target/s390x/cpu.h
    M target/sh4/cpu.h
    M target/sparc/cpu.h
    M target/tricore/cpu.h
    M target/xtensa/cpu.h

  Log Message:
  -----------
  target: Use ArchCPU as interface to target CPU

ArchCPU is our interface with target-specific code. Use it as
a forward-declared opaque pointer (abstract type), having its
structure defined by each target.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220214183144.27402-15-f4bug@amsat.org>


  Commit: 95e862d72cb0a0de4c6053337a76ec84be717a4f
      
https://github.com/qemu/qemu/commit/95e862d72cb0a0de4c6053337a76ec84be717a4f
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M target/i386/hax/hax-all.c
    M target/i386/nvmm/nvmm-all.c
    M target/i386/whpx/whpx-all.c

  Log Message:
  -----------
  target/i386: Remove pointless CPUArchState casts

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220305233415.64627-3-philippe.mathieu.daude@gmail.com>


  Commit: 61deada4bf54fddf1bc36e15c16269c33462aa90
      
https://github.com/qemu/qemu/commit/61deada4bf54fddf1bc36e15c16269c33462aa90
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M accel/tcg/cpu-exec.c

  Log Message:
  -----------
  accel/tcg: Remove pointless CPUArchState casts

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220305233415.64627-2-philippe.mathieu.daude@gmail.com>


  Commit: 99c4a9e68eafade057e33906d23b2face24ca1ff
      
https://github.com/qemu/qemu/commit/99c4a9e68eafade057e33906d23b2face24ca1ff
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    M accel/kvm/kvm-accel-ops.c
    M accel/meson.build
    M accel/qtest/qtest.c
    M accel/stubs/hax-stub.c
    M accel/stubs/kvm-stub.c
    M accel/stubs/meson.build
    M accel/tcg/cpu-exec.c
    M accel/tcg/tcg-accel-ops-icount.c
    M accel/tcg/tcg-accel-ops-mttcg.c
    M accel/tcg/tcg-accel-ops-rr.c
    M accel/tcg/tcg-accel-ops.c
    M cpu.c
    M include/exec/cpu-all.h
    M include/exec/cpu-common.h
    M include/exec/cpu_ldst.h
    M include/exec/exec-all.h
    M include/exec/gdbstub.h
    M include/exec/poison.h
    M include/hw/core/cpu.h
    M include/qemu/typedefs.h
    M include/sysemu/accel-ops.h
    M include/sysemu/arch_init.h
    M include/sysemu/hax.h
    M include/sysemu/hw_accel.h
    M include/sysemu/kvm.h
    M include/sysemu/memory_mapping.h
    M meson.build
    M softmmu/arch_init.c
    M softmmu/cpu-timers.c
    M softmmu/cpus.c
    M softmmu/globals.c
    M softmmu/memory_mapping.c
    M softmmu/meson.build
    M softmmu/physmem.c
    M softmmu/vl.c
    M target/alpha/cpu-qom.h
    M target/alpha/cpu.h
    M target/alpha/translate.c
    M target/arm/cpu-qom.h
    M target/arm/cpu.h
    M target/arm/hvf_arm.h
    M target/avr/cpu-qom.h
    M target/avr/cpu.h
    M target/cris/cpu-qom.h
    M target/cris/cpu.h
    M target/hexagon/cpu.h
    M target/hppa/cpu-qom.h
    M target/hppa/cpu.h
    M target/i386/cpu-qom.h
    M target/i386/cpu.h
    M target/i386/hax/hax-all.c
    M target/i386/hvf/x86_emu.c
    M target/i386/hvf/x86_emu.h
    M target/i386/nvmm/nvmm-all.c
    M target/i386/tcg/sysemu/excp_helper.c
    M target/i386/tcg/sysemu/misc_helper.c
    M target/i386/whpx/whpx-accel-ops.c
    M target/i386/whpx/whpx-all.c
    M target/m68k/cpu-qom.h
    M target/m68k/cpu.h
    M target/microblaze/cpu-qom.h
    M target/microblaze/cpu.h
    M target/microblaze/mmu.h
    M target/mips/cpu-qom.h
    M target/mips/cpu.h
    M target/mips/internal.h
    M target/nios2/cpu.h
    M target/nios2/mmu.h
    M target/openrisc/cpu.h
    M target/ppc/cpu-qom.h
    M target/ppc/cpu.h
    M target/riscv/cpu.h
    M target/riscv/csr.c
    M target/riscv/pmp.h
    M target/rx/cpu-qom.h
    M target/rx/cpu.h
    M target/s390x/cpu-qom.h
    M target/s390x/cpu.h
    M target/sh4/cpu-qom.h
    M target/sh4/cpu.h
    M target/sparc/cpu-qom.h
    M target/sparc/cpu.h
    M target/tricore/cpu-qom.h
    M target/tricore/cpu.h
    M target/xtensa/cpu-qom.h
    M target/xtensa/cpu.h
    M tests/unit/ptimer-test-stubs.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/philmd/tags/abstract-arch-cpu-20220307' 
into staging

- Re-org accel/ and softmmu/ to have more target-agnostic objects.

- Use CPUArchState as an abstract type, defined by each target
  (CPUState is our interface with generic code, CPUArchState is
   our interface with target-specific code).

# gpg: Signature made Sun 06 Mar 2022 23:23:19 GMT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" 
[unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd/tags/abstract-arch-cpu-20220307: (33 commits)
  accel/tcg: Remove pointless CPUArchState casts
  target/i386: Remove pointless CPUArchState casts
  target: Use ArchCPU as interface to target CPU
  target: Introduce and use OBJECT_DECLARE_CPU_TYPE() macro
  target: Use CPUArchState as interface to target-specific CPU state
  target: Use forward declared type instead of structure type
  target/hexagon: Add missing 'hw/core/cpu.h' include
  target: Include missing 'cpu.h'
  Hexagon (target/hexagon) convert to OBJECT_DECLARE_TYPE
  target/i386/tcg/sysemu: Include missing 'exec/exec-all.h' header
  cpu: Add missing 'exec/exec-all.h' and 'qemu/accel.h' headers
  exec/cpu_ldst: Include 'cpu.h' to get target_ulong definition
  meson: Display libfdt as disabled when system emulation is disabled
  softmmu: Build target-agnostic objects once
  softmmu: Add qemu_init_arch_modules()
  exec/cpu: Make address_space_init/reloading_memory_map target agnostic
  exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic
  misc: Add missing "sysemu/cpu-timers.h" include
  misc: Remove unnecessary "sysemu/cpu-timers.h" include
  softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header
  ...

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


Compare: https://github.com/qemu/qemu/compare/b49872aa8fc0...99c4a9e68eaf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]