Trivial branch for 7.0 patches
The following changes since commit 6621441db50d5bae7e34dbd04bf3c57a27a71b32:
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20220115' into staging (2022-01-16 20:12:23 +0000)
are available in the Git repository at:
https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-for-7.0-pull-request
for you to fetch changes up to bfadf13f63d63d099bf2be14c9b1863f25a091a2:
linux-user: Remove MAX_SIGQUEUE_SIZE (2022-01-18 12:44:44 +0100)
----------------------------------------------------------------
trivial patches pull request 20220118
Fix comments and typos
Add vmstate for ETRAX timers
Use ldst in megasas
----------------------------------------------------------------
Bernhard Beschow (1):
softmmu: Provide a clue as to why device tree loading failed
Peter Maydell (4):
qdev-core.h: Fix wrongly named reference to TYPE_SPLIT_IRQ
linux-user: Fix comment typo in arm cpu_loop code
linux-user: Rename user_force_sig tracepoint to match function name
linux-user: Return void from queue_signal()
Philippe Mathieu-Daudé (3):
hw/timer/etraxfs_timer: Add vmstate for ETRAX timers hw/scsi/megasas: Simplify using the ldst API
tests: Fix typo in check-help output
Warner Losh (1):
linux-user: Remove MAX_SIGQUEUE_SIZE
hw/scsi/megasas.c | 17 +++-------------- hw/timer/etraxfs_timer.c | 34 +++++++++++++++++++++++++++++++++- include/hw/qdev-core.h | 2 +- linux-user/arm/cpu_loop.c | 4 ++-- linux-user/qemu.h | 2 -- linux-user/signal-common.h | 4 ++-- linux-user/signal.c | 7 +++---- linux-user/trace-events | 2 +- softmmu/device_tree.c | 6 ++++-- tests/Makefile.include | 2 +- 10 files changed, 50 insertions(+), 30 deletions(-)
Signature · 1 line
2.34.1
[PULL 3/9] qdev-core.h: Fix wrongly named reference to TYPE_SPLIT_IRQ
From: Peter Maydell <[email protected]>
Fix a comment in qdev-core.h where we incorrectly referred to TYPE_IRQ_SPLIT when we meant TYPE_SPLIT_IRQ.
Message-Id: <[email protected]>
--- include/hw/qdev-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/qdev-core.h +1 -1
@@ -493,7 +493,7 @@ qemu_irq qdev_get_gpio_in_named(DeviceState *dev, const char *name, int n);* qemu_irqs at once, or to connect multiple outbound GPIOs to the * same qemu_irq. (Warning: there is no assertion or other guard to * catch this error: the model will just not do the right thing.) -* Instead, for fan-out you can use the TYPE_IRQ_SPLIT device: connect +* Instead, for fan-out you can use the TYPE_SPLIT_IRQ device: connect * a device's outbound GPIO to the splitter's input, and connect each * of the splitter's outputs to a different device. For fan-in you * can use the TYPE_OR_IRQ device, which is a model of a logical OR
Signature · 1 line
2.34.1
[PULL 2/9] hw/scsi/megasas: Simplify using the ldst API
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
This code is easier to review using the load/store API.
Message-Id: <[email protected]>
--- hw/scsi/megasas.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-)
hw/scsi/megasas.c +3 -14
@@ -383,8 +383,7 @@ static int megasas_setup_inquiry(uint8_t *cdb, int pg, int len) cdb[1 ] =0x1 ; cdb[2 ] = pg; } - cdb[3 ] = (len >>8 ) &0xff ; - cdb[4 ] = (len &0xff ); +stw_be_p (&cdb[3 ], len);return len; }
@@ -400,18 +399,8 @@ static void megasas_encode_lba(uint8_t *cdb, uint64_t lba, }else { cdb[0 ] =READ_16 ; } - cdb[2 ] = (lba >>56 ) &0xff ; - cdb[3 ] = (lba >>48 ) &0xff ; - cdb[4 ] = (lba >>40 ) &0xff ; - cdb[5 ] = (lba >>32 ) &0xff ; - cdb[6 ] = (lba >>24 ) &0xff ; - cdb[7 ] = (lba >>16 ) &0xff ; - cdb[8 ] = (lba >>8 ) &0xff ; - cdb[9 ] = (lba) &0xff ; - cdb[10 ] = (len >>24 ) &0xff ; - cdb[11 ] = (len >>16 ) &0xff ; - cdb[12 ] = (len >>8 ) &0xff ; - cdb[13 ] = (len) &0xff ; +stq_be_p (&cdb[2 ], lba); +stl_be_p (&cdb[2 +8 ], len); }/*
Signature · 1 line
2.34.1
[PULL 4/9] tests: Fix typo in check-help output
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Fix typo in 'make check-help' output.
Message-Id: <[email protected]>
--- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile.include +1 -1
@@ -23,7 +23,7 @@ endif @echo " $(MAKE) check-clean Clean the tests and related data" @echo @echo "The following are useful for CI builds" - @echo " $(MAKE) check-build Build most test binaris" + @echo " $(MAKE) check-build Build most test binaries" @echo " $(MAKE) get-vm-images Downloads all images used by avocado tests, according to configured targets (~350 MB each, 1.5 GB max)" @echo @echo
Signature · 1 line
2.34.1
[PULL 6/9] linux-user: Fix comment typo in arm cpu_loop code
In reply to Laurent VivierFrom: Peter Maydell <[email protected]>
Fix a typo in a comment in the arm cpu_loop code.
Message-Id: <[email protected]>
--- linux-user/arm/cpu_loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/arm/cpu_loop.c +2 -2
@@ -434,8 +434,8 @@ void cpu_loop(CPUARMState *env)case 0x6 :/* Access flag fault, level 2 */ case 0x9 :/* Domain fault, level 1 */ case 0xb :/* Domain fault, level 2 */ -case 0xd :/* Permision fault, level 1 */ -case 0xf :/* Permision fault, level 2 */ +case 0xd :/* Permission fault, level 1 */ +case 0xf :/* Permission fault, level 2 */ si_signo =TARGET_SIGSEGV ; si_code =TARGET_SEGV_ACCERR ;break ;
Signature · 1 line
2.34.1
[PULL 7/9] linux-user: Rename user_force_sig tracepoint to match function name
In reply to Laurent VivierFrom: Peter Maydell <[email protected]>
In commit c599d4d6d6e9bfdb64 in 2016 we renamed the old force_sig() function to dump_core_and_abort(), but we forgot to rename the associated tracepoint. Rename the tracepoint to to match the function it's called from.
Message-Id: <[email protected]>
--- linux-user/signal.c | 2 +- linux-user/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
linux-user/signal.c +1 -1
@@ -734,7 +734,7 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig)struct sigaction act; host_sig =target_to_host_signal (target_sig); -trace_user_force_sig (env, target_sig, host_sig); +trace_user_dump_core_and_abort (env, target_sig, host_sig);gdb_signalled (env, target_sig);/* dump core if supported by target binary format */
linux-user/trace-events +1 -1
@@ -9,7 +9,7 @@ user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64 user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64 user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64 user_do_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=0x%"PRIx64 -user_force_sig(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)" +user_dump_core_and_abort(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)" user_handle_signal(void *env, int target_sig) "env=%p signal %d" user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (target %d)" user_queue_signal(void *env, int target_sig) "env=%p signal %d"
Signature · 1 line
2.34.1
[PULL 9/9] linux-user: Remove MAX_SIGQUEUE_SIZE
In reply to Laurent VivierFrom: Warner Losh <[email protected]>
It's been unused for 7 years since 907f5fddaa67 when linux-user stopped queueing any signals.
Message-Id: <[email protected]>
--- linux-user/qemu.h | 2 -- 1 file changed, 2 deletions(-)
linux-user/qemu.h +0 -2
@@ -89,8 +89,6 @@ struct vm86_saved_state {#include "nwfpe/fpa11.h" #endif -#define MAX_SIGQUEUE_SIZE 1024 -struct emulated_sigtable {int pending;/* true if signal is pending */ target_siginfo_t info;
Signature · 1 line
2.34.1
[PULL 8/9] linux-user: Return void from queue_signal()
In reply to Laurent VivierFrom: Peter Maydell <[email protected]>
The linux-user queue_signal() function always returns 1, and none of its callers check the return value. Give it a void return type instead.
The return value is a leftover from the old pre-2016 linux-user signal handling code, which really did have a queue of signals and so might return a failure indication if too many signals were queued at once. The current design avoids having to ever have more than one signal queued via queue_signal() at once, so it can never fail.
Message-Id: <[email protected]>
--- linux-user/signal-common.h | 4 ++-- linux-user/signal.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-)
linux-user/signal-common.h +2 -2
@@ -59,8 +59,8 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,void process_pending_signals (CPUArchState *cpu_env);void signal_init (void ); -int queue_signal (CPUArchState *env,int sig,int si_type, -target_siginfo_t *info); +void queue_signal (CPUArchState *env,int sig,int si_type, +target_siginfo_t *info);void host_to_target_siginfo (target_siginfo_t *tinfo,const siginfo_t *info);void target_to_host_siginfo (siginfo_t *info,const target_siginfo_t *tinfo);int target_to_host_signal (int sig);
linux-user/signal.c +2 -3
@@ -780,8 +780,8 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig)/* queue a signal so that it will be send to the virtual CPU as soon as possible */ -int queue_signal (CPUArchState *env,int sig,int si_type, -target_siginfo_t *info) +void queue_signal (CPUArchState *env,int sig,int si_type, +target_siginfo_t *info) {CPUState *cpu =env_cpu (env);TaskState *ts = cpu->opaque;
@@ -794,7 +794,6 @@ int queue_signal(CPUArchState *env, int sig, int si_type, ts->sync_signal.pending = sig;/* signal that a new signal is pending */ qatomic_set (&ts->signal_pending,1 ); -return 1 ;/* indicates that the signal was queued */ }
Signature · 1 line
2.34.1
[PULL 1/9] hw/timer/etraxfs_timer: Add vmstate for ETRAX timers
In reply to Laurent VivierFrom: Philippe Mathieu-Daudé <[email protected]>
Add the vmstate for the ETRAX timers.
This is in theory a migration compatibility break for the 'AXIS devboard 88' CRIS machine.
Message-Id: <[email protected]>
--- hw/timer/etraxfs_timer.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-)
hw/timer/etraxfs_timer.c +33 -1
@@ -26,6 +26,7 @@#include "hw/sysbus.h" #include "sysemu/reset.h" #include "sysemu/runstate.h" +#include "migration/vmstate.h" #include "qemu/module.h" #include "qemu/timer.h" #include "hw/irq.h"
@@ -64,7 +65,7 @@ struct ETRAXTimerState {ptimer_state *ptimer_t1;ptimer_state *ptimer_wd; -int wd_hits; +uint32_t wd_hits;/* Control registers. */ uint32_t rw_tmr0_div;
@@ -83,6 +84,36 @@ struct ETRAXTimerState {uint32_t r_masked_intr; }; +static const VMStateDescription vmstate_etraxfs = { + .name ="etraxfs" , + .version_id =0 , + .minimum_version_id =0 , + .fields = (VMStateField []) { +VMSTATE_PTIMER (ptimer_t0, ETRAXTimerState), +VMSTATE_PTIMER (ptimer_t1, ETRAXTimerState), +VMSTATE_PTIMER (ptimer_wd, ETRAXTimerState), + +VMSTATE_UINT32 (wd_hits, ETRAXTimerState), + +VMSTATE_UINT32 (rw_tmr0_div, ETRAXTimerState), +VMSTATE_UINT32 (r_tmr0_data, ETRAXTimerState), +VMSTATE_UINT32 (rw_tmr0_ctrl, ETRAXTimerState), + +VMSTATE_UINT32 (rw_tmr1_div, ETRAXTimerState), +VMSTATE_UINT32 (r_tmr1_data, ETRAXTimerState), +VMSTATE_UINT32 (rw_tmr1_ctrl, ETRAXTimerState), + +VMSTATE_UINT32 (rw_wd_ctrl, ETRAXTimerState), + +VMSTATE_UINT32 (rw_intr_mask, ETRAXTimerState), +VMSTATE_UINT32 (rw_ack_intr, ETRAXTimerState), +VMSTATE_UINT32 (r_intr, ETRAXTimerState), +VMSTATE_UINT32 (r_masked_intr, ETRAXTimerState), + +VMSTATE_END_OF_LIST () + } +}; +static uint64_t timer_read (void *opaque,hwaddr addr,unsigned int size) {
@@ -357,6 +388,7 @@ static void etraxfs_timer_class_init(ObjectClass *klass, void *data)ResettableClass *rc =RESETTABLE_CLASS (klass); dc->realize = etraxfs_timer_realize; + dc->vmsd = &vmstate_etraxfs; rc->phases.enter = etraxfs_timer_reset_enter; rc->phases.hold = etraxfs_timer_reset_hold; }
Signature · 1 line
2.34.1
[PULL 5/9] softmmu: Provide a clue as to why device tree loading failed
In reply to Laurent VivierFrom: Bernhard Beschow <[email protected]>
fdt_open_into() obligingly returns an error code in case the operation failed. So be obliging as well and use it in the error message.
Message-Id: <[email protected]>
--- softmmu/device_tree.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
softmmu/device_tree.c +4 -2
@@ -60,7 +60,8 @@ void *create_device_tree(int *sizep) } ret =fdt_open_into (fdt, fdt, *sizep);if (ret) { -error_report ("Unable to copy device tree in memory" ); +error_report ("%s: Unable to copy device tree into memory: %s" , + __func__,fdt_strerror (ret));exit (1 ); }
@@ -104,7 +105,8 @@ void *load_device_tree(const char *filename_path, int *sizep) ret =fdt_open_into (fdt, fdt, dt_size);if (ret) { -error_report ("Unable to copy device tree in memory" ); +error_report ("%s: Unable to copy device tree into memory: %s" , + __func__,fdt_strerror (ret)); goto fail; }
Signature · 1 line
2.34.1
Peter Maydell
AppliedQuoted 11 lines · Laurent Vivier
The following changes since commit
6621441db50d5bae7e34dbd04bf3c57a27a71b32:Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20220115' into staging (2022-01-16 20:12:23 +0000)
are available in the Git repository at:
https://gitlab.com/laurent_vivier/qemu.git tags/trivial-branch-for-7.0-pull-request
for you to fetch changes up to
bfadf13f63d63d099bf2be14c9b1863f25a091a2:
Quoted 8 lines
linux-user: Remove
MAX_SIGQUEUE_SIZE(2022-01-18 12:44:44 +0100)----------------------------------------------------------------
trivial patches pull request 20220118Fix comments and typos
Add vmstate for ETRAX timers
Use ldst in megasas
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/7.0
for any user-visible changes.
-- PMM