[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/37] accel/tcg: use current_machine as it is always set for soft
From: |
Paolo Bonzini |
Subject: |
[PULL 18/37] accel/tcg: use current_machine as it is always set for softmmu |
Date: |
Tue, 6 Oct 2020 09:29:28 +0200 |
From: Claudio Fontana <cfontana@suse.de>
current_machine is always set before accelerators are initialized,
so use that instead of MACHINE(qdev_get_machine()).
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
accel/tcg/tcg-cpus.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/accel/tcg/tcg-cpus.c b/accel/tcg/tcg-cpus.c
index cedd1e6c4f..da1c63d8f6 100644
--- a/accel/tcg/tcg-cpus.c
+++ b/accel/tcg/tcg-cpus.c
@@ -479,16 +479,7 @@ static void tcg_start_vcpu_thread(CPUState *cpu)
if (!tcg_region_inited) {
tcg_region_inited = 1;
tcg_region_init();
- /*
- * If MTTCG, and we will create multiple cpus,
- * then we will have cpus running in parallel.
- */
- if (qemu_tcg_mttcg_enabled()) {
- MachineState *ms = MACHINE(qdev_get_machine());
- if (ms->smp.max_cpus > 1) {
- parallel_cpus = true;
- }
- }
+ parallel_cpus = qemu_tcg_mttcg_enabled() &&
current_machine->smp.max_cpus > 1;
}
if (qemu_tcg_mttcg_enabled() || !single_tcg_cpu_thread) {
--
2.26.2
- [PULL 08/37] cpus: extract out whpx-specific code to target/i386/, (continued)
- [PULL 08/37] cpus: extract out whpx-specific code to target/i386/, Paolo Bonzini, 2020/10/06
- [PULL 10/37] cpus: cleanup now unneeded includes, Paolo Bonzini, 2020/10/06
- [PULL 09/37] cpus: extract out hvf-specific code to target/i386/hvf/, Paolo Bonzini, 2020/10/06
- [PULL 12/37] cpus: add handle_interrupt to the CpusAccel interface, Paolo Bonzini, 2020/10/06
- [PULL 13/37] hvf: remove hvf specific functions from global includes, Paolo Bonzini, 2020/10/06
- [PULL 15/37] hax: remove hax specific functions from global includes, Paolo Bonzini, 2020/10/06
- [PULL 11/37] cpus: remove checks for non-NULL cpus_accel, Paolo Bonzini, 2020/10/06
- [PULL 14/37] whpx: remove whpx specific functions from global includes, Paolo Bonzini, 2020/10/06
- [PULL 16/37] kvm: remove kvm specific functions from global includes, Paolo Bonzini, 2020/10/06
- [PULL 17/37] kvm: kvm_init_vcpu take Error pointer, Paolo Bonzini, 2020/10/06
- [PULL 18/37] accel/tcg: use current_machine as it is always set for softmmu,
Paolo Bonzini <=
- [PULL 19/37] slirp: Convert Makefile bits to meson bits, Paolo Bonzini, 2020/10/06
- [PULL 20/37] dtc: Convert Makefile bits to meson bits, Paolo Bonzini, 2020/10/06
- [PULL 23/37] configure: don't enable ASLR for --enable-debug Windows builds, Paolo Bonzini, 2020/10/06
- [PULL 22/37] configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to meson, Paolo Bonzini, 2020/10/06
- [PULL 25/37] replay: provide an accessor for rr filename, Paolo Bonzini, 2020/10/06
- [PULL 21/37] configure: do not clobber environment CFLAGS/CXXFLAGS/LDFLAGS, Paolo Bonzini, 2020/10/06
- [PULL 24/37] replay: don't record interrupt poll, Paolo Bonzini, 2020/10/06
- [PULL 26/37] qcow2: introduce icount field for snapshots, Paolo Bonzini, 2020/10/06
- [PULL 27/37] migration: introduce icount field for snapshots, Paolo Bonzini, 2020/10/06