Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master with upstream #1

Merged
merged 10,000 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
5804518
tests/qtest : Use `g_assert_cmphex` instead of `g_assert_cmpuint`
inesvar Apr 14, 2024
838f824
docs: i386: pc: Update maximum CPU numbers for PC Q35
trueptolemy Apr 12, 2024
5e279f3
tests/vm: update openbsd image to 7.5
brad0 Apr 10, 2024
6705587
Revert ".travis.yml: Cache Avocado cache"
huth Mar 20, 2024
aeb99d0
.travis.yml: Remove the unused UNRELIABLE environment variable
huth Mar 20, 2024
66163bc
.travis.yml: Update the jobs to Ubuntu 22.04
huth Apr 18, 2024
4d6ae2d
.travis.yml: Do some more testing with Clang
huth Mar 20, 2024
45070eb
tests: Remove Ubuntu 20.04 container
huth Apr 18, 2024
c723d9d
tests/lcitool/libvirt-ci: Update to the latest master branch
huth Apr 18, 2024
2355d18
tests/docker/dockerfiles: Run lcitool-refresh after the lcitool update
huth Apr 18, 2024
641b1ef
tests: Update our CI to use CentOS Stream 9 instead of 8
huth Apr 18, 2024
443df40
qom: add default value
Mar 18, 2024
236e939
qmp: add dump machine type compatibility properties
Mar 18, 2024
33956e4
python/qemu/machine: add method to retrieve QEMUMachine::binary field
Mar 18, 2024
b928505
scripts: add script to compare compatibility properties
Mar 18, 2024
6c3b785
hw/core: Remove check on NEED_CPU_H in tcg-cpu-ops.h
philmd Mar 19, 2024
6307357
target/i386: Move APIC related code to cpu-apic.c
philmd Mar 21, 2024
2b0d2ab
target/arm: Handle HCR_EL2 accesses for bits introduced with FEAT_NMI
Apr 19, 2024
6aa2041
target/arm: Add PSTATE.ALLINT
Apr 19, 2024
4833c75
target/arm: Add support for FEAT_NMI, Non-maskable Interrupt
Apr 19, 2024
cbf817a
target/arm: Implement ALLINT MSR (immediate)
Apr 19, 2024
5c21697
target/arm: Support MSR access to ALLINT
Apr 19, 2024
b36a32e
target/arm: Add support for Non-maskable Interrupt
Apr 19, 2024
963e4e3
target/arm: Add support for NMI in arm_phys_excp_target_el()
Apr 19, 2024
2e0be5f
target/arm: Handle IS/FS in ISR_EL1 for NMI, VINMI and VFNMI
Apr 19, 2024
167f263
target/arm: Handle PSTATE.ALLINT on taking an exception
Apr 19, 2024
83f3207
hw/intc/arm_gicv3: Add external IRQ lines for NMI
Apr 19, 2024
34d94b7
hw/arm/virt: Wire NMI and VINMI irq lines from GIC to CPU
Apr 19, 2024
e4eb290
target/arm: Handle NMI in arm_cpu_do_interrupt_aarch64()
Apr 19, 2024
c9e86cb
hw/intc/arm_gicv3: Add has-nmi property to GICv3 device
Apr 19, 2024
67d74e4
hw/intc/arm_gicv3_kvm: Not set has-nmi=true for the KVM GICv3
Apr 19, 2024
0e9f4e8
hw/intc/arm_gicv3: Add irq non-maskable property
Apr 19, 2024
7c79d98
hw/intc/arm_gicv3_redist: Implement GICR_INMIR0
Apr 19, 2024
44ed1e4
hw/intc/arm_gicv3: Implement GICD_INMIR
Apr 19, 2024
28cca59
hw/intc/arm_gicv3: Add NMI handling CPU interface registers
pm215 Apr 19, 2024
d2c0c6a
hw/intc/arm_gicv3: Handle icv_nmiar1_read() for icc_nmiar1_read()
pm215 Apr 19, 2024
d89daa8
hw/intc/arm_gicv3: Implement NMI interrupt priority
Apr 19, 2024
f3c26a4
hw/intc/arm_gicv3: Report the NMI interrupt in gicv3_cpuif_update()
Apr 19, 2024
c57e818
hw/intc/arm_gicv3: Report the VINMI interrupt
Apr 19, 2024
14a1640
target/arm: Add FEAT_NMI to max
Apr 19, 2024
5ae47f7
hw/arm/virt: Enable NMI support in the GIC if the CPU has FEAT_NMI
Apr 19, 2024
c3a68df
hw/dma: avoid apparent overflow in soc_dma_set_request
Apr 9, 2024
a6819c1
linux-user/flatload.c: Remove unused bFLT shared-library and ZFLAT code
pm215 Apr 11, 2024
1e0f2b3
hw/misc: Don't special case RESET_TYPE_COLD in npcm7xx_clk, gcr
pm215 Apr 12, 2024
ef6ab29
allwinner-i2c, adm1272: Use device_cold_reset() for software-triggere…
pm215 Apr 12, 2024
aadea88
scripts/coccinelle: New script to add ResetType to hold and exit phases
pm215 Apr 12, 2024
ad80e36
hw, target: Add ResetType argument to hold and exit phase methods
pm215 Apr 12, 2024
41d49ec
docs/devel/reset: Update to new API for hold and exit phase methods
pm215 Apr 12, 2024
631f46d
reset: Add RESET_TYPE_SNAPSHOT_LOAD
pm215 Apr 12, 2024
4fb37ae
hw/char: Implement STM32L4x5 USART skeleton
Mar 29, 2024
87b77e6
hw/char/stm32l4x5_usart: Enable serial read and write
Mar 29, 2024
c4c12ee
hw/char/stm32l4x5_usart: Add options for serial parameters setting
Mar 29, 2024
9274143
hw/arm: Add the USART to the stm32l4x5 SoC
Mar 29, 2024
214652d
tests/qtest: Add tests for the STM32L4x5 USART
Mar 29, 2024
a6ab7a9
hw/misc/applesmc: Simplify DeviceReset handler
philmd Apr 8, 2024
ca4af17
hw/misc/imx: Replace sprintf() by snprintf()
philmd Apr 11, 2024
b8ff846
hw/riscv/virt: Replace sprintf by g_strdup_printf
philmd Apr 11, 2024
c1c350d
hw: Fix problem with the A*MPCORE switches in the Kconfig files
huth Apr 15, 2024
259181d
hw: Add a Kconfig switch for the TYPE_CPU_CLUSTER device
huth Apr 15, 2024
2c5b2d9
hw/cxl/cxl-cdat: Make ct3_load_cdat() return boolean
trueptolemy Apr 18, 2024
a133d20
hw/cxl/cxl-cdat: Make ct3_build_cdat() return boolean
trueptolemy Apr 18, 2024
e0ddabc
hw/cxl/cxl-cdat: Make cxl_doe_cdat_init() return boolean
trueptolemy Apr 18, 2024
159fb79
hw/elf_ops: Rename elf_ops.h -> elf_ops.h.inc
philmd Apr 18, 2024
206e562
hw/xtensa: Include missing 'exec/cpu-common.h' in 'bootparam.h'
philmd Apr 18, 2024
4f88e52
hw/misc : Correct 5 spaces indents in stm32l4x5_exti
inesvar Apr 21, 2024
f4b6376
hw/i386/pc_sysfw: Remove unused parameter from pc_isa_bios_init()
shentok Apr 22, 2024
dcba73b
hw/core/machine: Introduce the module as a CPU topology level
trueptolemy Apr 24, 2024
8ec0a46
hw/core/machine: Support modules in -smp
trueptolemy Apr 24, 2024
989bb31
hw/core: Introduce module-id as the topology subindex
trueptolemy Apr 24, 2024
098de99
hw/core: Support module-id in numa configuration
trueptolemy Apr 24, 2024
ae6d91a
nbd/server: do not poll within a coroutine context
Apr 8, 2024
9a72bea
hw/s390x: Include missing 'cpu.h' header
philmd Mar 22, 2024
b1f8536
docs/devel: fix minor typo in submitting-a-patch.rst
epilys Apr 22, 2024
73a1e96
tests/unit: Remove debug statements in test-nested-aio-poll.c
philmd Apr 22, 2024
17523a3
target/s390x: Remove KVM stubs in cpu_models.h
philmd Apr 19, 2024
45bef95
Merge tag 'pull-request-2024-04-25' of https://gitlab.com/thuth/qemu …
rth7680 Apr 25, 2024
83baec6
Merge tag 'pull-target-arm-20240425' of https://git.linaro.org/people…
rth7680 Apr 25, 2024
a118c4a
Merge tag 'hw-misc-20240425' of https://github.com/philmd/qemu into s…
rth7680 Apr 25, 2024
4fa333e
nbd/server: Mark negotiation functions as coroutine_fn
ebblake Apr 8, 2024
7d7a21b
exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET
philmd Jun 13, 2023
51579d4
exec: Reduce tlb_set_dirty() declaration scope
philmd Sep 14, 2023
8501048
exec: Include 'cpu.h' before validating CPUArchState placement
philmd Dec 5, 2023
75bbe6a
exec: Expose 'target_page.h' API to user emulation
philmd Dec 7, 2023
4597463
accel: Include missing 'exec/cpu_ldst.h' header
philmd Dec 5, 2023
fe76673
gdbstub: Include missing 'hw/core/cpu.h' header
philmd Dec 7, 2023
94326e4
gdbstub: Simplify #ifdef'ry in helpers.h
philmd Mar 22, 2024
0654c79
gdbstub: Avoid including 'cpu.h' in 'gdbstub/helpers.h'
philmd Apr 18, 2024
3aac8ab
semihosting/uaccess: Avoid including 'cpu.h'
philmd Dec 6, 2023
83fb360
semihosting/guestfd: Remove unused 'semihosting/uaccess.h' header
philmd Dec 6, 2023
e92dd33
target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h'
philmd Dec 5, 2023
eedd109
target/ppc/excp_helper: Avoid 'abi_ptr' in system emulation
philmd Dec 4, 2023
9b21d29
target/sparc: Replace abi_ulong by uint32_t for TARGET_ABI32
philmd Apr 18, 2024
7e17a52
target/i386: Include missing 'exec/exec-all.h' header
philmd Dec 1, 2023
3b28c27
accel/tcg: Un-inline retaddr helpers to 'user-retaddr.h'
philmd Dec 5, 2023
6bba316
accel/tcg: Include missing 'hw/core/cpu.h' header
philmd Dec 1, 2023
893b4bd
accel/tcg: Include missing headers in 'tb-jmp-cache.h'
philmd Jan 10, 2024
e4751d3
accel/tcg: Rename load-extract/store-insert headers using .h.inc suffix
philmd Mar 25, 2024
2379866
accel/tcg: Rename helper-head.h -> helper-head.h.inc
philmd Apr 22, 2024
9ad4953
accel/whpx: Use accel-specific per-vcpu @dirty field
philmd Apr 24, 2024
79f1926
accel/nvmm: Use accel-specific per-vcpu @dirty field
philmd Apr 24, 2024
e620363
accel/hvf: Use accel-specific per-vcpu @dirty field
philmd Apr 24, 2024
edfc858
exec/cpu-all: Reduce 'qemu/rcu.h' header inclusion
philmd Dec 2, 2023
c8f7bbb
exec/cpu-all: Remove unused 'qemu/thread.h' header
philmd Dec 2, 2023
77166c4
exec/cpu-all: Remove unused tswapls() definitions
philmd Dec 12, 2023
4250826
exec: Declare target_words_bigendian() in 'exec/tswap.h'
philmd Dec 12, 2023
8272386
exec: Move [b]tswapl() declarations to 'exec/user/tswap-target.h'
philmd Dec 12, 2023
d25ddb3
exec/user: Do not include 'cpu.h' in 'abitypes.h'
philmd Dec 5, 2023
471558c
exec: Declare abi_ptr type in its own 'abi_ptr.h' header
philmd Dec 5, 2023
9c1283d
exec: Declare MMUAccessType type in 'mmu-access-type.h' header
philmd Mar 26, 2024
6ce1c9d
exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header
philmd Mar 26, 2024
43bc8a6
exec: Restrict TCG specific declarations of 'cputlb.h'
philmd Apr 3, 2024
1ce871a
exec: Restrict 'cpu_ldst.h' to TCG accelerator
philmd Apr 3, 2024
d3cbde7
exec: Rename 'exec/user/guest-base.h' as 'user/guest-base.h'
philmd Mar 26, 2024
16aa8ea
exec: Restrict inclusion of 'user/guest-base.h'
philmd Dec 11, 2023
aacfd8b
exec: Move CPUTLBEntry helpers to cputlb.c
philmd Apr 3, 2024
76d07d3
hw/core: Avoid including the full 'hw/core/cpu.h' in 'tcg-cpu-ops.h'
philmd Mar 26, 2024
77bcaf5
Merge tag 'pull-nbd-2024-04-25' of https://repo.or.cz/qemu/ericb into…
rth7680 Apr 26, 2024
671558d
plugins: Include missing 'qemu/bitmap.h' header
philmd Apr 18, 2024
fd87be1
Merge tag 'accel-20240426' of https://github.com/philmd/qemu into sta…
rth7680 Apr 26, 2024
0355519
net/slirp: Use newer slirp_*_hostxfwd API
nicholasngai Sep 25, 2021
d771ca1
hw/loongarch: Move boot functions to boot.c
gaosong-loongson Apr 26, 2024
02307a6
hw/loongarch: Add load initrd
gaosong-loongson Apr 26, 2024
7e0510d
hw/loongarch: Add slave cpu boot_code
gaosong-loongson Apr 26, 2024
58ee60d
hw/loongarch: Add init_cmdline
gaosong-loongson Apr 26, 2024
4216baa
hw/loongarch: Init efi_system_table
gaosong-loongson Apr 26, 2024
252b8e6
hw/loongarch: Init efi_boot_memmap table
gaosong-loongson Apr 26, 2024
0606850
hw/loongarch: Init efi_initrd table
gaosong-loongson Apr 26, 2024
6042385
hw/loongarch: Init efi_fdt table
gaosong-loongson Apr 26, 2024
b11f981
hw/loongarch: Fix fdt memory node wrong 'reg'
gaosong-loongson Apr 26, 2024
a0663ef
hw/loongarch: fdt adds cpu interrupt controller node
gaosong-loongson Apr 26, 2024
975a5af
hw/loongarch: fdt adds Extend I/O Interrupt Controller
gaosong-loongson Apr 26, 2024
2904f50
hw/loongarch: fdt adds pch_pic Controller
gaosong-loongson Apr 26, 2024
572d45e
hw/loongarch: fdt adds pch_msi Controller
gaosong-loongson Apr 26, 2024
07bf0b6
hw/loongarch: fdt adds pcie irq_map node
gaosong-loongson Apr 26, 2024
22126fd
hw/loongarch: fdt remove unused irqchip node
gaosong-loongson Apr 26, 2024
f5cce57
hw/loongarch: Add cells missing from uart node
gaosong-loongson Apr 26, 2024
841ef2c
hw/loongarch: Add cells missing from rtc node
gaosong-loongson Apr 26, 2024
f2c8aeb
hw/ufs: Fix buffer overflow bug
Feb 5, 2024
4984321
target/i386/cpu: Remove "x86" prefix from the CPU list
huth Apr 20, 2024
7febce3
target/s390x/cpu_models: Rework the output of "-cpu help"
huth Apr 20, 2024
5b638f6
target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list
huth Apr 20, 2024
e3812d1
scripts/checkpatch: Avoid author email mangled by qemu-*@nongnu.org
philmd Apr 2, 2024
af692fd
scripts/checkpatch: Do not use mailmap
philmd Apr 2, 2024
06479db
backends/cryptodev-builtin: Fix local_error leaks
zhijianli88 Apr 22, 2024
0cbb322
target/loongarch/cpu.c: typo fix: expection
Apr 24, 2024
e442635
target/riscv/kvm: remove sneaky strerrorname_np() instance
danielhb Apr 24, 2024
ce1992d
checkpatch.pl: forbid strerrorname_np()
danielhb Apr 24, 2024
5fee33d
Merge tag 'samuel-thibault' of https://people.debian.org/~sthibault/q…
rth7680 Apr 29, 2024
2358f1b
Merge tag 'pull-trivial-patches' of https://gitlab.com/mjt0k/qemu int…
rth7680 Apr 30, 2024
7c0c099
target/s390x/cpu_model: Make check_compatibility() return boolean
trueptolemy Apr 25, 2024
9c2df9c
target/s390x/cpu_model: Drop local @err in s390_realize_cpu_model()
trueptolemy Apr 25, 2024
47ab3b2
target/s390x/cpu_models: Make kvm_s390_get_host_cpu_model() return bo…
trueptolemy Apr 25, 2024
c6f1baf
target/s390x/cpu_models: Drop local @err in get_max_cpu_model()
trueptolemy Apr 25, 2024
38098df
target/s390x/cpu_models: Make kvm_s390_apply_cpu_model() return boolean
trueptolemy Apr 25, 2024
046bf2a
target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu_model()
trueptolemy Apr 25, 2024
6982674
hw: misc: edu: fix 2 off-by-one errors
cfriedt Oct 18, 2022
3e64d7d
hw: misc: edu: rename local vars in edu_check_range
cfriedt Oct 18, 2022
7b608e5
hw: misc: edu: use qemu_log_mask instead of hw_error
cfriedt Oct 18, 2022
109f1a4
stubs: Add missing qga stubs
kostyanf14 Apr 26, 2024
26813f7
qga: Re-enable the qga-ssh-test when running without fuzzing
huth Apr 26, 2024
e40e129
hw/char/stm32l4x5_usart: Fix memory corruption by adding correct clas…
huth Apr 29, 2024
8356189
build-environment: make some packages optional
stsquad Apr 26, 2024
108d997
gitlab: migrate the s390x custom machine to 22.04
stsquad Apr 26, 2024
39ad72c
gitlab: remove stale s390x-all-linux-static conf hacks
stsquad Apr 26, 2024
8682ff6
hw/ide/core.c (cmd_read_native_max): Avoid limited device parameters
Oct 10, 2022
622f8eb
tests/qtest/ide-test: Verify READ NATIVE MAX ADDRESS is not limited
Oct 10, 2022
a88a049
.gitlab-ci.d/cirrus.yml: Shorten the runtime of the macOS and FreeBSD…
huth Apr 29, 2024
cc6cb42
.gitlab-ci.d/cirrus: Remove the netbsd and openbsd jobs
huth Apr 26, 2024
845dd03
hw/core/clock: allow clock_propagate on child clocks
raphui Apr 19, 2024
a8aa8af
hvf: arm: Remove PL1_WRITE_MASK
Apr 22, 2024
7b19a35
target/arm: Restrict translation disabled alignment check to VMSA
rth7680 Apr 22, 2024
bc980d6
docs/system/arm/emulation.rst: Add missing implemented features
pm215 Apr 18, 2024
e197395
target/arm: Enable FEAT_CSV2_3 for -cpu max
pm215 Apr 18, 2024
74360f3
target/arm: Enable FEAT_ETS2 for -cpu max
pm215 Apr 18, 2024
f7ddd7b
target/arm: Implement ID_AA64MMFR3_EL1
pm215 Apr 18, 2024
663163f
target/arm: Enable FEAT_Spec_FPACC for -cpu max
pm215 Apr 18, 2024
dcc5c01
tests/avocado: update sunxi kernel from armbian to 6.6.16
pm215 Apr 15, 2024
bd8e9dd
target/arm: Refactor default generic timer frequency handling
pm215 Apr 26, 2024
ee4336f
hw/arm/sbsa-ref: Force CPU generic timer to 62.5MHz
pm215 Apr 26, 2024
88c756b
hw/watchdog/sbsa_gwdt: Make watchdog timer frequency a QOM property
pm215 Apr 26, 2024
f037f5b
target/arm: Default to 1GHz cntfrq for 'max' and new CPUs
pm215 Apr 26, 2024
de7e907
Merge tag 'pull-loongarch-20240429' of https://gitlab.com/gaosong/qem…
rth7680 Apr 30, 2024
4b00855
hw/dmax/xlnx_dpdma: fix handling of address_extension descriptor fields
Apr 28, 2024
afdc29b
hw/char/stm32l4x5_usart: Fix memory corruption by adding correct clas…
huth Apr 29, 2024
eb656a6
hw/arm/npcm7xx: Store derivative OTP fuse key in little endian
philmd Apr 22, 2024
c771f88
hw/display : Add device DM163
inesvar Apr 24, 2024
5b5b014
hw/arm : Pass STM32L4x5 SYSCFG gpios to STM32L4x5 SoC
inesvar Apr 24, 2024
4c3308c
hw/arm : Create Bl475eMachineState
inesvar Apr 24, 2024
4915720
hw/arm : Connect DM163 to B-L475E-IOT01A
inesvar Apr 24, 2024
a0c325c
tests/qtest : Add testcase for DM163
inesvar Apr 24, 2024
b1e8807
Merge tag 'pull-request-2024-04-30' of https://gitlab.com/thuth/qemu …
rth7680 Apr 30, 2024
9c6c079
Merge tag 'pull-target-arm-20240430' of https://git.linaro.org/people…
rth7680 Apr 30, 2024
ed30e7b
tcg: Make tcg/helper-info.h self-contained
rth7680 Mar 14, 2024
83a0ad2
tcg: Pass function pointer to tcg_gen_call*
rth7680 Mar 14, 2024
25875fe
plugins: Zero new qemu_plugin_dyn_cb entries
rth7680 Mar 14, 2024
aff56de
plugins: Move function pointer in qemu_plugin_dyn_cb
rth7680 Mar 15, 2024
c7ba948
plugins: Create TCGHelperInfo for all out-of-line callbacks
rth7680 Mar 14, 2024
a0948bb
plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN
rth7680 Mar 14, 2024
21a3f62
plugins: Use emit_before_op for PLUGIN_GEN_FROM_TB
rth7680 Mar 14, 2024
74bb8ac
plugins: Add PLUGIN_GEN_AFTER_TB
rth7680 Mar 15, 2024
ac97717
plugins: Use emit_before_op for PLUGIN_GEN_FROM_INSN
rth7680 Mar 14, 2024
8a2927f
plugins: Use emit_before_op for PLUGIN_GEN_FROM_MEM
rth7680 Mar 14, 2024
5f2a5a5
plugins: Remove plugin helpers
rth7680 Mar 14, 2024
b074897
tcg: Remove TCG_CALL_PLUGIN
rth7680 Mar 15, 2024
36ab430
tcg: Remove INDEX_op_plugin_cb_{start,end}
rth7680 Mar 15, 2024
db409c0
plugins: Simplify callback queues
rth7680 Mar 15, 2024
ccd8f17
plugins: Introduce PLUGIN_CB_MEM_REGULAR
rth7680 Mar 15, 2024
b384c73
plugins: Replace pr_ops with a proper debug dump flag
rth7680 Mar 15, 2024
7e53aa2
plugins: Split out common cb expanders
rth7680 Mar 15, 2024
5e379b0
plugins: Merge qemu_plugin_tb_insn_get to plugin-gen.c
rth7680 Mar 15, 2024
5c48b01
plugins: Inline plugin_gen_empty_callback
rth7680 Mar 15, 2024
917d7f8
plugins: Update the documentation block for plugin-gen.c
rth7680 Mar 15, 2024
50761a5
qga: guest-get-fsinfo: add optional 'total-bytes-privileged' field
Mar 20, 2024
c3f32c1
qga: introduce ga_run_command() helper for guest cmd execution
Mar 20, 2024
123f040
qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper
Mar 20, 2024
1fce82b
qga/commands-posix: qmp_guest_set_time: use ga_run_command helper
Mar 20, 2024
8ef383b
qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper
Mar 20, 2024
2048129
qga/commands-posix: don't do fork()/exec() when suspending via sysfs
Mar 20, 2024
0e5b75a
qga/commands-posix: qmp_guest_set_user_password: use ga_run_command h…
Mar 20, 2024
1cc9932
qga: Refactor common SSH functions
aidanleuck Apr 24, 2024
6b9296b
qga: Implement SSH commands for Windows
aidanleuck Apr 24, 2024
d5a8f0b
Merge tag 'qga-pull-2024-05-01' of https://github.com/kostyanf14/qemu…
rth7680 May 1, 2024
935da8c
Merge tag 'pull-ufs-20240429' of https://gitlab.com/jeuk20.kim/qemu i…
rth7680 May 1, 2024
4977ce1
Merge tag 'pull-tcg-20240501' of https://gitlab.com/rth7680/qemu into…
rth7680 May 1, 2024
61653b4
accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()
philmd Apr 29, 2024
083367d
accel/whpx: Fix NULL dereference in whpx_init_vcpu()
philmd Apr 29, 2024
8a917b9
util/bufferiszero: Remove SSE4.1 variant
amonakov Feb 6, 2024
d018425
util/bufferiszero: Remove AVX512 variant
amonakov Feb 14, 2024
cbe3d52
util/bufferiszero: Reorganize for early test for acceleration
amonakov Feb 6, 2024
93a6085
util/bufferiszero: Remove useless prefetches
amonakov Feb 6, 2024
f28e0bb
util/bufferiszero: Optimize SSE2 and AVX2 variants
amonakov Feb 6, 2024
7ae6399
util/bufferiszero: Improve scalar variant
rth7680 Apr 7, 2024
0100ce2
util/bufferiszero: Introduce biz_accel_fn typedef
rth7680 Feb 15, 2024
bf67aa3
util/bufferiszero: Simplify test_buffer_is_zero_next_accel
rth7680 Feb 15, 2024
22437b4
util/bufferiszero: Add simd acceleration for aarch64
rth7680 Feb 10, 2024
a06d9ed
tests/bench: Add bufferiszero-bench
rth7680 Feb 16, 2024
909aff7
Merge tag 'pull-misc-20240503' of https://gitlab.com/rth7680/qemu int…
rth7680 May 3, 2024
f184f38
exec: Include missing license in 'exec/cpu-common.h'
philmd Apr 24, 2024
22879b6
user: Move 'abitypes.h' from 'exec/user' to 'user'
philmd Mar 22, 2024
4e11165
user: Move 'thunk.h' from 'exec/user' to 'user'
philmd Mar 22, 2024
bf0bcac
coverity: Update user emulation regexp
philmd Mar 22, 2024
155fb46
plugins/api: Only include 'exec/ram_addr.h' with system emulation
philmd Mar 22, 2024
e096d37
plugins: Update stale comment
philmd Apr 24, 2024
a0dbef9
MAINTAINERS: Update my email address
anthonyper-ctx Apr 29, 2024
c365e6b
target/sh4: Fix ADDV opcode
philmd Apr 30, 2024
e88a856
target/sh4: Fix SUBV opcode
philmd Apr 30, 2024
40ed073
target/sh4: Rename TCGv variables as manual for ADDV opcode
philmd Apr 30, 2024
942ba09
target/sh4: Rename TCGv variables as manual for SUBV opcode
philmd Apr 30, 2024
2d27c91
ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs
pm215 May 2, 2024
97c8722
Merge tag 'accel-sh4-ui-20240503' of https://github.com/philmd/qemu i…
rth7680 May 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nbd/server: do not poll within a coroutine context
Coroutines are not supposed to block. Instead, they should yield.

