Re: [PATCH] target/ppc: Implement new wait variants

2022-07-20 Thread Nicholas Piggin
Excerpts from Víctor Colombo's message of July 20, 2022 12:20 am: > Hello Nicholas, > > On 19/07/2022 08:38, Nicholas Piggin wrote: >> ISA v2.06 adds new variations of wait, specified by the WC field. These >> are not compatible with the wait 0 implementation, because they add >> additional

Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-07-20 Thread Stefan Hajnoczi
On Sat, Jul 9, 2022, 00:36 Jinhao Fan wrote: > Use irqfd to directly notify KVM to inject interrupts. This is done by > registering a virtual IRQ(virq) in KVM and associate the virq with an > irqfd, so that KVM can directly inject the interrupt when it receives > notification from the irqfd.

Re: [PULL 00/21] loongarch patch queue

2022-07-20 Thread Peter Maydell
On Tue, 19 Jul 2022 at 19:03, Richard Henderson wrote: > > The following changes since commit da7da9d5e608200ecc0749ff37be246e9cd3314f: > > Merge tag 'pull-request-2022-07-19' of https://gitlab.com/thuth/qemu into > staging (2022-07-19 13:05:06 +0100) > > are available in the Git repository

[PULL 02/30] cpus: Introduce cpu_list_generation_id

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) Introduce cpu_list_generation_id to track cpu list generation so that cpu hotplug/unplug can be detected during measurement of dirty page rate. cpu_list_generation_id could be used to detect changes of cpu list, which is prepared for dirty page rate measurement.

[PULL 12/30] migration: Postcopy preemption enablement

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu This patch enables postcopy-preempt feature. It contains two major changes to the migration logic: (1) Postcopy requests are now sent via a different socket from precopy background migration stream, so as to be isolated from very high page request delays. (2) For huge

[PULL 29/30] migration: Avoid false-positive on non-supported scenarios for zero-copy-send

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Migration with zero-copy-send currently has it's limitations, as it can't be used with TLS nor any kind of compression. In such scenarios, it should output errors during parameter / capability setting. But currently there are some ways of setting this not-supported scenarios

Re: [PATCH v2 0/1] Coverity fixes in hw/ppc/spapr_nvdimm.c

2022-07-20 Thread Peter Maydell
On Sat, 9 Apr 2022 at 21:11, Daniel Henrique Barboza wrote: > > Changes from v1: > - clarified in the commit message which kind of errors we aim to prevent > - changed the H_HARDWARE return to g_assert() exit > - v1 link: https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00569.html > >

Re: [PATCH] tests: migration-test: Allow test to run without uffd

2022-07-20 Thread Peter Xu
On Wed, Jul 20, 2022 at 12:52:02PM +0200, Thomas Huth wrote: > On 19/07/2022 21.53, Peter Xu wrote: > ... > > It seems the button to generate API token just didn't have a respond for me > > until I refresh the page (then I can see some token generated), however I > > still haven't figured out a

[PATCH v13 07/10] vhost: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 78

[PATCH] e1000e: Fix possible interrupt loss when using MSI

2022-07-20 Thread Ake Koomsin
Commit "e1000e: Prevent MSI/MSI-X storms" introduced msi_causes_pending to prevent interrupt storms problem. It was tested with MSI-X. In case of MSI, the guest can rely solely on interrupts to clear ICR. Upon clearing all pending interrupts, msi_causes_pending gets cleared. However, when

[PATCH v6 15/21] vdpa: Export vhost_vdpa_dma_map and unmap calls

2022-07-20 Thread Eugenio Pérez
Shadow CVQ will copy buffers on qemu VA, so we avoid TOCTOU attacks from the guest that could set a different state in qemu device model and vdpa device. To do so, it needs to be able to map these new buffers to the device. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang ---

[PATCH v6 09/21] vhost: Add SVQDescState

2022-07-20 Thread Eugenio Pérez
This will allow SVQ to add context to the different queue elements. This patch only store the actual element, no functional change intended. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 8 ++-- hw/virtio/vhost-shadow-virtqueue.c | 16 2 files

