aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-01-18 22:27:13 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-01-18 22:27:13 +0000
commitdea52c223bdb856e1f7a7155e71887535a3ab9f4 (patch)
tree1c4b924fcf1fc1a2e7a7ddb1b85700df2b95bed2
parent0dabdd6b3a7ead1183d6f26eaded7d0c332e4cc7 (diff)
parentbfadf13f63d63d099bf2be14c9b1863f25a091a2 (diff)
downloadqemu-dea52c223bdb856e1f7a7155e71887535a3ab9f4.zip
qemu-dea52c223bdb856e1f7a7155e71887535a3ab9f4.tar.gz
qemu-dea52c223bdb856e1f7a7155e71887535a3ab9f4.tar.bz2
Merge remote-tracking branch 'remotes/lvivier-gitlab/tags/trivial-branch-for-7.0-pull-request' into staging
trivial patches pull request 20220118 Fix comments and typos Add vmstate for ETRAX timers Use ldst in megasas # gpg: Signature made Tue 18 Jan 2022 12:28:04 GMT # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/lvivier-gitlab/tags/trivial-branch-for-7.0-pull-request: linux-user: Remove MAX_SIGQUEUE_SIZE linux-user: Return void from queue_signal() linux-user: Rename user_force_sig tracepoint to match function name linux-user: Fix comment typo in arm cpu_loop code softmmu: Provide a clue as to why device tree loading failed tests: Fix typo in check-help output qdev-core.h: Fix wrongly named reference to TYPE_SPLIT_IRQ hw/scsi/megasas: Simplify using the ldst API hw/timer/etraxfs_timer: Add vmstate for ETRAX timers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/scsi/megasas.c17
-rw-r--r--hw/timer/etraxfs_timer.c34
-rw-r--r--include/hw/qdev-core.h2
-rw-r--r--linux-user/arm/cpu_loop.c4
-rw-r--r--linux-user/qemu.h2
-rw-r--r--linux-user/signal-common.h4
-rw-r--r--linux-user/signal.c7
-rw-r--r--linux-user/trace-events2
-rw-r--r--softmmu/device_tree.c6
-rw-r--r--tests/Makefile.include2
10 files changed, 50 insertions, 30 deletions
diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
index de613c8..c9da5ce 100644
--- a/hw/scsi/megasas.c
+++ b/hw/scsi/megasas.c
@@ -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);
}
/*
diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c
index 4ba6621..139e5b8 100644
--- a/hw/timer/etraxfs_timer.c
+++ b/hw/timer/etraxfs_timer.c
@@ -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;
}
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index d19c941..92c3d65 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -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
diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c
index f153ab5..032e1ff 100644
--- a/linux-user/arm/cpu_loop.c
+++ b/linux-user/arm/cpu_loop.c
@@ -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;
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 5c713fa..7910ce5 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -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;
diff --git a/linux-user/signal-common.h b/linux-user/signal-common.h
index 42aa479..2113165 100644
--- a/linux-user/signal-common.h
+++ b/linux-user/signal-common.h
@@ -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);
diff --git a/linux-user/signal.c b/linux-user/signal.c
index f813b4f..32854bb 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -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 */
@@ -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 */
}
diff --git a/linux-user/trace-events b/linux-user/trace-events
index e7d2f54..f33717f 100644
--- a/linux-user/trace-events
+++ b/linux-user/trace-events
@@ -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"
diff --git a/softmmu/device_tree.c b/softmmu/device_tree.c
index 3965c83..31d1066 100644
--- a/softmmu/device_tree.c
+++ b/softmmu/device_tree.c
@@ -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;
}
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 4c564cf..3aba622 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -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