Re: [PATCH 0/6] tests: enable meson test timeouts to improve debuggability

2023-06-01 Thread Richard Henderson
On 6/1/23 09:31, Daniel P. Berrangé wrote: Daniel P. Berrangé (6): qtest: bump min meson timeout to 60 seconds qtest: bump migration-test timeout to 5 minutes qtest: bump qom-test timeout to 7 minutes qtest: bump aspeed_smc-test timeout to 2 minutes qtest: bump bios-table-test time

Re: [PULL v2 00/11] Tracing patches

2023-06-01 Thread Richard Henderson
On 6/1/23 08:06, Stefan Hajnoczi wrote: The following changes since commit c6a5fc2ac76c5ab709896ee1b0edd33685a67ed1: decodetree: Add --output-null for meson testing (2023-05-31 19:56:42 -0700) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/tracing-pull

Re: [PATCH v5 00/11] *** Add allwinner-r40 support ***

2023-06-01 Thread Niek Linnenbank
Hi Qianfan, Thanks for sending the v5. From my side, I have no further comments on the content. So please feel free to add the following to each of the patches 01-11 in the series: Reviewed-by: Niek Linnenbank As a reminder and explained here on this page, you'll need to make sure these lines g

Re: [PATCH 3/6] qtest: bump qom-test timeout to 7 minutes

2023-06-01 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: The qom-test is periodically hitting the 5 minute timeout when running on the aarch64 emulator under GitLab CI. Add another 2 minutes headroom to the timeout to improve reliability. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build |

Re: [PATCH 5/6] qtest: bump bios-table-test timeout to 6 minutes

2023-06-01 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: This is reliably hitting the current 2 minute timeout in GitLab CI for the TCI job, and even hits a 4 minute timeout. That sentence is somewhat hard to parse... maybe rather: This is reliably hitting the current 2 minute timeout in GitLab CI, and

Re: [PATCH 4/6] qtest: bump aspeed_smc-test timeout to 2 minutes

2023-06-01 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: On a reasonably modern laptop this test takes 40 seconds with the arm emulator. Raising the timeout to 2 minutes gives greater headroom for slowdown under GitLab CI. Signed-off-by: Daniel P. Berrangé --- tests/qtest/meson.build | 1 + 1 file cha

Re: [PATCH 6/6] mtest2make: stop disabling meson test timeouts

2023-06-01 Thread Thomas Huth
On 01/06/2023 18.31, Daniel P. Berrangé wrote: The mtest2make.py script passes the arg '-t 0' to 'meson test' which disables all test timeouts. This is a major source of pain when running in GitLab CI and a test gets stuck. It will stall until GitLab kills the CI job. This leaves us with little e

Re: [PATCH v2 0/8] misc AHCI cleanups

2023-06-01 Thread John Snow
On Thu, Jun 1, 2023 at 9:45 AM Niklas Cassel wrote: > > From: Niklas Cassel > > Hello John, > > Here comes some misc AHCI cleanups. > > Most are related to error handling. > > Please review. > > (I'm also working on a second series which will add support for > READ LOG EXT and READ LOG DMA EXT, b

Re: [PATCH] hvf: Handle EC_INSNABORT

2023-06-01 Thread Mark Burton
> On 1 Jun 2023, at 18:45, Peter Maydell wrote: > > WARNING: This email originated from outside of Qualcomm. Please be wary of > any links or attachments, and do not enable macros. > > On Thu, 1 Jun 2023 at 17:00, Mark Burton wrote: >> This patch came from a discussion on the KVM call the o

[PATCH 3/6] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-06-01 Thread Andrey Drobyshev via
Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for the data read from the old and new backing files are aligned using BlockDriverState (or BlockBackend later on) referring to the target image. However, this isn't quite right, because target image is only being written to and ha

[PATCH 2/6] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-06-01 Thread Andrey Drobyshev via
Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/024 | 57

[PATCH 6/6] iotests: add test 314 for "qemu-img rebase" with compression

2023-06-01 Thread Andrey Drobyshev via
The test cases considered so far: 1. Check that compression mode isn't compatible with "-f raw" (raw format doesn't support compression). 2. Check that rebasing an image onto no backing file preserves the data and writes the copied clusters actually compressed. 3. Same as 2, but with a raw b

[PATCH 4/6] qemu-img: rebase: avoid unnecessary COW operations

2023-06-01 Thread Andrey Drobyshev via
When rebasing an image from one backing file to another, we need to compare data from old and new backings. If the diff between that data happens to be unaligned to the target cluster size, we might end up doing partial writes, which would lead to copy-on-write and additional IO. Consider the fol

[PATCH 5/6] qemu-img: add compression option to rebase subcommand

