Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 09:28:59AM +0100, David Hildenbrand wrote: > On 25.11.21 03:20, Jason Wang wrote: > > We only process the first in sg which may lead to the bitmap of the > > pages belongs to following sgs were not cleared. This may result more > > pages to be migrated. Fixing this by proces

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 09:34:32AM +0100, Philippe Mathieu-Daudé wrote: > On 11/25/21 03:20, Jason Wang wrote: > > We only process the first in sg which may lead to the bitmap of the > > pages belongs to following sgs were not cleared. This may result more > > pages to be migrated. Fixing this by p

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread David Hildenbrand
On 25.11.21 17:09, Michael S. Tsirkin wrote: > On Thu, Nov 25, 2021 at 09:28:59AM +0100, David Hildenbrand wrote: >> On 25.11.21 03:20, Jason Wang wrote: >>> We only process the first in sg which may lead to the bitmap of the >>> pages belongs to following sgs were not cleared. This may result more

Re: [PATCH 2/2] virtio-balloon: correct used length

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 10:20:46AM +0800, Jason Wang wrote: > Spec said: > > "and len the total of bytes written into the buffer." > > For inflateq, deflateq and statsq, we don't process in_sg so the used > length should be zero. For free_page_vq, since the pages could be > changed in the destina

[PATCH v6 0/3] support dirty restraint on vCPU

2021-11-25 Thread huangy81
From: Hyman Huang(黄勇) v6: - rebase on master - fix dirtylimit setup crash found by Markus - polish the comments according to the advice given by Markus - adjust the qemu qmp command tag to 7.0 v5: - rebase on master - adjust the throttle algorithm by removing the tuning in RESTRAINT_RATIO cas

[PATCH v6 2/3] cpu-throttle: implement vCPU throttle

2021-11-25 Thread huangy81
From: Hyman Huang(黄勇) Impose dirty restraint on vCPU by kicking it and sleep as the auto-converge does during migration, but just kick the specified vCPU instead, not all vCPUs of vm. Start a thread to track the dirtylimit status and adjust the throttle pencentage dynamically depend on current a

[PATCH v6 3/3] cpus-common: implement dirty page limit on vCPU

2021-11-25 Thread huangy81
From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirty page rate given by user. Introduce qmp commands set-dirty-limit/cancel-dirty-limit to set/cancel dirty page limit on vCPU. Signed-off-by: Hyman Huang(黄勇) --

[PATCH v6 1/3] migration/dirtyrate: implement vCPU dirtyrate calculation periodically

2021-11-25 Thread huangy81
From: Hyman Huang(黄勇) Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly. Implement thread for calculating dirtyrate periodly, which will be used for for vCPU throttle implementation. Add dirtylimit.h to introduce the util function for dirty page li

Re: [PATCH] vfio/migration: Improve to read/write full migration region per chunk

2021-11-25 Thread Cornelia Huck
On Thu, Nov 11 2021, Yishai Hadas wrote: > Upon reading/writing the migration data there is no real reason to limit > the read/write system call from the file to be 8 bytes. > > In addition, there is no reason to depend on the file offset alignment. > The offset is just some logical value which d

Re: [RFC v2 PATCH 06/13] KVM: Register/unregister memfd backed memslot

