Re: [PATCH 2/4] target/riscv: Add CSR name in the CSR function table

2021-01-15 Thread Alistair Francis
On Mon, Jan 11, 2021 at 9:05 PM Bin Meng wrote: > > From: Bin Meng > > In preparation to generate the CSR register list for GDB stub > dynamically, let's add the CSR name in the CSR function table. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair > --- > >

Re: [PATCH 2/4] target/riscv: Add CSR name in the CSR function table

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 5:35 AM Alexander Richardson wrote: > > On Tue, 12 Jan 2021 at 05:02, Bin Meng wrote: > > > > From: Bin Meng > > > > In preparation to generate the CSR register list for GDB stub > > dynamically, let's add the CSR name in the CSR function table. > > > > Signed-off-by:

Re: [PATCH 3/4] target/riscv: Generate the GDB XML file for CSR registers dynamically

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 1:59 PM Alistair Francis wrote: > > On Mon, Jan 11, 2021 at 8:55 PM Bin Meng wrote: > > > > From: Bin Meng > > > > At present QEMU RISC-V uses a hardcoded XML to report the feature > > "org.gnu.gdb.riscv.csr" [1]. There are two major issues with the > > approach being

[PATCH v3 05/21] exec: Improve types for guest_addr_valid

2021-01-15 Thread Richard Henderson
Return bool not int; pass abi_ulong not 'unsigned long'. All callers use abi_ulong already, so the change in type has no effect. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/cpu_ldst.h

[PATCH v3 03/21] exec: Use uintptr_t for guest_base

2021-01-15 Thread Richard Henderson
This is more descriptive than 'unsigned long'. No functional change, since these match on all linux+bsd hosts. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 +- bsd-user/main.c| 2 +- linux-user/main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff

Re: [PATCH 05/15] arc: TCG instruction generator and hand-definitions