[PATCH v6 05/21] vhost: Reorder vhost_svq_kick

2022-07-20 Thread Eugenio Pérez
Future code needs to call it from vhost_svq_add. No functional change intended. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c

[PATCH v6 10/21] vhost: Track number of descs in SVQDescState

2022-07-20 Thread Eugenio Pérez
A guest's buffer continuos on GPA may need multiple descriptors on qemu's VA, so SVQ should track its length sepparatedly. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 6 ++ hw/virtio/vhost-shadow-virtqueue.c | 4 ++-- 2 files changed, 8 insertions(+), 2

Re: [PATCH v9 07/11] i386/pc: handle unitialized mr in pc_get_cxl_range_end()

2022-07-20 Thread Igor Mammedov
On Tue, 19 Jul 2022 18:00:10 +0100 Joao Martins wrote: > Remove pc_get_cxl_range_end() dependency on the CXL memory region, > and replace with one that does not require the CXL host_mr to determine > the start of CXL start. > > This in preparation to allow pc_pci_hole64_start() to be called

Re: [PULL 00/29] migration queue

2022-07-20 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Tue, 19 Jul 2022 at 18:16, Dr. David Alan Gilbert (git) > wrote: > > > > From: "Dr. David Alan Gilbert" > > > > The following changes since commit da7da9d5e608200ecc0749ff37be246e9cd3314f: > > > > Merge tag 'pull-request-2022-07-19' of

Re: [PATCH] Revert "gitlab: disable accelerated zlib for s390x"

2022-07-20 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 20/07/2022 10.28, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > This reverts commit 309df6acb29346f89e1ee542b1986f60cab12b87. > > With Ilya's 'multifd: Copy pages before compressing them with zlib' > > in the latest

Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 08:55:46AM +, Wangjing(Hogan) wrote: > > > On Wed, Jul 20, 2022 at 11:36:07AM +0400, Marc-André Lureau wrote: > > > Hi > > > > > > On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via > > > > > > wrote: > > > > > > > IOWatchPoll object did not hold the @ioc and @src

[PULL V2 02/25] virtio-net: Expose MAC_TABLE_ENTRIES

2022-07-20 Thread Jason Wang
From: Eugenio Pérez vhost-vdpa control virtqueue needs to know the maximum entries supported by the virtio-net device, so we know if it is possible to apply the filter. Signed-off-by: Eugenio Pérez Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/virtio-net.c

[PULL V2 21/25] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-07-20 Thread Jason Wang
From: Eugenio Pérez Finally offering the possibility to enable SVQ from the command line. Signed-off-by: Eugenio Pérez Acked-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 72 +---

[PULL V2 25/25] net/colo.c: fix segmentation fault when packet is not parsed correctly

2022-07-20 Thread Jason Wang
From: Zhang Chen When COLO use only one vnet_hdr_support parameter between filter-redirector and filter-mirror(or colo-compare), COLO will crash with segmentation fault. Back track as follow: Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x55cb200b in

Re: [PATCH v2] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Roman Kagan
On Tue, Jul 19, 2022 at 12:42:47PM +0200, Thomas Huth wrote: > On 19/07/2022 10.01, Roman Kagan wrote: > > +#include "qemu/osdep.h" > > +#include "libqtest-single.h" > > Do you really need libqtest-single.h here? libqtest.h should be enough, > shouldn't it? Indeed, will replace with libqtest.h

Re: [PULL 00/29] migration queue

2022-07-20 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Tue, 19 Jul 2022 at 18:16, Dr. David Alan Gilbert (git) > wrote: > > > > From: "Dr. David Alan Gilbert" > > > > The following changes since commit da7da9d5e608200ecc0749ff37be246e9cd3314f: > > > > Merge tag 'pull-request-2022-07-19' of

[PULL 08/30] tests: Add dirty page rate limit test

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) Add dirty page rate limit test if kernel support dirty ring, The following qmp commands are covered by this test case: "calc-dirty-rate", "query-dirty-rate", "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit" and "query-vcpu-dirty-limit". Signed-off-by: Hyman Huang(黄勇)

