Skip to content

Commit 8a02e09

Browse files
Merge commit 'ed1d873caa9' into merge
Signed-off-by: Francisco Iglesias <francisco.iglesias@amd.com>
2 parents 1c34e84 + ed1d873 commit 8a02e09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+1723
-1087
lines changed

MAINTAINERS

+9-3
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,10 @@ M: Hao Wu <wuhaotsh@google.com>
859859
L: qemu-arm@nongnu.org
860860
S: Supported
861861
F: hw/*/npcm*
862+
F: hw/sensor/adm1266.c
862863
F: include/hw/*/npcm*
863864
F: tests/qtest/npcm*
865+
F: tests/qtest/adm1266-test.c
864866
F: pc-bios/npcm7xx_bootrom.bin
865867
F: roms/vbootrom
866868
F: docs/system/arm/nuvoton.rst
@@ -1615,6 +1617,7 @@ F: hw/intc/sh_intc.c
16151617
F: hw/pci-host/sh_pci.c
16161618
F: hw/timer/sh_timer.c
16171619
F: include/hw/sh4/sh_intc.h
1620+
F: include/hw/timer/tmu012.h
16181621

16191622
Shix
16201623
R: Yoshinori Sato <ysato@users.sourceforge.jp>
@@ -1772,7 +1775,7 @@ F: include/hw/southbridge/ich9.h
17721775
F: include/hw/southbridge/piix.h
17731776
F: hw/isa/apm.c
17741777
F: include/hw/isa/apm.h
1775-
F: tests/unit/test-x86-cpuid.c
1778+
F: tests/unit/test-x86-topo.c
17761779
F: tests/qtest/test-x86-cpuid-compat.c
17771780

17781781
PC Chipset
@@ -1858,6 +1861,7 @@ M: Max Filippov <jcmvbkbc@gmail.com>
18581861
S: Maintained
18591862
F: hw/xtensa/xtfpga.c
18601863
F: hw/net/opencores_eth.c
1864+
F: include/hw/xtensa/mx_pic.h
18611865

18621866
Devices
18631867
-------
@@ -2594,6 +2598,7 @@ W: https://canbus.pages.fel.cvut.cz/
25942598
F: net/can/*
25952599
F: hw/net/can/*
25962600
F: include/net/can_*.h
2601+
F: docs/system/devices/can.rst
25972602

25982603
OpenPIC interrupt controller
25992604
M: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
@@ -3148,10 +3153,11 @@ M: Michael Roth <michael.roth@amd.com>
31483153
M: Konstantin Kostiuk <kkostiuk@redhat.com>
31493154
S: Maintained
31503155
F: qga/
3156+
F: contrib/systemd/qemu-guest-agent.service
31513157
F: docs/interop/qemu-ga.rst
31523158
F: docs/interop/qemu-ga-ref.rst
31533159
F: scripts/qemu-guest-agent/
3154-
F: tests/unit/test-qga.c
3160+
F: tests/*/test-qga*
31553161
T: git https://github.com/mdroth/qemu.git qga
31563162