2021-01-15 Thread Richard Henderson
On 1/15/21 7:11 AM, Cupertino Miranda wrote: >> On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: >>> +/* >>> + * The macro to add boiler plate code for conditional execution. >>> + * It will add tcg_gen codes only if there is a condition to >>> + * be checked (ctx->insn.cc != 0). This macro

Re: [PATCH v2 12/25] tests/docker: add script for automating container refresh

2021-01-15 Thread Wainer dos Santos Moschetta
Hi, On 1/14/21 10:02 AM, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- tests/docker/dockerfiles/refresh | 53 1 file changed, 53 insertions(+) create mode 100755 tests/docker/dockerfiles/refresh diff --git

[PATCH v2 04/22] tcg/arm: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target-con-str.h | 22 tcg/arm/tcg-target.h | 1 + tcg/arm/tcg-target.c.inc | 69 +++- 3 files changed, 36 insertions(+), 56 deletions(-) create mode 100644 tcg/arm/tcg-target-con-str.h

[PATCH v2 06/22] tcg/ppc: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target-con-str.h | 30 +++ tcg/ppc/tcg-target.h | 1 + tcg/ppc/tcg-target.c.inc | 73 3 files changed, 46 insertions(+), 58 deletions(-) create mode 100644 tcg/ppc/tcg-target-con-str.h

[PATCH v2 09/22] tcg/riscv: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-str.h | 21 ++ tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 50 -- 3 files changed, 33 insertions(+), 39 deletions(-) create mode 100644

[PATCH v2 16/22] tcg/mips: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target-con-set.h | 36 + tcg/mips/tcg-target.h | 1 + tcg/mips/tcg-target.c.inc | 96 +++ 3 files changed, 66 insertions(+), 67 deletions(-) create mode 100644

[PATCH v2 13/22] tcg/i386: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
This exports the constraint sets from tcg_target_op_def to a place we will be able to manipulate more in future. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target-con-set.h | 54 ++ tcg/i386/tcg-target.h | 1 + tcg/tcg.c | 122 +

Re: [PATCH 4/4] target/riscv: Remove built-in GDB XML files for CSRs

2021-01-15 Thread Alistair Francis
On Mon, Jan 11, 2021 at 8:55 PM Bin Meng wrote: > > From: Bin Meng > > Now that we have switched to generate the RISC-V CSR XML dynamically, > remove the built-in hardcoded XML files. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair > > --- > >

Re: [PATCH v2 09/22] tcg/riscv: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 1:09 PM Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > tcg/riscv/tcg-target-con-str.h | 21 ++ > tcg/riscv/tcg-target.h | 1 + > tcg/riscv/tcg-target.c.inc | 50 -- > 3 files changed, 33

Re: [PATCH 2/4] tests/qtest: Make fuzz-test generic to all targets

2021-01-15 Thread Thomas Huth
On 15/01/2021 16.09, Philippe Mathieu-Daudé wrote: Tests in fuzz-test's main() already check for the supported architecture before adding tests, therefore this test is not specific to the X86 target. Move it to the generic set. As long as it does not run any test on non-x86, it does not make

Re: [PATCH 3/4] tests/qtest: Only run fuzz-megasas-test if megasas device is available

2021-01-15 Thread Alexander Bulekov
On 210115 1609, Philippe Mathieu-Daudé wrote: > This test fails when QEMU is built without the megasas device, > restrict it to its availability. Should we just make a separate directory for fuzzer tests and have a separate source file for each reproducer (or for each device)? That way, we avoid

[PATCH 05/11] hw/m68k/next-cube: Make next_irq take NeXTPC* as its opaque

2021-01-15 Thread Peter Maydell
Make the next_irq function take a NeXTPC* as its opaque rather than the M68kCPU*. This will make it simpler to turn the next_irq function into a gpio input line of the NeXTPC device in the next commit. For this to work we have to pass the CPU to the NeXTPC device via a link property, in the same

[PATCH 10/11] hw/m68k/next-cube: Add vmstate for NeXTPC device

2021-01-15 Thread Peter Maydell
Add the vmstate for the new NeXTPC devic; this is in theory a migration compatibility break, but this machine doesn't have working migration currently anyway. Signed-off-by: Peter Maydell --- hw/m68k/next-cube.c | 34 +- 1 file changed, 33 insertions(+), 1

[PATCH 08/11] hw/m68k/next-cube: Move rtc into NeXTPC struct

2021-01-15 Thread Peter Maydell
Move the rtc into the NeXTPC struct. Since this is the last use of the 'backdoor' NextState pointer we can now remove that. Probably the RTC should be its own device at some point: in hardware there is a separate MCS1850 RTC chip connected to the Peripheral Controller via a 1-bit serial

[PATCH v2 00/22] tcg: backend constraints cleanup

2021-01-15 Thread Richard Henderson
This pulls out constraints to a couple of headers, which reduces the boilerplate just a little. I have a longer term goal, which this aids, in which I move some of the startup-time debug-only validation into build/compile-time validation. But not yet. Changes for v2: * Rename "conset" ->

[PATCH v2 22/22] tcg: Remove TCG_TARGET_CON_SET_H

2021-01-15 Thread Richard Henderson
All backends have now been converted to tcg-target-con-set.h, so we can remove the fallback code. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 - tcg/arm/tcg-target.h | 1 - tcg/i386/tcg-target.h| 1 - tcg/mips/tcg-target.h| 1

Re: [PATCH v2 00/22] tcg: backend constraints cleanup

2021-01-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210115210456.1053477-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210115210456.1053477-1-richard.hender...@linaro.org Subject: [PATCH v2

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 6:09 AM Bin Meng wrote: > > On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell > wrote: > > > > On Fri, 15 Jan 2021 at 13:33, Bin Meng wrote: > > > > > > On Fri, Jan 15, 2021 at 7:50 PM Peter Maydell > > > wrote: > > > > > > > > Ping! This patch was trying to fix a

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2021-01-15 Thread Richard Henderson
On 1/15/21 11:28 AM, Shahab Vahedi wrote: >>> +cpu_stl_data(env, tmp_sp, CPU_FP(env)); >>> +} >> >> And what if these stores raise an exception? I doubt you're going to get an >> exception at the correct pc. > > I've added a few bad-weather test cases [1] and they work as expected.

[PATCH v3 01/21] tcg: Introduce target-specific page data for user-only

2021-01-15 Thread Richard Henderson
This data can be allocated by page_alloc_target_data() and released by page_set_flags(start, end, prot | PAGE_RESET). This data will be used to hold tag memory for AArch64 MTE. Signed-off-by: Richard Henderson --- v3: Add doc comments; tweak alloc so that the !PAGE_VALID case is clear. ---

[PATCH v3 00/21] target-arm: Implement ARMv8.5-MemTag, user mode

2021-01-15 Thread Richard Henderson
The kernel abi was finally merged into 5.10. Changes for v3: * Split out type changes to separate patches. * Add doc comments; tweak alloc so that the !PAGE_VALID case is clear. * Do not overlap PAGE_TARGET_2 with PAGE_RESERVED. * Use syndrome.h, arm_deliver_fault. r~ v1:

[PATCH v3 10/21] linux-user: Fix guest_addr_valid vs reserved_va

2021-01-15 Thread Richard Henderson
We must always use GUEST_ADDR_MAX, because even 32-bit hosts can use -R to restrict the memory address of the guest. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/exec/cpu_ldst.h

[PATCH v3 02/21] linux-user: Introduce PAGE_ANON

2021-01-15 Thread Richard Henderson
Record whether the backing page is anonymous, or if it has file backing. This will allow us to get close to the Linux AArch64 ABI for MTE, which allows tag memory only on ram-backed VMAs. The real ABI allows tag memory on files, when those files are on ram-backed filesystems, such as tmpfs. We

[PATCH v3 16/21] linux-user/aarch64: Pass syndrome to EXC_*_ABORT

2021-01-15 Thread Richard Henderson
A proper syndrome is required to fill in the proper si_code. Use page_get_flags to determine permission vs translation for user-only. Signed-off-by: Richard Henderson --- v3: Use syndrome.h, arm_deliver_fault. --- linux-user/aarch64/cpu_loop.c | 24 +---

[PATCH v3 07/21] linux-user: Tidy VERIFY_READ/VERIFY_WRITE

2021-01-15 Thread Richard Henderson
These constants are only ever used with access_ok, and friends. Rather than translating them to PAGE_* bits, let them equal the PAGE_* bits to begin. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/qemu.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-)

[PATCH v2 02/22] tcg/i386: Move constraint type check to tcg_target_const_match

2021-01-15 Thread Richard Henderson
Rather than check the type when filling in the constraint, check it when matching the constant. This removes the only use of the type argument to target_parse_constraint. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 28 +--- 1 file changed, 17

[PATCH v2 11/22] tcg/sparc: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target-con-str.h | 22 + tcg/sparc/tcg-target.h | 5 +--- tcg/sparc/tcg-target.c.inc | 45 +- 3 files changed, 29 insertions(+), 43 deletions(-) create mode 100644

[PATCH v2 10/22] tcg/s390: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/s390/tcg-target-con-str.h | 23 tcg/s390/tcg-target.h | 1 + tcg/s390/tcg-target.c.inc | 40 --- 3 files changed, 24 insertions(+), 40 deletions(-) create mode 100644

Re: [PATCH 05/15] arc: TCG instruction generator and hand-definitions

2021-01-15 Thread Cupertino Miranda
Thanks for your quick reply. On 1/15/21 8:17 PM, Richard Henderson wrote: > On 1/15/21 7:11 AM, Cupertino Miranda wrote: >>> On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: +/* + * The macro to add boiler plate code for conditional execution. + * It will add tcg_gen codes

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2021-01-15 Thread Cupertino Miranda
On 1/15/21 8:31 PM, Richard Henderson wrote: > On 1/15/21 7:11 AM, Cupertino Miranda wrote: >>> Similarly. I think that both of these could be implemented entirely in >>> translate, which is what >>> +bool restore_fp= u7 & 0x10; /* u[4] indicates if fp must be saved */

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2021-01-15 Thread Richard Henderson
On 1/15/21 11:48 AM, Cupertino Miranda wrote: >> In the case of enter or leave, this is one load/store plus one addition, >> followed by a branch. All of which is encoded as fields in the instruction. >> Extremely simple. > > So your recommendation is leave the conditional exception triggering

