[PULL 4/6] tcg/tci: Remove CONFIG_DEBUG_TCG_INTERPRETER

2022-07-05 Thread Richard Henderson
There is nothing in this environment variable that cannot be done better with -d flags. There is nothing special about TCI that warrants this hack. Moreover, it does not compile -- remove it. Reported-by: Song Gao Reviewed-by: Song Gao Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson

[PULL 2/6] target/loongarch: Clean up tlb when cpu reset

2022-07-05 Thread Richard Henderson
From: Song Gao We should make sure that tlb is clean when cpu reset. Signed-off-by: Song Gao Message-Id: <20220705070950.2364243-1-gaos...@loongson.cn> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/loongarch/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PULL 6/6] hw/intc/loongarch_ipi: Fix mail send and any send function

2022-07-05 Thread Richard Henderson
From: Xiaojuan Yang By the document of ipi mailsend device, byte is written only when the mask bit is 0. The original code discards mask bit and overwrite the data always, this patch fixes the issue. Signed-off-by: Xiaojuan Yang Message-Id: <20220705064901.2353349-3-yangxiaoj...@loongson.cn> Si

Re: [PATCH v4 20/45] target/arm: Implement SME LD1, ST1

2022-07-05 Thread Richard Henderson
On 7/5/22 16:18, Peter Maydell wrote: Ah yes, I see how this works. I wonder if there's some way we can abstract out this sort of index calculation into a macro or function so that we can comment what it's doing there and then all the use-sites are more "obviously correct". Perhaps: /* * When

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Alberto Faria
On Tue, Jul 5, 2022 at 8:16 AM Daniel P. Berrangé wrote: > for i in `git ls-tree --name-only -r HEAD:` > do > clang-tidy $i 1>/dev/null 2>&1 > done All of those invocations are probably failing quickly due to missing includes and other problems, since the location of the co

Re: questions about QMP commands - "block-export-add" and "nbd-server-add"

2022-07-05 Thread Hanna Reitz
On 05.07.22 11:57, Yu Zhang wrote: Hi All, since QEMU-5.2, the QMP command "nbd-server-add" was deprecated and replaced with "block-export-add" [1]. Arguments for the two are different. For using "block-export-add", "id" and "node-name" are needed, of which "id" is "device" for "nbd-server-

Re: [PATCH] linux-user: Add LoongArch to qemu_get_family()

2022-07-05 Thread Laurent Vivier
Le 05/07/2022 à 08:59, Song Gao a écrit : qemu_get_family() needs to add LoongArch support. Signed-off-by: Song Gao --- scripts/qemu-binfmt-conf.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 1f4e2cd19d..6ef9f118d9 10

Re: [PATCH 03/62] target/arm: Fix MTE check in sve_ldnfff1_r

2022-07-05 Thread Peter Maydell
On Sun, 3 Jul 2022 at 09:25, Richard Henderson wrote: > > The comment was correct, but the test was not: > disable mte if tagged is *not* set. > > Signed-off-by: Richard Henderson > --- > target/arm/sve_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/arm/

Re: [PATCH 04/62] target/arm: Record tagged bit for user-only in sve_probe_page

2022-07-05 Thread Peter Maydell
On Sun, 3 Jul 2022 at 09:27, Richard Henderson wrote: > > Fixes a bug in that we were not honoring MTE from user-only > SVE. Copy the user-only MTE logic from allocation_tag_mem > into sve_probe_page. > > Signed-off-by: Richard Henderson > --- > target/arm/sve_helper.c | 3 +++ Reviewed-by: Pete

Re: [PATCH 1/5] multifd: Create property multifd-sync-each-iteration

2022-07-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We used to synchronize all channels at the end of each RAM section > sent. That is not needed, so preparing to only synchronize once every > full round in latests patches. > > Notice that we initialize the property as true. We will change the > defa

Re: [PATCH 2/5] multifd: Put around all sync calls tests for each iteration

2022-07-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We will sync later in different places. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 33 + > 1 file changed, 21 insertions(+), 12 deletions(-) > > diff --git a/mig

Re: [PULL 0/6] loongarch64 patch queue

2022-07-05 Thread Richard Henderson
gitlab.com/rth7680/qemu.git tags/pull-la-20220705 for you to fetch changes up to bf7ce37f8f40149dfa354bdb74810c8e586a11e4: hw/intc/loongarch_ipi: Fix mail send and any send function (2022-07-05 16:25:17 +0530) Loongarch patch que

Re: [PATCH 12/14] aspeed: Make aspeed_board_init_flashes public

2022-07-05 Thread Cédric Le Goater
Hello Alex, On 6/30/22 11:43, Alex Bennée wrote: Cédric Le Goater writes: On 6/29/22 20:24, Alex Bennée wrote: Cédric Le Goater writes: On 6/29/22 16:14, Alex Bennée wrote: Cédric Le Goater writes: On 6/24/22 18:50, Cédric Le Goater wrote: On 6/23/22 20:43, Peter Delevoryas wrote:

Re: [PATCH v8 16/20] jobs: protect job.aio_context with BQL and job_mutex

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:34AM -0400, Emanuele Giuseppe Esposito wrote: > In order to make it thread safe, implement a "fake rwlock", > where we allow reads under BQL *or* job_mutex held, but > writes only under BQL *and* job_mutex. > > The only write we have is in child_job_set_aio_ctx, which

Re: [PATCH 05/62] target/arm: Use PageEntryExtra for MTE

2022-07-05 Thread Peter Maydell
On Sun, 3 Jul 2022 at 09:28, Richard Henderson wrote: > > Tagged pages are indicated by the page attributes, so we > don't need to use a separate bit in MemTxAttrs. Further, > we store the PA, so we don't need to recover it by walking > the tree of memory regions. > > Signed-off-by: Richard Hende

Re: [PATCH 3/5] migration: Simplify ram_find_and_save_block()

2022-07-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We will need later that find_dirty_block() return errors, so > simplify the loop. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 20 +--- > 1 file changed, 9 insertions(+), 11 deleti

Re: [PATCH 4/5] migration: Make find_dirty_block() return a single parameter

2022-07-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We used to return two bools, just return a single int with the > following meaning: > > old return / again / new return > falsefalse 0 > falsetrue1 > true true2 /* We don't care about again at all */ We shouldn't us

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 12:48:44AM +0200, Ilya Leoshkevich wrote: > wasmtime is a WebAssembly runtime, which includes a large testsuite. > This testsuite uses qemu-user (aarch64 and s390x are supported) in > order to exercise foreign architectures. So you're saying that WebAssembly itself is aware

