Skip to content

Commit 2033cc6

Browse files
committed
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Make checkpatch say 'qemu' instead of 'kernel' (Aleksandar) * Fix PSE guests with emulated NPT (Alexander B. #1) * Fix leak (Alexander B. #2) * HVF fixes (Roman, Cameron) * New Sapphire Rapids CPUID bits (Cathy) * cpus.c and softmmu/ cleanups (Claudio) * TAP driver tweaks (Daniel, Havard) * object-add bugfix and testcases (Eric A.) * Fix Coverity MIN_CONST and MAX_CONST (Eric B.) * "info lapic" improvement (Jan) * SSE fixes (Joseph) * "-msg guest-name" option (Mario) * support for AMD nested live migration (myself) * Small i386 TCG fixes (myself) * improved error reporting for Xen (myself) * fix "-cpu host -overcommit cpu-pm=on" (myself) * Add accel/Kconfig (Philippe) * iscsi sense handling fixes (Yongji) * Misc bugfixes # gpg: Signature made Sat 11 Jul 2020 00:33:41 BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "[email protected]" # gpg: Good signature from "Paolo Bonzini <[email protected]>" [full] # gpg: aka "Paolo Bonzini <[email protected]>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (47 commits) linux-headers: update again to 5.8 apic: Report current_count via 'info lapic' scripts: improve message when TAP based tests fail target/i386: Enable TSX Suspend Load Address Tracking feature target/i386: Add SERIALIZE cpu feature softmmu/vl: Remove the check for colons in -accel parameters cpu-throttle: new module, extracted from cpus.c softmmu: move softmmu only files from root pc: fix leak in pc_system_flash_cleanup_unused cpus: Move CPU code from exec.c to cpus-common.c target/i386: Correct the warning message of Intel PT checkpatch: Change occurences of 'kernel' to 'qemu' in user messages iscsi: return -EIO when sense fields are meaningless iscsi: handle check condition status in retry loop target/i386: sev: fail query-sev-capabilities if QEMU cannot use SEV target/i386: sev: provide proper error reporting for query-sev-capabilities KVM: x86: believe what KVM says about WAITPKG target/i386: implement undocumented "smsw r32" behavior target/i386: remove gen_io_end Makefile: simplify MINIKCONF rules ... Signed-off-by: Peter Maydell <[email protected]>
2 parents d4a6bab + 56908dc commit 2033cc6

Some content is hidden

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

70 files changed

+1615
-441
lines changed

Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source Kconfig.host
2+
source backends/Kconfig
3+
source accel/Kconfig
4+
source hw/Kconfig

Kconfig.host

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# down to Kconfig. See also MINIKCONF_ARGS in the Makefile:
33
# these two need to be kept in sync.
44

5-
config KVM
6-
bool
7-
85
config LINUX
96
bool
107

@@ -31,10 +28,6 @@ config VHOST_KERNEL
3128
bool
3229
select VHOST
3330

34-
config XEN
35-
bool
36-
select FSDEV_9P if VIRTFS
37-
3831
config VIRTFS
3932
bool
4033

MAINTAINERS

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Overall TCG CPUs
115115
M: Richard Henderson <[email protected]>
116116
R: Paolo Bonzini <[email protected]>
117117
S: Maintained
118-
F: cpus.c
118+
F: softmmu/cpus.c
119119
F: cpus-common.c
120120
F: exec.c
121121
F: accel/tcg/
@@ -362,7 +362,7 @@ Overall KVM CPUs
362362
M: Paolo Bonzini <[email protected]>
363363
364364
S: Supported
365-
F: */kvm.*
365+
F: */*/kvm*
366366
F: accel/kvm/
367367
F: accel/stubs/kvm-stub.c
368368
F: include/hw/kvm/
@@ -416,8 +416,21 @@ S: Supported
416416
F: target/i386/kvm.c
417417
F: scripts/kvm/vmxcap
418418

419+
Guest CPU Cores (other accelerators)
420+
------------------------------------
421+
Overall
422+
M: Richard Henderson <[email protected]>
423+
R: Paolo Bonzini <[email protected]>
424+
S: Maintained
425+
F: include/sysemu/accel.h
426+
F: accel/accel.c
427+
F: accel/Makefile.objs
428+
F: accel/stubs/Makefile.objs
429+
419430
X86 HVF CPUs
431+
M: Cameron Esfahani <[email protected]>
420432
M: Roman Bolshakov <[email protected]>
433+
W: https://wiki.qemu.org/Features/HVF
421434
S: Maintained
422435
F: accel/stubs/hvf-stub.c
423436
F: target/i386/hvf/
@@ -465,6 +478,7 @@ M: Colin Xu <[email protected]>
465478
466479
W: https://github.com/intel/haxm/issues
467480
S: Maintained
481+
F: accel/stubs/hax-stub.c
468482
F: include/sysemu/hax.h
469483
F: target/i386/hax-*
470484

@@ -1710,7 +1724,7 @@ M: David Hildenbrand <[email protected]>
17101724
S: Maintained
17111725
F: hw/virtio/virtio-balloon*.c
17121726
F: include/hw/virtio/virtio-balloon.h
1713-
F: balloon.c
1727+
F: softmmu/balloon.c
17141728
F: include/sysemu/balloon.h
17151729

17161730
virtio-9p
@@ -2189,12 +2203,12 @@ Memory API
21892203
M: Paolo Bonzini <[email protected]>
21902204
S: Supported
21912205
F: include/exec/ioport.h
2192-
F: ioport.c
21932206
F: include/exec/memop.h
21942207
F: include/exec/memory.h
21952208
F: include/exec/ram_addr.h
21962209
F: include/exec/ramblock.h
2197-
F: memory.c
2210+
F: softmmu/ioport.c
2211+
F: softmmu/memory.c
21982212
F: include/exec/memory-internal.h
21992213
F: exec.c
22002214
F: scripts/coccinelle/memory-region-housekeeping.cocci
@@ -2226,13 +2240,14 @@ F: ui/cocoa.m
22262240
Main loop
22272241
M: Paolo Bonzini <[email protected]>
22282242
S: Maintained
2229-
F: cpus.c
22302243
F: include/qemu/main-loop.h
22312244
F: include/sysemu/runstate.h
22322245
F: util/main-loop.c
22332246
F: util/qemu-timer.c
22342247
F: softmmu/vl.c
22352248
F: softmmu/main.c
2249+
F: softmmu/cpus.c
2250+
F: softmmu/cpu-throttle.c
22362251
F: qapi/run-state.json
22372252

22382253
Human Monitor (HMP)
@@ -2387,7 +2402,7 @@ M: Thomas Huth <[email protected]>
23872402
M: Laurent Vivier <[email protected]>
23882403
R: Paolo Bonzini <[email protected]>
23892404
S: Maintained
2390-
F: qtest.c
2405+
F: softmmu/qtest.c
23912406
F: accel/qtest.c
23922407
F: tests/qtest/
23932408
X: tests/qtest/bios-tables-test-allowed-diff.h

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ endif
404404
# This has to be kept in sync with Kconfig.host.
405405
MINIKCONF_ARGS = \
406406
$(CONFIG_MINIKCONF_MODE) \
407-
$@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
407+
$@ $*/config-devices.mak.d $< $(SRC_PATH)/Kconfig \
408+
CONFIG_TCG=$(CONFIG_TCG) \
408409
CONFIG_KVM=$(CONFIG_KVM) \
409410
CONFIG_SPICE=$(CONFIG_SPICE) \
410411
CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
@@ -418,12 +419,11 @@ MINIKCONF_ARGS = \
418419
CONFIG_LINUX=$(CONFIG_LINUX) \
419420
CONFIG_PVRDMA=$(CONFIG_PVRDMA)
420421

421-
MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/backends/Kconfig $(SRC_PATH)/hw/Kconfig
422-
MINIKCONF_DEPS = $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig)
423-
MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
422+
MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py
424423