2023-06-01 Thread Andrey Drobyshev via
If we rebase an image whose backing file has compressed clusters, we might end up wasting disk space since the copied clusters are now uncompressed. In order to have better control over this, let's add "--compress" option to the "qemu-img rebase" command. Note that this option affects only the cl

[PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file

2023-06-01 Thread Andrey Drobyshev via
In case when we're rebasing within one backing chain, and when target image is larger than old backing file, bdrv_is_allocated_above() ends up setting *pnum = 0. As a result, target offset isn't getting incremented, and we get stuck in an infinite for loop. Let's detect this case and proceed furt

[PATCH 0/6] qemu-img: rebase: add compression support

2023-06-01 Thread Andrey Drobyshev via
This series is adding [-c | --compress] option to "qemu-img rebase" command, which might prove useful for saving some disk space when, for instance, manipulating chains of backup images. Along the way I had to make a couple of minor improvements. The first 2 patches are a bug fix + corresponding

Re: [PATCH v3 0/3] hw/{i2c, nvme}: mctp endpoint, nvme management interface model

2023-06-01 Thread Corey Minyard
On Wed, May 31, 2023 at 01:47:41PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > This adds a generic MCTP endpoint model that other devices may derive > from. I'm not 100% happy with the design of the class methods, but it's > a start. > > Also included is a very basic implementation of an

Re: [PATCH v3 12/48] target/arm: Fix test of TCG_OVERSIZED_GUEST

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:02, Richard Henderson wrote: The symbol is always defined, even if to 0. We wanted to test for TCG_OVERSIZED_GUEST == 0. Fixes: 71943a1e90 ("target/arm: Implement FEAT_HAFDBS, access flag portion") Signed-off-by: Richard Henderson --- target/arm/ptw.c | 7 ++- 1 file cha

Re: [PATCH v3 18/48] tcg: Remove outdated comments in helper-head.h

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: Signed-off-by: Richard Henderson --- include/exec/helper-head.h | 18 +++--- 1 file changed, 3 insertions(+), 15 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 21/48] tcg: Move temp_idx and tcgv_i32_temp debug out of line

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: Removes a multiplicty of calls to __assert_fail, saving up "Multiplicity" to 360kiB of .text space as measured on an x86_64 host. Old New Less%Change 9257272 680 368592 3.98% qemu-system-aarch64 6100968 5911832 189136 3.10% qem

Re: [PATCH v3 28/48] tcg: Split tcg/tcg-op-gvec.h

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: Create tcg/tcg-op-gvec-common.h, moving everything that does not concern TARGET_LONG_BITS. Adjust tcg-op-gvec.c to use the new header. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-gvec-common.h | 426 + includ

Re: [PATCH v5 8/9] vfio/migration: Add x-allow-pre-copy VFIO device property

2023-06-01 Thread Alex Williamson
On Tue, 30 May 2023 17:48:20 +0300 Avihai Horon wrote: > Add a new VFIO device property x-allow-pre-copy to keep migration > compatibility to/from older QEMU versions that don't have VFIO pre-copy > support. This doesn't make sense to me, vfio migration is not currently supported, it can only be

Re: [PATCH v3 32/48] tcg: Spit out exec/translation-block.h

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 06:03, Richard Henderson wrote: This is all that is required by tcg/ from exec-all.h. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 135 +-- include/exec/translation-block.h | 152 +++ tcg/tcg-op-ldst.c

Re: [PATCH v2 0/5] Various xive fixes

2023-06-01 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 6/1/23 09:13, Frederic Barrat wrote: A set of small fixes for the interrupt controller (xive2) on P10. Change log: v2: split last patch to do a bit of cleanup first add Cedric's reviewed-by on the first 3 patches Frede

Re: [PATCH] pnv/xive2: Quiet down some error messages

2023-06-01 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 5/31/23 12:05, Frederic Barrat wrote: When dumping the END and NVP tables ("info pic" from the HMP) on the P10 model, we're likely to be flooded with error messages such as: XIVE[0] - VST: invalid NVPT entry f33800 !? The

Re: [PATCH v4] target/ppc: Fix PMU hflags calculation

2023-06-01 Thread Daniel Henrique Barboza
Reviewed-by: Daniel Henrique Barboza and queued. Thanks, Daniel On 5/30/23 10:04, Nicholas Piggin wrote: Some of the PMU hflags bits can go out of synch, for example a store to MMCR0 with PMCjCE=1 fails to update hflags correctly and results in hflags mismatch: qemu: fatal: TCG hflags m

Re: [PATCH v3 1/3] hw/i2c: add smbus pec utility function

2023-06-01 Thread Philippe Mathieu-Daudé
On 31/5/23 13:47, Klaus Jensen wrote: From: Klaus Jensen Add i2c_smbus_pec() to calculate the SMBus Packet Error Code for a message. Signed-off-by: Klaus Jensen --- hw/i2c/smbus_master.c | 28 include/hw/i2c/smbus_master.h | 2 ++ 2 files changed, 30