Re: [PATCH v8 13/20] jobs: group together API calls under the same job lock

2022-07-05 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 10:17 schrieb Emanuele Giuseppe Esposito: > > > Am 05/07/2022 um 10:14 schrieb Stefan Hajnoczi: >> On Wed, Jun 29, 2022 at 10:15:31AM -0400, Emanuele Giuseppe Esposito wrote: >>> diff --git a/blockdev.c b/blockdev.c >>> index 71f793c4ab..5b79093155 100644 >>> --- a/blockdev.c

Re: [PATCH v8 17/20] job.c: enable job lock/unlock and remove Aiocontext locks

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:35AM -0400, Emanuele Giuseppe Esposito wrote: > Change the job_{lock/unlock} and macros to use job_mutex. > > Now that they are not nop anymore, remove the aiocontext > to avoid deadlocks. > > Therefore: > - when possible, remove completely the aiocontext lock/unlock

Re: [PATCH v8 19/20] blockjob: remove unused functions

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:37AM -0400, Emanuele Giuseppe Esposito wrote: > These public functions are not used anywhere, thus can be dropped. > > Signed-off-by: Emanuele Giuseppe Esposito > --- > blockjob.c | 30 -- > include/block/blockjob.h | 33 +++

Re: [PATCH v8 20/20] job: remove unused functions

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:38AM -0400, Emanuele Giuseppe Esposito wrote: > These public functions are not used anywhere, thus can be dropped. > Also, since this is the final job API that doesn't use AioContext > lock and replaces it with job_lock, adjust all remaining function > documentation to

Re: [PATCH v8 00/20] job: replace AioContext lock with job_mutex

2022-07-05 Thread Stefan Hajnoczi
On Wed, Jun 29, 2022 at 10:15:18AM -0400, Emanuele Giuseppe Esposito wrote: > In this series, we want to remove the AioContext lock and instead > use the already existent job_mutex to protect the job structures > and list. This is part of the work to get rid of AioContext lock > usage in favour of

Re: [PATCH v8 13/20] jobs: group together API calls under the same job lock

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
On 7/5/22 16:01, Emanuele Giuseppe Esposito wrote: Am 05/07/2022 um 10:17 schrieb Emanuele Giuseppe Esposito: Am 05/07/2022 um 10:14 schrieb Stefan Hajnoczi: On Wed, Jun 29, 2022 at 10:15:31AM -0400, Emanuele Giuseppe Esposito wrote: diff --git a/blockdev.c b/blockdev.c index 71f793c4ab..5

Re: [PATCH v2] io_uring: fix short read slow path

