[PATCH 09/11] tcg: Update env_tlb() comments

2023-09-12 Thread Anton Johansson via
Signed-off-by: Anton Johansson --- tcg/aarch64/tcg-target.c.inc | 2 +- tcg/arm/tcg-target.c.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 0931a69448..d2f5ca5946 100644 --- a/tcg/aarch64/tcg-target.

Re: [PATCH v2 06/12] qtest: bump pxe-test timeout to 3 minutes

2023-09-12 Thread Daniel P . Berrangé
On Wed, Jul 19, 2023 at 03:26:11PM +0200, Thomas Huth wrote: > On 17/07/2023 20.28, Daniel P. Berrangé wrote: > > The pxe-test takes about 1 + 1/2 minutes in a --enable-debug > > build. Bumping to 3 minutes will give more headroom. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > tests/qte

[PATCH] hw/i386/pc: fix code comment on cumulative flash size

2023-09-12 Thread Laszlo Ersek
- The comment is incorrectly indented / formatted. - The comment states a 8MB limit, even though the code enforces a 16MB limit. Both of these warts come from commit 0657c657eb37 ("hw/i386/pc: add max combined fw size as machine configuration option", 2020-12-09); clean them up. Arguably, it's

[PATCH v2] hw/i386/pc: fix code comment on cumulative flash size

2023-09-12 Thread Laszlo Ersek
- The comment is incorrectly indented / formatted. - The comment states a 8MB limit, even though the code enforces a 16MB limit. Both of these warts come from commit 0657c657eb37 ("hw/i386/pc: add max combined fw size as machine configuration option", 2020-12-09); clean them up. Arguably, it's

Re: [PATCH] gitlab: remove unreliable avocado CI jobs

2023-09-12 Thread Alex Bennée
Daniel P. Berrangé writes: > On Tue, Sep 12, 2023 at 11:06:11AM -0400, Stefan Hajnoczi wrote: >> The avocado-system-alpine, avocado-system-fedora, and >> avocado-system-ubuntu jobs are unreliable. I identified them while >> looking over CI failures from the past week: >> https://gitlab.com/qemu

Re: [PATCH] gitlab: remove unreliable avocado CI jobs

2023-09-12 Thread Daniel P . Berrangé
On Tue, Sep 12, 2023 at 05:01:26PM +0100, Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > On Tue, Sep 12, 2023 at 11:06:11AM -0400, Stefan Hajnoczi wrote: > >> The avocado-system-alpine, avocado-system-fedora, and > >> avocado-system-ubuntu jobs are unreliable. I identified them while >

Re: [PATCH v3 1/4] hw/cxl: Push cxl_decoder_count_enc() and cxl_decode_ig() into .c

2023-09-12 Thread Fan Ni
On Mon, Sep 11, 2023 at 12:43:10PM +0100, Jonathan Cameron wrote: > There is no strong justification for keeping these in the header > so push them down into the associated cxl-component-utils.c file. > > Suggested-by: Philippe Mathieu-Daudé > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by

Re: [PATCH] gitlab: remove unreliable avocado CI jobs

2023-09-12 Thread Stefan Hajnoczi
On Tue, Sep 12, 2023, 12:14 Daniel P. Berrangé wrote: > On Tue, Sep 12, 2023 at 05:01:26PM +0100, Alex Bennée wrote: > > > > Daniel P. Berrangé writes: > > > > > On Tue, Sep 12, 2023 at 11:06:11AM -0400, Stefan Hajnoczi wrote: > > >> The avocado-system-alpine, avocado-system-fedora, and > > >> a

Re: [PATCH RESEND v5 51/57] target/loongarch: Implement xvinsgr2vr xvpickve2gr