[PULL 26/30] Add dirty-sync-missed-zero-copy migration stat

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Signed-off-by: Leonardo Bras Acked-by: Markus Armbruster Acked-by: Peter Xu Reviewed-by: Daniel P. Berrangé Message-Id: <2022071122.18951-3-leob...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 2 ++ monitor/hmp-cmds.c| 5 +

[PULL 11/30] migration: Postcopy preemption preparation on channel creation

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Create a new socket for postcopy to be prepared to send postcopy requested pages via this specific channel, so as to not get blocked by precopy pages. A new thread is also created on dest qemu to receive data from this new channel based on the ram_load_postcopy() routine. The

[PULL 18/30] migration: Enable TLS for preempt channel

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu This patch is based on the async preempt channel creation. It continues wiring up the new channel with TLS handshake to destionation when enabled. Note that only the src QEMU needs such operation; the dest QEMU does not need any change for TLS support due to the fact that all

Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze

2022-07-20 Thread Jason A. Donenfeld
Hey again, On Tue, Jul 19, 2022 at 08:15:54PM +0200, Jason A. Donenfeld wrote: > Hi Paolo, > > On Tue, Jul 19, 2022 at 8:15 PM Paolo Bonzini wrote: > > > > On 7/19/22 14:35, Jason A. Donenfeld wrote: > > >> 6 files changed, 19 insertions(+), 6 deletions(-) > > > Considering the subject line,

Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze

2022-07-20 Thread Paolo Bonzini
On 7/20/22 13:20, Jason A. Donenfeld wrote: Sure, no problem. Unfortunately I was on vacation around the time you sent it first. Excellent, thanks so much! Just wondering one thing: which tree did you put the patch in? I didn't see it on your gitlab, but it seems like QEMU development happens

Re: [PATCH v2 0/1] Coverity fixes in hw/ppc/spapr_nvdimm.c

2022-07-20 Thread Daniel Henrique Barboza
On 7/20/22 09:34, Peter Maydell wrote: On Sat, 9 Apr 2022 at 21:11, Daniel Henrique Barboza wrote: Changes from v1: - clarified in the commit message which kind of errors we aim to prevent - changed the H_HARDWARE return to g_assert() exit - v1 link:

Re: [PULL 0/2] Hexagon (target/hexagon) bug fixes for mem_noshuf

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 00:27, Taylor Simpson wrote: > > The following changes since commit d48125de38f48a61d6423ef6a01156d6dff9ee2c: > > Merge tag 'kraxel-20220719-pull-request' of https://gitlab.com/kraxel/qemu > into staging (2022-07-19 17:40:36 +0100) > > are available in the Git repository

