Re: [PATCH 01/12] ui/console-vc: Replace sprintf() by g_strdup_printf()

2024-04-10 Thread Marc-André Lureau
On Wed, Apr 10, 2024 at 8:06 PM Philippe Mathieu-Daudé wrote: > > sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, > resulting in painful developper experience. > > Replace sprintf() by g_strdup_printf() in order to avoid: > > [702/1310] Compiling C object libcommon.fa.p/ui_conso

Re: [PATCH 05/12] system/qtest: Replace sprintf() by g_string_append_printf()

2024-04-10 Thread Thomas Huth
On 10/04/2024 18.06, Philippe Mathieu-Daudé wrote: sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Replace sprintf() by GString API uses in order to avoid: [120/169] Compiling C object libcommon.fa.p/system_qtest.c.o system/qtes

Re: [PATCH v4] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Cindy Lu
On Thu, Apr 11, 2024 at 1:56 PM Michael S. Tsirkin wrote: > > On Thu, Apr 11, 2024 at 12:11:30PM +0800, Cindy Lu wrote: > > During the booting process of the non-standard image, the behavior of the > > called function in qemu is as follows: > > > > 1. vhost_net_stop() was triggered by guest image.

Re: [PATCH v4] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Jason Wang
On Thu, Apr 11, 2024 at 12:11 PM Cindy Lu wrote: > > During the booting process of the non-standard image, the behavior of the > called function in qemu is as follows: > > 1. vhost_net_stop() was triggered by guest image. This will call the function > virtio_pci_set_guest_notifiers() with assgin=

Re: [PATCH v4] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Michael S. Tsirkin
On Thu, Apr 11, 2024 at 12:11:30PM +0800, Cindy Lu wrote: > During the booting process of the non-standard image, the behavior of the > called function in qemu is as follows: > > 1. vhost_net_stop() was triggered by guest image. This will call the function > virtio_pci_set_guest_notifiers() with a

[PATCH v4] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Cindy Lu
During the booting process of the non-standard image, the behavior of the called function in qemu is as follows: 1. vhost_net_stop() was triggered by guest image. This will call the function virtio_pci_set_guest_notifiers() with assgin= false, virtio_pci_set_guest_notifiers() will release the irqf

?????? [PATCH RFC v1]display: fix heap use after free in cursor_put

2024-04-10 Thread ?glym
Hi During the test with logging, I found that there may be a conflict between the logic of updating the refcount in vnc_dpy_cursor_define() and QXL_CURSOR_SET action,  same as dpy_cursor_define() after commit 385ac97f,  and the atomic operation needs to be ensured; The first thoughts are as

Re: [PATCH v3] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Cindy Lu
On Thu, Apr 11, 2024 at 12:18 AM Michael S. Tsirkin wrote: > > On Thu, Apr 11, 2024 at 12:12:00AM +0800, Cindy Lu wrote: > > During the booting process of the non-standard image, the behavior of the > > called function in qemu is as follows: > > > > 1. vhost_net_stop() was triggered by guest image

Re: [PATCH v13 00/24] target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI

2024-04-10 Thread Jinjie Ruan via
On 2024/4/10 20:58, Peter Maydell wrote: > On Wed, 10 Apr 2024 at 07:19, Jinjie Ruan via wrote: >> >> Ping. > > As I said in my reply on the previous version, we're in > freeze at the moment, so this patchset is not going anywhere > until 9.0 releases. I think it's in shape to apply after that

Re: [PATCH 00/12] misc: Remove sprintf() due to macOS deprecation

2024-04-10 Thread BALATON Zoltan
On Wed, 10 Apr 2024, Richard Henderson wrote: On 4/10/24 06:06, Philippe Mathieu-Daudé wrote: Hi, sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Is snprintf also deprecated? It might be easier to convert some of these fixed buffer

[PATCH] hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately

2024-04-10 Thread BALATON Zoltan
Move calculation of mask after the switch which sets the function number for PIRQ/PINT pins to make sure the state of these pins are kept track of separately and IRQ is raised if any of them is active. Fixes: 7e01bd80c1 hw/isa/vt82c686: Bring back via_isa_set_irq() Signed-off-by: BALATON Zoltan -

Re: Point where target instructions are read

2024-04-10 Thread Gautam Bhat
On Tue, Apr 9, 2024 at 2:23 PM Peter Maydell wrote: > That sounds like a problem with your binary. If the reset vector > needs to be at 0xFFFE then it needs to be there, and you > should arrange for it to be built correctly. It doesn't matter > whether it's an ELF file or a raw binary file, the d

Re: [PATCH for-9.0] target/riscv/debug: set tval=pc in breakpoint exceptions

2024-04-10 Thread Daniel Henrique Barboza
On 3/22/24 00:59, Alistair Francis wrote: On Wed, Mar 20, 2024 at 7:33 PM Daniel Henrique Barboza wrote: We're not setting (s/m)tval when triggering breakpoints of type 2 (mcontrol) and 6 (mcontrol6). According to the debug spec section 5.7.12, "Match Control Type 6": "The Privileged Spec

Re: [PATCH 12/12] backends/tpm: Use qemu_hexdump_line() to avoid sprintf()