425-
$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_DEPS) $(BUILD_DIR)/config-host.mak
426-
$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
424+
$(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(SRC_PATH)/Kconfig $(BUILD_DIR)/config-host.mak
425+
$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) \
426+
> $@.tmp, "GEN", "$@.tmp")
427427
$(call quiet-command, if test -f $@; then \
428428
if cmp -s $@.old $@; then \
429429
mv $@.tmp $@; \

Makefile.target

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,16 +152,13 @@ endif #CONFIG_BSD_USER
152152
#########################################################
153153
# System emulator target
154154
ifdef CONFIG_SOFTMMU
155-
obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o
156-
obj-y += qtest.o
155+
obj-y += softmmu/
156+
obj-y += gdbstub.o
157157
obj-y += dump/
158158
obj-y += hw/
159159
obj-y += monitor/
160160
obj-y += qapi/
161-
obj-y += memory.o
162-
obj-y += memory_mapping.o
163161
obj-y += migration/ram.o
164-
obj-y += softmmu/
165162
LIBS := $(libs_softmmu) $(LIBS)
166163

167164
# Hardware support

accel/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config TCG
2+
bool
3+
4+
config KVM
5+
bool
6+
7+
config XEN
8+
bool
9+
select FSDEV_9P if VIRTFS

accel/stubs/tcg-stub.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ void tb_flush(CPUState *cpu)
2222
void tlb_set_dirty(CPUState *cpu, target_ulong vaddr)
2323
{
2424
}
25+
26+
void *probe_access(CPUArchState *env, target_ulong addr, int size,
27+
MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
28+
{
29+
/* Handled by hardware accelerator. */
30+
g_assert_not_reached();
31+
}

block/iscsi.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,11 @@ iscsi_co_generic_cb(struct iscsi_context *iscsi, int status,
241241

242242
iTask->status = status;
243243
iTask->do_retry = 0;
244+
iTask->err_code = 0;
244245
iTask->task = task;
245246

246247
if (status != SCSI_STATUS_GOOD) {
248+
iTask->err_code = -EIO;
247249
if (iTask->retries++ < ISCSI_CMD_RETRIES) {
248250
if (status == SCSI_STATUS_BUSY ||
249251
status == SCSI_STATUS_TIMEOUT ||
@@ -266,16 +268,16 @@ iscsi_co_generic_cb(struct iscsi_context *iscsi, int status,
266268
timer_mod(&iTask->retry_timer,
267269
qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + retry_time);
268270
iTask->do_retry = 1;
269-
}
270-
} else if (status == SCSI_STATUS_CHECK_CONDITION) {
271-
int error = iscsi_translate_sense(&task->sense);
272-
if (error == EAGAIN) {
273-
error_report("iSCSI CheckCondition: %s",
274-
iscsi_get_error(iscsi));
275-
iTask->do_retry = 1;
276-
} else {
277-
iTask->err_code = -error;
278-
iTask->err_str = g_strdup(iscsi_get_error(iscsi));
271+
} else if (status == SCSI_STATUS_CHECK_CONDITION) {
272+
int error = iscsi_translate_sense(&task->sense);
273+
if (error == EAGAIN) {
274+
error_report("iSCSI CheckCondition: %s",
275+
iscsi_get_error(iscsi));
276+
iTask->do_retry = 1;
277+
} else {
278+
iTask->err_code = -error;
279+
iTask->err_str = g_strdup(iscsi_get_error(iscsi));
280+
}
279281
}
280282
}
281283
}

cpus-common.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ static int cpu_get_free_index(void)
7272
return max_cpu_index;
7373
}
7474

75+
CPUTailQ cpus = QTAILQ_HEAD_INITIALIZER(cpus);
76+
7577
void cpu_list_add(CPUState *cpu)
7678
{
7779
QEMU_LOCK_GUARD(&qemu_cpu_list_lock);
@@ -96,6 +98,22 @@ void cpu_list_remove(CPUState *cpu)
9698
cpu->cpu_index = UNASSIGNED_CPU_INDEX;
9799
}
98100

101+
CPUState *qemu_get_cpu(int index)
102+
{
103+
CPUState *cpu;
104+
105+
CPU_FOREACH(cpu) {
106+
if (cpu->cpu_index == index) {
107+
return cpu;
108+
}
109+
}
110+
111+
return NULL;
112+
}
113+
114+
/* current CPU in the current thread. It is only valid inside cpu_exec() */
115+
__thread CPUState *current_cpu;
116+
99117
struct qemu_work_item {
100118
QSIMPLEQ_ENTRY(qemu_work_item) node;
101119
run_on_cpu_func func;

exec.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@ AddressSpace address_space_memory;
9898
static MemoryRegion io_mem_unassigned;
9999
#endif
100100

101-
CPUTailQ cpus = QTAILQ_HEAD_INITIALIZER(cpus);
102-
103-
/* current CPU in the current thread. It is only valid inside
104-
cpu_exec() */
105-
__thread CPUState *current_cpu;
106-
107101
uintptr_t qemu_host_page_size;
108102
intptr_t qemu_host_page_mask;
109103

@@ -832,22 +826,6 @@ const VMStateDescription vmstate_cpu_common = {
832826
}
833827
};
834828

835-
#endif
836-
837-
CPUState *qemu_get_cpu(int index)
838-
{
839-
CPUState *cpu;
840-
841-
CPU_FOREACH(cpu) {
842-
if (cpu->cpu_index == index) {
843-
return cpu;
844-
}
845-
}
846-
847-
return NULL;
848-
}
849-
850-
#if !defined(CONFIG_USER_ONLY)
851829
void cpu_address_space_init(CPUState *cpu, int asidx,
852830
const char *prefix, MemoryRegion *mr)
853831
{

0 commit comments

Comments
 (0)