Re: [PATCH] ppc/pnv: Add QME region for P10

2023-07-06 Thread Cédric Le Goater
On 7/7/23 06:06, Joel Stanley wrote: The Quad Management Engine (QME) manages power related settings for its quad. The xscom region is separate from the quad xscoms, therefore a new region is added. The xscoms in a QME select a given core by selecting the forth nibble. Implement dummy reads for

[PATCH QEMU v8 7/9] migration: Implement dirty-limit convergence algo

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) Implement dirty-limit convergence algo for live migration, which is kind of like auto-converge algo but using dirty-limit instead of cpu throttle to make migration convergent. Enable dirty page limit if dirty_rate_high_cnt greater than 2 when dirty-limit capability

[PATCH QEMU v8 8/9] migration: Extend query-migrate to provide dirty page limit info

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) Extend query-migrate to provide throttle time and estimated ring full time with dirty-limit capability enabled, through which we can observe if dirty limit take effect during live migration. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Markus Armbruster Reviewed-by: Juan

[PATCH QEMU v8 9/9] tests: Add migration dirty-limit capability test

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) Add migration dirty-limit capability test if kernel support dirty ring. Migration dirty-limit capability introduce dirty limit capability, two parameters: x-vcpu-dirty-limit-period and vcpu-dirty-limit are introduced to implement the live migration with dirty limit. The

[PATCH QEMU v8 3/9] qapi/migration: Introduce vcpu-dirty-limit parameters

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) Introduce "vcpu-dirty-limit" migration parameter used to limit dirty page rate during live migration. "vcpu-dirty-limit" and "x-vcpu-dirty-limit-period" are two dirty-limit-related migration parameters, which can be set before and during live migration by qmp

[PATCH QEMU v8 0/9] migration: introduce dirtylimit capability

2023-07-06 Thread ~hyman
Hi, Juan and Markus, thanks for reviewing the previous versions and please review the latest version if you have time :) Yong v8: 1. Rebase on master and refactor the docs suggested by Markus v7: 1. Rebase on master and fix conflicts v6: 1. Rebase on master 2. Split the commit "Implement

[PATCH QEMU v8 6/9] migration: Put the detection logic before auto-converge checking

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) This commit is prepared for the implementation of dirty-limit convergence algo. The detection logic of throttling condition can apply to both auto-converge and dirty-limit algo, putting it's position before the checking logic for auto-converge feature. Signed-off-by:

[PATCH QEMU v8 5/9] migration: Refactor auto-converge capability logic

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) Check if block migration is running before throttling guest down in auto-converge way. Note that this modification is kind of like code clean, because block migration does not depend on auto-converge capability, so the order of checks can be adjusted. Signed-off-by: Hyman

[PATCH QEMU v8 4/9] migration: Introduce dirty-limit capability

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned on before live migration and limit dirty page rate durty live migration. Introduce migrate_dirty_limit function to help check if dirty-limit capability enabled during live migration. Meanwhile, refactor

[PATCH QEMU v8 2/9] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) Introduce "x-vcpu-dirty-limit-period" migration experimental parameter, which is in the range of 1 to 1000ms and used to make dirtyrate calculation period configurable. Currently with the "x-vcpu-dirty-limit-period" varies, the total time of live migration changes, test

[PATCH QEMU v8 1/9] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit"

2023-07-06 Thread ~hyman
From: Hyman Huang(黄勇) dirty_rate paraemter of hmp command "set_vcpu_dirty_limit" is invalid if less than 0, so add parameter check for it. Note that this patch also delete the unsolicited help message and clean up the code. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Markus Armbruster

[PATCH] ppc/pnv: Add QME region for P10

2023-07-06 Thread Joel Stanley
The Quad Management Engine (QME) manages power related settings for its quad. The xscom region is separate from the quad xscoms, therefore a new region is added. The xscoms in a QME select a given core by selecting the forth nibble. Implement dummy reads for the stop state history (SSH) and

Re: [PATCH QEMU v7 4/9] migration: Introduce dirty-limit capability

2023-07-06 Thread Yong Huang
On Thu, Jul 6, 2023 at 10:59 PM Markus Armbruster wrote: > ~hyman writes: > > > From: Hyman Huang(黄勇) > > > > Introduce migration dirty-limit capability, which can > > be turned on before live migration and limit dirty > > page rate durty live migration. > > > > Introduce migrate_dirty_limit

RE: [PATCH 2/2] virtio-iommu: Rework the trace in virtio_iommu_set_page_size_mask()

