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

2021-01-15 Thread Thomas Huth
Am Fri, 15 Jan 2021 20:12:06 + schrieb 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(+)

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 >

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

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

2021-01-15 Thread Bin Meng
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 --- (no changes since v1) .../targets/riscv32-linux-user.mak| 2 +-

[PATCH v2 1/2] target/riscv: Generate the GDB XML file for CSR registers dynamically

2021-01-15 Thread Bin Meng
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 entry, hence consecutive numbers are used by the remote GDB

[PATCH v2 0/2] target/riscv: Generate the GDB XML file for CSR registers dynamically

2021-01-15 Thread Bin Meng
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 entry, hence consecutive numbers are used by the remote GDB

[Bug 1699867] Re: x86_64 qemu crashes at far call into long-mode

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/1699867 Title: x86_64

[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:

[Bug 1492649] Re: QEMU soundhw HDA huge microphone lag

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/1492649 Title: QEMU

[Bug 1743214] Re: OS/2 Warp 3 support broken in 2.11

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/1743214 Title: OS/2 Warp

[Bug 1737194] Re: Windows NT 4.0 fails to boot from qcow2 installation

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/1737194 Title: Windows NT

[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 3/4] target/riscv: Generate the GDB XML file for CSR registers dynamically

2021-01-15 Thread Bin Meng
On Sat, Jan 16, 2021 at 6:08 AM Alistair Francis wrote: > > 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 > > >

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

2021-01-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210115224645.1196742-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: 20210115224645.1196742-1-richard.hender...@linaro.org Subject: [PATCH v3

[Bug 1906193] Re: riscv32 user mode emulation: fork return values broken

2021-01-15 Thread Alistair Francis
Can you add a Tested-by: tag to the patch? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906193 Title: riscv32 user mode emulation: fork return values broken Status in QEMU: Confirmed Bug

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 2:17 PM Peter Maydell wrote: > > 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

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

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: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-01-15 Thread Alistair Francis
On Wed, Jan 13, 2021 at 6:32 PM Richard Henderson wrote: > > Signed-off-by: Richard Henderson This patch results in a QEMU seg fault when starting userspace on RISC-V 32-bit. This is the full backtrace: ``` #0 0x55a67c4d in ts_are_copies (ts2=0x7fffa8008008, ts1=0x7fffa8001e40) at

[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 v1 1/1] linux-user/signal: Decode waitid si_code

2021-01-15 Thread Alistair Francis
On Sat, Dec 19, 2020 at 10:11 AM Alistair Francis wrote: > > When mapping the host waitid status to the target status we previously > just used decoding information in the status value. This doesn't follow > what the waitid documentation describes, which instead suggests using > the si_code value

[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

[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 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 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

[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

[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 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 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 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 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 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 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

[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 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 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 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 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 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 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. ---

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

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

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

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 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

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 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 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 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

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 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 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

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 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 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 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 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 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.

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] 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 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] 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 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 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 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

[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 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

[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 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 +

[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 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

[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

[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 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 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 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

[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 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 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 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 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 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 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 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] 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] 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

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

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

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

  1   2   3   4   5   >