Re: [PATCH v7 3/6] [RISCV_PM] Print new PM CSRs in QEMU logs

2021-01-15 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:57 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 25 + > 1 file changed, 25 insertions(+) > > diff --git a/target/riscv/cpu.c

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Peter Maydell
On Fri, 15 Jan 2021 at 21:43, Alistair Francis wrote: > > On Fri, Jan 15, 2021 at 6:09 AM Bin Meng wrote: > > > > On Fri, Jan 15, 2021 at 9:55 PM Peter Maydell > > wrote > > > printf is definitely the wrong thing... you need to either report > > > the error back to the guest if the interface

[PATCH v2 07/22] tcg/tci: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/tci/tcg-target-con-str.h | 11 +++ tcg/tci/tcg-target.h | 2 ++ tcg/tci/tcg-target.c.inc | 14 -- 3 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 tcg/tci/tcg-target-con-str.h diff --git

[PATCH v2 08/22] tcg/mips: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target-con-str.h | 24 tcg/mips/tcg-target.h | 1 + tcg/mips/tcg-target.c.inc | 72 --- 3 files changed, 41 insertions(+), 56 deletions(-) create mode 100644 tcg/mips/tcg-target-con-str.h

[PATCH v2 17/22] tcg/ppc: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target-con-set.h | 42 +++ tcg/ppc/tcg-target.h | 1 + tcg/ppc/tcg-target.c.inc | 136 +++ 3 files changed, 99 insertions(+), 80 deletions(-) create mode 100644 tcg/ppc/tcg-target-con-set.h

