Re: Question about atomics

2022-03-12 Thread Warner Losh
On Tue, Mar 8, 2022 at 9:29 AM Warner Losh wrote: > > > On Tue, Mar 8, 2022 at 7:26 AM Paolo Bonzini wrote: > >> On 3/8/22 15:09, Warner Losh wrote: >> > >> > Yes, qatomic_foo is expected to work. It's what we use across >> > threads, and it is expected to work "in kernel mode", i.e. wi

QEMU+KVM on RISC-V + Hypervisor Extension

2022-03-12 Thread Ralf Ramsauer
Hi, I'm trying to run Linux/QEMU+KVM inside an emulated qemu-system-riscv64 VM (x86 host). On latest&greatest QEMU (1416688c53), I run Linux inside QEMU. On host side: qemu-system-riscv64 -nographic \ -machine virt \ -cpu 'rv64,h=true' \ -smp 8 -m 8G \ -bios $la

Re: [PATCH v3 0/7] isa: Resolve unneeded IRQ attributes from ISADevice

2022-03-12 Thread Bernhard Beschow
Am 7. März 2022 00:34:27 UTC schrieb "Philippe Mathieu-Daudé" : >On 1/3/22 23:00, Bernhard Beschow wrote: > >> The IRQ attributes are mostly used for printing ('info qtree') and there is >> one >> user, hw/ppc/pnv, to use the attributes directly. As it turns out, the >> printing >> is redundant

[PULL v2 00/12] Hexagon (target/hexagon) queue

2022-03-12 Thread Taylor Simpson
s/pull-hex-20220312-1 for you to fetch changes up to 4a818b3767220dcd21cf5cc7f12e33e28c2073ed: target/hexagon: remove unused variable (2022-03-12 09:14:22 -0800) Hexagon bug fixes and additional tests Also includes a patch from Zongy

[PULL v2 06/12] Hexagon (tests/tcg/hexagon) test instructions that might set bits in USR

2022-03-12 Thread Taylor Simpson
Hexagon has ~200 instructions that set the saturate bit in USR, these were broken into groups of similar instructions and one instruction from each group is tested with at least one input that does not saturate and at least one input that does saturate. Signed-off-by: Taylor Simpson Message-Id: <

[PULL v2 08/12] Hexagon (tests/tcg/hexagon) update overflow test

2022-03-12 Thread Taylor Simpson
Add a test that sets USR multiple times in a packet Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-9-tsimp...@quicinc.com> Acked-by: Richard Henderson --- tests/tcg/hexagon/overflow.c | 61 +++- 1 file changed, 60 insertions(+), 1 deletion(-) dif

[PULL v2 11/12] Hexagon (target/hexagon) assignment to c4 should wait until packet commit

2022-03-12 Thread Taylor Simpson
On Hexagon, c4 is an alias for predicate registers P3:0. If we assign to c4 inside a packet with reads from predicate registers, the predicate reads should get the old values. Test case added to tests/tcg/hexagon/preg_alias.c Co-authored-by: Michael Lambert Signed-off-by: Taylor Simpson Messag

[PULL v2 04/12] Hexagon (target/hexagon) properly handle denorm in arch_sf_recip_common

2022-03-12 Thread Taylor Simpson
The arch_sf_recip_common function was calling float32_getexp which adjusts for denorm, but the we actually need the raw exponent bits. This function is called from 3 instructions sfrecipa sffixupn sffixupd Test cases added to tests/tcg/hexagon/fpstuff.c Signed-off-by: Taylor Simpson

[PULL v2 10/12] Hexagon (target/hexagon) fix bug in conv_df2uw_chop

2022-03-12 Thread Taylor Simpson
Fix typo that checked for 32 bit nan instead of 64 bit Test case added in tests/tcg/hexagon/usr.c Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-11-tsimp...@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/op_helper.c | 2 +- tests/tcg/hexagon/usr.c| 4 2