2024-04-10 Thread Stefan Berger
On 4/10/24 12:06, Philippe Mathieu-Daudé wrote: sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use qemu_hexdump_line() to avoid sprintf() calls, silencing: backends/tpm/tpm_util.c:357:14: warning: 'sprintf' is deprecated:

Re: [PATCH v6 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-10 Thread Jonathan Cameron via
On Tue, 9 Apr 2024 14:26:51 -0700 fan wrote: > On Fri, Apr 05, 2024 at 01:18:56PM +0100, Jonathan Cameron wrote: > > On Mon, 25 Mar 2024 12:02:27 -0700 > > nifan@gmail.com wrote: > > > > > From: Fan Ni > > > > > > To simulate FM functionalities for initiating Dynamic Capacity Add > > > (

Re: [PATCH 00/12] misc: Remove sprintf() due to macOS deprecation

2024-04-10 Thread Richard Henderson
On 4/10/24 06:06, Philippe Mathieu-Daudé wrote: Hi, sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Is snprintf also deprecated? It might be easier to convert some of these fixed buffer cases that way, if allowed. r~

[PATCH RFC v1]display: fix heap use after free in cursor_put

2024-04-10 Thread ?glym
0001-display-fix-heap-use-after-free-in-cursor_put.patch Description: Binary data

Re: [QEMU][PATCH v3 5/7] memory: add MemoryRegion map and unmap callbacks

2024-04-10 Thread Peter Xu
On Wed, Apr 10, 2024 at 06:44:38PM +0200, Edgar E. Iglesias wrote: > On Tue, Feb 27, 2024 at 11:37 PM Vikram Garhwal > wrote: > > > From: Juergen Gross > > > > In order to support mapping and unmapping guest memory dynamically to > > and from qemu during address_space_[un]map() operations add th

[Bug 1926249] Re: postcopy migration fails in hirsute (solved)

2024-04-10 Thread Felipe Alencastro
Hi @ajkavanagh, this affects focal-hwe, jammy and will affect any new releases unless this sysctl is set to 1. ** No longer affects: charm-nova-compute ** Also affects: qemu Importance: Undecided Status: New ** No longer affects: qemu ** Also affects: charm-nova-compute Importance:

Re: [PATCH for-9.1 04/19] target/i386: do not use s->tmp0 and s->tmp4 to compute flags

2024-04-10 Thread Paolo Bonzini
Il mer 10 apr 2024, 08:35 Richard Henderson ha scritto: > On 4/9/24 06:43, Paolo Bonzini wrote: > > Create a new temporary whenever flags have to use one, instead of using > > s->tmp0 or s->tmp4. NULL can now be passed as the scratch register > > to gen_prepare_*. > > > > Signed-off-by: Paolo Bo

Re: [PATCH] hw/misc/applesmc: Simplify DeviceReset handler

2024-04-10 Thread Peter Maydell
On Wed, 10 Apr 2024 at 19:08, Philippe Mathieu-Daudé wrote: > > Have applesmc_find_key() return a const pointer. > Since the returned buffers are not modified in > applesmc_io_data_write(), it is pointless to > delete and re-add the keys in the DeviceReset > handler. Add them once in DeviceRealize

[PATCH] hw/misc/applesmc: Simplify DeviceReset handler

2024-04-10 Thread Philippe Mathieu-Daudé
Have applesmc_find_key() return a const pointer. Since the returned buffers are not modified in applesmc_io_data_write(), it is pointless to delete and re-add the keys in the DeviceReset handler. Add them once in DeviceRealize, and discard them in the DeviceUnrealize handler. Signed-off-by: Philip

Re: [PULL v2 00/20] misc patch queue

2024-04-10 Thread Michael Tokarev
10.04.2024 19:38, Richard Henderson:   target/hppa: Fix IIAOQ, IIASQ for pa2.0 This is for hppa64, so not further back than 8.2, or not at all -- hppa64 is really still in development. We had a few other fixes for hppa64 for 8.2. I was unsure about this since hppa64 appeared in 8.2 for the

Re: [External] Re: [PATCH v11 2/2] memory tier: create CPUless memory tiers after obtaining HMAT info

2024-04-10 Thread Jonathan Cameron via
On Tue, 9 Apr 2024 12:02:31 -0700 "Ho-Ren (Jack) Chuang" wrote: > Hi Jonathan, > > On Tue, Apr 9, 2024 at 9:12 AM Jonathan Cameron > wrote: > > > > On Fri, 5 Apr 2024 15:43:47 -0700 > > "Ho-Ren (Jack) Chuang" wrote: > > > > > On Fri, Apr 5, 2024 at 7:03 AM Jonathan Cameron > > > wrote: >

Re: [QEMU][PATCH v3 5/7] memory: add MemoryRegion map and unmap callbacks

2024-04-10 Thread Edgar E. Iglesias
On Tue, Feb 27, 2024 at 11:37 PM Vikram Garhwal wrote: > From: Juergen Gross > > In order to support mapping and unmapping guest memory dynamically to > and from qemu during address_space_[un]map() operations add the map() > and unmap() callbacks to MemoryRegionOps. > > Those will be used e.g. f

Re: [PULL v2 00/20] misc patch queue

2024-04-10 Thread Richard Henderson
On 4/10/24 06:10, Michael Tokarev wrote: From this list, do we pick something for stable? It looks like  tcg/optimize: Do not attempt to constant fold neg_vec  linux-user: Fix waitid return of siginfo_t and rusage Yes.  target/hppa: Fix IIAOQ, IIASQ for pa2.0 This is for hppa64, so not

Re: [PATCH v3] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Michael S. Tsirkin
On Thu, Apr 11, 2024 at 12:12:00AM +0800, Cindy Lu wrote: > During the booting process of the non-standard image, the behavior of the > called function in qemu is as follows: > > 1. vhost_net_stop() was triggered by guest image. This will call the function > virtio_pci_set_guest_notifiers() with a

[PATCH v3] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Cindy Lu
During the booting process of the non-standard image, the behavior of the called function in qemu is as follows: 1. vhost_net_stop() was triggered by guest image. This will call the function virtio_pci_set_guest_notifiers() with assgin= false, virtio_pci_set_guest_notifiers() will release the irqf

[PATCH 10/12] hw/ide/atapi: Use qemu_hexdump_line() to avoid sprintf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use qemu_hexdump_line() to avoid sprintf() calls, silencing: [1367/1604] Compiling C object libcommon.fa.p/backends_tpm_tpm_util.c.o backends/tpm/tpm_util.c:355:18: warning: 'sprintf'

[PATCH 03/12] hw/ppc/spapr: Replace sprintf() by g_strdup_printf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Replace sprintf() by g_strdup_printf() in order to avoid: hw/ppc/spapr.c:385:5: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to

Re: [PULL v2 00/20] misc patch queue

2024-04-10 Thread Michael Tokarev
09.04.2024 22:35, Richard Henderson wrote: target/m68k: Fix fp accrued exception reporting target/hppa: Fix IIAOQ, IIASQ for pa2.0 target/sh4: Fixes to mac.l and mac.w saturation target/sh4: Fixes to illegal delay slot reporting linux-user: Fix waitid return of siginfo_t and rusage linux-user: P

[PATCH 04/12] hw/mips/malta: Replace sprintf() by g_string_append_printf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Extract common code to get_rng_seed_hex(), replacing the sprintf() calls by GString API ones in order to avoid: [120/169] Compiling C object libcommon.fa.p/system_qtest.c.o hw/mips/mal

[PATCH 11/12] hw/dma/pl330: Use qemu_hexdump_line() to avoid sprintf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use qemu_hexdump_line() to avoid sprintf() calls, silencing: [5/8] Compiling C object libcommon.fa.p/hw_dma_pl330.c.o hw/dma/pl330.c:333:13: warning: 'sprintf' is deprecated: This

[PATCH 09/12] hw/scsi/scsi-disk: Use qemu_hexdump_line() to avoid sprintf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use qemu_hexdump_line() to avoid sprintf() calls, silencing: [105/169] Compiling C object libcommon.fa.p/hw_scsi_scsi-disk.c.o hw/scsi/scsi-disk.c:2659:14: warning: 'sprintf' is deprec

[PATCH 07/12] util/hexdump: Have qemu_hexdump_line() return heap allocated buffer

2024-04-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/cutils.h | 10 +++--- hw/virtio/vhost-vdpa.c | 5 +++-- util/hexdump.c | 12 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index 70ca4b876b..e8d6b86098

[PATCH 06/12] util/hexdump: Rename @offset argument in qemu_hexdump_line()

2024-04-10 Thread Philippe Mathieu-Daudé
@offset argument is more descriptive than @b. Inverse @bufptr <-> @offset arguments order. Document qemu_hexdump_line(). Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/cutils.h | 11 +-- hw/virtio/vhost-vdpa.c | 8 util/hexdump.c | 16 3 file

[PATCH 12/12] backends/tpm: Use qemu_hexdump_line() to avoid sprintf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use qemu_hexdump_line() to avoid sprintf() calls, silencing: backends/tpm/tpm_util.c:357:14: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons onl

[PATCH 01/12] ui/console-vc: Replace sprintf() by g_strdup_printf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Replace sprintf() by g_strdup_printf() in order to avoid: [702/1310] Compiling C object libcommon.fa.p/ui_console-vc.c.o ui/console-vc.c:824:21: warning: 'sprintf' is deprecated: T

[PATCH 08/12] util/hexdump: Replace sprintf() by g_string_append_printf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Replace sprintf() by GString API in order to avoid: [426/1310] Compiling C object libqemuutil.a.p/util_hexdump.c.o util/hexdump.c:35:21: warning: 'sprintf' is deprecated: This func

[PATCH 05/12] system/qtest: Replace sprintf() by g_string_append_printf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Replace sprintf() by GString API uses in order to avoid: [120/169] Compiling C object libcommon.fa.p/system_qtest.c.o system/qtest.c:623:13: warning: 'sprintf' is deprecated: This

[PATCH 00/12] misc: Remove sprintf() due to macOS deprecation

2024-04-10 Thread Philippe Mathieu-Daudé
Hi, sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Suggestion to avoid the super-noisy warning on macOS forum are [*]: * use -Wno-deprecated-declarations on the whole build * surgically add #pragma clang diagnostic around each use. N

[PATCH 02/12] hw/vfio/pci: Replace sprintf() by g_strdup_printf()

2024-04-10 Thread Philippe Mathieu-Daudé
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use g_strdup_printf() instead. Signed-off-by: Philippe Mathieu-Daudé --- hw/vfio/pci.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/p

Re: [PULL 00/16] Misc HW patches for 2024-04-10

2024-04-10 Thread Peter Maydell
; > are available in the Git repository at: > > https://github.com/philmd/qemu.git tags/hw-misc-20240410 > > for you to fetch changes up to dcb0a1ac03d6b5ba6c7fcbe467f0215738006113: > > hw/audio/virtio-snd: Re

Re: secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-10 Thread Gerd Hoffmann
> > > Options I see: > > > > > > (a) Stop using direct kernel boot, let virt-install & other tools > > > create vfat boot media with shim+kernel+initrd instead. > > > > > > (b) Enroll the distro signing keys in the efi variable store, so > > > booting the kernel without shim.efi w

Re: [PATCH 1/4] Revert "migration: modify test_multifd_tcp_none() to use new QAPI syntax"

2024-04-10 Thread Peter Xu
On Wed, Apr 10, 2024 at 10:04:33AM -0300, Fabiano Rosas wrote: > Het Gala writes: > > > This reverts commit 8e3766eefbb4036cbc280c1f1a0d28537929f7fb > > > > After addition of 'channels' as the starting argument of new QAPI > > syntax inside postcopy test, even if the user entered the old QAPI > >

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-04-10 Thread Peter Xu
On Wed, Apr 10, 2024 at 02:28:59AM +, Zhijian Li (Fujitsu) via wrote: > > > on 4/10/2024 3:46 AM, Peter Xu wrote: > > >> Is there document/link about the unittest/CI for migration tests, Why > >> are those tests missing? > >> Is it hard or very special to set up an environment for that? mayb

Re: [PATCH] tests/qtest: Standardize qtest function caller strings.

2024-04-10 Thread Fabiano Rosas
Het Gala writes: > On 05/04/24 7:58 pm, Fabiano Rosas wrote: >> !---| >>CAUTION: External Email >> >> |---! >> >> Het Gala writes: >> >>> On 27/03/24 2:37 am, Fabia

Re: [PULL v2 00/20] misc patch queue

2024-04-10 Thread Peter Maydell
On Tue, 9 Apr 2024 at 20:39, Richard Henderson wrote: > > Defer 16 patches to 9.1; add fix for -strace. > > r~ > > > The following changes since commit bc0cd4ae881dff47e81581a8fea93a50b1d1dbe7: > > Merge tag 'for_upstream' of > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2024

Re: [PATCH RFC v1]display: fix heap use after free in cursor_put

2024-04-10 Thread Marc-André Lureau
Hi On Wed, Apr 10, 2024 at 2:06 PM ゞlym <707242...@qq.com> wrote: > > Please send the patch as inline: https://www.qemu.org/docs/master/devel/submitting-a-patch.html#do-not-send-as-an-attachment The patch is doing too much changes to the ssd.lock usage without explaining in detail which race and

Re: [PATCH 4/4] tests/qtest/migration: Add postcopy migration qtests to use 'channels' argument instead of uri

2024-04-10 Thread Fabiano Rosas
Het Gala writes: > Add qtests to perform postcopy live migration by having list of > 'channels' argument as the starting point instead of uri string. > (Note: length of the list is restricted to 1 for now) > > Signed-off-by: Het Gala > --- > tests/qtest/migration-test.c | 38 +++

Re: [PATCH 3/4] tests/qtest/migration: Add channels parameter in migrate_incoming_qmp

2024-04-10 Thread Fabiano Rosas
Het Gala writes: > Alter migrate_incoming_qmp() to allow both uri and channels > independently. For channels, convert string to a QDict. > > Signed-off-by: Het Gala > --- > tests/qtest/migration-helpers.c | 13 +++-- > tests/qtest/migration-helpers.h | 4 ++-- > tests/qtest/migrati

Re: [PATCH 2/4] tests/qtest/migration: Replace 'migrate-incoming' qtest_qmp_assert_success with migrate_incoming_qmp

2024-04-10 Thread Fabiano Rosas
Het Gala writes: > Already have a migrate_incoming_qmp helper function to initiate > 'migrate-incoming' QMP command with some additional checks. > Replace 'migrate-incoming' qtest_qmp_assert_success command with > calling migrate_incoming_qmp helper function for postcopy qtests. > > Signed-off-by

Re: [PATCH 1/4] Revert "migration: modify test_multifd_tcp_none() to use new QAPI syntax"

2024-04-10 Thread Fabiano Rosas
Het Gala writes: > This reverts commit 8e3766eefbb4036cbc280c1f1a0d28537929f7fb > > After addition of 'channels' as the starting argument of new QAPI > syntax inside postcopy test, even if the user entered the old QAPI > syntax, test used the new syntax. > It was a temporary patch added to have s

Re: [PATCH v13 00/24] target/arm: Implement FEAT_NMI and FEAT_GICv3_NMI

2024-04-10 Thread Peter Maydell
On Wed, 10 Apr 2024 at 07:19, Jinjie Ruan via wrote: > > Ping. As I said in my reply on the previous version, we're in freeze at the moment, so this patchset is not going anywhere until 9.0 releases. I think it's in shape to apply after that. thanks -- PMM

Re: [PATCH v5 2/2] nbd/server: Mark negotiation functions as coroutine_fn

2024-04-10 Thread Eric Blake
On Wed, Apr 10, 2024 at 10:05:28AM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > > @@ -755,7 +764,8 @@ struct NBDTLSServerHandshakeData { > > > >Coroutine *co; > > > >}; > > > > > > > > -static void nbd_server_tls_handshake(QIOTask *task, void *opaque) > > > > +static coroutine_fn v

Re: [QEMU][PATCH v3 0/7] Xen: support grant mappings.

2024-04-10 Thread Edgar E. Iglesias
On Wed, Feb 28, 2024 at 8:00 PM Vikram Garhwal wrote: > Hi Manos, > On Wed, Feb 28, 2024 at 03:27:12PM +0200, Manos Pitsidianakis wrote: > > Hello Vikram, > > > > Series doesn't apply on master. Can you rebase and also provide a > > base-commit with --base= when you use git-format-patch? This > >

Re: [PATCH] tests/qtest: Standardize qtest function caller strings.

2024-04-10 Thread Het Gala
On 05/04/24 7:58 pm, Fabiano Rosas wrote: !---| CAUTION: External Email |---! Het Gala writes: On 27/03/24 2:37 am, Fabiano Rosas wrote: Het Gala writes: So

[PATCH] tests/vm: update openbsd image to 7.5

2024-04-10 Thread Brad Smith
tests/vm: update openbsd to release 7.5 Signed-off-by: Brad Smith --- This exposes a further issue with Clang 16 and the ROP exploits flag usage at the moment.. https://gitlab.com/qemu-project/qemu/-/issues/2278 tests/vm/openbsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

Re: secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-10 Thread Gerd Hoffmann
On Wed, Apr 10, 2024 at 07:10:22AM -0400, Michael S. Tsirkin wrote: > On Wed, Apr 10, 2024 at 12:35:13PM +0200, Gerd Hoffmann wrote: > > On Wed, Apr 10, 2024 at 03:26:29AM -0400, Michael S. Tsirkin wrote: > > > On Wed, Apr 10, 2024 at 09:21:26AM +0200, Gerd Hoffmann wrote: > > > > If the binary loa

[PATCH 3/4] tests/qtest/migration: Add channels parameter in migrate_incoming_qmp

2024-04-10 Thread Het Gala
Alter migrate_incoming_qmp() to allow both uri and channels independently. For channels, convert string to a QDict. Signed-off-by: Het Gala --- tests/qtest/migration-helpers.c | 13 +++-- tests/qtest/migration-helpers.h | 4 ++-- tests/qtest/migration-test.c | 12 ++--

Re: [QEMU][PATCH v3 5/7] memory: add MemoryRegion map and unmap callbacks

2024-04-10 Thread Edgar E. Iglesias
On Fri, Mar 1, 2024 at 12:11 AM Stefano Stabellini wrote: > On Tue, 27 Feb 2024, Vikram Garhwal wrote: > > From: Juergen Gross > > > > In order to support mapping and unmapping guest memory dynamically to > > and from qemu during address_space_[un]map() operations add the map() > > and unmap() c

[PATCH 0/4] tests/qtest/migration: Add postcopy qtests for introducing 'channels' argument with new QAPI syntax

2024-04-10 Thread Het Gala
Add postcopy migration qtests with new QAPI syntax, having 'channels' as the starting argument. Also, introduce 'channels' to migrate_incoming_qmp function so as to call migration with the new QAPI syntax from src as well as dest. Patch 1: Revert back commit which temporarily introduced '

[PATCH 1/4] Revert "migration: modify test_multifd_tcp_none() to use new QAPI syntax"

2024-04-10 Thread Het Gala
This reverts commit 8e3766eefbb4036cbc280c1f1a0d28537929f7fb After addition of 'channels' as the starting argument of new QAPI syntax inside postcopy test, even if the user entered the old QAPI syntax, test used the new syntax. It was a temporary patch added to have some presence of the new syntax

[PATCH 2/4] tests/qtest/migration: Replace 'migrate-incoming' qtest_qmp_assert_success with migrate_incoming_qmp

2024-04-10 Thread Het Gala
Already have a migrate_incoming_qmp helper function to initiate 'migrate-incoming' QMP command with some additional checks. Replace 'migrate-incoming' qtest_qmp_assert_success command with calling migrate_incoming_qmp helper function for postcopy qtests. Signed-off-by: Het Gala --- tests/qtest/m

[PATCH 4/4] tests/qtest/migration: Add postcopy migration qtests to use 'channels' argument instead of uri

2024-04-10 Thread Het Gala
Add qtests to perform postcopy live migration by having list of 'channels' argument as the starting point instead of uri string. (Note: length of the list is restricted to 1 for now) Signed-off-by: Het Gala --- tests/qtest/migration-test.c | 38 ++-- 1 file change

Re: [QEMU][PATCH v3 3/7] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2024-04-10 Thread Edgar E. Iglesias
On Tue, Feb 27, 2024 at 11:37 PM Vikram Garhwal wrote: > From: Juergen Gross > > qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so > modify qemu_ram_ptr_length() a little bit and use it for > qemu_map_ram_ptr(), too. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram

Re: [QEMU][PATCH v3 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry

2024-04-10 Thread Edgar E. Iglesias
On Fri, Mar 1, 2024 at 6:08 PM Alex Bennée wrote: > Vikram Garhwal writes: > > > From: Juergen Gross > > > > Today xen_ram_addr_from_mapcache() will either abort() or return 0 in > > case it can't find a matching entry for a pointer value. Both cases > > are bad, so change that to return an inv

Re: [QEMU][PATCH v3 2/7] xen: add pseudo RAM region for grant mappings

2024-04-10 Thread Edgar E. Iglesias
On Fri, Mar 1, 2024 at 3:06 PM Alex Bennée wrote: > Vikram Garhwal writes: > > > From: Juergen Gross > > > > Add a memory region which can be used to automatically map granted > > memory. It is starting at 0x8000ULL in order to be able to > > distinguish it from normal RAM. > > Is t

Re: [QEMU][PATCH v3 6/7] xen: add map and unmap callbacks for grant region

2024-04-10 Thread Edgar E. Iglesias
On Fri, Mar 1, 2024 at 12:34 AM Stefano Stabellini wrote: > On Tue, 27 Feb 2024, Vikram Garhwal wrote: > > From: Juergen Gross > > > > Add the callbacks for mapping/unmapping guest memory via grants to the > > special grant memory region. > > > > Signed-off-by: Juergen Gross > > Signed-off-by:

Re: [QEMU][PATCH v3 1/7] softmmu: physmem: Split ram_block_add()

2024-04-10 Thread Edgar E. Iglesias
On Fri, Mar 1, 2024 at 12:35 PM Alex Bennée wrote: > Vikram Garhwal writes: > > > Extract ram block list update to a new function ram_block_add_list(). > This is > > done to support grant mappings which adds a memory region for granted > memory and > > updates the ram_block list. > > > > Signed-

Re: [QEMU][PATCH v3 7/7] hw: arm: Add grant mapping.

2024-04-10 Thread Edgar E. Iglesias
On Wed, Mar 6, 2024 at 9:57 PM Vikram Garhwal wrote: > Hi Alex, > On Fri, Mar 01, 2024 at 05:10:28PM +, Alex Bennée wrote: > > Vikram Garhwal writes: > > > > > Enable grant ram mapping support for Xenpvh machine on ARM. > > > > > > Signed-off-by: Vikram Garhwal > > > Reviewed-by: Stefano St

Re: secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-10 Thread Michael S. Tsirkin
On Wed, Apr 10, 2024 at 12:35:13PM +0200, Gerd Hoffmann wrote: > On Wed, Apr 10, 2024 at 03:26:29AM -0400, Michael S. Tsirkin wrote: > > On Wed, Apr 10, 2024 at 09:21:26AM +0200, Gerd Hoffmann wrote: > > > If the binary loaded via -kernel is *not* a linux kernel (in which > > > case protocol == 0),

Re: [PATCH for-9.0] ppc440_pcix: Do not expose a bridge device on PCI bus

2024-04-10 Thread BALATON Zoltan
On Wed, 10 Apr 2024, Nicholas Piggin wrote: On Wed Apr 10, 2024 at 9:55 AM AEST, BALATON Zoltan wrote: Real 460EX SoC apparently does not expose a bridge device and having it appear on PCI bus confuses an AmigaOS file system driver that uses this to detect which machine it is running on. Since v

secure boot & direct kernel load (was: Re: [PATCH] x86/loader: only patch linux kernels)

2024-04-10 Thread Gerd Hoffmann
On Wed, Apr 10, 2024 at 03:26:29AM -0400, Michael S. Tsirkin wrote: > On Wed, Apr 10, 2024 at 09:21:26AM +0200, Gerd Hoffmann wrote: > > If the binary loaded via -kernel is *not* a linux kernel (in which > > case protocol == 0), do not patch the linux kernel header fields. > > > > It's (a) pointle

[RFC 0/2] Identify aliased maps in vdpa SVQ iova_tree

2024-04-10 Thread Eugenio Pérez
The guest may have overlapped memory regions, where different GPA leads to the same HVA. This causes a problem when overlapped regions (different GPA but same translated HVA) exists in the tree, as looking them by HVA will return them twice. To solve this, track GPA in the DMA entry that acs as u

[RFC 2/2] vdpa: identify aliased maps in iova_tree

2024-04-10 Thread Eugenio Pérez
The guest may have overlapped memory regions, where different GPA leads to the same HVA. This causes a problem when overlapped regions (different GPA but same translated HVA) exists in the tree, as looking them by HVA will return them twice. To solve this, track GPA in the DMA entry that acs as u

[RFC 1/2] iova_tree: add an id member to DMAMap

2024-04-10 Thread Eugenio Pérez
IOVA tree is also used to track the mappings of virtio-net shadow virtqueue. This mappings may not match with the GPA->HVA ones. This causes a problem when overlapped regions (different GPA but same translated HVA) exists in the tree, as looking them by HVA will return them twice. To solve this,

[PULL 13/16] hw/net/lan9118: Fix overflow in MIL TX FIFO

2024-04-10 Thread Philippe Mathieu-Daudé
When the MAC Interface Layer (MIL) transmit FIFO is full, truncate the packet, and raise the Transmitter Error (TXE) flag. Broken since model introduction in commit 2a42499017 ("LAN9118 emulation"). When using the reproducer from https://gitlab.com/qemu-project/qemu/-/issues/2267 we get: hw/ne

[PULL 01/16] hw/virtio: Introduce virtio_bh_new_guarded() helper

2024-04-10 Thread Philippe Mathieu-Daudé
Introduce virtio_bh_new_guarded(), similar to qemu_bh_new_guarded() but using the transport memory guard, instead of the device one (there can only be one virtio device per virtio bus). Inspired-by: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Acked-by: Michael S. Tsirkin Signed-off-by: Philippe Ma

[PULL 08/16] hw/block/nand: Fix out-of-bound access in NAND block buffer

2024-04-10 Thread Philippe Mathieu-Daudé
nand_command() and nand_getio() don't check @offset points into the block, nor the available data length (s->iolen) is not negative. In order to fix: - check the offset is in range in nand_blk_load_NAND_PAGE_SIZE(), - do not set @iolen if blk_load() failed. Reproducer: $ cat << EOF | qemu-sys

[PULL 02/16] hw/display/virtio-gpu: Protect from DMA re-entrancy bugs

2024-04-10 Thread Philippe Mathieu-Daudé
Replace qemu_bh_new_guarded() by virtio_bh_new_guarded() so the bus and device use the same guard. Otherwise the DMA-reentrancy protection can be bypassed: $ cat << EOF | qemu-system-i386 -display none -nodefaults \ -machine q35,accel=qtest \

[PULL 16/16] hw/audio/virtio-snd: Remove unused assignment

2024-04-10 Thread Philippe Mathieu-Daudé
Coverity reported: >>> CID 1542933: Code maintainability issues (UNUSED_VALUE) >>> CID 1542934: Code maintainability issues (UNUSED_VALUE) >>> Assigning value "NULL" to "stream" here, but that stored value is overwritten before it can be used. Simply remove the unu

[PULL 12/16] hw/net/lan9118: Replace magic '2048' value by MIL_TXFIFO_SIZE definition

2024-04-10 Thread Philippe Mathieu-Daudé
The magic 2048 is explained in the LAN9211 datasheet (DS2414A) in chapter 1.4, "10/100 Ethernet MAC": The MAC Interface Layer (MIL), within the MAC, contains a 2K Byte transmit and a 128 Byte receive FIFO which is separate from the TX and RX FIFOs. [...] Note, the use of the constant in

[PULL 06/16] hw/block/nand: Factor nand_load_iolen() method out

2024-04-10 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Reviewed-by: Kevin Wolf Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240409135944.24997-2-phi...@linaro.org> --- hw/block/nand.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/hw/block/nand.c b/hw/

[PULL 15/16] hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()

2024-04-10 Thread Philippe Mathieu-Daudé
If a fragmented packet size is too short, do not try to calculate its checksum. Reproduced using: $ cat << EOF | qemu-system-i386 -display none -nodefaults \ -machine q35,accel=qtest -m 32M \ -device igb,netdev=net0 \

[PULL 09/16] hw/misc/applesmc: Do not call DeviceReset from DeviceRealize

2024-04-10 Thread Philippe Mathieu-Daudé
QDev core layer always call DeviceReset() after DeviceRealize(), no need to do it manually. Remove the extra call. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20240408095217.57239-2-phi...@linaro.org> --- hw/misc/applesmc.c | 1 - 1 file changed, 1 deletion(-)

[PULL 14/16] hw/sd/sdhci: Do not update TRNMOD when Command Inhibit (DAT) is set

2024-04-10 Thread Philippe Mathieu-Daudé
Per "SD Host Controller Standard Specification Version 3.00": * 2.2.5 Transfer Mode Register (Offset 00Ch) Writes to this register shall be ignored when the Command Inhibit (DAT) in the Present State register is 1. Do not update the TRNMOD register when Command Inhibit (DAT) bit is set

[PULL 05/16] qemu-options: Fix CXL Fixed Memory Window interleave-granularity typo

2024-04-10 Thread Philippe Mathieu-Daudé
From: Yuquan Wang Fix the unit typo of interleave-granularity of CXL Fixed Memory Window in qemu-option.hx. Fixes: 03b39fcf64 ("hw/cxl: Make the CFMW a machine parameter.") Signed-off-by: Yuquan Wang wangyuquan1...@phytium.com.cn Message-ID: <20240407083539.1488172-2-wangyuquan1...@phytium.com.c

[PULL 10/16] hw/misc/applesmc: Fix memory leak in reset() handler

2024-04-10 Thread Philippe Mathieu-Daudé
AppleSMCData is allocated with g_new0() in applesmc_add_key(): release it with g_free(). Leaked since commit 1ddda5cd36 ("AppleSMC device emulation"). Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2272 Reported-by: Zheyu Ma Signed-off-by: Philippe Mathieu-Dau

[PULL 07/16] hw/block/nand: Have blk_load() take unsigned offset and return boolean

2024-04-10 Thread Philippe Mathieu-Daudé
Negative offset is meaningless, use unsigned type. Return a boolean value indicating success. Reviewed-by: Richard Henderson Reviewed-by: Kevin Wolf Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240409135944.24997-3-phi...@linaro.org> --- hw/block/nand.c | 14 ++ 1 file chan

[PULL 04/16] hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs

2024-04-10 Thread Philippe Mathieu-Daudé
Replace qemu_bh_new_guarded() by virtio_bh_new_guarded() so the bus and device use the same guard. Otherwise the DMA-reentrancy protection can be bypassed. Fixes: CVE-2024-3446 Cc: qemu-sta...@nongnu.org Suggested-by: Alexander Bulekov Reviewed-by: Gerd Hoffmann Acked-by: Michael S. Tsirkin Sig

[PULL 11/16] backends/cryptodev: Do not abort for invalid session ID

2024-04-10 Thread Philippe Mathieu-Daudé
Instead of aborting when a session ID is invalid, return VIRTIO_CRYPTO_INVSESS ("Invalid session id"). Reproduced using: $ cat << EOF | qemu-system-i386 -display none \ -machine q35,accel=qtest -m 512M -nodefaults \ -object cryptodev-backend-builtin,id=cryptodev0 \ -device virtio

[PULL 00/16] Misc HW patches for 2024-04-10

2024-04-10 Thread Philippe Mathieu-Daudé
The following changes since commit 927284d65bce63ab1495d3febe7c7b5b6d563874: Merge tag 'edk2-20240409-pull-request' of https://gitlab.com/kraxel/qemu into staging (2024-04-09 17:36:40 +0100) are available in the Git repository at: https://github.com/philmd/qemu.git tags/hw-mis

[PULL 03/16] hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs

2024-04-10 Thread Philippe Mathieu-Daudé
Replace qemu_bh_new_guarded() by virtio_bh_new_guarded() so the bus and device use the same guard. Otherwise the DMA-reentrancy protection can be bypassed. Fixes: CVE-2024-3446 Cc: qemu-sta...@nongnu.org Suggested-by: Alexander Bulekov Reviewed-by: Gerd Hoffmann Acked-by: Michael S. Tsirkin Sig

Re: [PATCH] hw/audio/virtio-snd: Remove unused assignment

2024-04-10 Thread Philippe Mathieu-Daudé
On 10/4/24 07:37, Philippe Mathieu-Daudé wrote: Coverity reported: >>> CID 1542933: Code maintainability issues (UNUSED_VALUE) >>> CID 1542934: Code maintainability issues (UNUSED_VALUE) >>> Assigning value "NULL" to "stream" here, but that stored value is ove

Re: [PATCH v2 1/1] virtio-pci: Fix the crash that the vector was used after released.

2024-04-10 Thread Jason Wang
Offline: On Wed, Apr 10, 2024 at 2:28 PM Cindy Lu wrote: > > On Wed, Apr 10, 2024 at 1:36 PM Jason Wang wrote: > > > > On Wed, Apr 10, 2024 at 1:29 PM Cindy Lu wrote: > > > > > > When the guest triggers vhost_stop and then virtio_reset, the vector will > > > the > > > IRQFD for this vector wil

Re: [PATCH-for-9.0? v2] hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()

2024-04-10 Thread Philippe Mathieu-Daudé
On 10/4/24 09:35, Mauro Matteo Cascella wrote: Hi, On Wed, Apr 10, 2024 at 9:05 AM Philippe Mathieu-Daudé wrote: If a fragmented packet size is too short, do not try to calculate its checksum. This was assigned CVE-2024-3567. Thanks for the quick reaction! Reproduced using: $ cat <<

Re: [PATCH-for-9.0? v2] hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum()

2024-04-10 Thread Jason Wang
On Wed, Apr 10, 2024 at 3:06 PM Akihiko Odaki wrote: > > On 2024/04/10 16:04, Philippe Mathieu-Daudé wrote: > > If a fragmented packet size is too short, do not try to > > calculate its checksum. > > > > Reproduced using: > > > >$ cat << EOF | qemu-system-i386 -display none -nodefaults \ > >

Re: vhost-user-blk reconnect issue

2024-04-10 Thread Yajun Wu
On 4/2/2024 4:44 PM, Li Feng wrote: *External email: Use caution opening links or attachments* Hi, I tested it today and there is indeed a problem in this scenario. It seems that the first version of the patch is the best and can handle all scenarios. With this patch, the previously merged

[Stable-8.2.3 69/87] target/riscv: rvv: Remove the dependency of Zvfbfmin to Zfbfmin

2024-04-10 Thread Michael Tokarev
From: Max Chou According to the Zvfbfmin definition in the RISC-V BF16 extensions spec, the Zvfbfmin extension only requires either the V extension or the Zve32f extension. Signed-off-by: Max Chou Reviewed-by: Alistair Francis Message-ID: <20240321170929.1162507-1-max.c...@sifive.com> Signed-o

  1   2   >