[PATCH v2 21/22] tcg/tci: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
This requires finishing the conversion to tcg_target_op_def. Remove quite a lot of ifdefs, since we can reference opcodes even if they are not implemented. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target-con-set.h | 25 +++ tcg/tci/tcg-target.h | 2 + tcg/tci/tcg-target.c.inc

[PATCH v3 09/21] linux-user: Do not use guest_addr_valid for h2g_valid

2021-01-15 Thread Richard Henderson
This is the only use of guest_addr_valid that does not begin with a guest address, but a host address being transformed to a guest address. We will shortly adjust guest_addr_valid to handle guest memory tags, and the host address should not be subjected to that. Move h2g_valid adjacent to the

[PATCH v3 18/21] linux-user/aarch64: Signal SEGV_MTEAERR for async tag check error

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/aarch64/target_signal.h | 1 + linux-user/aarch64/cpu_loop.c | 34 +- target/arm/mte_helper.c| 10 + 3 files changed, 35 insertions(+), 10 deletions(-) diff --git

[PATCH v3 20/21] target/arm: Enable MTE for user-only

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/cpu.c | 16 1 file changed, 16 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index abc0affd00..5e613a747a 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -208,6 +208,22 @@ static void

Re: [PATCH 1/4] tests/qtest: Remove TPM tests

2021-01-15 Thread Stefan Berger
On 1/15/21 1:40 PM, Stefan Berger wrote: On 1/15/21 11:06 AM, Philippe Mathieu-Daudé wrote: On 1/15/21 4:53 PM, Stefan Berger wrote: On 1/15/21 10:52 AM, Philippe Mathieu-Daudé wrote: Subject is incorrect, this is not a removal of the tests, but removal of their execution. The tests are still

Re: [PULL 00/11] Ui 20210115 patches

2021-01-15 Thread Peter Maydell
in the Git repository at: > > git://git.kraxel.org/qemu tags/ui-20210115-pull-request > > for you to fetch changes up to 763deea7e906321f8ba048c359f168f60d51c14e: > > vnc: add support for extended desktop resize (2021-01-15 11:22:43 +0100) > >

[PATCH 04/11] hw/m68k/next-cube: Move scr_ops into NeXTPC device

2021-01-15 Thread Peter Maydell
Move the registers handled by the scr_ops struct into the NeXTPC device. Signed-off-by: Peter Maydell --- hw/m68k/next-cube.c | 50 ++--- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index

[PATCH 01/11] hw/m68k/next-cube: Make next_irq() function static

2021-01-15 Thread Peter Maydell
The next_irq() function is global, but isn't actually used anywhere outside next-cube.c. Make it static. Signed-off-by: Peter Maydell --- include/hw/m68k/next-cube.h | 2 -- hw/m68k/next-cube.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH 00/11] hw/m68k/next-cube: refactor to fix Coverity issue