[PATCH v13 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-07-20 Thread Cindy Lu
To support configure interrupt for vhost-vdpa Introduce VIRTIO_CONFIG_IRQ_IDX -1 as configure interrupt's queue index, Then we can reuse the functions guest_notifier_mask and guest_notifier_pending. Add the check of queue index in these drivers, if the driver does not support configure interrupt,

[PATCH v13 10/10] virtio-pci: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 ++--- hw/virtio/virtio-pci.h | 4 +- 2 files

[PATCH v13 09/10] virtio-mmio: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Mark Cave-Ayland
On 20/07/2022 12:00, Roman Kagan wrote: On Wed, Jul 20, 2022 at 11:44:26AM +0100, Daniel P. Berrangé wrote: On Wed, Jul 20, 2022 at 01:25:55PM +0300, Roman Kagan wrote: It's possible to create non-working configurations by attaching a device to a derivative of PCIe slot (pcie-root-port,

Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Wangjing(Hogan)
> On Wed, Jul 20, 2022 at 08:55:46AM +, Wangjing(Hogan) wrote: > > > > > On Wed, Jul 20, 2022 at 11:36:07AM +0400, Marc-André Lureau wrote: > > > > Hi > > > > > > > > On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via > > > > > > > > wrote: > > > > > > > > > IOWatchPoll object did not hold

[PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Roman Kagan
It's possible to create non-working configurations by attaching a device to a derivative of PCIe slot (pcie-root-port, ioh3420, etc) and specifying a slot number other that zero, e.g.: -device pcie-root-port,id=s0,... \ -device virtio-blk-pci,bus=s0,addr=4,... Make QEMU reject such

Re: [PATCH 1/1] docs: pcie: describe PCIe option ROMs

2022-07-20 Thread Heinrich Schuchardt
On 7/20/22 08:42, Heinrich Schuchardt wrote: Provide a descriptions of the options that control the emulation of option ROMS for PCIe devices. Signed-off-by: Heinrich Schuchardt --- docs/pcie.txt | 25 + 1 file changed, 25 insertions(+) diff --git a/docs/pcie.txt

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Roman Kagan
On Wed, Jul 20, 2022 at 11:44:26AM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 20, 2022 at 01:25:55PM +0300, Roman Kagan wrote: > > It's possible to create non-working configurations by attaching a device > > to a derivative of PCIe slot (pcie-root-port, ioh3420, etc) and > > specifying a slot

[PULL 13/30] migration: Postcopy recover with preempt enabled

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu To allow postcopy recovery, the ram fast load (preempt-only) dest QEMU thread needs similar handling on fault tolerance. When ram_load_postcopy() fails, instead of stopping the thread it halts with a semaphore, preparing to be kicked again when recovery is detected. A mutex is

[PULL 03/30] migration/dirtyrate: Refactor dirty page rate calculation

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) abstract out dirty log change logic into function global_dirty_log_change. abstract out dirty page rate calculation logic via dirty-ring into function vcpu_calculate_dirtyrate. abstract out mathematical dirty page rate calculation into do_calculate_dirtyrate, decouple it

[PULL 05/30] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) Introduce kvm_dirty_ring_size util function to help calculate dirty ring ful time. Signed-off-by: Hyman Huang(黄勇) Acked-by: Peter Xu Message-Id: Signed-off-by: Dr. David Alan Gilbert --- accel/kvm/kvm-all.c| 5 + accel/stubs/kvm-stub.c | 5 +

[PULL 06/30] softmmu/dirtylimit: Implement virtual CPU throttle

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is in service. Signed-off-by: Hyman Huang(黄勇)

[PULL 16/30] migration: Add helpers to detect TLS capability

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Add migrate_channel_requires_tls() to detect whether the specific channel requires TLS, leveraging the recently introduced migrate_use_tls(). No functional change intended. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id:

[PULL 21/30] tests: Add postcopy tls migration test

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu We just added TLS tests for precopy but not postcopy. Add the corresponding test for vanilla postcopy. Rename the vanilla postcopy to "postcopy/plain" because all postcopy tests will only use unix sockets as channel. Signed-off-by: Peter Xu Message-Id:

[PULL 20/30] tests: Move MigrateCommon upper

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu So that it can be used in postcopy tests too soon. Reviewed-by: Daniel P. Berrange Signed-off-by: Peter Xu Message-Id: <20220707185522.27638-1-pet...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/migration-test.c | 144 +--

[PULL 23/30] tests: Add postcopy preempt tests

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Four tests are added for preempt mode: - Postcopy plain - Postcopy recovery - Postcopy tls - Postcopy tls+recovery Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20220707185530.27801-1-pet...@redhat.com> Signed-off-by: Dr. David Alan Gilbert

Re: [PATCH v2] target/s390x: support PRNO_TRNG instruction