2023-09-12 Thread Richard Henderson
On 9/12/23 02:09, gaosong wrote: static bool gen_g2v_vl(DisasContext *ctx, arg_vr_i *a, uint32_t oprsz, MemOp mop,    void (*func)(TCGv, TCGv_ptr, tcg_target_long)) {     TCGv src = gpr_src(ctx, a->rj, EXT_NONE);     if (!check_vec(ctx, oprsz)) {     return true;   

Re: [PATCH 3/4] tcg/aarch64: Emit BTI insns at jump landing pads

2023-09-12 Thread Peter Maydell
On Wed, 16 Aug 2023 at 15:27, Richard Henderson wrote: > > The prologue is entered via "call"; the epilogue, each tb, > and each goto_tb continuation point are all reached via "jump". > > As tcg_out_goto_long is only used by tcg_out_exit_tb, merge > the two functions. Change the indirect register

Re: [PATCH] gitlab-ci/cirrus: Increase timeout to 100 minutes

2023-09-12 Thread Daniel P . Berrangé
On Tue, Sep 12, 2023 at 03:15:28PM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 12, 2023 at 10:02:17AM -0400, Stefan Hajnoczi wrote: > > On Tue, 12 Sept 2023 at 09:53, Daniel P. Berrangé > > wrote: > > > > > > On Tue, Sep 12, 2023 at 09:38:29AM -0400, Stefan Hajnoczi wrote: > > > > The 80m time

Re: [RFC 2/3] rcu: add drain_call_rcu_co() API

2023-09-12 Thread Kevin Wolf
Am 06.09.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > call_drain_rcu() has limitations that make it unsuitable for use in > qmp_device_add(). This sounds a bit vague with only alluding to some unnamed limitations. I assume that you mean the two points you add to rcu.txt. If so, maybe it would

Re: [PATCH v2] hw/i386/pc: fix code comment on cumulative flash size

2023-09-12 Thread Philippe Mathieu-Daudé
On 12/9/23 17:55, Laszlo Ersek wrote: - The comment is incorrectly indented / formatted. - The comment states a 8MB limit, even though the code enforces a 16MB limit. Both of these warts come from commit 0657c657eb37 ("hw/i386/pc: add max combined fw size as machine configuration option", 20

Re: [PATCH] tests/avocado: Fix console data loss

2023-09-12 Thread Philippe Mathieu-Daudé
+Alex who also looked at that IIRC. On 12/9/23 15:13, Nicholas Piggin wrote: Occasionally some avocado tests will fail waiting for console line despite the machine running correctly. Console data goes missing, as can be seen in the console log. This is due to _console_interaction calling makefil

Re: [PATCH v4 0/3] target/i386: Restrict system-specific features from user emulation

2023-09-12 Thread Philippe Mathieu-Daudé
On 12/9/23 16:07, Paolo Bonzini wrote: On 9/11/23 23:13, Philippe Mathieu-Daudé wrote: Too many system-specific code (and in particular KVM related) is pulled in user-only build. This led to adding unjustified stubs as kludge to unagressive linker non-optimizations. This series restrict x86 sys

Re: [RFC 3/3] qmp: make qmp_device_add() a coroutine

2023-09-12 Thread Kevin Wolf
Am 06.09.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > It is not safe to call drain_call_rcu() from qmp_device_add() because > some call stacks are not prepared for drain_call_rcu() to drop the Big > QEMU Lock (BQL). > > For example, device emulation code is protected by the BQL but when it > c

Re: [PATCH v2 18/21] block: Take graph rdlock in bdrv_change_aio_context()

2023-09-12 Thread Stefan Hajnoczi
On Mon, Sep 11, 2023 at 11:46:17AM +0200, Kevin Wolf wrote: > The function reads the parents list, so it needs to hold the graph lock. > > Signed-off-by: Kevin Wolf > Reviewed-by: Emanuele Giuseppe Esposito > --- > block.c | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Stefan Hajnocz

Re: [PATCH v2 17/21] block: Take graph rdlock in bdrv_drop_intermediate()

2023-09-12 Thread Stefan Hajnoczi
On Mon, Sep 11, 2023 at 11:46:16AM +0200, Kevin Wolf wrote: > The function reads the parents list, so it needs to hold the graph lock. > > Signed-off-by: Kevin Wolf > Reviewed-by: Emanuele Giuseppe Esposito > --- > block.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Stefan Hajnoczi

Re: [PATCH v2 05/21] block: Introduce bdrv_schedule_unref()

2023-09-12 Thread Stefan Hajnoczi
On Mon, Sep 11, 2023 at 11:46:04AM +0200, Kevin Wolf wrote: > bdrv_unref() is called by a lot of places that need to hold the graph > lock (it naturally happens in the context of operations that change the > graph). However, bdrv_unref() takes the graph writer lock internally, so > it can't actuall

Re: [PATCH v2 00/21] Graph locking part 4 (node management)

2023-09-12 Thread Stefan Hajnoczi
On Mon, Sep 11, 2023 at 11:45:59AM +0200, Kevin Wolf wrote: > The previous parts of the graph locking changes focussed mostly on the > BlockDriver side and taking reader locks while performing I/O. This > series focusses more on the functions managing the graph structure, i.e > adding, removing and

Re: [risu PATCH v2 1/4] s390x: Add basic s390x support to the C code

2023-09-12 Thread Peter Maydell
On Tue, 5 Sept 2023 at 12:50, Thomas Huth wrote: > > With these changes, it is now possible to compile the "risu" binary > for s390x hosts. > > Acked-by: Ilya Leoshkevich > Signed-off-by: Thomas Huth > +/* reginfo_init: initialize with a ucontext */ > +void reginfo_init(struct reginfo *ri, uc

Re: [RFC 2/3] rcu: add drain_call_rcu_co() API

2023-09-12 Thread Stefan Hajnoczi
On Tue, 12 Sept 2023 at 12:37, Kevin Wolf wrote: > > Am 06.09.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > > call_drain_rcu() has limitations that make it unsuitable for use in > > qmp_device_add(). > > This sounds a bit vague with only alluding to some unnamed limitations. > I assume that you

Re: [risu PATCH v2 4/4] s390x: Update the configure script for s390x support

2023-09-12 Thread Peter Maydell
On Tue, 5 Sept 2023 at 12:50, Thomas Huth wrote: > > Auto-detect s390x hosts and add s390x information to the help text. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Thomas Huth > --- > configure | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/configure b

Re: [RFC 3/3] qmp: make qmp_device_add() a coroutine

2023-09-12 Thread Stefan Hajnoczi
On Tue, 12 Sept 2023 at 12:47, Kevin Wolf wrote: > > Am 06.09.2023 um 21:01 hat Stefan Hajnoczi geschrieben: > > It is not safe to call drain_call_rcu() from qmp_device_add() because > > some call stacks are not prepared for drain_call_rcu() to drop the Big > > QEMU Lock (BQL). > > > > For example

Re: [RFC 0/3] qmp: make qmp_device_add() a coroutine

2023-09-12 Thread Kevin Wolf
Am 07.09.2023 um 16:25 hat Paolo Bonzini geschrieben: > On Thu, Sep 7, 2023 at 4:00 PM Stefan Hajnoczi wrote: > > While I agree that the issue would not happen if monitor commands only > > ran in the iohandler AioContext, I don't think we can change that. > > When Kevin implemented coroutine comma

Re: [PATCH v3 2/4] hw/cxl: Add utility functions decoder interleave ways and target count.

2023-09-12 Thread Fan Ni
On Mon, Sep 11, 2023 at 12:43:11PM +0100, Jonathan Cameron wrote: > As an encoded version of these key configuration parameters is available > in a register, provide functions to extract it again so as to avoid > the need for duplicating the storage. > > Whilst here update the _enc() function to

Re: [PATCH v4 0/3] target/i386: Restrict system-specific features from user emulation

2023-09-12 Thread Paolo Bonzini
Il mar 12 set 2023, 18:44 Philippe Mathieu-Daudé ha scritto: > I can try to improve it with your comments, but I have no idea of > x86 CPU features. > I will take a look. > However, the dependency of user-mode emulation on KVM is really an > > implementation detail of QEMU. It's very much bake

Re: [PATCH v2] hw/i386/pc: fix code comment on cumulative flash size

2023-09-12 Thread Michael Tokarev
12.09.2023 18:55, Laszlo Ersek: - The comment is incorrectly indented / formatted. - The comment states a 8MB limit, even though the code enforces a 16MB limit. Both of these warts come from commit 0657c657eb37 ("hw/i386/pc: add max combined fw size as machine configuration option", 2020-12-

Re: [PATCH 5/7] hw/pci: spelling fixes

2023-09-12 Thread Michael Tokarev
11.09.2023 18:37, Peter Maydell wrote: On Sat, 9 Sept 2023 at 14:18, Michael Tokarev wrote: - * We initially place MSI interrupt I/O region a adress 0 and + * We initially place MSI interrupt I/O region a address 0 and "at address 0" - * Resources defined for PXBs are

Re: [PATCH v3 3/4] hw/cxl: Fix and use same calculation for HDM decoder block size everywhere

2023-09-12 Thread Fan Ni
On Mon, Sep 11, 2023 at 12:43:12PM +0100, Jonathan Cameron wrote: > In order to avoid having the size of the per HDM decoder register block > repeated in lots of places, create the register definitions for HDM > decoder 1 and use the offset between the first registers in HDM decoder 0 and > HDM de

[PATCH v2] virtio: add VIRTQUEUE_ERROR QAPI event

2023-09-12 Thread Vladimir Sementsov-Ogievskiy
For now we only log the vhost device error, when virtqueue is actually stopped. Let's add a QAPI event, which makes possible: - collect statistics of such errors - make immediate actions: take core dumps or do some other debugging - inform the user through a management API or UI, so that (s)he

Re: cherry-picking something to -stable which might require other changes

2023-09-12 Thread Michael Tokarev
12.09.2023 18:23, Daniel P. Berrangé wrote: .. I tend to try to cherry-pick the dependancies in case (1) too unless they are functionally invasive. Any time you manually adjust a patch, you increase the likelihood that later cherry picks will also require manual work. So I always favour a clean c

Re: [PATCH v3 4/4] hw/cxl: Support 4 HDM decoders at all levels of topology

2023-09-12 Thread Fan Ni
On Mon, Sep 11, 2023 at 12:43:13PM +0100, Jonathan Cameron wrote: > Support these decoders in CXL host bridges (pxb-cxl), CXL Switch USP > and CXL Type 3 end points. > > Signed-off-by: Jonathan Cameron > > --- One comment inline, other than that, looks good to me. > v3: Factor out the hdm_in

Re: cherry-picking something to -stable which might require other changes

2023-09-12 Thread Daniel P . Berrangé
On Tue, Sep 12, 2023 at 09:01:43PM +0300, Michael Tokarev wrote: > 12.09.2023 18:23, Daniel P. Berrangé wrote: > .. > > I tend to try to cherry-pick the dependancies in case (1) too > > unless they are functionally invasive. Any time you manually > > adjust a patch, you increase the likelihood that

Re: [PATCH v2 11/12] target/arm: Implement the CPY* instructions

2023-09-12 Thread Richard Henderson
On 9/12/23 07:04, Peter Maydell wrote: The FEAT_MOPS CPY* instructions implement memory copies. These come in both "always forwards" (memcpy-style) and "overlap OK" (memmove-style) flavours. Signed-off-by: Peter Maydell --- v2: - separate helpers for the 'forwards' and 'move' variants - fix

Re: [PATCH v2 12/12] target/arm: Enable FEAT_MOPS for CPU 'max'

2023-09-12 Thread Richard Henderson
On 9/12/23 07:04, Peter Maydell wrote: Enable FEAT_MOPS on the AArch64 'max' CPU, and add it to the list of features we implement. Signed-off-by: Peter Maydell --- v2: Now sets the hwcap bit --- docs/system/arm/emulation.rst | 1 + linux-user/elfload.c | 1 + target/arm/tcg/cpu64.c

Re: [PATCH] gitlab: remove unreliable avocado CI jobs

2023-09-12 Thread Alex Bennée
Stefan Hajnoczi writes: > On Tue, Sep 12, 2023, 12:14 Daniel P. Berrangé wrote: > > On Tue, Sep 12, 2023 at 05:01:26PM +0100, Alex Bennée wrote: > > > > Daniel P. Berrangé writes: > > > > > On Tue, Sep 12, 2023 at 11:06:11AM -0400, Stefan Hajnoczi wrote: > > >> The avocado-system-alpi

[PATCH 1/4] microbit: add missing qtest_quit() call

2023-09-12 Thread Daniel P . Berrangé
Without this call, the QEMU process is being left running which on FreeBSD 13.2 at least, makes meson think the test is still running, and thus execution of "make check" continues forever. This fixes the regression introduced in: commit a9c9bbee855877293683012942d3485d50f286af Author: Chris L

[PATCH 0/4] ci: fix hang of FreeBSD CI jobs

2023-09-12 Thread Daniel P . Berrangé
This addresses https://gitlab.com/qemu-project/qemu/-/issues/1882 Which turned out to be a genuine flaw which we missed during merge as the patch hitting master co-incided with the FreeBSD CI job having an temporary outage due to changed release image version. Daniel P. Berrangé (4): microbi

[PATCH 2/4] qtest: kill orphaned qtest QEMU processes on FreeBSD

2023-09-12 Thread Daniel P . Berrangé
On Linux we use PR_SET_PDEATHSIG to kill orphaned QEMU processes if we fail to call qtest_quit(), or the test program aborts/segvs. This prevents meson from hanging forever due to the orphaned process keeping stdout open. On FreeBSD we can achieve the same using PROC_PDEATHSIG_CTL, which gives us

[PATCH 4/4] gitlab: make Cirrus CI jobs gating

2023-09-12 Thread Daniel P . Berrangé
The Cirrus CI jobs have been non-gating for a while to let us build confidence in their reliability. Aside from periodic dependancy problems when FreeBSD Ports switches to be based on a new FreeBSD image version, the jobs have been reliable. It is thus worth making them gating to prevent build fail

[PATCH 3/4] gitlab: make Cirrus CI timeout explicit

2023-09-12 Thread Daniel P . Berrangé
On the GitLab side we're invoking the Cirrus CI job using the cirrus-run tool which speaks to the Cirrus REST API. Cirrus sometimes tasks 5-10 minutes to actually schedule the task, and thus the execution time of 'cirrus-run' inside GitLab will be slightly longer than the execution time of the Cirr

Re: [PATCH 03/11] accel/tcg: Modify tlb_*() to use CPUState

2023-09-12 Thread Richard Henderson
On 9/12/23 08:34, Anton Johansson wrote: Changes tlb_*() functions to take CPUState instead of CPUArchState, as they don't require the full CPUArchState. This makes it easier to decouple target-(in)dependent code. Signed-off-by: Anton Johansson --- include/exec/cpu_ldst.h | 8 +- accel/tcg

Re: [PATCH 02/11] include: Introduce tlb_ptr field to CPUState

2023-09-12 Thread Richard Henderson
On 9/12/23 08:34, Anton Johansson wrote: IcountDecr *icount_decr_ptr; +struct CPUTLB *tlb_ptr; These are both in CPUNegativeOffsetState. We might as well use that pointer instead. r~

Re: [PATCH 1/1] migration: skip poisoned memory pages on "ram saving" phase

2023-09-12 Thread Peter Xu
On Mon, Sep 11, 2023 at 03:48:38PM -0400, Peter Xu wrote: > On Sat, Sep 09, 2023 at 03:57:44PM +0100, Joao Martins wrote: > > > Should I continue to treat them as zero pages written with > > > save_zero_page_to_file ? > > > > MCE had already been forward to the guest, so guest is supposed to not

Re: [PATCH] gitlab: remove unreliable avocado CI jobs

2023-09-12 Thread Stefan Hajnoczi
On Tue, 12 Sept 2023 at 14:36, Alex Bennée wrote: > > > Stefan Hajnoczi writes: > > > On Tue, Sep 12, 2023, 12:14 Daniel P. Berrangé wrote: > > > > On Tue, Sep 12, 2023 at 05:01:26PM +0100, Alex Bennée wrote: > > > > > > Daniel P. Berrangé writes: > > > > > > > On Tue, Sep 12, 2023 at 11:0

Re: [PATCH 0/4] ci: fix hang of FreeBSD CI jobs

2023-09-12 Thread Stefan Hajnoczi
On Tue, 12 Sept 2023 at 14:41, Daniel P. Berrangé wrote: > > This addresses > > https://gitlab.com/qemu-project/qemu/-/issues/1882 > > Which turned out to be a genuine flaw which we missed during merge > as the patch hitting master co-incided with the FreeBSD CI job > having an temporary outage

Re: [PATCH 2/4] qtest: kill orphaned qtest QEMU processes on FreeBSD

2023-09-12 Thread Richard Henderson
On 9/12/23 11:41, Daniel P. Berrangé wrote: On Linux we use PR_SET_PDEATHSIG to kill orphaned QEMU processes if we fail to call qtest_quit(), or the test program aborts/segvs. This prevents meson from hanging forever due to the orphaned process keeping stdout open. On FreeBSD we can achieve the

Re: [PATCH 1/4] microbit: add missing qtest_quit() call

2023-09-12 Thread Richard Henderson
On 9/12/23 11:41, Daniel P. Berrangé wrote: Without this call, the QEMU process is being left running which on FreeBSD 13.2 at least, makes meson think the test is still running, and thus execution of "make check" continues forever. This fixes the regression introduced in: commit a9c9bbee855

[PATCH 0/4] Add BHRB Facility Support

2023-09-12 Thread Glenn Miles
This is a series of patches for adding support for the Branch History Rolling Buffer (BHRB) facility. This was added to the Power ISA starting with version 2.07. Changes were subsequently made in version 3.1 to limit BHRB recording to instructions run in problem state only and to add a control bi

Re: [PATCH 1/2] blockdev: qmp_transaction: harden transaction properties for bitmaps

2023-09-12 Thread Vladimir Sementsov-Ogievskiy
On 04.09.23 11:31, Andrey Zhadchenko wrote: Unlike other transaction commands, bitmap operations do not drain target bds. If we have an IOThread, this may result in some inconsistencies, as bitmap content may change during transaction command. Add bdrv_drained_begin()/end() to bitmap operations.

Re: [PATCH 05/11] accel/tcg: Modifies memory access functions to use CPUState

2023-09-12 Thread Richard Henderson
On 9/12/23 08:34, Anton Johansson wrote: do_[ld|st]*() and mmu_lookup*() are changed to use CPUState over CPUArchState, moving the target-dependence to the target-facing facing cpu_[ld|st] functions. Signed-off-by: Anton Johansson --- accel/tcg/cputlb.c | 324 ++---

Re: [PATCH 2/3] iotests: improve 'not run' message for nbd-multiconn test

2023-09-12 Thread Vladimir Sementsov-Ogievskiy
On 06.09.23 17:09, Denis V. Lunev wrote: The test actually requires Python bindings to libnbd rather than libnbd itself. Clarify that inside the message. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Hanna Reitz CC: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vla

Re: [PATCH 2/9] migration: Let migrate_set_error() take ownership

2023-09-12 Thread Fabiano Rosas
Peter Xu writes: > migrate_set_error() used one error_copy() so it always copy an error. > However that's not the major use case - the major use case is one would > like to pass the error to migrate_set_error() without further touching the > error. > > It can be proved if we see most of the calle

Re: [PATCH] gitlab: remove unreliable avocado CI jobs

2023-09-12 Thread Thomas Huth
On 12/09/2023 17.06, Stefan Hajnoczi wrote: The avocado-system-alpine, avocado-system-fedora, and avocado-system-ubuntu jobs are unreliable. I identified them while looking over CI failures from the past week: https://gitlab.com/qemu-project/qemu/-/jobs/5058610614 https://gitlab.com/qemu-project/

Re: [PATCH 1/4] target/ppc: Add new hflags to support BHRB

2023-09-12 Thread Glenn Miles
Sorry, this is my first attempt at sending out a patch and it looks like only part of the patch made it. Until I can figure out what I did wrong, please ignore this patch. Thanks, Glenn Miles

Re: [PATCH 0/4] ci: fix hang of FreeBSD CI jobs

2023-09-12 Thread Thomas Huth
On 12/09/2023 20.41, Daniel P. Berrangé wrote: This addresses https://gitlab.com/qemu-project/qemu/-/issues/1882 Which turned out to be a genuine flaw which we missed during merge as the patch hitting master co-incided with the FreeBSD CI job having an temporary outage due to changed release

Re: [PATCH 3/3] iotests: distinguish 'skipped' and 'not run' states

2023-09-12 Thread Vladimir Sementsov-Ogievskiy
On 06.09.23 17:09, Denis V. Lunev wrote: Each particular testcase could skipped intentionally and accidentally. For example the test is not designed for a particular image format or is not run due to the missed library. The latter case is unwanted in reality. Though the discussion has revealed t

Re: [PATCH v2] tpm: fix crash when FD >= 1024

2023-09-12 Thread Michael Tokarev
12.09.2023 03:08, Stefan Berger wrote: On 9/11/23 09:25, marcandre.lur...@redhat.com wrote: From: Marc-Andr޸ Lureau Replace select() with poll() to fix a crash when QEMU has a large number of FDs. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2020133 For backporting I think we should

Re: [PATCH 9/9] migration/postcopy: Allow network to fail even during recovery

2023-09-12 Thread Peter Xu
On Mon, Sep 11, 2023 at 09:31:51PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > Hi, sorry it took me so long to get to this. Not a problem. > > > Normally the postcopy recover phase should only exist for a super short > > period, that's the duration when QEMU is trying to recover from an

Re: [PATCH 2/9] migration: Let migrate_set_error() take ownership

2023-09-12 Thread Peter Xu
On Tue, Sep 12, 2023 at 04:40:14PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > migrate_set_error() used one error_copy() so it always copy an error. > > However that's not the major use case - the major use case is one would > > like to pass the error to migrate_set_error() without furth

Re: [PATCH 1/4] target/ppc: Add new hflags to support BHRB

2023-09-12 Thread Cédric Le Goater
On 9/12/23 22:00, Glenn Miles wrote: Sorry, this is my first attempt at sending out a patch and it looks like only part of the patch made it.  Until I can figure out what I did wrong, please ignore this patch. I didn't get patches 2-4. Patch 1 looked good though. Please resend. Thanks, C.

Re: [PATCH v2] tpm: fix crash when FD >= 1024

2023-09-12 Thread Michael Tokarev
12.09.2023 03:08, Stefan Berger пишет: On 9/11/23 09:25, marcandre.lur...@redhat.com wrote: From: Marc-Andr޸ Lureau Replace select() with poll() to fix a crash when QEMU has a large number of FDs. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2020133 Fixes:  ca64b08638 ("tpm: Move bac

[PATCH 1/4] target/ppc: Add new hflags to support BHRB

2023-09-12 Thread Glenn Miles
This commit is preparatory to the addition of Branch History Rolling Buffer (BHRB) functionality, which is being provided today starting with the P8 processor. BHRB uses several SPR register fields to control whether or not a branch instruction's address (and sometimes target address) should be re

[PATCH 2/4] target/ppc: Add recording of taken branches to BHRB

2023-09-12 Thread Glenn Miles
This commit continues adding support for the Branch History Rolling Buffer (BHRB) as is provided starting with the P8 processor and continuing with its successors. This commit is limited to the recording and filtering of taken branches. The following changes were made: - Added a BHRB buffer fo

[PATCH 3/4] target/ppc: Add clrbhrb and mfbhrbe instructions

2023-09-12 Thread Glenn Miles
Add support for the clrbhrb and mfbhrbe instructions. Since neither instruction is believed to be critical to performance, both instructions were implemented using helper functions. Access to both instructions is controlled by bits in the HFSCR (for privileged state) and MMCR0 (for problem state)

Re: [PATCH v2 3/3] tests/acpi: Update DSDT.cxl with QTG DSM

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 05:18:47PM +0100, Jonathan Cameron wrote: > Description of change in previous patch. > > Signed-off-by: Jonathan Cameron Reviewed-by: Fan Ni > --- > tests/qtest/bios-tables-test-allowed-diff.h | 1 - > tests/data/acpi/q35/DSDT.cxl| Bin 9655 -> 9723 b

Re: [PATCH v2 1/3] tests/acpi: Allow update of DSDT.cxl

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 05:18:45PM +0100, Jonathan Cameron wrote: > Addition of QTG in following patch requires an update to the test > data. > > Signed-off-by: Jonathan Cameron > --- Reviewed-by: Fan Ni > tests/qtest/bios-tables-test-allowed-diff.h | 1 + > 1 file changed, 1 insertion(+) >

Re: [PATCH v2 2/3] hw/cxl: Add QTG _DSM support for ACPI0017 device

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 05:18:46PM +0100, Jonathan Cameron wrote: > From: Dave Jiang > > Add a simple _DSM call support for the ACPI0017 device to return a fake QTG > ID value of 0 in all cases. The enabling is for _DSM plumbing testing > from the OS. > > Following edited for readbility only >

[PATCH v4 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-12 Thread John Allen
From: William Roche AMD guests can't currently deal with BUS_MCEERR_AO MCE injection as it panics the VM kernel. We filter this event and provide a warning message. Signed-off-by: William Roche --- v3: - New patch v4: - Remove redundant check for AO errors --- target/i386/kvm/kvm.c | 9 +++

[PATCH v4 3/3] i386: Add support for SUCCOR feature

2023-09-12 Thread John Allen
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. Reported-by: William Roche Reviewed-by: Joao Martins Signed-off-by: John Allen v2: - Add "succor" feature word. - Add case

[PATCH v4 1/3] i386: Fix MCE support for AMD hosts

2023-09-12 Thread John Allen
For the most part, AMD hosts can use the same MCE injection code as Intel, but there are instances where the qemu implementation is Intel specific. First, MCE delivery works differently on AMD and does not support broadcast. Second, kvm_mce_inject generates MCEs that include a number of Intel speci

Re: [PATCH 1/4] hw/cxl: Fix CFMW config memory leak

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 02:28:03PM +0100, Jonathan Cameron wrote: > From: Li Zhijian > > Allocate targets and targets[n] resources when all sanity checks are > passed to avoid memory leaks. > > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Li Zhijian > Reviewed-by: Philippe Mathieu-Da

Re: [PATCH 2/4] hw/pci-bridge/cxl_upstream: Fix bandwidth entry base unit for SSLBIS

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 02:28:04PM +0100, Jonathan Cameron wrote: > From: Dave Jiang > > According to ACPI spec 6.5 5.2.28.4 System Locality Latency and Bandwidth > Information Structure, if the "Entry Base Unit" is 1024 for BW and the > matrix entry has the value of 100, the BW is 100 GB/s. So t

[PATCH v4 0/3] Fix MCE handling on AMD hosts

2023-09-12 Thread John Allen
In the event that a guest process attempts to access memory that has been poisoned in response to a deferred uncorrected MCE, an AMD system will currently generate a SIGBUS error which will result in the entire guest being shutdown. Ideally, we only want to kill the guest process that accessed pois

Re: [PATCH 4/4] docs/cxl: Change to lowercase as others

2023-09-12 Thread Fan Ni
On Mon, Sep 04, 2023 at 02:28:06PM +0100, Jonathan Cameron wrote: > From: Li Zhijian > > Using the same style as elsewhere for topology / topo > > Signed-off-by: Li Zhijian > Link: > https://urldefense.com/v3/__https://lore.kernel.org/r/20230519085802.2106900-2-lizhijian@cn.fujitsu.com__;!!EwV

[PATCH 3/4] target/ppc: Add clrbhrb and mfbhrbe instructions

2023-09-12 Thread Glenn Miles
Add support for the clrbhrb and mfbhrbe instructions. Since neither instruction is believed to be critical to performance, both instructions were implemented using helper functions. Access to both instructions is controlled by bits in the HFSCR (for privileged state) and MMCR0 (for problem state)

[PATCH 3/4] target/ppc: Add clrbhrb and mfbhrbe instructions

2023-09-12 Thread Glenn Miles
Add support for the clrbhrb and mfbhrbe instructions. Since neither instruction is believed to be critical to performance, both instructions were implemented using helper functions. Access to both instructions is controlled by bits in the HFSCR (for privileged state) and MMCR0 (for problem state)

[PATCH 0/4] Add BHRB Facility Support

2023-09-12 Thread Glenn Miles
This is a series of patches for adding support for the Branch History Rolling Buffer (BHRB) facility. This was added to the Power ISA starting with version 2.07. Changes were subsequently made in version 3.1 to limit BHRB recording to instructions run in problem state only and to add a control bi

[RFC v6 0/9] Native Library Calls

2023-09-12 Thread Yeqi Fu
Executing a program under QEMU's user mode subjects the entire program, including all library calls, to translation. It's important to understand that many of these library functions are optimized specifically for the guest architecture. Therefore, their translation might not yield the most efficie

[RFC v6 1/9] build: Implement logic for sharing cross-building config files

2023-09-12 Thread Yeqi Fu
Since both TCG tests and libnative libraries require cross-building, the config files for cross-building, config_target_mak, are now saved in the cross-build directory for sharing. This allows TCG tests and libnative libraries to use these config files through symbolic links when cross-building con

[RFC v6 4/9] tcg: Add tcg opcodes and helpers for native library calls

2023-09-12 Thread Yeqi Fu
This commit implements tcg opcodes and helpers for native library calls. A table is used to store the parameter types and return value types for each native library function. In terms of types, only three types are of real concern: the two base sizes int and intptr_t, and if the value is a pointer,

[RFC v6 7/9] target/arm: Add support for native library calls

2023-09-12 Thread Yeqi Fu
This commit introduces support for native library calls on the arm target. When encountering special instructions reserved for native calls, this commit extracts the function name and generates the corresponding native call. Signed-off-by: Yeqi Fu --- configs/targets/aarch64-linux-user.mak | 1

[RFC v6 6/9] target/mips: Add support for native library calls

2023-09-12 Thread Yeqi Fu
This commit introduces support for native library calls on the mips target. When encountering special instructions reserved for native calls, this commit extracts the function name and generates the corresponding native call. Signed-off-by: Yeqi Fu --- configs/targets/mips-linux-user.mak | 1

[RFC v6 8/9] tests/tcg/multiarch: Add nativecall.c test

2023-09-12 Thread Yeqi Fu
Introduce a new test for native calls to ensure their functionality. The process involves cross-compiling the test cases, building them as dynamically linked binaries, and running these binaries which necessitates the addition of the appropriate interpreter prefix. Signed-off-by: Yeqi Fu --- tes

[RFC v6 9/9] docs/user: Add doc for native library calls

2023-09-12 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- docs/user/index.rst| 1 + docs/user/native_calls.rst | 91 ++ 2 files changed, 92 insertions(+) create mode 100644 docs/user/native_calls.rst diff --git a/docs/user/index.rst b/docs/user/index.rst index 782d27cda2..d3fc9b7a

[RFC v6 3/9] linux-user: Implement native-bypass option support

2023-09-12 Thread Yeqi Fu
This commit implements support for the native-bypass option in linux-user. By utilizing this functionality, the specified shared library can be loaded into the user program. This is achieved by dynamically modifying the /etc/ld.so.preload file, enabling the user program to load the shared library e

[PATCH 4/4] target/ppc: Add migration support for BHRB

2023-09-12 Thread Glenn Miles
Adds migration support for Branch History Rolling Buffer (BHRB) internal state. Signed-off-by: Glenn Miles --- target/ppc/machine.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target/ppc/machine.c b/target/ppc/machine.c index b195fb4dc8..89146969c8 100644 --- a/t

[RFC v6 2/9] build: Implement libnative library and the build machinery for libnative

2023-09-12 Thread Yeqi Fu
This commit implements a shared library, where native functions are rewritten as special instructions. At runtime, user programs load the shared library, and special instructions are executed when native functions are called. Signed-off-by: Yeqi Fu --- Makefile| 2 ++

[RFC v6 5/9] target/i386: Add support for native library calls

2023-09-12 Thread Yeqi Fu
This commit introduces support for native library calls on the i386 target. When encountering special instructions reserved for native calls, this commit extracts the function name and generates the corresponding native call. Signed-off-by: Yeqi Fu --- configs/targets/i386-linux-user.mak | 1

[PATCH 2/4] target/ppc: Add recording of taken branches to BHRB

2023-09-12 Thread Glenn Miles
This commit continues adding support for the Branch History Rolling Buffer (BHRB) as is provided starting with the P8 processor and continuing with its successors. This commit is limited to the recording and filtering of taken branches. The following changes were made: - Added a BHRB buffer fo

Re: [PATCH v2 4/4] block-coroutine-wrapper: use qemu_get_current_aio_context()

2023-09-12 Thread Stefan Hajnoczi
On Fri, Sep 01, 2023 at 07:01:37PM +0200, Kevin Wolf wrote: > Am 24.08.2023 um 01:59 hat Stefan Hajnoczi geschrieben: > > Use qemu_get_current_aio_context() in mixed wrappers and coroutine > > wrappers so that code runs in the caller's AioContext instead of moving > > to the BlockDriverState's AioC

[PULL v1 0/1] Merge tpm 2023/09/12 v1

2023-09-12 Thread Stefan Berger
Hello! This PR contains a fix for the case where the TPM file descriptor is >= 1024 and the select() call cannot be used. Regards, Stefan The following changes since commit 9ef497755afc252fb8e060c9ea6b0987abfd20b6: Merge tag 'pull-vfio-20230911' of https://github.com/legoater/qemu into

[PULL v1 1/1] tpm: fix crash when FD >= 1024

2023-09-12 Thread Stefan Berger
From: Marc-Andr޸ Lureau Replace select() with poll() to fix a crash when QEMU has a large number of FDs. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2020133 Cc: qemu-sta...@nongnu.org Fixes: 56a3c24ffc ("tpm: Probe for connected TPM 1.2 or TPM 2") Signed-off-by: Marc-Andr޸ Lureau Review

[PATCH 4/4] target/ppc: Add migration support for BHRB

2023-09-12 Thread Glenn Miles
Adds migration support for Branch History Rolling Buffer (BHRB) internal state. Signed-off-by: Glenn Miles --- target/ppc/machine.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target/ppc/machine.c b/target/ppc/machine.c index b195fb4dc8..89146969c8 100644 --- a/t

[PATCH 4/4] target/ppc: Add migration support for BHRB

2023-09-12 Thread Glenn Miles
Adds migration support for Branch History Rolling Buffer (BHRB) internal state. Signed-off-by: Glenn Miles --- target/ppc/machine.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target/ppc/machine.c b/target/ppc/machine.c index b195fb4dc8..89146969c8 100644 --- a/t

Re: [PATCH 9/9] migration/postcopy: Allow network to fail even during recovery

2023-09-12 Thread Peter Xu
On Tue, Sep 12, 2023 at 04:05:27PM -0400, Peter Xu wrote: > Thanks for contributing the test case! > > Do you want me to pick this patch up (with modifications) and repost > together with this series? It'll also work if you want to send a separate > test patch. Let me know! It turns out I found

[PATCH v2 00/11] migration: Better error handling in rp thread, allow failures in recover

2023-09-12 Thread Peter Xu
v2: - Patch "migration: Let migrate_set_error() take ownership" - Fix three new call sites that uses migrate_set_error(), by dropping the error_report_err() later on. [Fabiano] - Patch "migration: Allow network to fail even during recovery" - Fixed wrong check for dest QEMU - Patch "migrat

[PATCH v2 08/11] migration: Add migration_rp_wait|kick()

2023-09-12 Thread Peter Xu
It's just a simple wrapper for rp_sem on either wait() or kick(), make it even clearer on how it is used. Prepared to be used even for other things. Reviewed-by: Fabiano Rosas Signed-off-by: Peter Xu --- migration/migration.h | 15 +++ migration/migration.c | 4 ++-- migration/ram

[PATCH v2 09/11] migration: Allow network to fail even during recovery

2023-09-12 Thread Peter Xu
Normally the postcopy recover phase should only exist for a super short period, that's the duration when QEMU is trying to recover from an interrupted postcopy migration, during which handshake will be carried out for continuing the procedure with state changes from PAUSED -> RECOVER -> POSTCOPY_AC

<    1   2   3   4   >