2021-11-25 Thread Steven Price
On 19/11/2021 13:47, Chao Peng wrote: > Signed-off-by: Yu Zhang > Signed-off-by: Chao Peng > --- > virt/kvm/kvm_main.c | 23 +++ > 1 file changed, 19 insertions(+), 4 deletions(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 271cef8d1cd0..b8673490d301 1

Re: [PATCH v3 03/23] multifd: Rename used field to num

2021-11-25 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> We will need to split it later in zero_num (number of zero pages) and > >> normal_num (number of normal pages). This name is better. > >> > >> Signed-off-by: Juan

[PATCH v2] target/ppc: fix Hash64 MMU update of PTE bit R

2021-11-25 Thread Leandro Lupori
When updating the R bit of a PTE, the Hash64 MMU was using a wrong byte offset, causing the first byte of the adjacent PTE to be corrupted. This caused a panic when booting FreeBSD, using the Hash MMU. Fixes: a2dd4e83e76b ("ppc/hash64: Rework R and C bit updates") Signed-off-by: Leandro Lupori --

Re: [PATCH v3 04/23] multifd: Add missing documention

2021-11-25 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Pretty obvious, but I guess to have the complete set of comments: Reviewed-by: Dr. David Alan Gilbert > --- > migration/multifd-zlib.c | 2 ++ > migration/multifd-zstd.c | 2 ++ > migration/multifd.c | 1 + > 3

Re: [PATCH v3 05/23] multifd: The variable is only used inside the loop

2021-11-25 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/multifd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/migration/multifd.c b/migration/multifd.c > index cdeffdc4c5..ce7101cf9d 10064

Re: [PATCH v3 06/23] multifd: remove used parameter from send_prepare() method

2021-11-25 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > It is already there as p->pages->num. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/multifd.h | 2 +- > migration/multifd-zlib.c | 7 +++ > migration/multifd-zstd.c | 7 +++ > migration/multif

Re: [PATCH v3 07/23] multifd: remove used parameter from send_recv_pages() method

2021-11-25 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > It is already there as p->pages->num. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/multifd.h | 2 +- > migration/multifd-zlib.c | 9 - > migration/multifd-zstd.c | 7 +++ > migration/mult

Re: [PATCH v2] target/ppc: fix Hash64 MMU update of PTE bit R

2021-11-25 Thread Daniel Henrique Barboza
On 11/25/21 15:33, Leandro Lupori wrote: When updating the R bit of a PTE, the Hash64 MMU was using a wrong byte offset, causing the first byte of the adjacent PTE to be corrupted. This caused a panic when booting FreeBSD, using the Hash MMU. Fixes: a2dd4e83e76b ("ppc/hash64: Rework R and C b

Re: [PATCH v3 08/23] multifd: Fill offset and block for reception

2021-11-25 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We were using the iov directly, but we will need this info on the > following patch. Yes I think so; have you considered that really need to check the fields of MultiFD*Params to see which fields you're actually using? Reviewed-by: Dr. David Alan

Re: [PATCH v3 01/23] multifd: Delete useless operation

2021-11-25 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> We are divining by page_size to multiply again in the only use. > > ^--- typo > >> Once there, impreve the comments. > > ^--- typo > >

Re: [PATCH-for-6.2] docs: add a word of caution on x-native-hotplug property for pcie-root-ports

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 05:36:29PM +0530, Ani Sinha wrote: > x-native-hotplug property, when used in order to disable HPC bit on the PCIE > root ports, can lead to unexpected results from the guest operating system. > Users are strongly advised not to touch this property in order to manipulte > th

[PATCH 1/1] ppc/pnv.c: add a friendly warning when accel=kvm is used

2021-11-25 Thread Daniel Henrique Barboza
If one tries to use -machine powernv9,accel=kvm in a Power9 host, a cryptic error will be shown: qemu-system-ppc64: Register sync failed... If you're using kvm-hv.ko, only "-cpu host" is possible qemu-system-ppc64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument Appending '-cpu h

RE: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Wang, Wei W
On Friday, November 26, 2021 12:11 AM, David Hildenbrand wrote: > On 25.11.21 17:09, Michael S. Tsirkin wrote: > > On Thu, Nov 25, 2021 at 09:28:59AM +0100, David Hildenbrand wrote: > >> On 25.11.21 03:20, Jason Wang wrote: > >>> We only process the first in sg which may lead to the bitmap of the >

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Michael S. Tsirkin
On Fri, Nov 26, 2021 at 01:21:46AM +, Wang, Wei W wrote: > On Friday, November 26, 2021 12:11 AM, David Hildenbrand wrote: > > On 25.11.21 17:09, Michael S. Tsirkin wrote: > > > On Thu, Nov 25, 2021 at 09:28:59AM +0100, David Hildenbrand wrote: > > >> On 25.11.21 03:20, Jason Wang wrote: > > >>

Re: [PATCH v2] target/ppc: fix Hash64 MMU update of PTE bit R

2021-11-25 Thread David Gibson
On Thu, Nov 25, 2021 at 03:33:22PM -0300, Leandro Lupori wrote: > When updating the R bit of a PTE, the Hash64 MMU was using a wrong byte > offset, causing the first byte of the adjacent PTE to be corrupted. > This caused a panic when booting FreeBSD, using the Hash MMU. > > Fixes: a2dd4e83e76b ("

Re: [PATCH 1/1] ppc/pnv.c: add a friendly warning when accel=kvm is used

2021-11-25 Thread David Gibson
On Thu, Nov 25, 2021 at 07:42:02PM -0300, Daniel Henrique Barboza wrote: > If one tries to use -machine powernv9,accel=kvm in a Power9 host, a > cryptic error will be shown: > > qemu-system-ppc64: Register sync failed... If you're using kvm-hv.ko, only > "-cpu host" is possible > qemu-system-ppc6

[PATCH v2 3/3] linux-user: Remove TARGET_SIGSTKSZ

2021-11-25 Thread Song Gao
TARGET_SIGSTKSZ is not used, we should remove it. Signed-off-by: Song Gao --- linux-user/alpha/target_signal.h | 1 - linux-user/generic/signal.h | 1 - linux-user/hppa/target_signal.h | 1 - linux-user/mips/target_signal.h | 1 - linux-user/mips64/target_signal.h | 1 - linux-user/sp

[PATCH v2 0/3] Move target_signal.h generic definitions to generic/signal.h

2021-11-25 Thread Song Gao
Hi all, This seris: - Move target_signal.h generic defintions to generic/signal.h, - target_syscall.h remove TARGET_MINSIGSTKSZ - Remove unused definitions TARGET_SIGSTKSZ. Song Gao (3): linux-user: Move target_signal.h generic definitions to generic/signal.h linux-user: target_syscal

[PATCH v2 1/3] linux-user: Move target_signal.h generic definitions to generic/signal.h

2021-11-25 Thread Song Gao
No code change Suggested-by: Richard Henderson Signed-off-by: Song Gao Reviewed-by: Laurent Vivier --- linux-user/aarch64/target_signal.h| 18 -- linux-user/arm/target_signal.h| 18 -- linux-user/cris/target_signal.h | 18 -- li

[PATCH v2 2/3] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ

2021-11-25 Thread Song Gao
TARGET_MINSIGSTKSZ has been defined in generic/signal.h or target_signal.h, We don't need to define it again. Signed-off-by: Song Gao Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé --- linux-user/aarch64/target_syscall.h| 1 - linux-user/alpha/target_syscall.h | 1 -

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Jason Wang
On Fri, Nov 26, 2021 at 9:21 AM Wang, Wei W wrote: > > On Friday, November 26, 2021 12:11 AM, David Hildenbrand wrote: > > On 25.11.21 17:09, Michael S. Tsirkin wrote: > > > On Thu, Nov 25, 2021 at 09:28:59AM +0100, David Hildenbrand wrote: > > >> On 25.11.21 03:20, Jason Wang wrote: > > >>> We on

RE: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Wang, Wei W
On Friday, November 26, 2021 10:31 AM, Jason Wang wrote: > > I've tested the code with migration before sending the patches, I see the hint > works fine. > That's great (assume you saw great reduction in the migration time as well). Reviewed-by: Wei Wang Thanks, Wei

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Jason Wang
On Fri, Nov 26, 2021 at 12:10 AM Michael S. Tsirkin wrote: > > On Thu, Nov 25, 2021 at 09:34:32AM +0100, Philippe Mathieu-Daudé wrote: > > On 11/25/21 03:20, Jason Wang wrote: > > > We only process the first in sg which may lead to the bitmap of the > > > pages belongs to following sgs were not cl

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Jason Wang
On Fri, Nov 26, 2021 at 10:40 AM Wang, Wei W wrote: > > On Friday, November 26, 2021 10:31 AM, Jason Wang wrote: > > > > I've tested the code with migration before sending the patches, I see the > > hint > > works fine. > > > > That's great (assume you saw great reduction in the migration time as

[PATCH] hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

2021-11-25 Thread Andy Pei
Turn on pre-defined feature VIRTIO_BLK_F_SIZE_MAX virtio blk device to avoid guest DMA request size is too large to exceed hardware spec. Signed-off-by: Andy Pei --- hw/block/vhost-user-blk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.

Re: [PATCH 2/2] virtio-balloon: correct used length

2021-11-25 Thread Jason Wang
On Fri, Nov 26, 2021 at 12:14 AM Michael S. Tsirkin wrote: > > On Thu, Nov 25, 2021 at 10:20:46AM +0800, Jason Wang wrote: > > Spec said: > > > > "and len the total of bytes written into the buffer." > > > > For inflateq, deflateq and statsq, we don't process in_sg so the used > > length should be

Re: [PATCH v2 1/2] vdpa: Add dummy receive callback

2021-11-25 Thread Jason Wang
On Thu, Nov 25, 2021 at 6:16 PM Eugenio Pérez wrote: > > Qemu falls back on userland handlers even if vhost-user and vhost-vdpa > cases. These assumes a tap device can handle the packets. > > If a vdpa device fail to start, it can trigger a sigsegv because of > that. Add dummy receiver that return

Re: [PATCH v2 2/2] virtio-net: Fix log message

2021-11-25 Thread Jason Wang
On Thu, Nov 25, 2021 at 6:16 PM Eugenio Pérez wrote: > > The message has never been true in the case of non tap networking, so > only tell that userland networking will be used if possible. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > --- > hw/net/virtio-net.c | 11 ++- > 1

Re: [PATCH-for-6.2] docs: add a word of caution on x-native-hotplug property for pcie-root-ports

2021-11-25 Thread Ani Sinha
On Thu, 25 Nov 2021, Michael S. Tsirkin wrote: > On Thu, Nov 25, 2021 at 05:36:29PM +0530, Ani Sinha wrote: > > x-native-hotplug property, when used in order to disable HPC bit on the PCIE > > root ports, can lead to unexpected results from the guest operating system. > > Users are strongly adv

[PATCH] Fix bad overflow check in hw/pci/pcie.c

2021-11-25 Thread Daniella Lee
Orginal qemu commit hash:14d02cfbe4adaeebe7cb833a8cc71191352cf03b In function pcie_add_capability, an assert contains the "offset < offset + size" expression. Both variable offset and variable size are uint16_t, the comparison is always true due to type promotion. The next expression may be t

[PATCH] dbus-vmstate: Restrict error checks to registered proxies in dbus_get_proxies

2021-11-25 Thread Priyankar Jain
The purpose of dbus_get_proxies to construct the proxies corresponding to the IDs registered to dbus-vmstate. Currenty, this function returns an error in case there is any failure while instantiating proxy for "all" the names on dbus. Ideally this function should error out only if it is not able

Re: [PATCH v6 3/3] cpus-common: implement dirty page limit on vCPU

2021-11-25 Thread Markus Armbruster
huang...@chinatelecom.cn writes: > From: Hyman Huang(黄勇) > > Implement dirtyrate calculation periodically basing on > dirty-ring and throttle vCPU until it reachs the quota > dirty page rate given by user. > > Introduce qmp commands set-dirty-limit/cancel-dirty-limit to > set/cancel dirty page li

Re: [PATCH v5 2/3] cpu-throttle: implement vCPU throttle

2021-11-25 Thread Markus Armbruster
The use of atomics in this patch and the previous requires careful review by an expert on proper use of atomics.

Re: [PATCH v6 2/3] cpu-throttle: implement vCPU throttle

2021-11-25 Thread Markus Armbruster
The use of atomics in this patch and the previous requires careful review by an expert on proper use of atomics.

Re: [PATCH 2/2] virtio-balloon: correct used length

2021-11-25 Thread Michael S. Tsirkin
On Fri, Nov 26, 2021 at 10:45:43AM +0800, Jason Wang wrote: > On Fri, Nov 26, 2021 at 12:14 AM Michael S. Tsirkin wrote: > > > > On Thu, Nov 25, 2021 at 10:20:46AM +0800, Jason Wang wrote: > > > Spec said: > > > > > > "and len the total of bytes written into the buffer." > > > > > > For inflateq,

<    1   2