2021-01-15 Thread Peter Maydell
Currently the next-cube board code open-codes a lot of handling of interrupts and some miscellaneous registers. This series refactors that to move most of it into a proper QOM device. (The main motivation here is to fix the Coverity issue CID 1421962 which is a trivial memory leak of the memory

[PATCH 09/11] hw/m68k/next-cube: Remove unused fields from NeXTState

2021-01-15 Thread Peter Maydell
The fields scsi_irq, scsi_dma, scsi_reset and fd_irq in NeXTState are all unused, except in commented out "this should do something like this" code. Remove the unused fields. As and when the functionality that might use them is added, we can put in the correct kind of wiring (which might or might

[PATCH 03/11] hw/m68k/next-cube: Move mmio_ops into NeXTPC device

2021-01-15 Thread Peter Maydell
Move the registers handled by the mmio_ops struct into the NeXTPC device. This allows us to also move the scr1 and scr2 data fields. Signed-off-by: Peter Maydell --- hw/m68k/next-cube.c | 80 + 1 file changed, 44 insertions(+), 36 deletions(-) diff

[PATCH 02/11] hw/m68k/next-cube: Move register/interrupt functionality into a device

2021-01-15 Thread Peter Maydell
Currently the next-cube board code open-codes a lot of handling of interrupts and some miscellaneous registers. Move this into a proper QOM device. In the real hardware this functionality seems to be the responsibility of the Peripheral Controller (PC) chip, so name the device that. There are

[PATCH 07/11] hw/m68k/next-cube: Make next_irq GPIO inputs to NEXT_PC device

2021-01-15 Thread Peter Maydell
Make the next_irq function be GPIO inputs to the NEXT_PC device, rather than a freestanding set of qemu_irq lines. This fixes a minor Coverity issue where it correctly points out the trivial memory leak of the memory allocated in the call to qemu_allocate_irqs(). Fixes: CID 1421962

[PATCH 06/11] hw/m68k/next-cube: Move int_status and int_mask to NeXTPC struct

2021-01-15 Thread Peter Maydell
All the code which accesses int_status and int_mask is now doing so via the NeXTPC->NeXTState indirection, so we can move these fields into the NeXTPC struct where they belong. Signed-off-by: Peter Maydell --- hw/m68k/next-cube.c | 33 - 1 file changed, 16

[PATCH v2] docs/devel: Explain how acceptance tests can be skipped

2021-01-15 Thread Wainer dos Santos Moschetta
Documented under the "Acceptance tests using the Avocado Framework" section in testing.rst how environment variables are used to skip tests. Signed-off-by: Wainer dos Santos Moschetta --- v2: - Made the changes Thomas pointed out. docs/devel/testing.rst | 62

[PATCH v2 03/22] tcg/i386: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
This eliminates the target-specific function target_parse_constraint and folds it into the single caller, process_op_defs. Since this is done directly into the switch statement, duplicates are compilation errors rather than silently ignored at runtime. Signed-off-by: Richard Henderson ---

[PATCH v2 01/22] tcg/tci: Drop L and S constraints

2021-01-15 Thread Richard Henderson
These are identical to the 'r' constraint. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 15981265db..9c45f5f88f 100644 ---

[PATCH v2 05/22] tcg/aarch64: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target-con-str.h | 24 +++ tcg/aarch64/tcg-target.h | 1 + tcg/aarch64/tcg-target.c.inc | 51 +--- 3 files changed, 33 insertions(+), 43 deletions(-) create mode 100644

[PATCH v2 19/22] tcg/s390: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/s390/tcg-target-con-set.h | 29 tcg/s390/tcg-target.h | 1 + tcg/s390/tcg-target.c.inc | 121 ++ 3 files changed, 81 insertions(+), 70 deletions(-) create mode 100644 tcg/s390/tcg-target-con-set.h

[PATCH v2 12/22] tcg: Remove TCG_TARGET_CON_STR_H

2021-01-15 Thread Richard Henderson
All backends have now been converted to tcg-target-con-str.h, so we can remove the fallback code. Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 - tcg/arm/tcg-target.h | 1 - tcg/i386/tcg-target.h| 1 - tcg/mips/tcg-target.h| 1

[PATCH v2 14/22] tcg/aarch64: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target-con-set.h | 36 + tcg/aarch64/tcg-target.h | 1 + tcg/aarch64/tcg-target.c.inc | 86 +++- 3 files changed, 65 insertions(+), 58 deletions(-) create mode 100644

Re: [PATCH v1 7/7] spapr.c: consider CPU core online state before allowing unplug

2021-01-15 Thread Daniel Henrique Barboza
On 1/15/21 2:22 PM, Greg Kurz wrote: On Thu, 14 Jan 2021 15:06:28 -0300 Daniel Henrique Barboza wrote: The only restriction we have when unplugging CPUs is to forbid unplug of the boot cpu core. spapr_core_unplug_possible() does not contemplate the I can't remember why this restriction

Re: [PATCH v1 7/7] spapr.c: consider CPU core online state before allowing unplug

2021-01-15 Thread Daniel Henrique Barboza
On 1/15/21 2:22 PM, Greg Kurz wrote: On Thu, 14 Jan 2021 15:06:28 -0300 Daniel Henrique Barboza wrote: The only restriction we have when unplugging CPUs is to forbid unplug of the boot cpu core. spapr_core_unplug_possible() does not contemplate the I can't remember why this restriction

Re: [PATCH v7 6/6] [RISCV_PM] Allow experimental J-ext to be turned on

2021-01-15 Thread Alistair Francis
On Sun, Jan 10, 2021 at 11:00 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c > index 19398977d3..234401c3c6 100644 >

Re: [PATCH v2 09/22] tcg/riscv: Split out target constraints to tcg-target-con-str.h

2021-01-15 Thread Richard Henderson
On 1/15/21 12:13 PM, Alistair Francis wrote: > On Fri, Jan 15, 2021 at 1:09 PM Richard Henderson > wrote: >> >> Signed-off-by: Richard Henderson >> --- >> tcg/riscv/tcg-target-con-str.h | 21 ++ >> tcg/riscv/tcg-target.h | 1 + >> tcg/riscv/tcg-target.c.inc | 50

[PATCH v3 06/21] linux-user: Check for overflow in access_ok

2021-01-15 Thread Richard Henderson
Verify that addr + size - 1 does not wrap around. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/qemu.h | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 534753ca12..a0f670832e 100644

[PATCH v3 14/21] linux-user/aarch64: Implement PROT_MTE

2021-01-15 Thread Richard Henderson
Remember the PROT_MTE bit as PAGE_MTE/PAGE_TARGET_2. Otherwise this does not yet have effect. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v3: Do not overlap PAGE_TARGET_2 with PAGE_RESERVED. --- include/exec/cpu-all.h| 1 + linux-user/syscall_defs.h | 1 +

[PATCH v3 04/21] exec: Use uintptr_t in cpu_ldst.h

2021-01-15 Thread Richard Henderson
This is more descriptive than 'unsigned long'. No functional change, since these match on all linux+bsd hosts. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h

[PATCH v3 08/21] bsd-user: Tidy VERIFY_READ/VERIFY_WRITE

2021-01-15 Thread Richard Henderson
These constants are only ever used with access_ok, and friends. Rather than translating them to PAGE_* bits, let them equal the PAGE_* bits to begin. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- bsd-user/qemu.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-)

[PATCH v3 17/21] linux-user/aarch64: Signal SEGV_MTESERR for sync tag check fault

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/aarch64/target_signal.h | 2 ++ linux-user/aarch64/cpu_loop.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/linux-user/aarch64/target_signal.h b/linux-user/aarch64/target_signal.h index ddd73169f0..777fb667fe 100644 ---

[PATCH v3 15/21] target/arm: Split out syndrome.h from internals.h

2021-01-15 Thread Richard Henderson
Move everything related to syndromes to a new file, which can be shared with linux-user. Signed-off-by: Richard Henderson --- target/arm/internals.h | 245 +--- target/arm/syndrome.h | 273 + 2 files changed, 274

[PATCH v2 15/22] tcg/arm: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target-con-set.h | 35 ++ tcg/arm/tcg-target.h | 1 + tcg/arm/tcg-target.c.inc | 94 3 files changed, 68 insertions(+), 62 deletions(-) create mode 100644 tcg/arm/tcg-target-con-set.h

[PATCH v2 18/22] tcg/riscv: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target-con-set.h | 30 tcg/riscv/tcg-target.h | 1 + tcg/riscv/tcg-target.c.inc | 83 ++ 3 files changed, 54 insertions(+), 60 deletions(-) create mode

[PATCH v3 11/21] exec: Add support for TARGET_TAGGED_ADDRESSES

2021-01-15 Thread Richard Henderson
The AArch64 Linux ABI has always enabled TBI, but has historically required that pointer tags be removed before a syscall. This has changed in the lead-up to ARMv8.5-MTE, in a way that affects the ABI generically and not specifically to MTE. This patch allows the target to indicate that (1)

[PATCH v3 12/21] linux-user/aarch64: Implement PR_TAGGED_ADDR_ENABLE

2021-01-15 Thread Richard Henderson
This is the prctl bit that controls whether syscalls accept tagged addresses. See Documentation/arm64/tagged-address-abi.rst in the linux kernel. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 4 target/arm/cpu-param.h | 3 +++ target/arm/cpu.h

[PATCH 11/11] hw/m68k/next-cube: Add missing header comment to next-cube.h

2021-01-15 Thread Peter Maydell
The next-cube.h file is missing the usual copyright-and-license header; add it (same as the next-cube.c one). Signed-off-by: Peter Maydell --- include/hw/m68k/next-cube.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/hw/m68k/next-cube.h b/include/hw/m68k/next-cube.h

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2021-01-15 Thread Richard Henderson
On 1/15/21 7:11 AM, Cupertino Miranda wrote: >> Similarly. I think that both of these could be implemented entirely in >> translate, which is what >> >>> +bool restore_fp= u7 & 0x10; /* u[4] indicates if fp must be saved >>> */ >>> +bool restore_blink = u7 & 0x20; /* u[5] indicates

[PATCH] tests: Fix memory leak in tpm-util.c

2021-01-15 Thread Stefan Berger
This patch fixes the following memory leak detected by asan: Indirect leak of 560320 byte(s) in 136 object(s) allocated from: #0 0x556b3b3f9b57 in calloc (/home/stefanb/tmp/qemu-tip/build/tests/qtest/tpm-crb-swtpm-test+0x23fb57) #1 0x152b0e96b9b0 in g_malloc0

[PATCH v2 20/22] tcg/sparc: Split out constraint sets to tcg-target-con-set.h

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target-con-set.h | 32 +++ tcg/sparc/tcg-target.h | 1 + tcg/sparc/tcg-target.c.inc | 75 +++--- 3 files changed, 56 insertions(+), 52 deletions(-) create mode 100644

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2021-01-15 Thread Shahab Vahedi
Hi Richard, On 12/1/20 10:35 PM, Richard Henderson wrote: > On 11/11/20 10:17 AM, cupertinomira...@gmail.com wrote: >> From: Cupertino Miranda >> +void helper_enter(CPUARCState *env, uint32_t u6) >> +{ >> +/* nothing to do? then bye-bye! */ >> +if (!u6) { >> +return; >> +} >>

Re: [PATCH 1/4] target/riscv: Make csr_ops[CSR_TABLE_SIZE] external

2021-01-15 Thread Alistair Francis
On Mon, Jan 11, 2021 at 8:53 PM Bin Meng wrote: > > From: Bin Meng > > In preparation to generate the CSR register list for GDB stub > dynamically, change csr_ops[] to non-static so that it can be > referenced externally. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair >

Re: [PATCH 04/15] arc: TCG and decoder glue code and helpers

2021-01-15 Thread Cupertino Miranda
Ok, enter and leave will officially get to be TCG code. To be honest initially we thought that helper code would be preferable to TCG one. Apparently we were wrong. :-) Thanks for your quick feedback. On 1/15/21 9:53 PM, Richard Henderson wrote: > On 1/15/21 11:48 AM, Cupertino Miranda wrote:

Re: [PATCH v7 1/6] [RISCV_PM] Add J-extension into RISC-V

2021-01-15 Thread Alistair Francis
On Sun, Jan 10, 2021 at 10:51 AM Alexey Baturo wrote: > > Signed-off-by: Alexey Baturo > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h >

Re: [PATCH] hw/riscv: microchip_pfsoc: specify XIP image

2021-01-15 Thread Alistair Francis
On Tue, Jan 12, 2021 at 4:11 AM Vitaly Wool wrote: > > Hi Bin, > > On Tue, Jan 5, 2021 at 7:27 AM Bin Meng wrote: > > > > +Alistair Francis > > > > On Sat, Dec 19, 2020 at 8:24 AM Vitaly Wool > > wrote: > > > > > > Add command line parameter to microchip_pfsoc machine to be able > > > to

[PATCH v3 21/21] tests/tcg/aarch64: Add mte smoke tests

2021-01-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tests/tcg/aarch64/mte.h | 53 +++ tests/tcg/aarch64/mte-1.c | 25 +++ tests/tcg/aarch64/mte-2.c | 42 tests/tcg/aarch64/mte-3.c | 47 +++

[PATCH v3 19/21] target/arm: Add allocation tag storage for user mode

2021-01-15 Thread Richard Henderson
Use the now-saved PAGE_ANON and PAGE_MTE bits, and the per-page saved data. Signed-off-by: Richard Henderson --- target/arm/mte_helper.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Alistair Francis
On Wed, Nov 4, 2020 at 1:29 AM Green Wan wrote: > > Fix code coverage issues by checking return value and handling fail case > of blk_pread() and blk_pwrite(). Return default value 0xff if read fails. > > Signed-off-by: Green Wan Reviewed-by: Alistair Francis Alistair > --- >