2023-07-06 Thread Duan, Zhenzhong
>-Original Message- >From: Jean-Philippe Brucker >Sent: Thursday, July 6, 2023 10:36 PM >Subject: Re: [PATCH 2/2] virtio-iommu: Rework the trace in >virtio_iommu_set_page_size_mask() > >On Wed, Jul 05, 2023 at 03:16:31PM +0200, Eric Auger wrote: >> >>> diff --git

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-07-06 Thread Jason Wang
On Fri, Jul 7, 2023 at 3:08 AM Stefan Hajnoczi wrote: > > On Wed, 5 Jul 2023 at 02:02, Jason Wang wrote: > > > > On Mon, Jul 3, 2023 at 5:03 PM Stefan Hajnoczi wrote: > > > > > > On Fri, 30 Jun 2023 at 09:41, Jason Wang wrote: > > > > > > > > On Thu, Jun 29, 2023 at 8:36 PM Stefan Hajnoczi >

撤回: Qemu asan test reported heap-use-after-free error when using qxl and spice

2023-07-06 Thread zhangjianguo (A)
zhangjianguo (A) 将撤回邮件“Qemu asan test reported heap-use-after-free error when using qxl and spice”。

[PATCH] gdbstub: fixes cases where wrong threads were reported to GDB on SIGINT

2023-07-06 Thread Matheus Branco Borella
Alex Bennée writes: > Can gdb switch which packet sequence it uses to halt and restart > threads? Yes, but the way it does it does not trigger the behavior I was concerned about. GDB falls back to the old sequence when either (1) the target does not support the vCont command it's trying to send

Re: [RESEND PATCH v3 2/4] ppc4xx_pci: Rename QOM type name define

2023-07-06 Thread BALATON Zoltan
On Thu, 6 Jul 2023, Daniel Henrique Barboza wrote: On 7/6/23 08:16, BALATON Zoltan wrote: Rename the TYPE_PPC4xx_PCI_HOST_BRIDGE define and its string value to match each other and other similar types and to avoid confusion with "ppc4xx-host-bridge" type defined in same file. Signed-off-by:

Re: Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-07-06 Thread Chris Laplante
Hi Peter, > > > > Working on adding this now. One question - if the CPU is off (via > > arm_set_cpu_off), will the 'DETECT' IRQ I add to nrf51_gpio.c still fire? > > > Yes. The only thing that turning the CPU off affects is > the CPU -- all the rest of the devices in the system > continue to

Addition of qtest_irq_intercept_out_named, or modify qtest_irq_interrupt_out?

2023-07-06 Thread Chris Laplante
Hello all, I have a test case that needs to intercept a named GPIO out interrupt. qtest_irq_intercept_out doesn't support this currently. I would like to send a patch to add this functionality. Does anyone have a preference if I implement it is a new function (qtest_irq_intercept_out_named),

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Leonardo Bras Soares Passos
On Thu, Jul 6, 2023 at 3:24 PM Peter Xu wrote: > > On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos wrote: > > > I asked the same question, and I still keep confused: whether there's a > > > first bad commit? Starting from when it fails? > > > > > > For example, is this

Re: [PATCH 2/2] i386: Fix MCE support for AMD hosts

2023-07-06 Thread Joao Martins
+x86 qemu folks On 06/07/2023 20:40, John Allen wrote: > For the most part, AMD hosts can use the same MCE injection code as Intel but, > there are instances where the qemu implementation is Intel specific. First, > MCE > deliviery works differently on AMD and does not support broadcast. Second,

Re: [PATCH 1/2] i386: Add support for SUCCOR feature

2023-07-06 Thread Joao Martins
+x86 qemu folks On 06/07/2023 21:22, Moger, Babu wrote: > Hi John, > Thanks for the patches. Few comments below. > > On 7/6/23 14:40, John Allen wrote: >> Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required >> to >> be exposed to guests to allow them to handle machine

Re: [PATCH v3] target/ppc: Machine check on invalid real address access on POWER9/10

2023-07-06 Thread Cédric Le Goater
On 7/6/23 22:50, Daniel Henrique Barboza wrote: On 7/6/23 04:32, Nicholas Piggin wrote: On Mon Jul 3, 2023 at 10:03 PM AEST, Nicholas Piggin wrote: ppc currently silently accepts invalid real address access. Catch these and turn them into machine checks on POWER9/10 machines. Would there

Re: [PATCH v3] target/ppc: Machine check on invalid real address access on POWER9/10

2023-07-06 Thread Daniel Henrique Barboza
On 7/6/23 04:32, Nicholas Piggin wrote: On Mon Jul 3, 2023 at 10:03 PM AEST, Nicholas Piggin wrote: ppc currently silently accepts invalid real address access. Catch these and turn them into machine checks on POWER9/10 machines. Would there be any objections to merging this and the