31573163
QEMU Guest Agent Win32
@@ -4061,7 +4067,7 @@ F: gitdm.config
40614067
F: contrib/gitdm/*
40624068

40634069
Incompatible changes
4064-
R: libvir-list@redhat.com
4070+
R: devel@lists.libvirt.org
40654071
F: docs/about/deprecated.rst
40664072

40674073
Build System

accel/stubs/tcg-stub.c

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ void tlb_set_dirty(CPUState *cpu, vaddr vaddr)
2222
{
2323
}
2424

25-
void tcg_flush_jmp_cache(CPUState *cpu)
26-
{
27-
}
28-
2925
int probe_access_flags(CPUArchState *env, vaddr addr, int size,
3026
MMUAccessType access_type, int mmu_idx,
3127
bool nonfault, void **phost, uintptr_t retaddr)

accel/tcg/cputlb.c

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "exec/memory.h"
2525
#include "exec/cpu_ldst.h"
2626
#include "exec/cputlb.h"
27+
#include "exec/tb-flush.h"
2728
#include "exec/memory-internal.h"
2829
#include "exec/ram_addr.h"
2930
#include "tcg/tcg.h"

accel/tcg/tcg-accel-ops.c

+9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "qemu/timer.h"
3535
#include "exec/exec-all.h"
3636
#include "exec/hwaddr.h"
37+
#include "exec/tb-flush.h"
3738
#include "exec/gdbstub.h"
3839

3940
#include "tcg-accel-ops.h"
@@ -77,6 +78,13 @@ int tcg_cpus_exec(CPUState *cpu)
7778
return ret;
7879
}
7980

81+
static void tcg_cpu_reset_hold(CPUState *cpu)
82+
{
83+
tcg_flush_jmp_cache(cpu);
84+
85+
tlb_flush(cpu);
86+
}
87+
8088
/* mask must never be zero, except for A20 change call */
8189
void tcg_handle_interrupt(CPUState *cpu, int mask)
8290
{
@@ -205,6 +213,7 @@ static void tcg_accel_ops_init(AccelOpsClass *ops)
205213
}
206214
}
207215

216+
ops->cpu_reset_hold = tcg_cpu_reset_hold;
208217
ops->supports_guest_debug = tcg_supports_guest_debug;
209218
ops->insert_breakpoint = tcg_insert_breakpoint;
210219
ops->remove_breakpoint = tcg_remove_breakpoint;

accel/tcg/translate-all.c

-8
Original file line numberDiff line numberDiff line change
@@ -675,11 +675,3 @@ void tcg_flush_jmp_cache(CPUState *cpu)
675675
qatomic_set(&jc->array[i].tb, NULL);
676676
}
677677
}
678-
679-
/* This is a wrapper for common code that can not use CONFIG_SOFTMMU */
680-
void tcg_flush_softmmu_tlb(CPUState *cs)
681-
{
682-
#ifdef CONFIG_SOFTMMU
683-
tlb_flush(cs);
684-
#endif
685-
}

accel/tcg/user-exec-stub.c

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ void qemu_init_vcpu(CPUState *cpu)
1414
{
1515
}
1616

17+
void cpu_exec_reset_hold(CPUState *cpu)
18+
{
19+
}
20+
1721
/* User mode emulation does not support record/replay yet. */
1822

1923
bool replay_exception(void)

bsd-user/main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void fork_end(int child)
118118
*/
119119
CPU_FOREACH_SAFE(cpu, next_cpu) {
120120
if (cpu != thread_cpu) {
121-
QTAILQ_REMOVE_RCU(&cpus, cpu, node);
121+
QTAILQ_REMOVE_RCU(&cpus_queue, cpu, node);
122122
}
123123
}
124124
mmap_fork_end(child);

cpu-common.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static int cpu_get_free_index(void)
7373
return max_cpu_index;
7474
}
7575

76-
CPUTailQ cpus = QTAILQ_HEAD_INITIALIZER(cpus);
76+
CPUTailQ cpus_queue = QTAILQ_HEAD_INITIALIZER(cpus_queue);
7777
static unsigned int cpu_list_generation_id;
7878

7979
unsigned int cpu_list_generation_id_get(void)
@@ -90,7 +90,7 @@ void cpu_list_add(CPUState *cpu)
9090
} else {
9191
assert(!cpu_index_auto_assigned);
9292
}
93-
QTAILQ_INSERT_TAIL_RCU(&cpus, cpu, node);
93+
QTAILQ_INSERT_TAIL_RCU(&cpus_queue, cpu, node);
9494
cpu_list_generation_id++;
9595
}
9696

@@ -102,7 +102,7 @@ void cpu_list_remove(CPUState *cpu)
102102
return;
103103
}
104104

105-
QTAILQ_REMOVE_RCU(&cpus, cpu, node);
105+
QTAILQ_REMOVE_RCU(&cpus_queue, cpu, node);
106106
cpu->cpu_index = UNASSIGNED_CPU_INDEX;
107107
cpu_list_generation_id++;
108108
}