2022-07-05 Thread Stefan Hajnoczi
On Fri, Jul 01, 2022 at 07:52:31AM +0900, Dominique Martinet wrote: > Stefano Garzarella wrote on Thu, Jun 30, 2022 at 05:49:21PM +0200: > > > so when we ask for more we issue an extra short reads, making sure we go > > > through the two short reads path. > > > (Unfortunately I wasn't quite sure wh

Re: [PATCH v2] io_uring: fix short read slow path

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 30, 2022 at 10:01:37AM +0900, Dominique Martinet wrote: > sqeq.off here is the offset to read within the disk image, so obviously > not 'nread' (the amount we just read), but as the author meant to write > its current value incremented by the amount we just read. > > Normally recent ve

[PULL 0/2] xen queue

2022-07-05 Thread Anthony PERARD via
The following changes since commit 19361471b59441cd6f2aa22d4fbee7a6e9e76586: Merge tag 'pull-la-20220705' of https://gitlab.com/rth7680/qemu into staging (2022-07-05 16:30:52 +0530) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm

[PULL 1/2] xen/pass-through: merge emulated bits correctly

2022-07-05 Thread Anthony PERARD via
From: Chuck Zmudzinski In xen_pt_config_reg_init(), there is an error in the merging of the emulated data with the host value. With the current Qemu, instead of merging the emulated bits with the host bits as defined by emu_mask, the emulated bits are merged with the host bits as defined by the i

[PULL 2/2] xen/pass-through: don't create needless register group

2022-07-05 Thread Anthony PERARD via
From: Chuck Zmudzinski Currently we are creating a register group for the Intel IGD OpRegion for every device we pass through, but the XEN_PCI_INTEL_OPREGION register group is only valid for an Intel IGD. Add a check to make sure the device is an Intel IGD and a check that the administrator has e

Re: venv for python qtest bits? (was: Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests)

2022-07-05 Thread Ani Sinha
On Mon, Jul 4, 2022 at 7:02 PM Ani Sinha wrote: > > On Fri, Jul 1, 2022 at 6:25 PM Michael S. Tsirkin wrote: > > > > On Fri, Jul 01, 2022 at 03:44:32PM +0530, Ani Sinha wrote: > > > but I thought you were suggesting we built bits every time the test is > > > run? > > > > In my opinion 3 scenario

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We need to add a new flag to mean to sync at that point. > Notice that we still synchronize at the end of setup and at the end of > complete stages. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 2 +- > migration/ram.c | 42

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-07-05 Thread Peter Maydell
On Tue, 5 Jul 2022 at 14:04, Daniel P. Berrangé wrote: > If we put this job in QEMU CI someone will have to be able to > interpret the results when it fails. In particular since this is qemu-user, the answer is probably at least some of the time going to be "oh, well, qemu-user isn't reliable if

Re: [PATCH 1/8] virtio_queue_aio_attach_host_notifier: remove AioContext lock

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:20AM -0400, Emanuele Giuseppe Esposito wrote: > @@ -146,7 +147,6 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev) > > s->dataplane_starting = false; > s->dataplane_started = true; > -aio_context_release(s->ctx); > return 0; This looks risky

Re: [PATCH 06/62] target/arm: Use PageEntryExtra for BTI

2022-07-05 Thread Peter Maydell
On Sun, 3 Jul 2022 at 09:27, Richard Henderson wrote: > > Add a bit to ARMCacheAttrs to hold the guarded bit between > get_phys_addr_lpae and arm_cpu_tlb_fill, then put the bit > into PageEntryExtra. > > In is_guarded_page, use probe_access_extra instead of just > guessing that the tlb entry is st

Re: [PATCH 07/62] include/exec: Remove target_tlb_bitN from MemTxAttrs

2022-07-05 Thread Peter Maydell
On Sun, 3 Jul 2022 at 09:35, Richard Henderson wrote: > > We have now moved all uses to PageEntryExtra. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-07-05 Thread Ilya Leoshkevich
On Tue, 2022-07-05 at 13:58 +0100, Daniel P. Berrangé wrote: > On Tue, Jul 05, 2022 at 12:48:44AM +0200, Ilya Leoshkevich wrote: > > wasmtime is a WebAssembly runtime, which includes a large > > testsuite. > > This testsuite uses qemu-user (aarch64 and s390x are supported) in > > order to exercise

Re: [PATCH 2/8] block-backend: enable_write_cache should be atomic

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:21AM -0400, Emanuele Giuseppe Esposito wrote: > It is read from IO_CODE and written with BQL held, > so setting it as atomic should be enough. > > Also remove the aiocontext lock that was sporadically > taken around the set. > > Signed-off-by: Emanuele Giuseppe Espos