Re: [PATCH] hw/misc/sifive_u_otp: handling the fails of blk_pread and blk_pwrite

2021-01-15 Thread Alistair Francis
On Fri, Jan 15, 2021 at 3:50 AM Peter Maydell wrote: > > Ping! This patch was trying to fix a Coverity issue (CID 1435959, > 1435960, 1435961) -- is anybody planning to review it? > > (I'm not entirely sure 'guest error' is the right warning category, > but I don't know the specifics of this

Re: [PATCH 3/4] target/riscv: Generate the GDB XML file for CSR registers dynamically

2021-01-15 Thread Alistair Francis
On Mon, Jan 11, 2021 at 8:55 PM Bin Meng wrote: > > From: Bin Meng > > At present QEMU RISC-V uses a hardcoded XML to report the feature > "org.gnu.gdb.riscv.csr" [1]. There are two major issues with the > approach being used currently: > > - The XML does not specify the "regnum" field of a CSR

[PATCH v3 13/21] linux-user/aarch64: Implement PR_MTE_TCF and PR_MTE_TAG

2021-01-15 Thread Richard Henderson
These prctl fields are required for the function of MTE. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 9 ++ linux-user/syscall.c| 44 + 2 files changed, 53 insertions(+) diff --git

[Bug 1743337] Re: OS/2 Warp 4 HPFS corruption

2021-01-15 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1743337 Title: OS/2 Warp

[Bug 1696746] Re: netdev user, restrict=on prevents forwarded ports from being accessed from other systems

2021-01-15 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1696746 Title: netdev

[Bug 1744009] Re: qemu for windows fails to use multicast socket as netdev

2021-01-15 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1744009 Title: qemu for

Re: [PATCH 01/11] hw/m68k/next-cube: Make next_irq() function static

2021-01-15 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:11:56 + schrieb Peter Maydell : > The next_irq() function is global, but isn't actually used anywhere > outside next-cube.c. Make it static. > > Signed-off-by: Peter Maydell > --- > include/hw/m68k/next-cube.h | 2 -- > hw/m68k/next-cube.c | 2 +- > 2 files

Re: [PATCH v1 1/1] riscv: Pass RISCVHartArrayState by pointer

2021-01-15 Thread Palmer Dabbelt
On Fri, 15 Jan 2021 15:00:27 PST (-0800), Alistair Francis wrote: We were accidently passing RISCVHartArrayState by value instead of pointer. The type is 824 bytes long so let's correct that and pass it by pointer instead. Fixes: Coverity CID 1438099 Fixes: Coverity CID 1438100 Fixes: Coverity

Re: [PATCH] cpu_exec_step_atomic: update the cpu running flag

2021-01-15 Thread Richard Henderson
On 9/21/20 9:42 PM, Douglas Crosher wrote: > > The cpu_exec_step_atomic() function is called with the cpu->running > clear and proceeds to run target code without setting this flag. If > this target code generates an exception then handle_cpu_signal() will > unnecessarily abort. > > For example

[Bug 1740887] Re: qemu-system-arm & qemu-system-aarch64 for windows crash at start

2021-01-15 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1740887 Title:

[PATCH v1 1/1] riscv: Pass RISCVHartArrayState by pointer

2021-01-15 Thread Alistair Francis
We were accidently passing RISCVHartArrayState by value instead of pointer. The type is 824 bytes long so let's correct that and pass it by pointer instead. Fixes: Coverity CID 1438099 Fixes: Coverity CID 1438100 Fixes: Coverity CID 1438101 Signed-off-by: Alistair Francis ---

Re: [PATCH 03/11] hw/m68k/next-cube: Move mmio_ops into NeXTPC device

2021-01-15 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:11:58 + schrieb Peter Maydell : > Move the registers handled by the mmio_ops struct into the NeXTPC > device. This allows us to also move the scr1 and scr2 data fields. > > Signed-off-by: Peter Maydell > --- > hw/m68k/next-cube.c | 80 >

  1   2   3   4   5   >