cpu-target.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ void cpu_exec_reset(CPUState *cpu)
142142
#endif
143143
}
144144

145-
void cpu_exec_realizefn(CPUState *cpu, Error **errp)
145+
bool cpu_exec_realizefn(CPUState *cpu, Error **errp)
146146
{
147147
/* cache the cpu class for the hotpath */
148148
cpu->cc = CPU_GET_CLASS(cpu);
149149

150150
if (!accel_cpu_common_realize(cpu, errp)) {
151-
return;
151+
return false;
152152
}
153153

154154
/* Wait until cpu initialization complete before exposing cpu. */
@@ -170,6 +170,8 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp)
170170
vmstate_register(NULL, cpu->cpu_index, cpu->cc->sysemu_ops->legacy_vmsd, cpu);
171171
}
172172
#endif /* CONFIG_USER_ONLY */
173+
174+
return true;
173175
}
174176

175177
void cpu_exec_unrealizefn(CPUState *cpu)

dump/dump.c

+1
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,7 @@ void qmp_dump_guest_memory(bool paging, const char *protocol,
21602160
return;
21612161
}
21622162
if (kdump_raw && lseek(fd, 0, SEEK_CUR) == (off_t) -1) {
2163+
close(fd);
21632164
error_setg(errp, "kdump-raw formats require a seekable file");
21642165
return;
21652166
}

hw/arm/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ config NPCM7XX
497497
default y
498498
depends on TCG && ARM
499499
select A9MPCORE
500+
select ADM1266
500501
select ADM1272
501502
select ARM_GIC
502503
select SMBUS

hw/core/cpu-common.c

+13-9
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,7 @@ static void cpu_common_reset_hold(Object *obj)
142142
cpu->cflags_next_tb = -1;
143143

144144
cpu_exec_reset(cpu);
145-
146-
if (tcg_enabled()) {
147-
tcg_flush_jmp_cache(cpu);
148-
tcg_flush_softmmu_tlb(cpu);
149-
}
145+
cpu_exec_reset_hold(cpu);
150146
}
151147

152148
static bool cpu_common_has_work(CPUState *cs)
@@ -156,10 +152,18 @@ static bool cpu_common_has_work(CPUState *cs)
156152

157153
ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model)
158154
{
159-
CPUClass *cc = CPU_CLASS(object_class_by_name(typename));
160-
161-
assert(cpu_model && cc->class_by_name);
162-
return cc->class_by_name(cpu_model);
155+
ObjectClass *oc;
156+
CPUClass *cc;
157+
158+
oc = object_class_by_name(typename);
159+
cc = CPU_CLASS(oc);
160+
assert(cc->class_by_name);
161+
assert(cpu_model);
162+
oc = cc->class_by_name(cpu_model);
163+
if (oc == NULL || object_class_is_abstract(oc)) {
164+
return NULL;
165+
}
166+
return oc;
163167
}
164168

165169
static void cpu_common_parse_features(const char *typename, char *features,

hw/core/loader.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ static void *rom_set_mr(Rom *rom, Object *owner, const char *name, bool ro)
10811081

10821082
ssize_t rom_add_file(const char *file, const char *fw_dir,
10831083
hwaddr addr, int32_t bootindex,
1084-
bool option_rom, MemoryRegion *mr,
1084+
bool has_option_rom, MemoryRegion *mr,
10851085
AddressSpace *as)
10861086
{
10871087
MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
@@ -1150,7 +1150,7 @@ ssize_t rom_add_file(const char *file, const char *fw_dir,
11501150
basename);
11511151
snprintf(devpath, sizeof(devpath), "/rom@%s", fw_file_name);
11521152

1153-
if ((!option_rom || mc->option_rom_has_mr) && mc->rom_file_has_mr) {
1153+
if ((!has_option_rom || mc->option_rom_has_mr) && mc->rom_file_has_mr) {
11541154
data = rom_set_mr(rom, OBJECT(fw_cfg), devpath, true);
11551155
} else {
11561156
data = rom->data;

0 commit comments

Comments
 (0)