Re: [PATCH v2] target/ppc: Fix nested-hv HEAI delivery

2023-06-01 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 5/30/23 10:21, Nicholas Piggin wrote: ppc hypervisors turn HEAI interrupts into program interrupts injected into the guest that executed the illegal instruction, if the hypervisor doesn't handle it some other way. The nested-

Re: [PATCH v2 0/2] qemu-img: fix getting stuck in infinite loop on in-chain rebase

2023-06-01 Thread Andrey Drobyshev
On 5/25/23 21:02, Andrey Drobyshev wrote: > v1 -> v2: > > * Avoid breaking the loop just yet, as the offsets beyond the old > backing size need to be explicitly zeroed; > * Amend the commit message accordingly; > * Alter the added test case to take the last zeroed cluster into > cons

Big TCG slowdown when using zstd with aarch64

2023-06-01 Thread Juan Quintela
Hi Before I continue investigating this further, do you have any clue what is going on here. I am running qemu-system-aarch64 on x86_64. $ time ./tests/qtest/migration-test -p /aarch64/migration/multifd/tcp/plain/none TAP version 13 # random seed: R02S3d50a0e874b28727af4b862a3cc4214e # Start o

Re: [PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file

2023-06-01 Thread Michael Tokarev
01.06.2023 22:28, Andrey Drobyshev via пишет: In case when we're rebasing within one backing chain, and when target image is larger than old backing file, bdrv_is_allocated_above() ends up setting *pnum = 0. As a result, target offset isn't getting incremented, and we get stuck in an infinite fo

Re: [PATCH] qcow2: Explicit mention of padding bytes

2023-06-01 Thread Eric Blake
On Mon, May 22, 2023 at 11:26:03PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 22.05.23 21:46, Eric Blake wrote: > > Although we already covered the need for padding bytes with our > > changes in commit 3ae3fcfa, commit 66fcbca5 (both v5.0.0) added one > > byte and relied on the rest of the tex

Re: [PATCH v3 00/19] Fix qemu_strtosz() read-out-of-bounds

2023-06-01 Thread Eric Blake
On Mon, May 22, 2023 at 02:04:22PM -0500, Eric Blake wrote: > v2 was here: > https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg02951.html > > Since then: > - fix another qemu_strtoui bug > - address review comments from Hanna This series has been reviewed; I fixed up the last few bits, a

Re: [PULL 0/8] Block patches

2023-06-01 Thread Richard Henderson
On 6/1/23 08:25, Stefan Hajnoczi wrote: The following changes since commit c6a5fc2ac76c5ab709896ee1b0edd33685a67ed1: decodetree: Add --output-null for meson testing (2023-05-31 19:56:42 -0700) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-r

Re: [PATCH v3 19/19] cutils: Improve qemu_strtosz handling of fractions

2023-06-01 Thread Eric Blake
On Mon, May 22, 2023 at 02:04:41PM -0500, Eric Blake wrote: > We have several limitations and bugs worth fixing; they are > inter-related enough that it is not worth splitting this patch into > smaller pieces: > > +++ b/util/cutils.c > @@ -194,15 +194,18 @@ static int64_t suffix_mul(char suffix, i

Re: [ANNOUNCE] KVM Microconference at LPC 2023

2023-06-01 Thread Mickaël Salaün
Hi, What is the status of this microconference proposal? We'd be happy to talk about Heki [1] and potentially other hypervisor supports. Regards, Mickaël [1] https://lore.kernel.org/all/20230505152046.6575-1-...@digikod.net/ On 26/05/2023 18:09, Mickaël Salaün wrote: See James Morris's p

Re: [PATCH v2] pc: q35: Bump max_cpus to 1024

2023-06-01 Thread Suthikulpanit, Suravee
On 6/1/2023 6:09 PM, Michael S. Tsirkin wrote: On Thu, Jun 01, 2023 at 11:17:30AM +0100, Daniel P. Berrangé wrote: On Thu, Jun 01, 2023 at 11:09:45AM +0100, Joao Martins wrote: On 31/05/2023 23:51, Suravee Suthikulpanit wrote: Since KVM_MAX_VCPUS is currently defined to 1024 for x86 as sho

[PULL 02/21] qcow2: Explicit mention of padding bytes

2023-06-01 Thread Eric Blake
Although we already covered the need for padding bytes with our changes in commit 3ae3fcfa, commit 66fcbca5 (both v5.0.0) added one byte and relied on the rest of the text for implicitly covering 7 padding bytes. For consistency with other parts of the header (such as the header extension format l

[PULL 00/21] NBD and miscellaneous patches for 2023-06-01

2023-06-01 Thread Eric Blake
The following changes since commit 19a720b74fde7e859d19f12c66a72e545947a657: Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-06-01 08:30:29 -0700) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2023-06-01 for

[PULL 13/21] test-cutils: Refactor qemu_strtosz tests for less boilerplate

2023-06-01 Thread Eric Blake
No need to copy-and-paste lots of boilerplate per string tested, when we can consolidate that behind helper functions. Plus, this adds a bit more coverage (we now test all strings both with and without endptr, whereas before some tests skipped the NULL endptr case), which exposed a SEGFAULT on qem

[PULL 01/21] iotests: Fix test 104 under NBD

2023-06-01 Thread Eric Blake
In the past, commit a231cb27 ("iotests: Fix 104 for NBD", v2.3.0) added an additional filter to _filter_img_info to rewrite NBD URIs into the expected output form. This recently broke when we tweaked tests to run in a per-format directory, which did not match the regex, because _img_info itself is

[PULL 05/21] test-cutils: Test integral qemu_strto* value on failures

2023-06-01 Thread Eric Blake
We are inconsistent on the contents of *value after a strto* parse failure. I found the following behaviors: - parse_uint() and parse_uint_full(), which document that *value is slammed to 0 on all EINVAL failures and 0 or UINT_MAX on ERANGE failures, and has unit tests for that (note that par

[PULL 14/21] cutils: Allow NULL str in qemu_strtosz

2023-06-01 Thread Eric Blake
All the other qemu_strto* and parse_uint allow a NULL str. Having qemu_strtosz not crash on qemu_strtosz(NULL, NULL, &value) is an easy fix that adds some consistency between our string parsers. Signed-off-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hanna Czenczek Message-I

[PULL 07/21] cutils: Fix wraparound parsing in qemu_strtoui

2023-06-01 Thread Eric Blake
While we were matching 32-bit strtol in qemu_strtoi, our use of a 64-bit parse was leaking through for some inaccurate answers in qemu_strtoui in comparison to a 32-bit strtoul (see the unit test for examples). The comment for that function even described what we have to do for a correct parse, bu

[PULL 06/21] test-cutils: Test more integer corner cases

2023-06-01 Thread Eric Blake
We have quite a few undertested and underdocumented integer parsing corner cases. To ensure that any changes we make in the code are intentional rather than accidental semantic changes, it is time to add more unit tests of existing behavior. In particular, this demonstrates that parse_uint() and

[PULL 03/21] test-cutils: Avoid g_assert in unit tests

2023-06-01 Thread Eric Blake
glib documentation[1] is clear: g_assert() should be avoided in unit tests because it is ineffective if G_DISABLE_ASSERT is defined; unit tests should stick to constructs based on g_assert_true() instead. Note that since commit 262a69f428, we intentionally state that you cannot define G_DISABLE_ASS

[PULL 11/21] test-cutils: Add coverage of qemu_strtod

2023-06-01 Thread Eric Blake
It's hard to tweak code for consistency if I can't prove what will or won't break from those tweaks. Time to add unit tests for qemu_strtod() and qemu_strtod_finite(). Among other things, I wrote a check whether we have C99 semantics for strtod("0x1") (which MUST parse hex numbers) rather than C8

[PULL 08/21] cutils: Document differences between parse_uint and qemu_strtou64

2023-06-01 Thread Eric Blake
These two functions are subtly different, and not just because of swapped parameter order. It took me adding better unit tests to figure out why. Document the differences to make it more obvious to developers trying to pick which one to use, as well as to aid in upcoming semantic changes. While

[PULL 19/21] cutils: Use parse_uint in qemu_strtosz for negative rejection

2023-06-01 Thread Eric Blake
Rather than open-coding two different ways to check for an unwanted negative sign, reuse the same code in both functions. That way, if we decide down the road to accept "-0" instead of rejecting it, we have fewer places to change. Also, it means we now get ERANGE instead of EINVAL for negative va

[PULL 16/21] test-cutils: Add more coverage to qemu_strtosz

2023-06-01 Thread Eric Blake
Add some more strings that the user might send our way. In particular, some of these additions include FIXME comments showing where our parser doesn't quite behave the way we want. Signed-off-by: Eric Blake Reviewed-by: Hanna Czenczek Message-Id: <20230522190441.64278-15-ebl...@redhat.com> ---

[PULL 18/21] cutils: Set value in all integral qemu_strto* error paths

2023-06-01 Thread Eric Blake
Our goal in writing qemu_strtoi() and friends is to have an interface harder to abuse than libc's strtol(). Leaving the return value uninitialized on some but not all error paths does not lend itself well to this goal; and our documentation wasn't helpful on what to expect. Note that the previous

[PULL 12/21] test-cutils: Prepare for upcoming semantic change in qemu_strtosz

2023-06-01 Thread Eric Blake
A quick search for 'qemu_strtosz' in the code base shows that outside of the testsuite, the ONLY place that passes a non-NULL pointer to @endptr of any variant of a size parser is in hmp.c (the 'o' parser of monitor_parse_arguments), and that particular caller warns of "extraneous characters at the

[PULL 09/21] cutils: Adjust signature of parse_uint[_full]

2023-06-01 Thread Eric Blake
It's already confusing that we have two very similar functions for wrapping the parse of a 64-bit unsigned value, differing mainly on whether they permit leading '-'. Adjust the signature of parse_uint() and parse_uint_full() to be like all of qemu_strto*(): put the result parameter last, use the

[PULL 17/21] cutils: Set value in all qemu_strtosz* error paths

2023-06-01 Thread Eric Blake
Making callers determine whether or not *value was populated on error is not nice for usability. Pre-patch, we have unit tests that check that *result is left unchanged on most EINVAL errors and set to 0 on many ERANGE errors. This is subtly different from libc strtoumax() behavior which returns

[PULL 10/21] cutils: Allow NULL endptr in parse_uint()

2023-06-01 Thread Eric Blake
All the qemu_strto*() functions permit a NULL endptr, just like their libc counterparts, leaving parse_uint() as the oddball that caused SEGFAULT on NULL and required the user to call parse_uint_full() instead. Relax things for consistency, even though the testsuite is the only impacted caller. A

[PULL 15/21] numa: Check for qemu_strtosz_MiB error

2023-06-01 Thread Eric Blake
As shown in the previous commit, qemu_strtosz_MiB sometimes leaves the result value untouched (we have to audit further to learn that in that case, the QAPI generator says that visit_type_NumaOptions() will have zero-initialized it), and sometimes leaves it with the value of a partial parse before

[PULL 21/21] cutils: Improve qemu_strtosz handling of fractions

2023-06-01 Thread Eric Blake
We have several limitations and bugs worth fixing; they are inter-related enough that it is not worth splitting this patch into smaller pieces: * ".5k" should work to specify 512, just as "0.5k" does * "1.k" and "1." + "9"*50 + "k" should both produce the same result of 2048 after rounding *

[PULL 04/21] test-cutils: Use g_assert_cmpuint where appropriate

2023-06-01 Thread Eric Blake
When debugging test failures, seeing unsigned values as large positive values rather than negative values matters (assuming glib 2.78+; given that I just fixed a bug in glib 2.76 [1] where g_assert_cmpuint displays signed instead of unsigned values). No impact when the test is passing, but using a

[PULL 20/21] cutils: Improve qemu_strtod* error paths

2023-06-01 Thread Eric Blake
Previous patches changed all integral qemu_strto*() error paths to guarantee that *value is never left uninitialized. Do likewise for qemu_strtod. Also, tighten qemu_strtod_finite() to never return a non-finite value (prior to this patch, we were rejecting "inf" with -EINVAL and unspecified resul

[PATCH v4 0/2] target/arm: allow DC CVA[D]P in user mode emulation

2023-06-01 Thread Zhuojia Shen
This patch series enables executing DC CVAP and DC CVADP instructions in AArch64 Linux user mode emulation and adds proper TCG tests. Changes in v4: - Add copyright and license header in new files Changes in v3: - Fix typo of HWCAP2_DCPODP - Split tests into a separate patch - Remove unnecessary

[PATCH v4 1/2] target/arm: allow DC CVA[D]P in user mode emulation

2023-06-01 Thread Zhuojia Shen
DC CVAP and DC CVADP instructions can be executed in EL0 on Linux, either directly when SCTLR_EL1.UCI == 1 or emulated by the kernel (see user_cache_maint_handler() in arch/arm64/kernel/traps.c). This patch enables execution of the two instructions in user mode emulation. Signed-off-by: Zhuojia S

[PATCH v4 2/2] tests/tcg/aarch64: add DC CVA[D]P tests

2023-06-01 Thread Zhuojia Shen
Test execution of DC CVAP and DC CVADP instructions under user mode emulation. Signed-off-by: Zhuojia Shen Reviewed-by: Peter Maydell --- tests/tcg/aarch64/Makefile.target | 11 ++ tests/tcg/aarch64/dcpodp.c| 63 +++ tests/tcg/aarch64/dcpop.c | 63

[PATCH 1/2] target/s390x: Fix MXDB and MXDBR

2023-06-01 Thread Ilya Leoshkevich
These instructions multiply 64 bits by 64 bits, not 128 bits by 64 bits. Reported-by: Tulio Magno Quites Machado Filho Fixes: 2b91240f95fd ("target/s390x: Use Int128 for passing float128") Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- target/s390x/helper.h| 2 +- ta

[PATCH 2/2] tests/tcg/s390x: Test MXDB and MXDBR

2023-06-01 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Cc: qemu-sta...@nongnu.org Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/mxdb.c | 30 ++ 2 files changed, 31 insertions(+) create mode 100644 tests/tcg/s390x/mxdb.c diff

[PATCH 0/2] target/s390x: Fix MXDB and MXDBR

2023-06-01 Thread Ilya Leoshkevich
Hi, This is the last finding from [1]. With this fix, llvm-project testcases run without issues. Best regards, Ilya [1] https://bugzilla.redhat.com/show_bug.cgi?id=2211472 Ilya Leoshkevich (2): target/s390x: Fix MXDB and MXDBR tests/tcg/s390x: Test MXDB and MXDBR target/s390x/helper.h

Re: [PATCH v4 01/10] tests/qtest: add various qtest_qmp_assert_success() variants

2023-06-01 Thread Juan Quintela
Daniel P. Berrangé wrote: > Add several counterparts of qtest_qmp_assert_success() that can > > * Use va_list instead of ... > * Accept a list of FDs to send > * Return the response data > > Reviewed-by: Thomas Huth > Signed-off-by: Daniel P. Berrangé Reviewed-by: Juan Quintela

Re: [PATCH v4 02/10] tests/qtest: add support for callback to receive QMP events

2023-06-01 Thread Juan Quintela
Daniel P. Berrangé wrote: > Currently code must call one of the qtest_qmp_event* functions to > fetch events. These are only usable if the immediate caller knows > the particular event they want to capture, and are only interested > in one specific event type. Adding ability to register an event >

Re: [PATCH v4 08/10] tests/qtest: distinguish src/dst migration VM stop/resume events

2023-06-01 Thread Juan Quintela
Daniel P. Berrangé wrote: > The 'got_stop' and 'got_resume' global variables apply to the src and > dst migration VM respectively. Change their names to make this explicit > to developers. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Juan Quintela

Re: [PATCH v4 09/10] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Juan Quintela
Daniel P. Berrangé wrote: > There are 27 pre-copy live migration scenarios being tested. In all of > these we force non-convergence and run for one iteration, then let it > converge and wait for completion during the second (or following) > iterations. At 3 mbps bandwidth limit the first iteration

[PATCH v4 2/2] tests/tcg/aarch64: add DC CVA[D]P tests

2023-06-01 Thread Zhuojia Shen
Test execution of DC CVAP and DC CVADP instructions under user mode emulation. Signed-off-by: Zhuojia Shen Reviewed-by: Peter Maydell --- tests/tcg/aarch64/Makefile.target | 11 ++ tests/tcg/aarch64/dcpodp.c| 63 +++ tests/tcg/aarch64/dcpop.c | 63

Re: [PATCH] qtest/migration: Document live=true cases

2023-06-01 Thread Juan Quintela
Peter Xu wrote: > Document every single live=true use cases on why it should be done in the > live manner. Also document on the parameter so new precopy cases should > always use live=off unless with explicit reasonings. > > Cc: Thomas Huth > Cc: Juan Quintela > Cc: Daniel P. Berrangé > Signed

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Thu, Jun 01, 2023 at 11:53:17AM -0400, Peter Xu wrote: >> On Thu, Jun 01, 2023 at 04:39:48PM +0100, Daniel P. Berrangé wrote: >> > On Thu, Jun 01, 2023 at 11:30:10AM -0400, Peter Xu wrote: >> > > Thanks for looking into this.. definitely worthwhile. >> > > >> > > On

Re: [PATCH v3 8/9] tests/qtest: make more migration pre-copy scenarios run non-live

2023-06-01 Thread Juan Quintela
Peter Xu wrote: > On Thu, Jun 01, 2023 at 04:55:25PM +0100, Daniel P. Berrangé wrote: >> On Thu, Jun 01, 2023 at 11:53:17AM -0400, Peter Xu wrote: >> > On Thu, Jun 01, 2023 at 04:39:48PM +0100, Daniel P. Berrangé wrote: >> > > On Thu, Jun 01, 2023 at 11:30:10AM -0400, Peter Xu wrote: >> > > > Than

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Juan Quintela
Peter Xu wrote: > On Wed, May 31, 2023 at 02:24:00PM +0100, Daniel P. Berrangé wrote: >> The migration test cases that actually exercise live migration want to >> ensure there is a minimum of two iterations of pre-copy, in order to >> exercise the dirty tracking code. >> >> Historically we've que

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-06-01 Thread Alistair Francis
On Thu, Jun 1, 2023 at 4:43 PM Weiwei Li wrote: > > > On 2023/6/1 13:27, Alistair Francis wrote: > > On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: > >> Normally, MPRV can be set to 1 only in M mode (It will be cleared > >> when returning to lower-privilege mode by MRET/SRET). > >> > >> Signed

Re: [PATCH v3 9/9] tests/qtest: massively speed up migration-test

2023-06-01 Thread Peter Xu
On Fri, Jun 02, 2023 at 01:00:10AM +0200, Juan Quintela wrote: > That was basically my idea and that is why I am holding the last two > patches and see if I can came with something in the next couple of days. Ah! ... If you haven't started, please hold off for one day. I'll see whether I can pos

[PULL 5/6] migration: restore vmstate on migration failure

2023-06-01 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy 1. Otherwise failed migration just drops guest-panicked state, which is not good for management software. 2. We do keep different paused states like guest-panicked during migration with help of global_state state. 3. We do restore running state on source

[PULL 3/6] runstate: drop unused runstate_store()

2023-06-01 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy The function is unused since previous commit. Drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Message-Id: <20230517123752.21615-4-vsement...@yandex-team.ru> Signed-off-by: Juan Quintela --- include/sysemu/runstate.h | 1 - s

[PULL 1/6] runstate: add runstate_get()

2023-06-01 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy It's necessary to restore the state after failed/cancelled migration in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Message-Id: <20230517123752.21615-2-vsement...@yandex-team.ru> Signed-off-by: Juan Quintela --- in

[PULL 0/6] Migration 20230601 patches

2023-06-01 Thread Juan Quintela
The following changes since commit 9eb400cdd7b0940bd696aa01462dd53004ae04e9: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-06-01 11:47:58 -0700) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/migratio

[PULL 6/6] migration: stop tracking ram writes when cancelling background migration

2023-06-01 Thread Juan Quintela
From: Fiona Ebner Currently, it is only done when the iteration finishes successfully. Not cleaning up the userfaultfd write protection can lead to symptoms/issues such as the process hanging in memmove or GDB not being able to attach. Signed-off-by: Fiona Ebner Message-Id: <20230526115908.1961

[PULL 4/6] migration: switch from .vm_was_running to .vm_old_state

2023-06-01 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy No logic change here, only refactoring. That's a preparation for next commit where we finally restore the stopped vm state on migration failure or cancellation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Message-Id: <20230517123752

[PULL 2/6] migration: never fail in global_state_store()

2023-06-01 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Actually global_state_store() can never fail. Let's get rid of extra error paths. To make things clear, use new runstate_get() and use same approach for global_state_store() and global_state_store_running(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewe

Re: [ANNOUNCE] KVM Microconference at LPC 2023

2023-06-01 Thread Sean Christopherson
On Thu, Jun 01, 2023, Micka�l Sala�n wrote: > Hi, > > What is the status of this microconference proposal? We'd be happy to talk > about Heki [1] and potentially other hypervisor supports. Proposal submitted (deadline is/was today), now we wait :-) IIUC, we should find out rather quickly wh

[PATCH RFC 2/3] Revert "tests/qtest: massively speed up migration-test"

2023-06-01 Thread Peter Xu
This reverts commit e76a92b869f17d7a3f554890fb89b7da595dd652. --- tests/qtest/migration-test.c | 143 +-- 1 file changed, 18 insertions(+), 125 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index d2cd71e6cf..b0c355bbd9 100644

[PATCH RFC 0/3] migration: switchover-hold flag

2023-06-01 Thread Peter Xu
This RFC patchset is based on Daniel's recent refactoring on migration-test: https://lore.kernel.org/r/20230601161347.1803440-1-berra...@redhat.com Based-on: <20230601161347.1803440-1-berra...@redhat.com> A new flag "switchover-hold" is added to allow src qemu explicitly hold switchover for preco

[PATCH RFC 3/3] qtest/migration: Use switchover-hold to speedup

2023-06-01 Thread Peter Xu
Use the switchover-hold flag rather than tuning bw+downtime to guide test convergence. This can achieve similar goal of previous patch "tests/qtest: massively speed up migration-test" but without magic offset to write or monitoring. The initial solution can reduce migration-test time from 8min to

[PATCH RFC 1/3] migration: switchover-hold parameter

2023-06-01 Thread Peter Xu
Add a new migration parameter switchover-hold which can block src qemu migration from switching over to dest from running. One can set this flag to true so src qemu will keep iterating the VM data, not switching over to dest even if it can. It means now live migration works somehow like COLO; we

Re: [PATCH 2/4] target/riscv: Remove check on mode for MPRV

2023-06-01 Thread Weiwei Li
On 2023/6/2 07:03, Alistair Francis wrote: On Thu, Jun 1, 2023 at 4:43 PM Weiwei Li wrote: On 2023/6/1 13:27, Alistair Francis wrote: On Mon, May 29, 2023 at 10:19 PM Weiwei Li wrote: Normally, MPRV can be set to 1 only in M mode (It will be cleared when returning to lower-privilege mode

Re: [PATCH v14 03/10] accel: collecting TB execution count

2023-06-01 Thread Wu, Fei
On 6/1/2023 10:03 PM, Richard Henderson wrote: > On 5/31/23 22:44, Wu, Fei wrote: >> On 6/1/2023 8:05 AM, Richard Henderson wrote: >>> On 5/30/23 01:35, Fei Wu wrote: From: "Vanderson M. do Rosario" If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS enabled, then we instru

Re: [PATCH v7 0/3] hw/riscv/virt: pflash improvements

2023-06-01 Thread Alistair Francis
On Thu, Jun 1, 2023 at 3:00 PM Sunil V L wrote: > > This series improves the pflash usage in RISC-V virt machine with solutions to > below issues. > > 1) Currently the first pflash is reserved for ROM/M-mode firmware code. But > S-mode > payload firmware like EDK2 need both pflash devices to have

Re: [PATCH v2 1/6] target/riscv: Without H-mode mask all HS mode inturrupts in mie.

2023-06-01 Thread Alistair Francis
On Sat, May 27, 2023 at 2:25 AM Rajnesh Kanwal wrote: > > Signed-off-by: Rajnesh Kanwal Reviewed-by: Alistair Francis Alistair > --- > target/riscv/csr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/riscv/csr.c b/target/riscv/csr.c > index 4451bd1263..041f0

Re: [PATCH v2 2/6] target/riscv: Check for async flag in case of RISCV_EXCP_SEMIHOST.

2023-06-01 Thread Alistair Francis
On Sat, May 27, 2023 at 2:24 AM Rajnesh Kanwal wrote: > > RISCV_EXCP_SEMIHOST is set to 0x10, which can be a local interrupt id > as well. This change moves RISCV_EXCP_SEMIHOST to switch case so that > async flag check is performed before invoking semihosting logic. > > Signed-off-by: Rajnesh Kanw

Re: [PATCH v2 3/6] target/riscv: Set VS* bits to one in mideleg when H-Ext is enabled

2023-06-01 Thread Alistair Francis
On Sat, May 27, 2023 at 2:24 AM Rajnesh Kanwal wrote: > > With H-Ext supported, VS bits are all hardwired to one in MIDELEG > denoting always delegated interrupts. This is being done in rmw_mideleg > but given mideleg is used in other places when routing interrupts > this change initializes it in

Re: [PATCH 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-01 Thread Yuquan Wang
Hi, Leif On Thu, 1 Jun 2023 18:59:56 +0100, Leif Lindholm wrote: > > +Ard > > On Thu, Jun 01, 2023 at 16:01:43 +0100, Peter Maydell wrote: > > > >> Also has EHCI never worked, or has it worked in some modes and so this > > > >> change should be versioned? > > > > > > > > AIUI, EHCI has never wor

Re: [PATCH v2 4/6] target/riscv: Split interrupt logic from riscv_cpu_update_mip.

2023-06-01 Thread Alistair Francis
On Sat, May 27, 2023 at 2:24 AM Rajnesh Kanwal wrote: > > This is to allow virtual interrupts to be inserted into S and VS > modes. Given virtual interrupts will be maintained in separate > mvip and hvip CSRs, riscv_cpu_update_mip will no longer be in the > path and interrupts need to be triggered

Re: [PATCH v3 0/2] Support for print to log vector extension registers

2023-06-01 Thread Alistair Francis
On Mon, Apr 10, 2023 at 10:46 PM Ivan Klokov wrote: > > The patch added an ability to include VPU registers in the 'cpu' logging. > --- > v3: >- split of the patch into two parts: general and RISC-V specific > --- > > Ivan Klokov (2): > util/log: Add vector registers to log > target/riscv:

Re: [PATCH v3 2/2] target/riscv: Add RVV registers to log

2023-06-01 Thread Alistair Francis
On Mon, Apr 10, 2023 at 10:47 PM Ivan Klokov wrote: > > Print RvV extesion register to log if VPU option is enabled. > > Signed-off-by: Ivan Klokov I applied the first patch, unfortunately this one doesn't apply anymore. Do you mind rebasing this on https://github.com/alistair23/qemu/tree/riscv-

Re: [PULL 00/21] NBD and miscellaneous patches for 2023-06-01

2023-06-01 Thread Richard Henderson
On 6/1/23 15:02, Eric Blake wrote: Eric Blake (21): iotests: Fix test 104 under NBD qcow2: Explicit mention of padding bytes test-cutils: Avoid g_assert in unit tests test-cutils: Use g_assert_cmpuint where appropriate test-cutils: Test integral qemu_strto* valu

Re: [PATCH v14 03/10] accel: collecting TB execution count

2023-06-01 Thread Richard Henderson
On 6/1/23 18:54, Wu, Fei wrote: We are not *checking* the tb->tb_stats->stats_enabled bit except at code generation time, not code execution time.  Therefore nothing ever reads the TB_PAUSED bit (or, correspondingly, the clearing of the other bits).  The setting of the bit is permanent. At dump

<    1   2   3   4   5   >