2022-07-20 Thread Jason A. Donenfeld
Hi David, Thanks for the feedback. On Wed, Jul 20, 2022 at 01:43:48PM +0200, David Hildenbrand wrote: > > --- a/target/s390x/cpu_models.c > > +++ b/target/s390x/cpu_models.c > > @@ -421,8 +421,6 @@ static void check_consistency(const S390CPUModel *model) > > { S390_FEAT_DFP_FAST,

Re: [PULL 20/21] hw/loongarch: Add acpi ged support

2022-07-20 Thread Peter Maydell
On Tue, 19 Jul 2022 at 19:16, Richard Henderson wrote: > > From: Xiaojuan Yang > > Loongarch virt machine uses general hardware reduces acpi method, rather > than LS7A acpi device. Now only power management function is used in > acpi ged device, memory hotplug will be added later. Also acpi

Re: [PULL 0/3] Misc patches for QEMU 7.1 freeze

2022-07-20 Thread Jason A. Donenfeld
Hi Paolo, On Wed, Jul 20, 2022 at 02:47:48PM +0200, Paolo Bonzini wrote: > On 7/20/22 13:20, Jason A. Donenfeld wrote: > >>> Sure, no problem. Unfortunately I was on vacation around the time you > >>> sent it first. > >> Excellent, thanks so much! > > Just wondering one thing: which tree did you

[PATCH v13 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-07-20 Thread Cindy Lu
To reuse the interrupt process in configure interrupt Need to decouple the single vector from the interrupt process. We add new function kvm_virtio_pci_vector_use_one and _release_one. These functions are used for the single vector, the whole process will finish in the loop with vq number.

Re: [PATCH v9 11/21] jobs: group together API calls under the same job lock

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 15:40, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 15:26 schrieb Vladimir Sementsov-Ogievskiy:   }     static bool child_job_drained_poll(BdrvChild *c) @@ -111,8 +113,10 @@ static bool child_job_drained_poll(BdrvChild *c)   /* An inactive or completed job doesn't have

[PATCH v13 00/10] vhost-vdpa: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add support for virtio-mmio bus active the notifier while the backend support configure interrupt misc fixes from v1 Change in v3 fix the coding style problems Change in v4 misc fixes from v3 merge the set_config_notifier to set_guest_notifier when vdpa start, check the feature by

Re: [PATCH v9 19/21] blockjob: protect iostatus field in BlockJob struct

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 16:07, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 16:51 schrieb Vladimir Sementsov-Ogievskiy: On 7/6/22 23:15, Emanuele Giuseppe Esposito wrote: iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop

[PATCH v3] target/ppc: Implement new wait variants

2022-07-20 Thread Nicholas Piggin
ISA v2.06 adds new variations of wait, specified by the WC field. These are not all compatible with the prior wait implementation, because they add additional conditions that cause the processor to resume, which can cause software to hang or run very slowly. ISA v3.0 changed the wait opcode and

Re: [PULL 00/29] migration queue

2022-07-20 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Jul 19, 2022 at 10:53:33PM +0100, Peter Maydell wrote: > > On Tue, 19 Jul 2022 at 18:16, Dr. David Alan Gilbert (git) > > wrote: > > > > > > From: "Dr. David Alan Gilbert" > > > > > > The following changes since commit > > >

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 01:25:55PM +0300, Roman Kagan wrote: > It's possible to create non-working configurations by attaching a device > to a derivative of PCIe slot (pcie-root-port, ioh3420, etc) and > specifying a slot number other that zero, e.g.: > > -device pcie-root-port,id=s0,... \ >

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 02:00:16PM +0300, Roman Kagan wrote: > On Wed, Jul 20, 2022 at 11:44:26AM +0100, Daniel P. Berrangé wrote: > > On Wed, Jul 20, 2022 at 01:25:55PM +0300, Roman Kagan wrote: > > > It's possible to create non-working configurations by attaching a device > > > to a derivative

[PULL 10/30] migration: Add postcopy-preempt capability

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Firstly, postcopy already preempts precopy due to the fact that we do unqueue_page() first before looking into dirty bits. However that's not enough, e.g., when there're host huge page enabled, when sending a precopy huge page, a postcopy request needs to wait until the whole

[PULL 07/30] softmmu/dirtylimit: Implement dirty page rate limit

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit" to enable, disable, query

[PULL 15/30] migration: Add property x-postcopy-preempt-break-huge

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Add a property field that can conditionally disable the "break sending huge page" behavior in postcopy preemption. By default it's enabled. It should only be used for debugging purposes, and we should never remove the "x-" prefix. Reviewed-by: Dr. David Alan Gilbert

[PULL 09/30] multifd: Copy pages before compressing them with zlib

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Ilya Leoshkevich 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 Data Compression accelerator

[PULL 22/30] tests: Add postcopy tls recovery migration test

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It's easy to build this upon the postcopy tls test. Rename the old postcopy recovery test to postcopy/recovery/plain. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20220707185527.27747-1-pet...@redhat.com> Signed-off-by: Dr. David Alan Gilbert

[PULL 17/30] migration: Export tls-[creds|hostname|authz] params to cmdline too

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It's useful for specifying tls credentials all in the cmdline (along with the -object tls-creds-*), especially for debugging purpose. The trick here is we must remember to not free these fields again in the finalize() function of migration object, otherwise it'll cause

[PULL 25/30] QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras 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 by returning early from flush if no sendmsg(...,MSG_ZEROCOPY) was attempted.

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 19/07/2022 um 20:07 schrieb Paolo Bonzini: > On 7/19/22 11:57, Emanuele Giuseppe Esposito wrote: >> >> Wrapping the new drains in aio_context_acquire/release(new_context) is >> not so much helpful either, since apparently the following >> blk_set_aio_context makes aio_poll() hang. >> I am

Re: [PATCH v2] target/s390x: support PRNO_TRNG instruction

2022-07-20 Thread David Hildenbrand
On 19.07.22 13:43, Jason A. Donenfeld wrote: > In order for hosts running inside of TCG to initialize the kernel's > random number generator, we should support the PRNO_TRNG instruction, > backed in the usual way with the qemu_guest_getrandom helper. This is > confirmed working on Linux 5.19-rc6.

[PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-07-20 Thread Jason A. Donenfeld
In order for hosts running inside of TCG to initialize the kernel's random number generator, we should support the PRNO_TRNG instruction, backed in the usual way with the qemu_guest_getrandom helper. This is confirmed working on Linux 5.19-rc6. Cc: Thomas Huth Cc: David Hildenbrand Cc: Richard

Re: [PATCH resend v3] hw/i386: pass RNG seed via setup_data entry

2022-07-20 Thread Jason A. Donenfeld
Hi Paolo, On Tue, Jul 19, 2022 at 01:53:00PM +0200, Jason A. Donenfeld wrote: > Tiny machines optimized for fast boot time generally don't use EFI, > which means a random seed has to be supplied some other way. For this > purpose, Linux (≥5.20) supports passing a seed in the setup_data table >

[PATCH v13 06/10] virtio: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu ---

Re: [PATCH v2 1/1] hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c

2022-07-20 Thread Greg Kurz
On Sat, 9 Apr 2022 17:08:56 -0300 Daniel Henrique Barboza wrote: > spapr_nvdimm_flush_completion_cb() and flush_worker_cb() are using the > DRC object returned by spapr_drc_index() without checking it for NULL. > In this case we would be dereferencing a NULL pointer when doing >

[PATCH v13 08/10] virtio-net: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Thomas Huth
On 20/07/2022 12.25, Roman Kagan wrote: It's possible to create non-working configurations by attaching a device to a derivative of PCIe slot (pcie-root-port, ioh3420, etc) and specifying a slot number other that zero, e.g.: -device pcie-root-port,id=s0,... \ -device

Re: [PATCH] tests: migration-test: Allow test to run without uffd

2022-07-20 Thread Thomas Huth
On 19/07/2022 21.53, Peter Xu wrote: ... It seems the button to generate API token just didn't have a respond for me until I refresh the page (then I can see some token generated), however I still haven't figured out a way to see the initial 6 letters since they'll be always masked out..

[PULL 01/30] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) Add a non-required argument 'CPUState' to kvm_dirty_ring_reap so that it can cover single vcpu dirty-ring-reaping scenario. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Peter Xu Message-Id: Signed-off-by: Dr. David Alan Gilbert --- accel/kvm/kvm-all.c | 23

[PULL 00/30] migration queue

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 68e26e1e812c8b09313d7929271f6cbd47ef4c07: Merge tag 'pull-la-20220719' of https://gitlab.com/rth7680/qemu into staging (2022-07-19 22:54:43 +0100) are available in the Git repository at: https://gitlab.com/dagrh/qemu.git

[PULL 04/30] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly for dirty page rate limit. Add dirtylimit.c to implement dirtyrate calculation periodly, which will be used for dirty page rate limit. Add dirtylimit.h to export util

[PULL 19/30] migration: Respect postcopy request order in preemption mode

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu With preemption mode on, when we see a postcopy request that was requesting for exactly the page that we have preempted before (so we've partially sent the page already via PRECOPY channel and it got preempted by another postcopy request), currently we drop the request so that

[PULL 14/30] migration: Create the postcopy preempt channel asynchronously

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Peter Xu This patch allows the postcopy preempt channel to be created asynchronously. The benefit is that when the connection is slow, we won't take the BQL (and potentially block all things like QMP) for a long time without releasing. A function postcopy_preempt_wait_channel() is

[PULL 24/30] migration: remove unreachable code after reading data

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé The code calls qio_channel_read() in a loop when it reports QIO_CHANNEL_ERR_BLOCK. This code is reported when errno==EAGAIN. As such the later block of code will always hit the 'errno != EAGAIN' condition, making the final 'else' unreachable. Fixes: Coverity CID

[PULL 27/30] migration/multifd: Report to user when zerocopy not working

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Leonardo Bras Some errors, like the lack of Scatter-Gather support by the network interface(NETIF_F_SG) may cause sendmsg(...,MSG_ZEROCOPY) to fail on using zero-copy, which causes it to fall back to the default copying mechanism. After each full dirty-bitmap scan there should be a

[PULL 28/30] multifd: Document the locking of MultiFD{Send/Recv}Params

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: Juan Quintela Reorder the structures so we can know if the fields are: - Read only - Their own locking (i.e. sems) - Protected by 'mutex' - Only for the multifd channel Signed-off-by: Juan Quintela Message-Id: <20220531104318.7494-2-quint...@redhat.com> Reviewed-by: Dr. David Alan

[PULL 30/30] Revert "gitlab: disable accelerated zlib for s390x"

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This reverts commit 309df6acb29346f89e1ee542b1986f60cab12b87. With Ilya's 'multifd: Copy pages before compressing them with zlib' in the latest migration series, this shouldn't be a problem any more. Suggested-by: Peter Maydell Signed-off-by: Dr. David Alan

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Roman Kagan
On Wed, Jul 20, 2022 at 12:04:58PM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 20, 2022 at 02:00:16PM +0300, Roman Kagan wrote: > > On Wed, Jul 20, 2022 at 11:44:26AM +0100, Daniel P. Berrangé wrote: > > > On Wed, Jul 20, 2022 at 01:25:55PM +0300, Roman Kagan wrote: > > > > It's possible to

Re: [PULL v2 35/86] cxl/cxl-host: Add memops for CFMWS region.

2022-07-20 Thread Peter Maydell
On Mon, 16 May 2022 at 21:52, Michael S. Tsirkin wrote: > > From: Jonathan Cameron > > These memops perform interleave decoding, walking down the > CXL topology from CFMWS described host interleave > decoder via CXL host bridge HDM decoders, through the CXL > root ports and finally call CXL type

Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 15:00, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: That made me ask: 1. Are all tests always run in main loop? If yes, why to protect status reading in test_complete_in_standby() ? 2. Maybe, we don't need to protect anything

Re: [PATCH v12 00/10] vhost-vdpa: add support for configure interrupt

2022-07-20 Thread Cindy Lu
On Tue, Jul 19, 2022 at 10:28 PM Daniel P. Berrangé wrote: > > On Tue, Jul 19, 2022 at 09:46:45PM +0800, Cindy Lu wrote: > > These patches introduced the support for configure interrupt > > The email threading of this series isn't setup right. Each > patch is appearing as a new top level mail,

[PATCH v13 02/10] virtio-pci: decouple notifier from interrupt process

2022-07-20 Thread Cindy Lu
To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 57

[PATCH v13 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-07-20 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h

[PATCH v13 05/10] vhost-vdpa: add support for config interrupt

2022-07-20 Thread Cindy Lu
Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 1 + hw/virtio/vhost-vdpa.c | 8 2 files changed, 9

[PATCH v6 04/21] vdpa: Avoid compiler to squash reads to used idx

2022-07-20 Thread Eugenio Pérez
In the next patch we will allow busypolling of this value. The compiler have a running path where shadow_used_idx, last_used_idx, and vring used idx are not modified within the same thread busypolling. This was not an issue before since we always cleared device event notifier before checking it,

[PATCH v6 12/21] vhost: Expose vhost_svq_add

2022-07-20 Thread Eugenio Pérez
This allows external parts of SVQ to forward custom buffers to the device. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 3 +++ hw/virtio/vhost-shadow-virtqueue.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v6 19/21] vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs

2022-07-20 Thread Eugenio Pérez
To know the device features is needed for CVQ SVQ, so SVQ knows if it can handle all commands or not. Extract from vhost_vdpa_get_max_queue_pairs so we can reuse it. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- net/vhost-vdpa.c | 30 -- 1 file changed, 20

Re: [PATCH] hw/microblaze: pass random seed to fdt

2022-07-20 Thread Edgar E. Iglesias
On Tue, Jul 19, 2022 at 2:23 PM Jason A. Donenfeld wrote: > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > initialize early. Set this using the usual guest random number > generation function. This FDT node is part of the DT specification. > Reviewed-by: Edgar E.

[PULL 3/3] tests/tcg/s390x: test signed vfmin/vfmax

2022-07-20 Thread Thomas Huth
From: Ilya Leoshkevich Add a test to prevent regressions. Try all floating point value sizes and all combinations of floating point value classes. Verify the results against PoP tables, which are represented as close to the original as possible - this produces a lot of checkpatch complaints, but

[PATCH] Revert "gitlab: disable accelerated zlib for s390x"

2022-07-20 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This reverts commit 309df6acb29346f89e1ee542b1986f60cab12b87. With Ilya's 'multifd: Copy pages before compressing them with zlib' in the latest migration series, this shouldn't be a problem any more. Suggested-by: Peter Maydell Signed-off-by: Dr. David Alan

Re: [PATCH v2] chardev: avoid use-after-free when client disconnect

2022-07-20 Thread Wangjing(Hogan)
> On Wed, Jul 20, 2022 at 11:36:07AM +0400, Marc-André Lureau wrote: > > Hi > > > > On Wed, Jul 20, 2022 at 11:13 AM Hogan Wang via > > > > wrote: > > > > > IOWatchPoll object did not hold the @ioc and @src objects reference, > > > then io_watch_poll_prepare execute in IO thread, if

[PULL V2 07/25] vhost: Check for queue full at vhost_svq_add

2022-07-20 Thread Jason Wang
From: Eugenio Pérez The series need to expose vhost_svq_add with full functionality, including checking for full queue. Signed-off-by: Eugenio Pérez Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/vhost-shadow-virtqueue.c | 59 +-

[PULL V2 11/25] vhost: add vhost_svq_push_elem

2022-07-20 Thread Jason Wang
From: Eugenio Pérez This function allows external SVQ users to return guest's available buffers. Signed-off-by: Eugenio Pérez Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/vhost-shadow-virtqueue.c | 16 hw/virtio/vhost-shadow-virtqueue.h | 3 +++

[PULL V2 04/25] vdpa: Avoid compiler to squash reads to used idx

2022-07-20 Thread Jason Wang
From: Eugenio Pérez In the next patch we will allow busypolling of this value. The compiler have a running path where shadow_used_idx, last_used_idx, and vring used idx are not modified within the same thread busypolling. This was not an issue before since we always cleared device event

  1   2   3   >