Re: [RESEND PATCH v3 2/4] ppc4xx_pci: Rename QOM type name define

2023-07-06 Thread Daniel Henrique Barboza
On 7/6/23 08:16, BALATON Zoltan wrote: Rename the TYPE_PPC4xx_PCI_HOST_BRIDGE define and its string value to match each other and other similar types and to avoid confusion with "ppc4xx-host-bridge" type defined in same file. Signed-off-by: BALATON Zoltan --- I struggled a bit to

Re: [RESEND PATCH v3 3/4] ppc4xx_pci: Add define for ppc4xx-host-bridge type name

2023-07-06 Thread Daniel Henrique Barboza
On 7/6/23 08:16, BALATON Zoltan wrote: Add a QOM type name define for ppc4xx-host-bridge in the common header and replace direct use of the string name with the constant. Signed-off-by: BALATON Zoltan --- Reviewed-by: Daniel Henrique Barboza hw/ppc/ppc440_pcix.c| 3 ++-

Re: [RESEND PATCH v3 4/4] ppc440_pcix: Rename QOM type define abd move it to common header

2023-07-06 Thread Daniel Henrique Barboza
On 7/6/23 08:16, BALATON Zoltan wrote: Rename TYPE_PPC440_PCIX_HOST_BRIDGE to better match its string value, move it to common header and use it also in sam460ex to replace hard coded type name. Signed-off-by: BALATON Zoltan --- Reviewed-by: Daniel Henrique Barboza

Re: [PATCH v2] vfio: Fix null pointer dereference bug in vfio_bars_finalize()

2023-07-06 Thread Alex Williamson
On Tue, 4 Jul 2023 16:39:27 +0300 Avihai Horon wrote: > vfio_realize() has the following flow: > 1. vfio_bars_prepare() -- sets VFIOBAR->size. > 2. msix_early_setup(). > 3. vfio_bars_register() -- allocates VFIOBAR->mr. > > After vfio_bars_prepare() is called msix_early_setup() can fail. If it

Re: [PATCH 1/2] i386: Add support for SUCCOR feature

2023-07-06 Thread Moger, Babu
Hi John, Thanks for the patches. Few comments below. On 7/6/23 14:40, John Allen wrote: > Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to > be exposed to guests to allow them to handle machine check exceptions on AMD > hosts. > > Reported-by: William Roche >

[PATCH v4 0/6] migration: Test the new "file:" migration

2023-07-06 Thread Fabiano Rosas
Based-on: [PATCH V4 0/2] migration file URI https://lore.kernel.org/r/1688135108-316997-1-git-send-email-steven.sist...@oracle.com Since v3: - used FILE_TEST_FILENAME for the three tests v3: https://lore.kernel.org/r/20230630212902.19925-1-faro...@suse.de v2:

[PATCH v4 3/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate

2023-07-06 Thread Fabiano Rosas
Use the new migrate_incoming_qmp helper in the places that currently open-code calling migrate-incoming. Reviewed-by: Juan Quintela Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 1 + tests/qtest/migration-test.c | 12 ++---

[PATCH v4 4/6] migration: Set migration status early in incoming side

2023-07-06 Thread Fabiano Rosas
We are sending a migration event of MIGRATION_STATUS_SETUP at qemu_start_incoming_migration but never actually setting the state. This creates a window between qmp_migrate_incoming and process_incoming_migration_co where the migration status is still MIGRATION_STATUS_NONE. Calling query-migrate

[PATCH v4 5/6] tests/qtest: migration: Add support for negative testing of qmp_migrate

2023-07-06 Thread Fabiano Rosas
There is currently no way to write a test for errors that happened in qmp_migrate before the migration has started. Add a version of qmp_migrate that ensures an error happens. To make use of it a test needs to set MigrateCommon.result as MIG_TEST_QMP_ERROR. Reviewed-by: Peter Xu Signed-off-by:

[PATCH v4 6/6] tests/qtest: migration-test: Add tests for file-based migration

2023-07-06 Thread Fabiano Rosas
Add basic tests for file-based migration. Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu --- tests/qtest/migration-test.c | 99 1 file changed, 99 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH v4 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper

2023-07-06 Thread Fabiano Rosas
file-based migration requires the target to initiate its migration after the source has finished writing out the data in the file. Currently there's no easy way to initiate 'migrate-incoming', allow this by introducing migrate_incoming_qmp helper, similarly to migrate_qmp. Also make sure

[PATCH v4 1/6] tests/qtest: migration: Expose migrate_set_capability

2023-07-06 Thread Fabiano Rosas
The following patch will make use of this function from within migrate-helpers.c, so move it there. Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 11 +++ tests/qtest/migration-helpers.h |

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 04:00:49PM -0400, Michael S. Tsirkin wrote: > I mean his patch is exactly right. cmask was designed with this > kind of use case in mind. > Will queue. That's great news. > If you want to suggest more text to the commit log, for the benefit > of backporters, that is fine

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Michael S. Tsirkin
On Thu, Jul 06, 2023 at 03:02:07PM -0400, Peter Xu wrote: > On Thu, Jul 06, 2023 at 02:50:20PM -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 06, 2023 at 02:14:37PM -0400, Peter Xu wrote: > > > On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos > > > wrote: > > > > > I asked

Re: [RFC PATCH 0/6] Enable vdpa net migration with features depending on CVQ

2023-07-06 Thread Michael S. Tsirkin
On Thu, Jul 06, 2023 at 09:12:21PM +0200, Eugenio Pérez wrote: > At this moment the migration of net features that depends on CVQ is not > possible, as there is no reliable way to restore the device state like mac > address, number of enabled queues, etc to the destination. This is mainly >

Re: [PATCH 07/21] audio: add Apple Sound Chip (ASC) emulation

2023-07-06 Thread Volker Rümelin
The Apple Sound Chip was primarily used by the Macintosh II to generate sound in hardware which was previously handled by the toolbox ROM with software interrupts. Implement both the standard ASC and also the enhanced ASC (EASC) functionality which is used in the Quadra 800. Note that whilst

[PATCH 0/2] migration: Only pass negative values to qemu_file_set_error()

2023-07-06 Thread Fabiano Rosas
qemu_file_set_error() sets f->last_error, which is later used by functions in qemu-file.c to return the error to callers. The following functions expect f->last_error to be -errno: qemu_file_get_error_obj() qemu_file_get_error() qemu_fclose() Make sure qemu_file_set_error() always receives a

[PATCH 1/2] target/arm: Return negative value on power state migration error

2023-07-06 Thread Fabiano Rosas
All migration hooks, except this one, return -1 on error and 0 on success. Signed-off-by: Fabiano Rosas --- target/arm/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/machine.c b/target/arm/machine.c index fc4a4a4064..db3fcd5ae4 100644 ---

[PATCH 2/2] migration: Make it clear that qemu_file_set_error() needs a negative value

2023-07-06 Thread Fabiano Rosas
The convention in qemu-file.c is to return a negative value on error. The only place that could use qemu_file_set_error() to store a positive value to f->last_error was vmstate_save() which has been fixed in the previous patch. bdrv_inactivate_all() already returns a negative value on error.

[PATCH 1/2] i386: Add support for SUCCOR feature

2023-07-06 Thread John Allen
Add cpuid bit definition for the SUCCOR feature. This cpuid bit is required to be exposed to guests to allow them to handle machine check exceptions on AMD hosts. Reported-by: William Roche Signed-off-by: John Allen --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 4 2 files changed, 5

[PATCH 2/2] i386: Fix MCE support for AMD hosts

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

[PATCH 0/2] Fix MCE handling on AMD hosts

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

Re: [PATCH 2/2] accel/tcg: Always lock pages before translation

2023-07-06 Thread Richard W.M. Jones
On Thu, Jul 06, 2023 at 06:05:37PM +0100, Richard Henderson wrote: > We had done this for user-mode by invoking page_protect > within the translator loop. Extend this to handle system > mode as well. Move page locking out of tb_link_page. > > Reported-by: Liren Wei > Reported-by: Richard W.M.

Re: [PATCH] migration/calc-dirty-rate: millisecond precision period

2023-07-06 Thread Peter Xu
On Thu, Jun 29, 2023 at 11:59:03AM +0300, Andrei Gudkov wrote: > Introduces alternative argument calc-time-ms, which is the > the same as calc-time but accepts millisecond value. > Millisecond precision allows to make predictions whether > migration will succeed or not. To do this, calculate dirty

[PATCH 1/1] qemu-nbd: fix regression with qemu-nbd --fork run over ssh

2023-07-06 Thread Denis V. Lunev
Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d Author: Hanna Reitz Date: Wed May 8 23:18:18 2019 +0200 qemu-nbd: Do not close stderr has introduced an interesting regression. Original behavior of ssh somehost qemu-nbd /home/den/tmp/file -f raw --fork was the following: *

[RFC PATCH 1/6] vdpa: export vhost_vdpa_set_vring_ready

2023-07-06 Thread Eugenio Pérez
The vhost-vdpa net backend needs to enable vrings in a different order than default, so export it. No functional change intended except for tracing, that now includes the (virtio) index being enabled and the return value of the ioctl. Still ignoring return value of this function if called from

[RFC PATCH 5/6] vdpa: delay enable of data vqs

2023-07-06 Thread Eugenio Pérez
To restore the device at the destination of a live migration we send the commands through control virtqueue. For a device to read CVQ it must have received the DRIVER_OK status bit. However this opens a window where the device could start receiving packets in rx queue 0 before it receives the

[RFC PATCH 6/6] vdpa: remove net cvq migration blocker

2023-07-06 Thread Eugenio Pérez
Now that we have add migration blockers if the device does not support all the needed features, remove the general blocker applied to all net devices with CVQ. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 12 1 file changed, 12 deletions(-) diff --git a/net/vhost-vdpa.c

[RFC PATCH 2/6] vdpa: add should_enable op

2023-07-06 Thread Eugenio Pérez
To restore the device at the destination of a live migration we send the commands through control virtqueue. For a device to read CVQ it must have received the DRIVER_OK status bit. However this opens a window where the device could start receiving packets in rx queue 0 before it receives the

[RFC PATCH 0/6] Enable vdpa net migration with features depending on CVQ

2023-07-06 Thread Eugenio Pérez
At this moment the migration of net features that depends on CVQ is not possible, as there is no reliable way to restore the device state like mac address, number of enabled queues, etc to the destination. This is mainly caused because the device must only read CVQ, and process all the commands

[RFC PATCH 4/6] vdpa: add stub vhost_vdpa_should_enable

2023-07-06 Thread Eugenio Pérez
To restore the device at the destination of a live migration we send the commands through control virtqueue. For a device to read CVQ it must have received the DRIVER_OK status bit. However this opens a window where the device could start receiving packets in rx queue 0 before it receives the

[RFC PATCH 3/6] vdpa: use virtio_ops->should_enable at vhost_vdpa_set_vrings_ready

2023-07-06 Thread Eugenio Pérez
This allow to skip some rings that qemu does not want to enable. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 5978d970ee..f51f5d9969 100644 --- a/hw/virtio/vhost-vdpa.c +++

Re: [PATCH] net: add initial support for AF_XDP network backend

2023-07-06 Thread Stefan Hajnoczi
On Wed, 5 Jul 2023 at 02:02, Jason Wang wrote: > > On Mon, Jul 3, 2023 at 5:03 PM Stefan Hajnoczi wrote: > > > > On Fri, 30 Jun 2023 at 09:41, Jason Wang wrote: > > > > > > On Thu, Jun 29, 2023 at 8:36 PM Stefan Hajnoczi > > > wrote: > > > > > > > > On Thu, 29 Jun 2023 at 07:26, Jason Wang

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 02:50:20PM -0400, Michael S. Tsirkin wrote: > On Thu, Jul 06, 2023 at 02:14:37PM -0400, Peter Xu wrote: > > On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos wrote: > > > > I asked the same question, and I still keep confused: whether there's a > > > >

[PATCH] ui/gtk: set scanout-mode right before scheduling draw

2023-07-06 Thread Dongwon Kim
Setting scanout mode is better to be done very last minute right because the mode can be reset anytime after it is set in dpy_gl_scanout_texture by any asynchronouse dpy_refresh call, which eventually cancels drawing of the guest scanout texture. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc:

[PATCH] ui/gtk: skip refresh if new dmabuf has been submitted

2023-07-06 Thread Dongwon Kim
Skip refresh if a new dmabuf (guest scanout frame) has already been submitted and ready to be drawn because the scanout will be updated with new frame anyway. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4

Re: [PATCH 2/2] virtio-iommu: Rework the trace in virtio_iommu_set_page_size_mask()

2023-07-06 Thread Michael S. Tsirkin
On Wed, Jul 05, 2023 at 03:16:31PM +0200, Eric Auger wrote: > Hi Zhenghong, > > On 7/5/23 10:17, Duan, Zhenzhong wrote: > > > >> -Original Message- > >> From: Duan, Zhenzhong > >> Sent: Wednesday, July 5, 2023 12:56 PM > >> Subject: RE: [PATCH 2/2] virtio-iommu: Rework the trace in > >>

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Michael S. Tsirkin
On Thu, Jul 06, 2023 at 02:14:37PM -0400, Peter Xu wrote: > On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos wrote: > > > I asked the same question, and I still keep confused: whether there's a > > > first bad commit? Starting from when it fails? > > > > > > For example, is

Re: [PATCH v3 5/6] tests/qtest: migration: Add support for negative testing of qmp_migrate

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:29:01PM -0300, Fabiano Rosas wrote: > There is currently no way to write a test for errors that happened in > qmp_migrate before the migration has started. > > Add a version of qmp_migrate that ensures an error happens. To make > use of it a test needs to set

Re: [PATCH v3 6/6] tests/qtest: migration-test: Add tests for file-based migration

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:29:02PM -0300, Fabiano Rosas wrote: > Add basic tests for file-based migration. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu One trivial comment below: > +static void test_precopy_file_offset_bad(void) > +{ > +/* using a value not supported by

Re: [PATCH v2 7/7] migration: Provide explicit error message for file shutdowns

2023-07-06 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jul 06, 2023 at 02:33:42PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Thu, Jul 06, 2023 at 10:50:34AM -0300, Fabiano Rosas wrote: >> >> Peter Xu writes: >> >> >> >> > On Wed, Jul 05, 2023 at 07:05:13PM -0300, Fabiano Rosas wrote: >> >> >> Peter Xu

Re: [PATCH v3 4/6] migration: Set migration status early in incoming side

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:29:00PM -0300, Fabiano Rosas wrote: > We are sending a migration event of MIGRATION_STATUS_SETUP at > qemu_start_incoming_migration but never actually setting the state. > > This creates a window between qmp_migrate_incoming and > process_incoming_migration_co where the

Re: [PATCH v3 1/6] tests/qtest: migration: Expose migrate_set_capability

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:28:57PM -0300, Fabiano Rosas wrote: > The following patch will make use of this function from within > migrate-helpers.c, so move it there. > > Reviewed-by: Juan Quintela > Reviewed-by: Thomas Huth > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v3 3/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:28:59PM -0300, Fabiano Rosas wrote: > Use the new migrate_incoming_qmp helper in the places that currently > open-code calling migrate-incoming. > > Signed-off-by: Fabiano Rosas > Reviewed-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Leonardo Bras Soares Passos
On Thu, Jul 6, 2023 at 3:24 PM Peter Xu wrote: > > On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos wrote: > > > I asked the same question, and I still keep confused: whether there's a > > > first bad commit? Starting from when it fails? > > > > > > For example, is this

Re: [PATCH v3 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper

2023-07-06 Thread Peter Xu
On Fri, Jun 30, 2023 at 06:28:58PM -0300, Fabiano Rosas wrote: > file-based migration requires the target to initiate its migration after > the source has finished writing out the data in the file. Currently > there's no easy way to initiate 'migrate-incoming', allow this by > introducing

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 03:07:40PM -0300, Leonardo Bras Soares Passos wrote: > > I asked the same question, and I still keep confused: whether there's a > > first bad commit? Starting from when it fails? > > > > For example, is this broken on 6.0 binaries too with pc-q35-6.0? > > I tested for

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Leonardo Bras Soares Passos
On Thu, Jul 6, 2023 at 11:35 AM Peter Xu wrote: > > On Thu, Jul 06, 2023 at 01:55:47AM -0300, Leonardo Bras wrote: > > When trying to migrate a machine type pc-q35-6.0 or lower, with this > > cmdline options, > > > > -device > >

Re: [PATCH v2 7/7] migration: Provide explicit error message for file shutdowns

2023-07-06 Thread Peter Xu
On Thu, Jul 06, 2023 at 02:33:42PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Thu, Jul 06, 2023 at 10:50:34AM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Wed, Jul 05, 2023 at 07:05:13PM -0300, Fabiano Rosas wrote: > >> >> Peter Xu writes: > >> >> > >> >> >

Re: [PATCH] virtio-gpu: do not replace surface when scanout is disabled

2023-07-06 Thread Kim, Dongwon
On 7/4/2023 8:12 AM, Marc-André Lureau wrote: Hi On Wed, Jun 28, 2023 at 12:32 AM Dongwon Kim wrote: Surface is replaced with a place holder whenever the surface res is unreferenced by the guest message. With this logic, there is very frequent switching between guest display and

Re: [PATCH v2 1/1] pcie: Add hotplug detect state register to cmask

2023-07-06 Thread Leonardo Bras Soares Passos
On Thu, Jul 6, 2023 at 4:37 AM Juan Quintela wrote: > > Leonardo Bras wrote: > > When trying to migrate a machine type pc-q35-6.0 or lower, with this > > cmdline options, > > > > -device > > driver=pcie-root-port,port=18,chassis=19,id=pcie-root-port18,bus=pcie.0,addr=0x12 > > \ > > -device >

Re: [PATCH 1/2] accel/tcg: Split out cpu_exec_longjmp_cleanup

2023-07-06 Thread Richard W.M. Jones
On Thu, Jul 06, 2023 at 06:05:36PM +0100, Richard Henderson wrote: > Share the setjmp cleanup between cpu_exec_step_atomic > and cpu_exec_setjmp. > > Signed-off-by: Richard Henderson Reviewed-by: Richard W.M. Jones (I'm still testing the other one, but already up to 600 iterations) Rich. >

Re: [PATCH v2 7/7] migration: Provide explicit error message for file shutdowns

2023-07-06 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jul 06, 2023 at 10:50:34AM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Wed, Jul 05, 2023 at 07:05:13PM -0300, Fabiano Rosas wrote: >> >> Peter Xu writes: >> >> >> >> > Provide an explicit reason for qemu_file_shutdown()s, which can be >> >> >

Re: [RFC PATCH-for-8.1] accel: Remove HAX accelerator

2023-07-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > HAX is deprecated since commits 73741fda6c ("MAINTAINERS: Abort > HAXM maintenance") and 90c167a1da ("docs/about/deprecated: Mark > HAXM in QEMU as deprecated"), released in v8.0.0. > > Per the QEMU deprecation policy, we shouldn't remove it before > QEMU release

Re: [PULL v2 00/14] target-arm queue

2023-07-06 Thread Richard Henderson
200) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230706 for you to fetch changes up to c41077235168140cdd4a34fce9bd95c3d30efe9c: target/arm: Avoid over-length shift in arm_cpu_sve_finalize() error case (2023-07-06 13:36

[PATCH] chore: rename `tricore_feature` to `is_tricore_feature_enabled`

2023-07-06 Thread Rui Chen
While upgrading capstone to v5 , there was some name clash with the tricore_feature in capstone (which was introduced in this PR ), thus rename tricore_feature to

Re: [PATCH 0/2] migration: trivialities

2023-07-06 Thread Michael Tokarev
06.07.2023 13:29, Laszlo Ersek wrote: SSIA; originally for RHBZ#2018404 (hence the links in the commit messages). Cc: Juan Quintela (maintainer:Migration) Cc: Leonardo Bras (reviewer:Migration) Cc: Peter Xu (reviewer:Migration) Cc: qemu-triv...@nongnu.org Laszlo Ersek (2): migration:

Re: [PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Michael Tokarev
06.07.2023 18:08, Peng Liang wrote: virt-acpi-build.c uses warn_report. However, it doesn't include qemu/error-report.h directly, it include qemu/error-report.h via trace.h if we enable log trace backend. But if we disable the log trace backend (e.g., --enable-trace-backends=nop), then

[PATCH 2/2] accel/tcg: Always lock pages before translation

2023-07-06 Thread Richard Henderson
We had done this for user-mode by invoking page_protect within the translator loop. Extend this to handle system mode as well. Move page locking out of tb_link_page. Reported-by: Liren Wei Reported-by: Richard W.M. Jones Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 30

[PATCH 0/2] accel/tcg: Fix race condition in tb create/invalidate

2023-07-06 Thread Richard Henderson
Thanks for the test case, Richard WMJ. Using the fedora rawhide kernel-core-6.5.0-0.rc0.20230703gita901a3568fd2.8.fc39.x86_64.rpm I was able to reproduce the problem within 30 iterations. I'm now at 650 iterations and counting. r~ Richard Henderson (2): accel/tcg: Split out

[PATCH 1/2] accel/tcg: Split out cpu_exec_longjmp_cleanup

2023-07-06 Thread Richard Henderson
Share the setjmp cleanup between cpu_exec_step_atomic and cpu_exec_setjmp. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 43 +++ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Peter Maydell
On Thu, 6 Jul 2023 at 17:21, Peter Maydell wrote: > > On Thu, 6 Jul 2023 at 17:10, Jean-Philippe Brucker > wrote: > > > > On Thu, Jul 06, 2023 at 04:42:02PM +0100, Peter Maydell wrote: > > > > > Do you have a repro case for this bug? Did it work > > > > > before commit fe4a5472ccd6 ? > > > > > >

Re: [PATCH] tb-maint: Document #ifdef..else..endif correctly

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 15:43, Richard W.M. Jones wrote: It was hard to tell from the comments whether the code applied to user mode (CONFIG_USER_ONLY) or system mode. Fix the comments on the #else and #endif directives to be clearer. Signed-off-by: Richard W.M. Jones --- accel/tcg/tb-maint.c | 4 ++--

Re: [PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 17:08, Peng Liang wrote: virt-acpi-build.c uses warn_report. However, it doesn't include qemu/error-report.h directly, it include qemu/error-report.h via trace.h if we enable log trace backend. But if we disable the log trace backend (e.g., --enable-trace-backends=nop), then

Re: [PATCH 1/4] QGA VSS: Add wrapper to send log to debugger and stderr

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 12:58, Konstantin Kostiuk wrote: On Thu, Jul 6, 2023 at 1:01 PM Philippe Mathieu-Daudé > wrote: On 6/7/23 09:54, Konstantin Kostiuk wrote: > Hi Philippe, > > On Wed, Jul 5, 2023 at 11:35 PM Philippe Mathieu-Daudé >

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-06 Thread Michael S. Tsirkin
On Tue, Jul 04, 2023 at 01:36:00PM +0100, Alex Bennée wrote: > Currently QEMU has to know some details about the back-end to be able > to setup the guest. While various parts of the setup can be delegated > to the backend (for example config handling) this is a very piecemeal > approach. > This

Re: [PATCH 2/2] migration: unexport migrate_fd_error()

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 12:29, Laszlo Ersek wrote: The only migrate_fd_error() call sites are in "migration/migration.c", which is also where we define migrate_fd_error(). Make the function static, and remove its declaration from "migration/migration.h". Cc: Juan Quintela (maintainer:Migration) Cc: Leonardo

Re: [PATCH 1/2] migration: factor out "resume_requested" in qmp_migrate()

2023-07-06 Thread Philippe Mathieu-Daudé
On 6/7/23 12:29, Laszlo Ersek wrote: It cuts back on those awkward, duplicated !(has_resume && resume) expressions. Cc: Juan Quintela (maintainer:Migration) Cc: Leonardo Bras (reviewer:Migration) Cc: Peter Xu (reviewer:Migration) Cc: qemu-triv...@nongnu.org Bugzilla:

Re: [PATCH] target/arm: Fix ptw parameters in S1_ptw_translate() for debug contexts

2023-07-06 Thread Marcin Juszkiewicz
W dniu 6.07.2023 o 17:25, Jean-Philippe Brucker pisze: (Note that there is an issue with TF-A missing ENABLE_FEAT_FGT for qemu at the moment, which prevents booting Linux with -cpu max. I'll send the fix to TF-A after this, but this reproducer should at least boot edk2.) Which reminds me that

[PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-07-06 Thread Andrey Drobyshev via
v1 --> v2: * Add vmdk format to the 1st commit. Tweak commit message accordingly; * Make "compressed" field in MapEntry optional. v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00184.html Andrey Drobyshev (3): block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

Re: [PATCH] hw/arm/virt-acpi-build.c: Add missing header

2023-07-06 Thread Ani Sinha
> On 06-Jul-2023, at 8:38 PM, Peng Liang wrote: > > virt-acpi-build.c uses warn_report. However, it doesn't include > qemu/error-report.h directly, it include qemu/error-report.h via trace.h > if we enable log trace backend. But if we disable the log trace backend > (e.g.,

[PATCH v2 3/3] qemu-iotests: update expected tests output to contain "compressed" field

2023-07-06 Thread Andrey Drobyshev via
The previous commit adds "compressed" boolean field to JSON output of "qemu-img map" command. Let's tweak expected tests output accordingly. Signed-off-by: Andrey Drobyshev --- tests/qemu-iotests/122.out| 84 tests/qemu-iotests/154.out| 194

Re: [RFC PATCH] docs/interop: define STANDALONE protocol feature for vhost-user

2023-07-06 Thread Alex Bennée
Alex Bennée writes: > Currently QEMU has to know some details about the back-end to be able > to setup the guest. While various parts of the setup can be delegated > to the backend (for example config handling) this is a very piecemeal > approach. > > This patch suggests a new feature flag

[PATCH v2 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-07-06 Thread Andrey Drobyshev via
Functions qcow2_get_host_offset(), get_cluster_offset(), vmdk_co_block_status() explicitly report compressed cluster types when data is compressed. However, this information is never passed further. Let's make use of it by adding new BDRV_BLOCK_COMPRESSED flag for bdrv_block_status(), so that

[PATCH v2 2/3] qemu-img: map: report compressed data blocks

2023-07-06 Thread Andrey Drobyshev via
Right now "qemu-img map" reports compressed blocks as containing data but having no host offset. This is not very informative. Instead, let's add another boolean field named "compressed" in case JSON output mode is specified. This is achieved by utilizing new allocation status flag

  1   2   3   >