[PULL v2 03/12] Hexagon (target/hexagon) properly set FPINVF bit in sfcmp.uo and dfcmp.uo

2022-03-12 Thread Taylor Simpson
Instead of checking for nan arguments, use float??_unordered_quiet test cases added in a subsequent patch to more extensively test USR bits Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-4-tsimp...@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/op_helper.c | 6 +

[PULL v2 02/12] Hexagon HVX (target/hexagon) fix bug in HVX saturate instructions

2022-03-12 Thread Taylor Simpson
Two tests added to tests/tcg/hexagon/hvx_misc.c v21.uw = vadd(v11.uw, v10.uw):sat v25:24.uw = vsub(v17:16.uw, v27:26.uw):sat Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-3-tsimp...@quicinc.com> Reviewed-by: Richard Henderson --- target/hexagon/macros.h | 4 +- te

[PULL v2 12/12] target/hexagon: remove unused variable

2022-03-12 Thread Taylor Simpson
From: Zongyuan Li When building with clang version 13.0.0 (eg. Fedora 13.0.0-3.fc35), two unused variables introduced by macro GATHER_FUNCTION and SCATTER_FUNCTION will cause building process failure due to [-Werror -Wunused-variable]. Signed-off-by: Zongyuan Li Resolves: https://gitlab.com/qem

[PULL v2 05/12] Hexagon (target/hexagon) properly handle NaN in dfmin/dfmax/sfmin/sfmax

2022-03-12 Thread Taylor Simpson
The float??_minnum implementation differs from Hexagon for SNaN, it returns NaN, but Hexagon returns the other input. So, we use float??_minimum_number. Test cases added to tests/tcg/hexagon/fpstuff.c Signed-off-by: Taylor Simpson Message-Id: <20220308190410.22355-1-tsimp...@quicinc.com> Review

[PULL v2 09/12] Hexagon (tests/tcg/hexagon) fix inline asm in preg_alias.c

2022-03-12 Thread Taylor Simpson
Replace consecutive inline asm blocks with a single one with proper outputs/inputs/clobbers rather than making assumptions about register values being carried between separate blocks. Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-10-tsimp...@quicinc.com> Reviewed-by: Richard Hend

[PULL v2 01/12] Hexagon (target/hexagon) fix bug in circular addressing

2022-03-12 Thread Taylor Simpson
From: Michael Lambert Versions V3 and earlier should treat the "K_const" and "length" values as unsigned. Modified circ_test_v3() in tests/tcg/hexagon/circ.c to reproduce the bug Signed-off-by: Michael Lambert Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-2-tsimp...@quicinc.c

[PULL v2 07/12] Hexagon (tests/tcg/hexagon) add floating point instructions to usr.c

2022-03-12 Thread Taylor Simpson
Tests to confirm floating point instructions are properly setting exception bits in USR Signed-off-by: Taylor Simpson Message-Id: <20220210021556.9217-8-tsimp...@quicinc.com> Acked-by: Richard Henderson --- tests/tcg/hexagon/usr.c | 339 1 file changed,

Re: [PATCH v5 48/48] hw/nios2: Machine with a Vectored Interrupt Controller

2022-03-12 Thread Mark Cave-Ayland
On 10/03/2022 11:27, Richard Henderson wrote: From: Amir Gonnen Demonstrate how to use nios2 VIC on a machine. Introduce a new machine property to attach a VIC. When VIC is present, let the CPU know that it should use the External Interrupt Interface instead of the Internal Interrupt Interfac

Re: [PATCH v5 46/48] hw/nios2: Introduce Nios2MachineState

2022-03-12 Thread Mark Cave-Ayland
On 10/03/2022 11:27, Richard Henderson wrote: We want to move data from the heap into Nios2MachineState, which is not possible with DEFINE_MACHINE. Signed-off-by: Richard Henderson --- hw/nios2/10m50_devboard.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-)

