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,

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 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 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

[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

[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

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

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 ++- >

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

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

[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

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

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

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 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

[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 -

[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 --

[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:

[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 -

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 >

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/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 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

[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

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 >

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 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 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

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 +++ >

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 +++ >

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

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

[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 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

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

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

[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

[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 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

[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

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

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

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

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

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Nov 25, 2021 at 03:40:36PM +, Dr. David Alan Gilbert wrote: > > * Sergio Lopez (s...@redhat.com) wrote: > > > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > > > > > > > > SEV-ES has pre-launch measurement and secret

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 03:40:36PM +, Dr. David Alan Gilbert wrote: > * Sergio Lopez (s...@redhat.com) wrote: > > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > > > > > > SEV-ES has pre-launch measurement and secret injection, just like SEV > > > (except that the measurement

[PATCH v2 5/7] gdbstub: handle a potentially racing TaskState

2021-11-25 Thread Alex Bennée
When dealing with multi-threaded userspace programs there is a race condition with the addition of cpu->opaque (aka TaskState). This is due to cpu_copy calling cpu_create which updates the global vCPU list. However the task state isn't set until later. This shouldn't be a problem because the new

Re: [PATCH] hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit

2021-11-25 Thread Peter Maydell
On Thu, 25 Nov 2021 at 15:19, Alex Bennée wrote: > > > Shashi Mallela writes: > > > When Enabled bit is cleared in GITS_CTLR,ITS feature continues > > to be enabled.This patch fixes the issue. > > > > Signed-off-by: Shashi Mallela > > > Tested-by: Alex Bennée > > in so far as it doesn't break

Re: [PATCH] hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit

2021-11-25 Thread Peter Maydell
On Wed, 24 Nov 2021 at 18:22, Shashi Mallela wrote: > > When Enabled bit is cleared in GITS_CTLR,ITS feature continues > to be enabled.This patch fixes the issue. > > Signed-off-by: Shashi Mallela > --- > hw/intc/arm_gicv3_its.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > >

[PATCH v2 7/7] MAINTAINERS: Add section for Aarch64 GitLab custom runner

2021-11-25 Thread Alex Bennée
From: Philippe Mathieu-Daudé Add a MAINTAINERS section to cover the GitLab YAML config file containing the jobs run on the custom runner sponsored by the Works On Arm project [*]. [*] https://developer.arm.com/solutions/infrastructure/works-on-arm Suggested-by: Thomas Huth Signed-off-by:

[PATCH v2 4/7] plugins/meson.build: fix linker issue with weird paths

2021-11-25 Thread Alex Bennée
Signed-off-by: Alex Bennée Tested-by: Stefan Weil Fixes: https://gitlab.com/qemu-project/qemu/-/issues/712 Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211123205729.2205806-5-alex.ben...@linaro.org> --- plugins/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v2 2/7] accel/tcg: suppress IRQ check for special TBs

2021-11-25 Thread Alex Bennée
When we set cpu->cflags_next_tb it is because we want to carefully control the execution of the next TB. Currently there is a race that causes the second stage of watchpoint handling to get ignored if an IRQ is processed before we finish executing the instruction that triggers the watchpoint. Use

[PATCH v2 3/7] tests/avocado: fix tcg_plugin mem access count test

2021-11-25 Thread Alex Bennée
When we cleaned up argument handling the test was missed. Fixes: 5ae589faad ("tests/plugins/mem: introduce "track" arg and make args not positional") Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH for 6.2 v2 0/7] more tcg, plugin, test and build fixes

2021-11-25 Thread Alex Bennée
Hi, As the release process rolls on here if the current state of my for-6.2 tree. There are fixes for TCG, plugins, build and test. For v2 I split the CF_NOIRQ patches and simplified a little bit. I tested with a custom trace point while using watchpoints on the x86_64 memory TCG test. A proper

[PATCH v2 6/7] MAINTAINERS: Remove me as a reviewer for the build and test/avocado

2021-11-25 Thread Alex Bennée
From: Willian Rampazzo Remove me as a reviewer for the Build and test automation and the Integration Testing with the Avocado Framework and add Beraldo Leal. Signed-off-by: Willian Rampazzo Reviewed-by: Beraldo Leal Message-Id: <20211122191124.31620-1-willi...@redhat.com> Signed-off-by: Alex

[PATCH v2 1/7] accel/tcg: introduce CF_NOIRQ

2021-11-25 Thread Alex Bennée
Here we introduce a new compiler flag to disable the checking of exit request (icount_decr.u32). This is useful when we want to ensure the next block cannot be preempted by an asynchronous event. Suggested-by: Richard Henderson Signed-off-by: Alex Bennée --- v2 - split from larger patch -

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Sergio Lopez (s...@redhat.com) wrote: > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > > [+cc jejb, tobin, jim, hubertus] > > > > > > On 25/11/2021 9:14, Sergio Lopez wrote: > > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > >> * Daniel P. Berrangé

Re: SEV guest attestation

2021-11-25 Thread Sergio Lopez
On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > [+cc jejb, tobin, jim, hubertus] > > > On 25/11/2021 9:14, Sergio Lopez wrote: > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > >> * Daniel P. Berrangé (berra...@redhat.com) wrote: > >>> On Wed, Nov 24,

Re: [PATCH] hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit

2021-11-25 Thread Alex Bennée
Shashi Mallela writes: > When Enabled bit is cleared in GITS_CTLR,ITS feature continues > to be enabled.This patch fixes the issue. > > Signed-off-by: Shashi Mallela Tested-by: Alex Bennée in so far as it doesn't break the kvm-unit-tests but it also doesn't solve the: irq 55: nobody

[PATCH v8 10/10] target/ppc/excp_helper.c: EBB handling adjustments

2021-11-25 Thread Daniel Henrique Barboza
The current logic is only considering event-based exceptions triggered by the performance monitor. This is true now, but we might want to add support for external event-based exceptions in the future. Let's make it a bit easier to do so by adding the bit logic that would happen in case we were

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > > Hi, > > > > > > > > We recently discussed

[PATCH v8 05/10] target/ppc: enable PMU counter overflow with cycle events

2021-11-25 Thread Daniel Henrique Barboza
The PowerISA v3.1 defines that if the proper bits are set (MMCR0_PMC1CE for PMC1 and MMCR0_PMCjCE for the remaining PMCs), counter negative conditions are enabled. This means that if the counter value overflows (i.e. exceeds 0x8000) a performance monitor alert will occur. This alert can

[PATCH v8 07/10] target/ppc/power8-pmu.c: add PM_RUN_INST_CMPL (0xFA) event

2021-11-25 Thread Daniel Henrique Barboza
PM_RUN_INST_CMPL, instructions completed with the run latch set, is the architected PowerISA v3.1 event defined with PMC4SEL = 0xFA. Implement it by checking for the CTRL RUN bit before incrementing the counter. To make this work properly we also need to force a new translation block each time

[PATCH v8 09/10] target/ppc: PMU Event-Based exception support

2021-11-25 Thread Daniel Henrique Barboza
From: Gustavo Romero Following up the rfebb implementation, this patch adds the EBB exception support that are triggered by Performance Monitor alerts. This exception occurs when an enabled PMU condition or event happens and both MMCR0_EBE and BESCR_PME are set. The supported PM alerts will

[PATCH v8 08/10] PPC64/TCG: Implement 'rfebb' instruction

2021-11-25 Thread Daniel Henrique Barboza
An Event-Based Branch (EBB) allows applications to change the NIA when a event-based exception occurs. Event-based exceptions are enabled by setting the Branch Event Status and Control Register (BESCR). If the event-based exception is enabled when the exception occurs, an EBB happens. The

[PATCH v8 03/10] target/ppc: PMU: update counters on PMCs r/w

2021-11-25 Thread Daniel Henrique Barboza
Calling pmu_update_cycles() on every PMC read/write operation ensures that the values being fetched are up to date with the current PMU state. In theory we can get away by just trapping PMCs reads, but we're going to trap PMC writes to deal with counter overflow logic later on. Let's put the

[PATCH v8 06/10] target/ppc: enable PMU instruction count

2021-11-25 Thread Daniel Henrique Barboza
The PMU is already counting cycles by calculating time elapsed in nanoseconds. Counting instructions is a different matter and requires another approach. This patch adds the capability of counting completed instructions (Perf event PM_INST_CMPL) by counting the amount of instructions translated

[PATCH v8 04/10] target/ppc: PMU: update counters on MMCR1 write

2021-11-25 Thread Daniel Henrique Barboza
MMCR1 determines the events to be sampled by the PMU. Updating the counters at every MMCR1 write ensures that we're not sampling more or less events by looking only at MMCR0 and the PMCs. It is worth noticing that both the Book3S PowerPC PMU, and this IBM Power8+ PMU that we're modeling, also

[PATCH v8 02/10] target/ppc: PMU basic cycle count for pseries TCG

2021-11-25 Thread Daniel Henrique Barboza
This patch adds the barebones of the PMU logic by enabling cycle counting. The overall logic goes as follows: - MMCR0 reg initial value is set to 0x8000 (MMCR0_FC set) to avoid having to spin the PMU right at system init; - to retrieve the events that are being profiled, pmc_get_event() will

[PATCH v8 01/10] target/ppc: introduce PMUEventType and PMU overflow timers

2021-11-25 Thread Daniel Henrique Barboza
This patch starts an IBM Power8+ compatible PMU implementation by adding the representation of PMU events that we are going to sample, PMUEventType. This enum represents a Perf event that is being sampled by a specific counter 'sprn'. Events that aren't available (i.e. no event was set in MMCR1)

[PATCH v8 00/10] PMU-EBB support for PPC64 TCG

2021-11-25 Thread Daniel Henrique Barboza
Hi, In this new version considerable changes were made based on David's feedback of the previous version. All the counter frozen logic was moved from the body of helper_store_mmcr0 to pmc_get_event() via a new PMUEventType called PMU_EVENT_INACTIVE. The function pmu_update_cycles() is now called

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: > > For SEV-SNP, this is pretty much the end of the story, because the > > attestation exchange is driven by an agent inside the guest. Well, > > there's also the need to have in the

[Bug 1603636] Re: Guest has not initialized the display yet on ubuntu 16.10 PPC

2021-11-25 Thread Paul White
** Changed in: ubuntu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1603636 Title: Guest has not initialized the display yet on ubuntu 16.10 PPC Status in QEMU:

Re: [PATCH v5 07/18] target/riscv: setup everything so that riscv128-softmmu compiles

2021-11-25 Thread Frédéric Pétrot
On 25/11/2021 12:47, Alistair Francis wrote: On Wed, Nov 24, 2021 at 5:33 PM Philippe Mathieu-Daudé wrote: Hi Frédéric, On 11/24/21 07:55, Frédéric Pétrot wrote: On 24/11/2021 07:12, Alistair Francis wrote: On Sat, Nov 13, 2021 at 1:16 AM Frédéric Pétrot wrote: This patch is kind of a

Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2021-11-25 Thread Cédric Le Goater
 https://qemu.readthedocs.io/en/latest/system/target-ppc.html Yes, I thought about that but haven't got to it yet. I'm also not sure what should I put in that doc so if you have time feel free to copy from the above URLs what you think is better to have in the docs. Otherwise I'll do it

Re: [PATCH v2 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2021-11-25 Thread Łukasz Gieryk
On Wed, Nov 24, 2021 at 09:03:06AM +0100, Klaus Jensen wrote: > Hi Lukasz, > > I've been through this. I have a couple of review comments, but overall > looks good for inclusion in nvme-next. Would be nice to get this in > early in the cycle so it can mature there for 7.0. We (I’m speaking on

Re: [PATCH 1/2] block-backend: Retain permissions after migration

2021-11-25 Thread Philippe Mathieu-Daudé
On 11/25/21 14:53, Hanna Reitz wrote: > After migration, the permissions the guest device wants to impose on its > BlockBackend are stored in blk->perm and blk->shared_perm. In > blk_root_activate(), we take our permissions, but keep all shared > permissions open by calling

Re: [PATCH v3 1/3] target/ppc: Fixed call to deferred exception

2021-11-25 Thread BALATON Zoltan
On Thu, 25 Nov 2021, David Gibson wrote: On Thu, Nov 25, 2021 at 01:49:46AM +0100, BALATON Zoltan wrote: On Wed, 24 Nov 2021, Lucas Mateus Castro (alqotel) wrote: mtfsf, mtfsfi and mtfsb1 instructions call helper_float_check_status after updating the value of FPSCR, but

Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2021-11-25 Thread BALATON Zoltan
On Thu, 25 Nov 2021, Cédric Le Goater wrote: On 11/25/21 01:45, BALATON Zoltan wrote: On Wed, 24 Nov 2021, Fabiano Rosas wrote: Fabiano Rosas writes: Hi all, We have this bug in QEMU which indicates that we haven't been able to run openbios on a 7450 cpu for quite a long time:

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 03:50:46PM +0200, Dov Murik wrote: > > > On 25/11/2021 15:27, Daniel P. Berrangé wrote: > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > >> * Daniel P. Berrangé (berra...@redhat.com) wrote: > >>> On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
[+cc Tom, Brijesh] On 25/11/2021 15:42, Daniel P. Berrangé wrote: > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: >> [+cc jejb, tobin, jim, hubertus] >> >> >> On 25/11/2021 9:14, Sergio Lopez wrote: >>> On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: *

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
On 25/11/2021 15:52, Daniel P. Berrangé wrote: > On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: >> For SEV-SNP, this is pretty much the end of the story, because the >> attestation exchange is driven by an agent inside the guest. Well, >> there's also the need to have in the VM a

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

2021-11-25 Thread Markus Armbruster
Hyman Huang writes: > 在 2021/11/24 23:33, 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 >>> dirtyrate given by user. >>> >>>

[PATCH 1/2] block-backend: Retain permissions after migration

2021-11-25 Thread Hanna Reitz
After migration, the permissions the guest device wants to impose on its BlockBackend are stored in blk->perm and blk->shared_perm. In blk_root_activate(), we take our permissions, but keep all shared permissions open by calling `blk_set_perm(blk->perm, BLK_PERM_ALL)`. Only afterwards

[PATCH 2/2] iotests/migration-permissions: New test

2021-11-25 Thread Hanna Reitz
This test checks that a raw image in use by a virtio-blk device does not share the WRITE permission both before and after migration. Signed-off-by: Hanna Reitz --- .../qemu-iotests/tests/migration-permissions | 101 ++ .../tests/migration-permissions.out | 5 + 2

[PATCH 0/2] block-backend: Retain permissions after migration

2021-11-25 Thread Hanna Reitz
Hi, Peng Liang has reported an issue regarding migration of raw images here: https://lists.nongnu.org/archive/html/qemu-block/2021-11/msg00673.html It turns out that after migrating, all permissions are shared when they weren’t before. The cause of the problem is that we deliberately delay

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: > For SEV-SNP, this is pretty much the end of the story, because the > attestation exchange is driven by an agent inside the guest. Well, > there's also the need to have in the VM a well-known vNIC bridged to a > network that's routed

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
On 25/11/2021 15:27, Daniel P. Berrangé wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrangé (berra...@redhat.com) wrote: >>> On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: Hi, We recently discussed a way for

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > [+cc jejb, tobin, jim, hubertus] > > > On 25/11/2021 9:14, Sergio Lopez wrote: > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > >> * Daniel P. Berrangé (berra...@redhat.com) wrote: > >>> On Wed, Nov 24,

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > > Hi, > > > > > > > > We

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > Hi, > > > > > > We recently discussed a way for remote SEV guest attestation through QEMU. > > > My

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Sergio Lopez (s...@redhat.com) wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > > Hi, > > > > > > > > We recently discussed a way for

unable to execute QEMU command 'qom-get': Property 'sgx-epc.unavailable-features' not found

2021-11-25 Thread Yang Zhong
Hello Paolo, Our customer used the Libvirt XML to start a SGX VM, but failed. libvirt.libvirtError: internal error: unable to execute QEMU command 'qom-get': Property 'sgx-epc.unavailable-features' not found The XML file, The new compound property command

Re: Questions about losing the write lock of raw-format disks after migration

2021-11-25 Thread Hanna Reitz
On 24.11.21 13:56, Peng Liang via wrote: Hi folks, When we test migration with raw-format disk, we found that the QEMU process in the dst will lose the write lock after migration. However, the QEMU process in the dst will still hold the write lock for qcow2-format disk. After reading some

Re: [RFC PATCH v3 0/5] QMP support for cold-plugging devices

2021-11-25 Thread Daniel P . Berrangé
On Wed, Nov 24, 2021 at 03:51:23PM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Wed, Nov 24, 2021 at 02:50:11PM +0100, Markus Armbruster wrote: > >> Damien Hedde writes: > >> > >> > The biggest difference is the fw_cfg option I think: it is related > >> > with the

Re: [PATCH] linux-user: move target_signal.h generic definitions to generic/signal.h

2021-11-25 Thread gaosong
Hi, On 2021/11/25 下午6:08, WANG Xuerui wrote: + +#define TARGET_MINSIGSTKSZ 2048 While all the architectures you de-duplicated here have TARGET_MINSIGSTACKSZ as 2048, some others specify a different value (mostly 4096, e.g. alpha), as can be seen in your next patch (which should belong to

Re: [RFC PATCH v3 0/5] QMP support for cold-plugging devices

2021-11-25 Thread Damien Hedde
On 11/24/21 15:51, Markus Armbruster wrote: Daniel P. Berrangé writes: On Wed, Nov 24, 2021 at 02:50:11PM +0100, Markus Armbruster wrote: Damien Hedde writes: The biggest difference is the fw_cfg option I think: it is related with the rom_set_order_override()/rom_reset_order_override()

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
[+cc jejb, tobin, jim, hubertus] On 25/11/2021 9:14, Sergio Lopez wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrangé (berra...@redhat.com) wrote: >>> On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: Hi, We

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

2021-11-25 Thread Hyman Huang
在 2021/11/24 23:33, 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 dirtyrate given by user. Introduce qmp commands

Re: [PATCH v4 3/3] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-25 Thread Philippe Mathieu-Daudé
On 11/25/21 12:57, Hanna Reitz wrote: > On 24.11.21 17:15, Philippe Mathieu-Daudé wrote: >> Without the previous commit, when running 'make check-qtest-i386' >> with QEMU configured with '--enable-sanitizers' we get: >> >>    AddressSanitizer:DEADLYSIGNAL >>   

  1   2   >