On Apr 12 11:59, Dmitry Tikhov wrote:
> Since nlbas is of type int, it does not work with large namespace size
> values, e.g., 9 TB size of file backing namespace and 8 byte metadata
> with 4096 bytes lbasz gives negative nlbas value, which is later
> promoted to negative int64_t type value and res
On Apr 15 23:48, Dmitry Tikhov wrote:
> Since there is no return after nvme_dsm_cb invocation, metadata
> associated with non-zero block range is currently zeroed. Also this
> behaviour leads to segfault since we schedule iocb->bh two times.
> First when entering nvme_dsm_cb with iocb->idx == iocb-
On 4/15/22 02:40, Xiaojuan Yang wrote:
+memory_region_init(&s->mmio[cpu], OBJECT(s),
+ "loongarch_extioi", EXTIOI_SIZE);
+
+memory_region_init_io(&s->mmio_nodetype[cpu], OBJECT(s),
+ &extioi_nodetype_ops, s,
+
On 4/15/22 02:40, Xiaojuan Yang wrote:
This patch realize PCH-MSI interrupt controller.
Signed-off-by: Xiaojuan Yang
Signed-off-by: Song Gao
---
hw/intc/Kconfig | 5 ++
hw/intc/loongarch_pch_msi.c | 75 +
hw/intc/meson.build
On 4/15/22 02:40, Xiaojuan Yang wrote:
+static void pch_pic_update_irq(LoongArchPCHPIC *s, uint32_t mask,
+ int level, int hi)
+{
+uint32_t val, irq;
+
+if (level == 1) {
+if (hi) {
+val = mask & s->intirr_hi & (~s->int_mask_hi);
+
When CPU-to-NUMA association isn't explicitly provided by users,
the default one is given by mc->get_default_cpu_node_id(). However,
the CPU topology isn't fully considered in the default association
and this causes CPU topology broken warnings on booting Linux guest.
For example, the following wa
When the PPTT table is built, the CPU topology is re-calculated, but
it's unecessary because the CPU topology has been populated in
virt_possible_cpu_arch_ids() on arm/virt machine.
This reworks build_pptt() to avoid by reusing the existing one in
ms->possible_cpus. Currently, the only user of bui
Currently, the SMP configuration isn't considered when the CPU
topology is populated. In this case, it's impossible to provide
the default CPU-to-NUMA mapping or association based on the socket
ID of the given CPU.
This takes account of SMP configuration when the CPU topology
is populated. The die
This adds cluster-id in CPU instance properties, which will be used
by arm/virt machine. Besides, the cluster-id is also verified or
dumped in various spots:
* hw/core/machine.c::machine_set_cpu_numa_node() to associate
CPU with its NUMA node.
* hw/core/machine.c::machine_numa_finish_cpu_
When the CPU-to-NUMA association isn't provided by user, the default NUMA
node ID for the specific CPU is returned from virt_get_default_cpu_node_id().
Unfortunately, the default NUMA node ID breaks socket boundary and leads to
the broken CPU topology warning message in Linux guest. This series int
On Sat, Apr 16, 2022 at 08:30:34PM +0100, Ben Dooks wrote:
> Use the qemu_fdt_setprop_strings() in sifve_u.c to simplify
> the code.
>
> Signed-off-by; Ben Dooks
> ---
> hw/riscv/sifive_u.c | 20 +++-
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/hw/riscv/s
On 4/15/22 02:40, Xiaojuan Yang wrote:
+static const VMStateDescription vmstate_loongarch_ipi = {
+.name = TYPE_LOONGARCH_IPI,
+.version_id = 0,
+.minimum_version_id = 0,
+.fields = (VMStateField[]) {
+VMSTATE_END_OF_LIST()
+}
Why are there no fields here? There's d
On 4/15/22 02:40, Xiaojuan Yang wrote:
+++ b/include/hw/loongarch/loongarch.h
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Definitions for loongarch board emulation.
+ *
+ * Copyright (C) 2021 Loongson Technology Corporation Limited
+ */
+
+#ifndef HW_LOONGARCH_H
+#de
On 4/15/22 02:40, Xiaojuan Yang wrote:
+++ b/configs/devices/loongarch64-softmmu/default.mak
@@ -0,0 +1,3 @@
+# Default configuration for loongarch64-softmmu
+
+CONFIG_LOONGARCH_VIRT=y
Again, you can't add this file until you're ready to build.
We do get farther that patch 30, ending in
../qe
Use the qemu_fdt_setprop_reg64() to replace the code
that sets the property manually.
Signed-off-by: Ben Dooks
---
hw/riscv/sifive_u.c | 41 +++--
1 file changed, 11 insertions(+), 30 deletions(-)
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 7
Use the qemu_fdt_setprop_strings() in sifve_u.c to simplify
the code.
Signed-off-by; Ben Dooks
---
hw/riscv/sifive_u.c | 20 +++-
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
index 1fe364cbb0..b00086d86e 100644
--- a/hw/
Add a helper to set a property from a set of strings
to reduce the following code:
static const char * const clint_compat[2] = {
"sifive,clint0", "riscv,clint0"
};
qemu_fdt_setprop_string_array(fdt, nodename, "compatible",
(char **)&clint_compat, ARRAY_SIZE(clint_compa
I've been doing a bit of looking at riscv and dt creation, and
was thinking the following two helper functions would be useful
so implemented qemu_fdt_setprop_reg64() and qemu_fdt_setprop_strings()
and then applied them to the hw/riscv/sifive_u.c machine.
I thought I should get a review in before
Add a macro qemu_fdt_setprop_reg64() to set the given
node's reg property directly from the memory map entry
to avoid open coding of the following:
qemu_fdt_setprop_cells(fdt, nodename, "reg",
0x0, memmap[SIFIVE_U_DEV_OTP].base,
0x0, memmap[SIFIVE_U_DEV_OTP].size);
Signed-off-
On 4/15/22 02:40, Xiaojuan Yang wrote:
+uint64_t helper_rdtime_d(CPULoongArchState *env)
+{
+LoongArchCPU *cpu = LOONGARCH_CPU(env_cpu(env));
+
+if ((env->CSR_MISC >> 7) & 0x1) {
+do_raise_exception(env, EXCCODE_IPE, GETPC());
This isn't correct -- you need to extract bit 4 + pl
On 4/15/22 02:40, Xiaojuan Yang wrote:
+void loongarch_cpu_register_gdb_regs_for_features(CPUState *cs)
+{
+gdb_register_coprocessor(cs, loongarch_gdb_get_fpu, loongarch_gdb_set_fpu,
+ 41, "loongarch-fpu64.xml", 0);
+}
+
+int loongarch_read_qxfer(CPUState *cs, cons
Use FILE* for global_file. We can perform an rcu_read on that
just as easily as RCUCloseFILE*. This simplifies a couple of
places, where previously we required taking the rcu_read_lock
simply to avoid racing to dereference RCUCloseFile->fd.
Only allocate the RCUCloseFile prior to call_rcu.
Revi
Add a new log flag, tid, to turn this feature on.
Require the log filename to be set, and to contain %d.
Do not allow tid to be turned off once it is on, nor let
the filename be change thereafter. This avoids the need
for signalling each thread to re-open on a name change.
Reviewed-by: Alex Benn
s/QemuLogFile/RCUCloseFILE/
s/qemu_logfile_free/rcu_close_file/
Emphasize that this is only a carrier for passing a pointer
to call_rcu for closing, and not the real logfile.
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
util/log.c | 28
Merge the close from the changed_name block with the close
from the !need_to_open_file block.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
util/log.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/util/log.c b/util/log.c
index 631856e231..21da96
Perform all logfile setup in one step.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
bsd-user/main.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index ed26fc5acb..aa13eae7f3 100644
--- a/bsd-user/main.c
On 4/15/22 02:40, Xiaojuan Yang wrote:
diff --git a/configs/targets/loongarch64-softmmu.mak
b/configs/targets/loongarch64-softmmu.mak
new file mode 100644
index 00..f33fa1590b
--- /dev/null
+++ b/configs/targets/loongarch64-softmmu.mak
@@ -0,0 +1 @@
+TARGET_XML_FILES= gdb-xml/loongarch-b
The only real use is in cpu_abort, where we have just
flushed the file via qemu_log_unlock, and are just about
to force-crash the application via abort. We do not
really need to close the FILE before the abort.
The two uses in test-logging.c can be handled with
qemu_set_log_filename_flags.
Revie
Rename to emphasize this is the file-scope global variable.
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
util/log.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/util/log.c b/util/log.c
index b3f79deb6c
Perform all logfile setup in one step.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
linux-user/main.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index d263b2a669..0297ae8321 100644
--- a/linux-user/main.
Rename to emphasize this is the file-scope global variable.
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
util/log.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/util/log.c b/util/log.c
index 491a8f97f9..b
Provide a function to set both filename and flags at
the same time. This is the common case at startup.
Signed-off-by: Richard Henderson
---
v2: Return bool, per recommendations in qapi/error.h (phil).
---
include/qemu/log.h | 1 +
util/log.c | 122
Rename to emphasize this covers the file-scope global variables.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
util/log.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/util/log.c b/util/log.c
index 425f0064b0..bb201664ac 100644
--- a/util/log.c
+
Now that the log buffer is flushed after every qemu_log_unlock,
which includes every call to qemu_log, we do not need to force
line buffering (or unbuffering for windows). Block buffer the
entire loggable unit.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
util/log.c | 6 --
Perform all logfile setup at startup in one step.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
softmmu/vl.c | 21 +
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index a74d0a44a2..65c02963b6 100644
--- a/softmmu/v
Move QemuLogFile, qemu_logfile, and all inline functions into qemu/log.c.
No need to expose these implementation details in the api.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/qemu/log.h| 38 --
tests/unit/test-logging.c |
We have extra stuff to log at the same time.
Hoist the qemu_log_lock/unlock to the caller and use fprintf.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/exec/log.h | 15 ---
linux-user/main.c | 43 +--
linux-user/mmap.
Only call is_daemonized once.
We require the result on all paths after this point.
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
util/log.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/util/log.c b/util/log.c
in
The bug referenced in os-win32.h was fixed in mingw-w64 v6.
According to repology, version 5 used by ubuntu 18, which is
not yet out of support, so provide a meson link test for it.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
meson.build | 12
inclu
We have extra stuff to log at the same time.
Hoist the qemu_log_trylock/unlock to the caller and use fprintf.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
bsd-user/main.c | 35 ++-
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/b
Use qemu_log_lock/unlock instead of the raw rcu_read.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
tests/unit/test-logging.c | 33 +++--
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/tests/unit/test-logging.c b/tests/unit/test-loggi
All uses flush output immediately before or after qemu_log_unlock.
Instead of a separate call, move the flush into qemu_log_unlock.
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
include/qemu/log.h| 2 --
accel/tcg/translate-all.c |
The only user of this feature, tcg_dump_ops, has been
converted to use fprintf directly.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/qemu/log-for-trace.h | 2 +-
util/log.c | 13 ++---
2 files changed, 3 insertions(+), 12 deletions(-)
diff -
Now that all uses have been updated, consider a missing
test of the result of qemu_log_trylock a bug and Werror.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/qemu/log.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/log.h b/include/qemu
Use qemu_log_trylock/unlock instead of the raw rcu_read.
Signed-off-by: Richard Henderson
---
include/exec/log.h | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/include/exec/log.h b/include/exec/log.h
index ad0a40cfeb..4a7375a45f 100644
--- a/include/exec/log.h
Avoid using QemuLogFile and RCU directly.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
util/log.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/util/log.c b/util/log.c
index 6b7b358573..090bc3bc39 100644
--- a/util/log.c
+++ b/util/log.c
@@ -62
Inside log_cpu_state, we perform qemu_log_trylock/unlock, which need
not be done if we have already performed the lock beforehand.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
accel/tcg/cpu-exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accel/tcg/cpu
Inside qemu_log, we perform qemu_log_trylock/unlock, which need
not be done if we have already performed the lock beforehand.
Always check the result of qemu_log_trylock -- only checking
qemu_loglevel_mask races with the acquisition of the lock on
the logfile.
Reviewed-by: Alex Bennée
Signed-off
Do not force exit within qemu_set_log; return bool and pass
an Error value back up the stack as per usual.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
v2: Return bool, per recommendations in qapi/error.h (phil).
---
include/qemu/log.h | 2 +-
bsd-user/main.c
Do not reference qemu_logfile directly;
use the predicate provided by qemu/log.h.
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
os-posix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/os-posix.c b/os-posix.c
index 24692
This is redundant with the logging done in cpu_common_reset.
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
target/nios2/cpu.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c
index 6975ae4bdb..b0
Do not replicate the individual logging statements.
Use qemu_log_trylock/unlock instead of qemu_log directly.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
hw/xen/xen_pvdev.c | 44
1 file changed, 24 insertions(+), 20 deletions(-)
di
These functions are no longer used.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/exec/log.h | 24
1 file changed, 24 deletions(-)
diff --git a/include/exec/log.h b/include/exec/log.h
index 648f4d2263..06ab9841ee 100644
--- a/include/exec/log.h
We have fetched and locked the logfile in translator_loop.
Pass the filepointer down to the disas_log hook so that it
need not be fetched and locked again.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/exec/translator.h | 2 +-
accel/tcg/translator.c| 2 +-
This function can fail, which makes it more like ftrylockfile
or pthread_mutex_trylock than flockfile or pthread_mutex_lock,
so rename it.
To closer match the other trylock functions, release rcu_read_lock
along the failure path, so that qemu_log_unlock need not be called
on failure.
Reviewed-by:
This code appears to be trying to make sure there is a logfile.
But that's already true -- the logfile will either be set by -D,
or will be stderr. In either case, not appropriate here.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
target/hexagon/translate.c | 6 --
1 file
This function is no longer used.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/qemu/log.h | 15 ---
1 file changed, 15 deletions(-)
diff --git a/include/qemu/log.h b/include/qemu/log.h
index d090faf22a..2d9455dc85 100644
--- a/include/qemu/log.h
+++ b/includ
We have already looked up and locked the filepointer.
Use fprintf instead of qemu_log directly for output
in and around tcg_dump_ops.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
tcg/tcg.c | 109 ++
1 file changed, 52 insertio
Most of the changes here reduce the amount of locking involved
in logging, due to repeated qemu_log calls, each of which takes
and releases the rcu_read_lock.
This makes more use of qemu_log_lock/unlock around code blocks,
which both keeps the output together in the face of threads and
also plays
This buffering was introduced during the Paleozoic: 9fa3e853531.
There has never been an explanation as to why we may not allow
glibc to allocate the file buffer itself. We certainly have
many other uses of mmap and malloc during user-only startup,
so presumably whatever the issue was, it has bee
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Richard Henderson
---
include/qemu/log.h | 28 +++-
util/log.c | 23 +++
2 files changed, 26 insertions(+), 25 deletions(-)
diff --git a/include/qemu/log.h b/include/
Enable the a76 for virt and sbsa board use.
Signed-off-by: Richard Henderson
---
docs/system/arm/virt.rst | 1 +
hw/arm/sbsa-ref.c| 1 +
hw/arm/virt.c| 1 +
target/arm/cpu64.c | 66
4 files changed, 69 insertions(+)
diff --gi
This feature is AArch64 only, and applies to physical SErrors,
which QEMU does not implement, thus the feature is a nop.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
v2: Update emulation.rst
---
docs/system/arm/emulation.rst | 1 +
target/arm/cpu64.c| 1 +
2 files
Per the recommendations in qapi/error.h, return false on failure.
Use the return value in the monitor, the only place we aren't
already passing error_fatal or error_abort.
Reviewed-by: Alex Bennée
Signed-off-by: Richard Henderson
---
include/qemu/log.h | 2 +-
monitor/misc.c | 3 +--
util/
This extension concerns not merging memory access, which TCG does
not implement. Thus we can trivially enable this feature.
Add a comment to handle_hint for the DGH instruction, but no code.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
v2: Update emulation.rst
---
docs/syste
Virtual SError exceptions are raised by setting HCR_EL2.VSE,
and are routed to EL1 just like other virtual exceptions.
Signed-off-by: Richard Henderson
---
v2: Honor EAE for reporting VSERR to aa32.
---
target/arm/cpu.h | 2 ++
target/arm/internals.h | 8
target/arm/syndrome.h
Update the legacy feature names to the current names.
Provide feature names for id changes that were not marked.
Sort the field updates into increasing bitfield order.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
target/arm/cpu64.c | 96 ++---
Enable the n1 for virt and sbsa board use.
Signed-off-by: Richard Henderson
---
docs/system/arm/virt.rst | 1 +
hw/arm/sbsa-ref.c| 1 +
hw/arm/virt.c| 1 +
target/arm/cpu64.c | 66
4 files changed, 69 insertions(+)
diff --git
Share the code to set AArch32 max features so that we no
longer have code drift between qemu{-system,}-{arm,aarch64}.
Signed-off-by: Richard Henderson
---
target/arm/internals.h | 2 +
target/arm/cpu64.c | 50 +-
target/arm/cpu_tcg.c | 114 ++-
Enable writes to the TERR and TEA bits when RAS is enabled.
These bits are otherwise RES0.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
target/arm/helper.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 655beba3d6.
This extension concerns branch speculation, which TCG does
not implement. Thus we can trivially enable this feature.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
v2: Update emulation.rst
---
docs/system/arm/emulation.rst | 1 +
target/arm/cpu64.c| 1 +
target/arm
This extension concerns cache speculation, which TCG does
not implement. Thus we can trivially enable this feature.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
v2: Update emulation.rst
---
docs/system/arm/emulation.rst | 1 +
target/arm/cpu64.c| 1 +
target/arm/
Instead of starting with cortex-a15 and adding v8 features to
a v7 cpu, begin with a v8 cpu stripped of its aarch64 features.
This fixes the long-standing to-do where we only enabled v8
features for user-only.
Signed-off-by: Richard Henderson
---
v2: Create impdef sysregs; only enable short-vecto
There is no branch prediction in TCG, therefore there is no
need to actually include the context number into the predictor.
Therefore all we need to do is add the state for SCXTNUM_ELx.
Signed-off-by: Richard Henderson
---
v2: Update emulation.rst; clear CSV2_FRAC; use decimal; tidy access_scxtnu
Add only the system registers required to implement zero error
records. This means we need to save state for ERRSELR, but all
values are out of range, so none of the indexed error record
registers need be implemented.
Add the EL2 registers required for injecting virtual SError.
Signed-off-by: Ri
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
target/arm/cpu.h | 15 +++
1 file changed, 15 insertions(+)
diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 76c0dd37cd..20bf70545e 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -3703,6 +3703,11 @@ stati
We set this for qemu-system-aarch64, but failed to do so
for the strictly 32-bit emulation.
Fixes: 3bec78447a9 ("target/arm: Provide ARMv8.4-PMU in '-cpu max'")
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
target/arm/cpu_tcg.c | 4
1 file changed, 4 insertions(+)
diff -
Use FIELD_DP{32,64} to manipulate id_pfr1 and id_aa64pfr0
during arm_cpu_realizefn.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
target/arm/cpu.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
in
Drop el3_no_el2_cp_reginfo, el3_no_el2_v8_cp_reginfo,
and the local vpidr_regs definition, and rely on the
squasing to ARM_CP_CONST while registering.
Signed-off-by: Richard Henderson
---
target/arm/helper.c | 158
1 file changed, 13 insertions(+), 14
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
v2: Update emulation.rst
---
docs/system/arm/emulation.rst | 1 +
target/arm/cpu64.c| 1 +
target/arm/cpu_tcg.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/docs/system/arm/emulation.rst b/docs/system/a
Check for and defer any pending virtual SError.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
v2: Retain m-profile check; improve comments.
---
target/arm/helper.h| 1 +
target/arm/a32.decode | 16 --
target/arm/t32.decode | 18
Create a typedef as well, and use it in ARMCPRegInfo.
This won't be perfect for debugging, but it'll nicely
display the most common cases.
Signed-off-by: Richard Henderson
---
target/arm/cpregs.h | 44 +++-
target/arm/helper.c | 5 ++---
2 files changed,
Previously we were defining some of these in user-only mode,
but none of them are accessible from user-only, therefore
define them only in system mode.
This will shortly be used from cpu_tcg.c also.
Signed-off-by: Richard Henderson
---
v2: New patch.
---
target/arm/internals.h | 6
target
Use a single memory allocation for name and reginfo.
Perform the override check early; use assert not printf+abort.
Use a switch statement to validate state.
Signed-off-by: Richard Henderson
---
target/arm/cpu.c| 16 +
target/arm/helper.c | 154 +++---
Rearrange the values of the enumerators of CPAccessResult
so that we may directly extract the target el. For the two
special cases in access_check_cp_reg, use CPAccessResult.
Signed-off-by: Richard Henderson
---
target/arm/cpregs.h| 26
target/arm/op_helper.c | 56 ++
Add the aa64 predicate for detecting RAS support from id registers.
We already have the aa32 version from the M-profile work.
Add the 'any' predicate for testing both aa64 and aa32.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
target/arm/cpu.h | 10 ++
1 file changed,
This register is present for either VHE or Debugv8p2.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Henderson
---
v3: Rely on EL3-no-EL2 squashing during registration.
---
target/arm/helper.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/target/arm/hel
Give this enum a name and use in ARMCPRegInfo and add_cpreg_to_hashtable.
Add the enumerator ARM_CP_SECSTATE_BOTH to clarify how 0
is handled in define_one_arm_cp_reg_with_opaque.
Signed-off-by: Richard Henderson
---
target/arm/cpregs.h | 7 ---
target/arm/helper.c | 3 ++-
2 files changed,
This extension concerns changes to the External Debug interface,
with Secure and Non-secure access to the debug registers, and all
of it is outside the scope of QEMU. Indicating support for this
is mandatory with FEAT_SEL2, which we do implement.
Reviewed-by: Peter Maydell
Signed-off-by: Richard
More gracefully handle cpregs when EL2 and/or EL3 are missing.
If the reg is entirely inaccessible, do not register it at all.
If the reg is for EL2, and EL3 is present but EL2 is not,
squash to ARM_CP_CONST.
This will simplify cpreg registration for conditional arm features.
Signed-off-by: Richa
Use tcg_constant_{i32,i64} as appropriate throughout.
Signed-off-by: Richard Henderson
---
target/arm/translate-sve.c | 198 +
1 file changed, 68 insertions(+), 130 deletions(-)
diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c
index ddc3a8
The only portion of FEAT_Debugv8p2 that is relevant to QEMU
is CONTEXTIDR_EL2, which is also conditionally implemented
with FEAT_VHE. The rest of the debug extension concerns the
External debug interface, which is outside the scope of QEMU.
Reviewed-by: Peter Maydell
Signed-off-by: Richard Hende
Give this enum a name and use in ARMCPRegInfo,
add_cpreg_to_hashtable and define_one_arm_cp_reg_with_opaque.
Signed-off-by: Richard Henderson
---
target/arm/cpregs.h | 6 +++---
target/arm/helper.c | 6 --
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/target/arm/cpregs.h b/t
Signed-off-by: Richard Henderson
---
target/arm/translate.h | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/target/arm/translate.h b/target/arm/translate.h
index 050d80f6f9..6f0ebdc88e 100644
--- a/target/arm/translate.h
+++ b/target/arm/translate.h
@@ -332,16 +
Move ARMCPRegInfo and all related declarations to a new
internal header, out of the public cpu.h.
Signed-off-by: Richard Henderson
---
target/arm/cpregs.h| 413 +
target/arm/cpu.h | 368 -
hw/arm/pxa2xx.c
Use tcg_constant_{i32,i64} as appropriate throughout.
Signed-off-by: Richard Henderson
---
target/arm/translate-vfp.c | 76 --
1 file changed, 23 insertions(+), 53 deletions(-)
diff --git a/target/arm/translate-vfp.c b/target/arm/translate-vfp.c
index 17f796e
Drop zcr_no_el2_reginfo and merge the 3 registers into one array,
now that ZCR_EL2 can be squashed to RES0 and ZCR_EL3 dropped
while registering.
Signed-off-by: Richard Henderson
---
target/arm/helper.c | 55 ++---
1 file changed, 17 insertions(+), 38 dele
Use tcg_constant_{i32,i64} as appropriate throughout.
Signed-off-by: Richard Henderson
---
target/arm/translate-neon.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/target/arm/translate-neon.c b/target/arm/translate-neon.c
index 384604c009..2e4d1ec87d
These particular data structures are not modified at runtime.
Signed-off-by: Richard Henderson
---
target/arm/helper.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index d6c34c7826..94b41c7e88 100644
--- a/target/a
Cast the uint32_t key into a gpointer directly, which
allows us to avoid allocating storage for each key.
Signed-off-by: Richard Henderson
---
target/arm/cpu.c | 4 ++--
target/arm/gdbstub.c | 2 +-
target/arm/helper.c | 45
3 files changed, 23
1 - 100 of 137 matches
Mail list logo