The client performs TLS upgrade outside of an AIOContext, during
synchronous handshake; this still requires g_main_loop.  But the
server responds to TLS upgrade inside a coroutine, so a nested
g_main_loop is wrong.  Since the two callbacks no longer share more
than the setting of data.complete and data.error, it's just as easy to
use static helpers instead of trying to share a common code path.  It
is also possible to add assertions that no other code is interfering
with the eventual path to qio reaching the callback, whether or not it
required a yield or main loop.

Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation")
Signed-off-by: Zhu Yangyang <[email protected]>
[eblake: move callbacks to their use point, add assertions]
Signed-off-by: Eric Blake <[email protected]>
Message-ID: <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
  • Loading branch information
Zhu Yangyang authored and ebblake committed Apr 25, 2024
commit ae6d91a7e9b77abb029ed3fa9fad461422286942
28 changes: 24 additions & 4 deletions nbd/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,13 +596,31 @@ static int nbd_request_simple_option(QIOChannel *ioc, int opt, bool strict,
return 1;
}

/* Callback to learn when QIO TLS upgrade is complete */
struct NBDTLSClientHandshakeData {
bool complete;
Error *error;
GMainLoop *loop;
};

static void nbd_client_tls_handshake(QIOTask *task, void *opaque)
{
struct NBDTLSClientHandshakeData *data = opaque;

qio_task_propagate_error(task, &data->error);
data->complete = true;
if (data->loop) {
g_main_loop_quit(data->loop);
}
}