Re: [PATCH 5/5] s390x: pv: Add dump support

2022-03-12 Thread Richard Henderson
On 3/10/22 03:25, Janosch Frank wrote: Sometimes dumping a guest from the outside is the only way to get the data that is needed. This can be the case if a dumping mechanism like KDUMP hasn't been configured or data needs to be fetched at a specific point. Dumping a protected guest from the outsi

Re: [PATCH v2 3/3] tests/tcg/s390x: Test BRASL and BRCL with large negative offsets

2022-03-12 Thread Richard Henderson
On 3/12/22 01:25, Ilya Leoshkevich wrote: Add a small test in order to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target| 1 + tests/tcg/s390x/branch-relative-long.c | 60 ++ 2 files changed, 61 insertions(+) create m

Re: [PATCH 4/5] dump/dump: Add section string table support

2022-03-12 Thread Richard Henderson
On 3/10/22 03:16, Janosch Frank wrote: Time to add a bit more descriptiveness to the dumps. Signed-off-by: Janosch Frank --- dump/dump.c | 106 -- include/sysemu/dump.h | 1 + 2 files changed, 94 insertions(+), 13 deletions(-) Hmm. I sup

Re: MAINTAINERS: macOS host support (was: MAINTAINERS: take edk2)

2022-03-12 Thread Christian Schoenebeck
On Freitag, 11. März 2022 10:26:47 CET Daniel P. Berrangé wrote: > On Fri, Mar 11, 2022 at 10:13:24AM +0100, Christian Schoenebeck wrote: > > On Donnerstag, 10. März 2022 12:40:06 CET Philippe Mathieu-Daudé wrote: > > > +Stefan for overall project resources. > > > > > > On 10/3/22 12:07, Daniel P.

[PATCH v2 2/7] tests/9pfs: Twalk with nwname=0

2022-03-12 Thread Christian Schoenebeck
Send Twalk request with nwname=0. In this case no QIDs should be returned by 9p server; this is equivalent to walking to dot. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/

[PATCH v2 6/7] tests/9pfs: guard recent 'Twalk' behaviour fix

2022-03-12 Thread Christian Schoenebeck
Previous 9p patch fixed 'Twalk' request handling, which was previously not behaving as specified by the 9p2000 protocol spec. This patch adds a new test case which guards the new 'Twalk' behaviour in question. More specifically: it sends a 'Twalk' request where the 1st path component is valid, whe

[PATCH v2 3/7] tests/9pfs: compare QIDs in fs_walk_none() test

2022-03-12 Thread Christian Schoenebeck
Extend previously added fs_walk_none() test by comparing the QID of the root fid with the QID of the cloned fid. They should be equal. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-9p-test.c | 87 1 file changed, 87 insertions(+) diff --git a/t

[PATCH v2 4/7] 9pfs: refactor 'name_idx' -> 'nwalked' in v9fs_walk()

2022-03-12 Thread Christian Schoenebeck via
The local variable 'name_idx' is used in two loops in function v9fs_walk(). Let the first loop use its own variable 'nwalked' instead, which we will use in subsequent patch as the number of (requested) path components successfully walked by background I/O thread. Signed-off-by: Christian Schoenebe