Re: [PATCH 3/8] virtio_blk_process_queued_requests: always run in a bh

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:22AM -0400, Emanuele Giuseppe Esposito wrote: > diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c > index f9224f23d2..03e10a36a4 100644 > --- a/hw/block/dataplane/virtio-blk.c > +++ b/hw/block/dataplane/virtio-blk.c > @@ -234,8 +234,16 @@ i

[PATCH v4] hw/nvme: Use ioeventfd to handle doorbell updates

2022-07-05 Thread Jinhao Fan
Add property "ioeventfd" which is enabled by default. When this is enabled, updates on the doorbell registers will cause KVM to signal an event to the QEMU main loop to handle the doorbell updates. Therefore, instead of letting the vcpu thread run both guest VM and IO emulation, we now use the main

Re: [PATCH 4/8] virtio: categorize callbacks in GS

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:23AM -0400, Emanuele Giuseppe Esposito wrote: > All the callbacks below are always running in the main loop. > > The callbacks are the following: > - start/stop_ioeventfd: these are the callbacks where > blk_set_aio_context(iothread) is done, so they are called in t

Re: [PATCH 5/8] virtio-blk: mark GLOBAL_STATE_CODE functions

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:24AM -0400, Emanuele Giuseppe Esposito wrote: > Just as done in the block API, mark functions in virtio-blk > that are always called in the main loop with BQL held. > > We know such functions are GS because they all are callbacks > from virtio.c API that has already c

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 02:56:35PM +0100, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > We need to add a new flag to mean to sync at that point. > > Notice that we still synchronize at the end of setup and at the end of > > complete stages. > > > > Signed-off-by:

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-07-05 Thread Ilya Leoshkevich
On Tue, 2022-07-05 at 14:57 +0100, Peter Maydell wrote: > On Tue, 5 Jul 2022 at 14:04, Daniel P. Berrangé > wrote: > > If we put this job in QEMU CI someone will have to be able to > > interpret the results when it fails. > > In particular since this is qemu-user, the answer is probably > at leas

Re: [PATCH 6/8] virtio-blk: mark IO_CODE functions

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:25AM -0400, Emanuele Giuseppe Esposito wrote: > Just as done in the block API, mark functions in virtio-blk > that are called also from iothread(s). > > We know such functions are IO because many are blk_* callbacks, > running always in the device iothread, and remain

Re: [RFC] gitlab: introduce s390x wasmtime job

2022-07-05 Thread Peter Maydell
On Tue, 5 Jul 2022 at 15:37, Ilya Leoshkevich wrote: > > On Tue, 2022-07-05 at 14:57 +0100, Peter Maydell wrote: > > On Tue, 5 Jul 2022 at 14:04, Daniel P. Berrangé > > wrote: > > > If we put this job in QEMU CI someone will have to be able to > > > interpret the results when it fails. > > > > In