static QIOChannel *nbd_receive_starttls(QIOChannel *ioc,
QCryptoTLSCreds *tlscreds,
const char *hostname, Error **errp)
{
int ret;
QIOChannelTLS *tioc;
struct NBDTLSHandshakeData data = { 0 };
struct NBDTLSClientHandshakeData data = { 0 };

ret = nbd_request_simple_option(ioc, NBD_OPT_STARTTLS, true, errp);
if (ret <= 0) {
Expand All @@ -619,18 +637,20 @@ static QIOChannel *nbd_receive_starttls(QIOChannel *ioc,
return NULL;
}
qio_channel_set_name(QIO_CHANNEL(tioc), "nbd-client-tls");
data.loop = g_main_loop_new(g_main_context_default(), FALSE);
trace_nbd_receive_starttls_tls_handshake();
qio_channel_tls_handshake(tioc,
nbd_tls_handshake,
nbd_client_tls_handshake,
&data,
NULL,
NULL);

if (!data.complete) {
data.loop = g_main_loop_new(g_main_context_default(), FALSE);
g_main_loop_run(data.loop);
assert(data.complete);
g_main_loop_unref(data.loop);
}
g_main_loop_unref(data.loop);

if (data.error) {
error_propagate(errp, data.error);
object_unref(OBJECT(tioc));
Expand Down
11 changes: 0 additions & 11 deletions nbd/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,6 @@ int nbd_drop(QIOChannel *ioc, size_t size, Error **errp)
}


void nbd_tls_handshake(QIOTask *task,
void *opaque)
{
struct NBDTLSHandshakeData *data = opaque;

qio_task_propagate_error(task, &data->error);
data->complete = true;
g_main_loop_quit(data->loop);
}


const char *nbd_opt_lookup(uint32_t opt)
{
switch (opt) {
Expand Down
10 changes: 0 additions & 10 deletions nbd/nbd-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,6 @@ static inline int nbd_write(QIOChannel *ioc, const void *buffer, size_t size,
return qio_channel_write_all(ioc, buffer, size, errp) < 0 ? -EIO : 0;
}

struct NBDTLSHandshakeData {
GMainLoop *loop;
bool complete;
Error *error;
};


void nbd_tls_handshake(QIOTask *task,
void *opaque);

int nbd_drop(QIOChannel *ioc, size_t size, Error **errp);

#endif
28 changes: 23 additions & 5 deletions nbd/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,23 @@ static int nbd_negotiate_handle_info(NBDClient *client, Error **errp)
return rc;
}

/* Callback to learn when QIO TLS upgrade is complete */
struct NBDTLSServerHandshakeData {
bool complete;
Error *error;
Coroutine *co;
};

static void nbd_server_tls_handshake(QIOTask *task, void *opaque)
{
struct NBDTLSServerHandshakeData *data = opaque;

qio_task_propagate_error(task, &data->error);
data->complete = true;
if (!qemu_coroutine_entered(data->co)) {
aio_co_wake(data->co);
}
}

/* Handle NBD_OPT_STARTTLS. Return NULL to drop connection, or else the
* new channel for all further (now-encrypted) communication. */
Expand All @@ -756,7 +773,7 @@ static QIOChannel *nbd_negotiate_handle_starttls(NBDClient *client,
{
QIOChannel *ioc;
QIOChannelTLS *tioc;
struct NBDTLSHandshakeData data = { 0 };
struct NBDTLSServerHandshakeData data = { 0 };

assert(client->opt == NBD_OPT_STARTTLS);

Expand All @@ -777,17 +794,18 @@ static QIOChannel *nbd_negotiate_handle_starttls(NBDClient *client,

qio_channel_set_name(QIO_CHANNEL(tioc), "nbd-server-tls");
trace_nbd_negotiate_handle_starttls_handshake();
data.loop = g_main_loop_new(g_main_context_default(), FALSE);
data.co = qemu_coroutine_self();
qio_channel_tls_handshake(tioc,
nbd_tls_handshake,
nbd_server_tls_handshake,
&data,
NULL,
NULL);

if (!data.complete) {
g_main_loop_run(data.loop);
qemu_coroutine_yield();
assert(data.complete);
}
g_main_loop_unref(data.loop);

if (data.error) {
object_unref(OBJECT(tioc));
error_propagate(errp, data.error);
Expand Down