[PATCH v2 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-03-12 Thread Christian Schoenebeck
Current implementation of 'Twalk' request handling always sends an 'Rerror' response if any error occured. The 9p2000 protocol spec says though: " If the first element cannot be walked for any reason, Rerror is returned. Otherwise, the walk will return an Rwalk message containing nwqid qids

[PATCH v2 0/7] 9pfs: fix 'Twalk' protocol violation

2022-03-12 Thread Christian Schoenebeck
Currently the implementation of 'Twalk' does not behave exactly as specified by the 9p2000 protocol specification. Actual fix is patch 5; see the description of that patch for details of what this overall fix and series is about. Patch 4 is a preparatory (pure) refactoring change to make patch 5 b

[PATCH v2 1/7] tests/9pfs: walk to non-existent dir

2022-03-12 Thread Christian Schoenebeck
Expect ENOENT Rlerror response when trying to walk to a non-existent directory. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz --- tests/qtest/virtio-9p-test.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/q

[PATCH v2 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-03-12 Thread Christian Schoenebeck
Extend previously added test case by checking that fid is unaffected by 'Twalk' request (i.e. when 2nd path component of request being invalid). Do that by comparing the QID of root fid with QID of walked fid; they should be identical. Signed-off-by: Christian Schoenebeck --- tests/qtest/virtio-

[PATCH v2 3/3] tests/tcg/s390x: Test BRASL and BRCL with large negative offsets

2022-03-12 Thread Ilya Leoshkevich
Add a small test in order to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target| 1 + tests/tcg/s390x/branch-relative-long.c | 60 ++ 2 files changed, 61 insertions(+) create mode 100644 tests/tcg/s390x/branch-relative-long.

[PATCH v2 1/3] s390x/tcg: Fix BRASL with a large negative offset

2022-03-12 Thread Ilya Leoshkevich
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping backwards. Fix by adding a missing cast, like in in2_ri2(). Fixes: 8ac33cdb8bfb ("Convert BRANCH AND SAVE") Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c | 2 +- 1 file chan

[PATCH v2 0/3] Fix BRASL and BRCL with large negative offsets

2022-03-12 Thread Ilya Leoshkevich
Hi, I noticed that sometimes jumping backwards leads to crashes or hangs. The problem is a missing cast. Patches 1 and 2 fix the problem, patch 3 adds a test. v1: https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg03356.html v1 -> v2: - Skip the test if mmap() fails (Richard). - Replace

[PATCH v2 2/3] s390x/tcg: Fix BRCL with a large negative offset

2022-03-12 Thread Ilya Leoshkevich
When RI2 is 0x8000, qemu enters an infinite loop instead of jumping backwards. Fix by adding a missing cast, like in in2_ri2(). Fixes: 7233f2ed1717 ("target-s390: Convert BRANCH ON CONDITION") Reviewed-by: David Hildenbrand Signed-off-by: Ilya Leoshkevich --- target/s390x/tcg/translate.c |

Re: [PATCH v3 1/4] target/ppc: Fix masked PVR matching

2022-03-12 Thread David Gibson
On Mon, Mar 07, 2022 at 04:55:24PM +1000, Nicholas Piggin wrote: > The pvr_match for a CPU class is not supposed to just match for any > CPU in the family, but rather whether this particular CPU class is the > best match in the family. Ok... but I don't see how that question can possibly be answer

Re: [PATCH v3 2/4] target/ppc: Remove chip type field from POWER9 DD2.0 PVR

2022-03-12 Thread David Gibson
On Mon, Mar 07, 2022 at 04:55:25PM +1000, Nicholas Piggin wrote: > The POWER9 DD2.0 PVR does not follow the same format as the other > POWER9/10 PVRs, it includes a non-zero value in the "chip type" field. I'm unclear whether you're describing the hardware PVR here, or the value in qemu. > This d

Re: [RFC PATCH 1/2] spapr: Report correct GTSE support via ov5

2022-03-12 Thread David Gibson
On Tue, Mar 08, 2022 at 10:23:59PM -0300, Fabiano Rosas wrote: > QEMU reports MMU support to the guest via the ibm,architecture-vec-5 > property of the /chosen node. Byte number 26 specifies Radix Table > Expansions, currently only GTSE (Guest Translation Shootdown > Enable). This feature determine

[PATCH] Resolves: https://gitlab.com/qemu-project/qemu/-/issues/542

2022-03-12 Thread zzl
--- hw/audio/intel-hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 5f8a878f20..ff32936cfd 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -328,7 +328,7 @@ static void intel_hda_corb_run(IntelHDAState *d)