Re: [PATCH 7/8] VirtIOBlock: protect rq with its own lock

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:26AM -0400, Emanuele Giuseppe Esposito wrote: > @@ -946,17 +955,20 @@ static void virtio_blk_reset(VirtIODevice *vdev) > * stops all Iothreads. > */ > blk_drain(s->blk); > +aio_context_release(ctx); > > /* We drop queued requests after blk_d

Re: [PATCH 8/8] virtio-blk: remove unnecessary AioContext lock from function already safe

2022-07-05 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 10:37:27AM -0400, Emanuele Giuseppe Esposito wrote: > AioContext lock was introduced in b9e413dd375 and in this instance > it is used to protect these 3 functions: > - virtio_blk_handle_rw_error > - virtio_blk_req_complete > - block_acct_done > > Now that all three of the a

Re: [PATCH v8 13/20] jobs: group together API calls under the same job lock

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
On 6/29/22 17:15, Emanuele Giuseppe Esposito wrote: --- a/job.c +++ b/job.c @@ -1045,11 +1045,14 @@ static void job_completed_txn_abort_locked(Job *job) /* Called with job_mutex held, but releases it temporarily */ static int job_prepare_locked(Job *job) { +int ret; + GLOBAL_STATE

[PATCH 1/5] ppc64: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread Cédric Le Goater
This replaces the IRQ array 'irq_inputs' with GPIO lines, the goal being to remove 'irq_inputs' when all CPUs have been converted. Signed-off-by: Cédric Le Goater --- hw/intc/xics.c| 10 ++ hw/intc/xive.c| 4 ++-- hw/ppc/mac_newworld.c | 8 hw/ppc/ppc.c

[PATCH 0/5] ppc: Remove irq_inputs

2022-07-05 Thread Cédric Le Goater
Hello, This replaces the IRQ array 'irq_inputs' with GPIO lines and removes 'irq_inputs' when all CPUs have been converted. Thanks, C. Cédric Le Goater (5): ppc64: Allocate IRQ lines with qdev_init_gpio_in() ppc/40x: Allocate IRQ lines with qdev_init_gpio_in() ppc/6xx: Allocate IRQ lines

[PATCH 2/5] ppc/40x: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/ppc.c | 5 + hw/ppc/ppc405_uc.c | 4 ++-- hw/ppc/ppc440_bamboo.c | 4 ++-- hw/ppc/sam460ex.c | 4 ++-- hw/ppc/virtex_ml507.c | 10 +- 5 files changed, 12 insertions(+), 15 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/p

[PATCH 4/5] ppc/e500: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/e500.c | 8 hw/ppc/ppc.c | 5 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 7f7f5b345260..757cfaa62f8a 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -861,7 +861,6 @@ void ppce500_in

[PATCH 3/5] ppc/6xx: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/mac_newworld.c | 8 hw/ppc/mac_oldworld.c | 2 +- hw/ppc/pegasos2.c | 2 +- hw/ppc/ppc.c | 5 + hw/ppc/prep.c | 2 +- hw/ppc/prep_systemio.c | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/hw

Re: [PATCH v8 08/20] blockjob.h: introduce block_job _locked() APIs

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
On 6/29/22 17:15, Emanuele Giuseppe Esposito wrote: Just as done with job.h, create _locked() functions in blockjob.h We modify not only blockjob.h, I'd s/blockjob.h/blockjob/ in subject. Also, we start to introduce _locked block_job_* APIs. Does it mean that BlockJob and Job share the global

[PATCH 5/5] ppc: Remove unused irq_inputs

2022-07-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- target/ppc/cpu.h | 1 - target/ppc/cpu_init.c | 5 - 2 files changed, 6 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 6d78078f379d..2166d2c4b692 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1172,7 +1172,6 @@ struct CP

[PATCH] target/ppc/cpu-models: Remove the "default" CPU alias

2022-07-05 Thread Thomas Huth
QEMU emulates a *lot* of PowerPC-based machines - having a CPU that is named "default" and cannot be used with most of those machines sounds just wrong. Thus let's remove this old and confusing alias now. Signed-off-by: Thomas Huth --- target/ppc/cpu-models.c | 2 +- 1 file changed, 1 insertion(

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> We need to add a new flag to mean to sync at that point. >> Notice that we still synchronize at the end of setup and at the end of >> complete stages. >> >> Signed-off-by: Juan Quintela >> --- >> migration/migrati

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Tue, Jul 05, 2022 at 02:56:35PM +0100, Dr. David Alan Gilbert wrote: >> * Juan Quintela (quint...@redhat.com) wrote: >> > We need to add a new flag to mean to sync at that point. >> > Notice that we still synchronize at the end of setup and at the end of >> > complet

Re: [PATCH v3 1/3] QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent

2022-07-05 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Mon, Jul 04, 2022 at 05:23:13PM -0300, Leonardo Bras wrote: >> If flush is called when no buffer was sent with MSG_ZEROCOPY, it currently >> returns 1. This return code should be used only when Linux fails to use >> MSG_ZEROCOPY on a lot of sendmsg(). >> >> Fix this

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Dr. David Alan Gilbert
* Ilya Leoshkevich (i...@linux.ibm.com) wrote: > zlib_send_prepare() compresses pages of a running VM. zlib does not > make any thread-safety guarantees with respect to changing deflate() > input concurrently with deflate() [1]. > > One can observe problems due to this with the IBM zEnterprise Dat

Re: [PATCH 17/18] block: Reorganize some declarations in block-backend-io.h

2022-07-05 Thread Alberto Faria
On Tue, Jul 5, 2022 at 10:18 AM Hanna Reitz wrote: > This moves blk_co_copy_range() from the “I/O API functions” section of > this header into the “"I/O or GS" API functions” section. Is that intended? Oops, thanks, it wasn't intended. Will fix. Alberto

Re: [PATCH 5/5] target/arm: Correctly implement Feat_DoubleLock

2022-07-05 Thread Peter Maydell
On Sat, 2 Jul 2022 at 15:19, Richard Henderson wrote: > > On 7/1/22 01:11, Peter Maydell wrote: > > +static inline bool isar_feature_any_doublelock(const ARMISARegisters *id) > > +{ > > +/* > > + * We can't just OR together the aa32 and aa64 checks, because > > + * if there is no AArch

[PATCH] iotests: fix copy-before-write for macOS and FreeBSD

2022-07-05 Thread Vladimir Sementsov-Ogievskiy
strerror() represents ETIMEDOUT a bit different in Linux and macOS / FreeBSD. Let's support the latter too. Fixes: 9d05a87b77 ("iotests: copy-before-write: add cases for cbw-timeout option") Signed-off-by: Vladimir Sementsov-Ogievskiy --- As John and Thomas noted, the new iotests fails for Free

Re: [RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-07-05 Thread Andrea Bolognani
Sorry it took me a while to find the time to look into this! Overall this second iteration is a significant improvement over the initial one. There are still a few things that I think should be changed, so for the time being I'm going to comment mostly on the generated Go code and leave the detail

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-07-05 Thread Andrea Bolognani
On Fri, Jun 17, 2022 at 02:19:28PM +0200, Victor Toso wrote: > qapi: > | { 'union': 'SetPasswordOptions', > | 'base': { 'protocol': 'DisplayProtocol', > | 'password': 'str', > | '*connected': 'SetPasswordAction' }, > | 'discriminator': 'protocol', > | 'data

Re: [RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-07-05 Thread Andrea Bolognani
I've commented in detail to the single patches, just a couple of additional points. On Fri, Jun 17, 2022 at 02:19:24PM +0200, Victor Toso wrote: > * 7) Flat structs by removing embed types. Discussion with Andrea > Thread: > https://lists.gnu.org/archive/html/qemu-devel/2022-05/msg01590.htm

Re: [PATCH] target/ppc/cpu-models: Remove the "default" CPU alias

2022-07-05 Thread Greg Kurz
On Tue, 5 Jul 2022 17:10:30 +0200 Thomas Huth wrote: > QEMU emulates a *lot* of PowerPC-based machines - having a CPU > that is named "default" and cannot be used with most of those > machines sounds just wrong. Thus let's remove this old and confusing > alias now. > > Signed-off-by: Thomas Hut

Re: [RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-07-05 Thread Andrea Bolognani
On Fri, Jun 17, 2022 at 02:19:31PM +0200, Victor Toso wrote: > +type EmptyCommandReturn struct { > +CommandId string `json:"id,omitempty"` > +Error *QapiError `json:"error,omitempty"` > +Name string `json:"-"` > +} Do we need a specific type for this? Ca

Re: [RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-07-05 Thread Andrea Bolognani
On Fri, Jun 17, 2022 at 02:19:29PM +0200, Victor Toso wrote: > This patch handles QAPI event types and generates data structures in > Go that handles it. > > We also define a Event interface and two helper functions MarshalEvent > and UnmarshalEvent. > > At the moment of this writing, this patch ge

Re: [PATCH] target/ppc/cpu-models: Remove the "default" CPU alias

2022-07-05 Thread Cédric Le Goater
On 7/5/22 17:10, Thomas Huth wrote: QEMU emulates a *lot* of PowerPC-based machines - having a CPU that is named "default" and cannot be used with most of those machines sounds just wrong. Thus let's remove this old and confusing alias now. Signed-off-by: Thomas Huth --- target/ppc/cpu-models

Re: [PATCH] target/ppc/cpu-models: Remove the "default" CPU alias

2022-07-05 Thread Peter Maydell
On Tue, 5 Jul 2022 at 16:13, Thomas Huth wrote: > > QEMU emulates a *lot* of PowerPC-based machines - having a CPU > that is named "default" and cannot be used with most of those > machines sounds just wrong. Thus let's remove this old and confusing > alias now. > > Signed-off-by: Thomas Huth > -

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Peter Maydell
On Mon, 4 Jul 2022 at 17:43, Ilya Leoshkevich wrote: > > zlib_send_prepare() compresses pages of a running VM. zlib does not > make any thread-safety guarantees with respect to changing deflate() > input concurrently with deflate() [1]. > > One can observe problems due to this with the IBM zEnterp

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 12:28:55PM +0100, Alberto Faria wrote: > On Tue, Jul 5, 2022 at 8:16 AM Daniel P. Berrangé wrote: > > for i in `git ls-tree --name-only -r HEAD:` > > do > > clang-tidy $i 1>/dev/null 2>&1 > > done > > All of those invocations are probably failing qui

Re: [RFC 0/8] Introduce an extensible static analyzer

2022-07-05 Thread Daniel P . Berrangé
On Sat, Jul 02, 2022 at 12:33:23PM +0100, Alberto Faria wrote: > This series introduces a static analyzer for QEMU. It consists of a > single static-analyzer.py script that relies on libclang's Python > bindings, and provides a common framework on which arbitrary static > analysis checks can be dev

[PATCH v2 00/18] Make block-backend-io.h API more consistent

2022-07-05 Thread Alberto Faria
Adjust existing pairs of non-coroutine and coroutine functions to share the same calling convention, and add non-coroutine/coroutine counterparts where they don't exist. Also make the non-coroutine versions generated_co_wrappers. This series sits on top of "[PATCH v5 00/10] Implement bdrv_{pread,

[PATCH v2 01/18] block: Make blk_{pread, pwrite}() return 0 on success

2022-07-05 Thread Alberto Faria
They currently return the value of their 'bytes' parameter on success. Make them return 0 instead, for consistency with other I/O functions and in preparation to implement them using generated_co_wrapper. This also makes it clear that short reads/writes are not possible. Signed-off-by: Alberto Fa

[PATCH v2 03/18] block: Change blk_{pread,pwrite}() param order

2022-07-05 Thread Alberto Faria
Swap 'buf' and 'bytes' around for consistency with blk_co_{pread,pwrite}(), and in preparation to implement these functions using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression blk, offset, buf, bytes, flags; @@ - blk_pread(blk, offset, buf, bytes,

[PATCH v2 04/18] block: Make 'bytes' param of blk_{pread, pwrite}() an int64_t

2022-07-05 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement them using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 6 +++--- include/sysemu/block-backend-io.h | 6 +++--- 2 files ch

[PATCH v2 05/18] block: Make blk_co_pwrite() take a const buffer

2022-07-05 Thread Alberto Faria
It does not mutate the buffer. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- include/sysemu/block-backend-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/block-backend-io.h b/include/sysemu/block-backend-io.h index

[PATCH v2 02/18] block: Add a 'flags' param to blk_pread()

2022-07-05 Thread Alberto Faria
For consistency with other I/O functions, and in preparation to implement it using generated_co_wrapper. Callers were updated using this Coccinelle script: @@ expression blk, offset, buf, bytes; @@ - blk_pread(blk, offset, buf, bytes) + blk_pread(blk, offset, buf, bytes, 0) It had no

[PATCH v2 06/18] block: Implement blk_{pread, pwrite}() using generated_co_wrapper

2022-07-05 Thread Alberto Faria
We need to add include/sysemu/block-backend-io.h to the inputs of the block-gen.c target defined in block/meson.build. Signed-off-by: Alberto Faria Reviewed-by: Hanna Reitz --- block/block-backend.c | 23 --- block/coroutines.h| 4 block/mes

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Mon, 4 Jul 2022 at 17:43, Ilya Leoshkevich wrote: > > > > zlib_send_prepare() compresses pages of a running VM. zlib does not > > make any thread-safety guarantees with respect to changing deflate() > > input concurrently with deflate() [1]. >

[PATCH v2 10/18] block: Change blk_pwrite_compressed() param order

2022-07-05 Thread Alberto Faria
Swap 'buf' and 'bytes' around for consistency with other I/O functions. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 4 ++-- include/sysemu/block-backend-io.h | 4 ++-- qemu-img.c| 2 +- qemu-io

[PATCH v2 07/18] block: Add blk_{preadv,pwritev}()

2022-07-05 Thread Alberto Faria
Implement them using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- include/sysemu/block-backend-io.h | 6 + tests/unit/test-block-iothread.c | 42 ++- 2 files changed, 47 insertions(+), 1 deletion(-)

[PATCH v2 08/18] block: Add blk_[co_]preadv_part()

2022-07-05 Thread Alberto Faria
Implement blk_preadv_part() using generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 30 +++--- block/coroutines.h| 5 - include/sysemu/block-backend-io.h |

[PATCH v2 13/18] block: Implement blk_pdiscard() using generated_co_wrapper

2022-07-05 Thread Alberto Faria
Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 12 block/coroutines.h| 3 --- include/sysemu/block-backend-io.h | 3 ++- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/block

[PATCH v2 09/18] block: Export blk_pwritev_part() in block-backend-io.h

2022-07-05 Thread Alberto Faria
Also convert it into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 14 -- block/coroutines.h| 5 - include/sysemu/block-backend-io.h | 4 tests/unit/test-bl

[PATCH v2 16/18] block: Add blk_co_truncate()

2022-07-05 Thread Alberto Faria
Also convert blk_truncate() into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 7 --- include/sysemu/block-backend-io.h | 8 ++-- tests/unit/test-block-iothread.c | 14 ++

[PATCH v2 18/18] block: Remove remaining unused symbols in coroutines.h

2022-07-05 Thread Alberto Faria
Some can be made static, others are unused generated_co_wrappers. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 6 +++--- block/coroutines.h| 19 --- 2 files changed, 3 insertions(+), 22 deletions(-) diff --gi

[PATCH v2 15/18] block: Add blk_co_ioctl()

2022-07-05 Thread Alberto Faria
Also convert blk_ioctl() into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 7 --- block/coroutines.h| 6 -- include/sysemu/block-backend-io.h | 5 - 3 files changed,

[PATCH v2 11/18] block: Add blk_co_pwrite_compressed()

2022-07-05 Thread Alberto Faria
Also convert blk_pwrite_compressed() into a generated_co_wrapper. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 8 include/sysemu/block-backend-io.h | 7 +-- tests/unit/test-block-iothread.c | 18 +++

[PATCH v2 17/18] block: Reorganize some declarations in block-backend-io.h

2022-07-05 Thread Alberto Faria
Keep generated_co_wrapper and coroutine_fn pairs together. This should make it clear that each I/O function has these two versions. Also move blk_co_{pread,pwrite}()'s implementations out of the header file for consistency. Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini --- block/bloc

Re: [PATCH 2/5] ppc/40x: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread Cédric Le Goater
On 7/5/22 18:27, BALATON Zoltan wrote: On Tue, 5 Jul 2022, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ppc/ppc.c   |  5 + hw/ppc/ppc405_uc.c |  4 ++-- hw/ppc/ppc440_bamboo.c |  4 ++-- hw/ppc/sam460ex.c  |  4 ++-- hw/ppc/virtex_ml507.c  | 10 +- 5 fi

[PATCH v2 12/18] block: Implement blk_pwrite_zeroes() using generated_co_wrapper

2022-07-05 Thread Alberto Faria
Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 8 include/sysemu/block-backend-io.h | 5 +++-- tests/unit/test-block-iothread.c | 17 + 3 files changed, 20 insertions(+), 10 deletions(-) diff

Re: [RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 08:45:30AM -0700, Andrea Bolognani wrote: > On Fri, Jun 17, 2022 at 02:19:28PM +0200, Victor Toso wrote: > > qapi: > > | { 'union': 'SetPasswordOptions', > > | 'base': { 'protocol': 'DisplayProtocol', > > | 'password': 'str', > > | '*connect

[PATCH v2 14/18] block: Implement blk_flush() using generated_co_wrapper

2022-07-05 Thread Alberto Faria
Signed-off-by: Alberto Faria Reviewed-by: Paolo Bonzini Reviewed-by: Hanna Reitz --- block/block-backend.c | 11 --- block/coroutines.h| 2 -- include/sysemu/block-backend-io.h | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/block/blo

Re: [PATCH 2/5] ppc/40x: Allocate IRQ lines with qdev_init_gpio_in()

2022-07-05 Thread BALATON Zoltan
On Tue, 5 Jul 2022, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ppc/ppc.c | 5 + hw/ppc/ppc405_uc.c | 4 ++-- hw/ppc/ppc440_bamboo.c | 4 ++-- hw/ppc/sam460ex.c | 4 ++-- hw/ppc/virtex_ml507.c | 10 +- 5 files changed, 12 insertions(+), 15 deleti

Re: [PULL 00/14] Testing and misc patches

2022-07-05 Thread Richard Henderson
On 7/5/22 16:08, Thomas Huth wrote: Hi Richard! The following changes since commit dfe2382f0641f537fdd33399d579215077c8f68c: Merge tag 'kraxel-20220704-pull-request' of https://gitlab.com/kraxel/qemu into staging (2022-07-04 14:57:21 +0530) are available in the Git repository at: htt

Re: [PATCH 5/5] multifd: Only sync once each full round of memory

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 05:11:46PM +0200, Juan Quintela wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> We need to add a new flag to mean to sync at that point. > >> Notice that we still synchronize at the end of setup and at the end of > >> complete

Re: [PATCH] multifd: Copy pages before compressing them with zlib

2022-07-05 Thread Dr. David Alan Gilbert
* Christian Borntraeger (borntrae...@de.ibm.com) wrote: > Am 05.07.22 um 18:16 schrieb Dr. David Alan Gilbert: > > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > > On Mon, 4 Jul 2022 at 17:43, Ilya Leoshkevich wrote: > > > > > > > > zlib_send_prepare() compresses pages of a running VM. zli

<    1   2   3   >