[PATCH] hw/nvme: i/o cmd set independent namespace data structure

2024-09-19 Thread Arun Kumar
add support for i/o command set independent namespace data structure(cns=8h and cns=1fh) Signed-off-by: Klaus Jensen Signed-off-by: Arun Kumar --- hw/nvme/ctrl.c | 37 + hw/nvme/trace-events | 1 + include/block/nvme.h | 17 + 3 files c

Re: [PATCH v4 02/12] tcg/riscv: Add basic support for vector

2024-09-19 Thread 0x48 Swung
Hey everyone! Late to the party. Life happens sometimes ;) Just discovered this patch and this mail list, and I'd like to provide some background story here. I originally provided my initial implementation in a downstream repo last

Re: [PATCH] hw/char/stm32l4x5_usart.c: Enable USART ACK bit response

2024-09-19 Thread Michael Tokarev
On 20.09.2024 07:32, Michael Tokarev wrote: ... Though I'm a bit unsure about the target series. !2540 talks about 9.0.2, but 9.0 does not have 87b77e6e01ca which is being fixed by this change.  Is !2540 incorrect? Ah, n/m, !2540 does indeed mention in 9.0 the device were non-functional. So th

Re: [PATCH] hw/char/stm32l4x5_usart.c: Enable USART ACK bit response

2024-09-19 Thread Michael Tokarev
On 11.09.2024 07:32, Jacob Abrams wrote: SW modifying USART_CR1 TE bit should cuase HW to respond by altering USART_ISR TEACK bit, and likewise for RE and REACK bit. This resolves some but not all issues necessary for the official STM USART HAL driver to function as is. Fixes: 87b77e6e01ca ("hw

Re: [PATCH v4 02/12] tcg/riscv: Add basic support for vector

2024-09-19 Thread LIU Zhiwei
On 2024/9/20 12:01, 0x48 Swung wrote: Hey everyone! Late to the party. Life happens sometimes ;) Just discovered this patch and this mail list, and I'd like to provide some background story here. I originally provided my initial implementation in a downstream repo last year, namely https://gi

[ANNOUNCE] QEMU 9.0.3 Stable released

2024-09-19 Thread Michael Tokarev
Hi everyone, The QEMU v9.0.3 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source https://download.qemu.org/qemu-9.0.3.tar.xz https://download.qemu.org/qemu-9.0.3.tar.xz.sig (signature) v9.0.3 is now tagged in the o

[ANNOUNCE] QEMU 8.2.7 Stable released

2024-09-19 Thread Michael Tokarev
Hi everyone, The QEMU v8.2.7 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source https://download.qemu.org/qemu-8.2.7.tar.xz https://download.qemu.org/qemu-8.2.7.tar.xz.sig (signature) v8.2.7 is now tagged in the o

[ANNOUNCE] QEMU 7.2.14 Stable released

2024-09-19 Thread Michael Tokarev
Hi everyone, The QEMU v7.2.14 stable release is now available. You can grab the tarball from our download page here: https://www.qemu.org/download/#source https://download.qemu.org/qemu-7.2.14.tar.xz https://download.qemu.org/qemu-7.2.14.tar.xz.sig (signature) v7.2.14 is now tagged in t

Re: [PATCH v1 1/7] migration: Introduce structs for background sync

2024-09-19 Thread Yong Huang
On Fri, Sep 20, 2024 at 2:45 AM Peter Xu wrote: > On Tue, Sep 17, 2024 at 02:48:03PM +0800, Yong Huang wrote: > > On Tue, Sep 17, 2024 at 5:11 AM Fabiano Rosas wrote: > > > > > Hyman Huang writes: > > > > > > > shadow_bmap, iter_bmap and iter_dirty_pages are introduced > > > > to satisfy the ne

Re: [PATCH v1 1/7] migration: Introduce structs for background sync

2024-09-19 Thread Yong Huang
On Fri, Sep 20, 2024 at 2:45 AM Peter Xu wrote: > On Tue, Sep 17, 2024 at 02:48:03PM +0800, Yong Huang wrote: > > On Tue, Sep 17, 2024 at 5:11 AM Fabiano Rosas wrote: > > > > > Hyman Huang writes: > > > > > > > shadow_bmap, iter_bmap and iter_dirty_pages are introduced > > > > to satisfy the ne

Re: [PATCH v1 1/7] migration: Introduce structs for background sync

2024-09-19 Thread Yong Huang
On Fri, Sep 20, 2024 at 2:45 AM Peter Xu wrote: > On Tue, Sep 17, 2024 at 02:48:03PM +0800, Yong Huang wrote: > > On Tue, Sep 17, 2024 at 5:11 AM Fabiano Rosas wrote: > > > > > Hyman Huang writes: > > > > > > > shadow_bmap, iter_bmap and iter_dirty_pages are introduced > > > > to satisfy the ne

[PATCH v2 1/1] hw/nvme: add atomic write support

2024-09-19 Thread Alan Adamson
Adds support for the controller atomic parameters: AWUN and AWUPF. Atomic Compare and Write Unit (ACWU) is not currently supported. Writes that adhere to the ACWU and AWUPF parameters are guaranteed to be atomic. New NVMe QEMU Parameters (See NVMe Specification for details): atomic.dn (def

[PATCH v2 0/1] hw/nvme: add atomic write support

2024-09-19 Thread Alan Adamson
Changelog: v2: - Include changes suggested by Klaus - Check for READ/WRITE commmands when walking SQs. - Updated the "cover-letter" below with new fio example. = Since there is work in the Lin

Re: [PATCH v5 1/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Laurent Vivier
Le 19/09/2024 à 21:46, Michael Vogt a écrit : This commit adds support for the `openat2()` syscall in the `linux-user` userspace emulator. It is implemented by extracting a new helper `maybe_do_fake_open()` out of the exiting `do_guest_openat()` and share that with the new `do_guest_openat2()`.

[PATCH] {hw/ssi,docs/system/arm}: Allwinner A10 SPI emulation

2024-09-19 Thread Strahinja Jankovic
This patch implements Allwinner A10 SPI controller emulation. Only master-mode functionality is implemented. Since U-Boot and Linux SPI drivers for Allwinner A10 perform only byte-wide CPU access (no DMA) to the peripheral, the emulated controller does not implement DMA control and supports only b

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 09:49:57PM +0200, Maciej S. Szmigiero wrote: > On 10.09.2024 18:06, Peter Xu wrote: > > On Tue, Aug 27, 2024 at 07:54:31PM +0200, Maciej S. Szmigiero wrote: > > > +bool multifd_queue_device_state(char *idstr, uint32_t instance_id, > > > +char

Re: [PATCH v3 0/1] Add support for generating OpenSBI domains in the device tree

2024-09-19 Thread Gregor Haas
Hi Drew, On Tue, Sep 17, 2024 at 5:45 AM Andrew Jones wrote: > > On Mon, Sep 09, 2024 at 01:27:05PM GMT, Alistair Francis wrote: > > On Tue, Aug 6, 2024 at 7:05 AM Gregor Haas wrote: > > > > > > This patch series adds support for specifying OpenSBI domains on the QEMU > > > command line. A simpl

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 09:49:43PM +0200, Maciej S. Szmigiero wrote: > On 10.09.2024 21:48, Peter Xu wrote: > > On Wed, Aug 28, 2024 at 09:41:17PM -0300, Fabiano Rosas wrote: > > > > +size_t multifd_device_state_payload_size(void) > > > > +{ > > > > +return sizeof(MultiFDDeviceState_t); > > > >

Re: [PATCH v2 08/17] migration: Add load_finish handler and associated functions

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 09:49:10PM +0200, Maciej S. Szmigiero wrote: > On 9.09.2024 22:03, Peter Xu wrote: > > On Tue, Aug 27, 2024 at 07:54:27PM +0200, Maciej S. Szmigiero wrote: > > > From: "Maciej S. Szmigiero" > > > > > > load_finish SaveVMHandler allows migration code to poll whether > > > a

Re: [PATCH v2 06/17] migration: Add save_live_complete_precopy_{begin,end} handlers

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 09:47:53PM +0200, Maciej S. Szmigiero wrote: > On 9.09.2024 21:08, Peter Xu wrote: > > On Mon, Sep 09, 2024 at 08:32:45PM +0200, Maciej S. Szmigiero wrote: > > > On 9.09.2024 19:59, Peter Xu wrote: > > > > On Thu, Sep 05, 2024 at 04:45:48PM +0300, Avihai Horon wrote: > > > >

Re: [PATCH v5 1/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Laurent Vivier
Hi, your PATCH 1/1 doesn't appear to be a reply of PATCH 0/1 (mail header tag "In-Reply-To:"/"Reference") so it is not correctly collected by patchew.org. Do you have the 'thread' parameter for git-send-email? See my comments below: Le 19/09/2024 à 21:46, Michael Vogt a écrit : This commit

Re: [PULL 00/38] target-arm queue

2024-09-19 Thread Peter Maydell
ilable in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20240919 > > for you to fetch changes up to 89b30b4921e51bb47313d2d8fdc3d7bce987e4c5: > > docs/deve

Re: [PATCH v2 09/17] migration/multifd: Device state transfer support - receive side

2024-09-19 Thread Maciej S. Szmigiero
On 12.09.2024 15:52, Fabiano Rosas wrote: Avihai Horon writes: On 09/09/2024 21:05, Maciej S. Szmigiero wrote: External email: Use caution opening links or attachments On 5.09.2024 18:47, Avihai Horon wrote: On 27/08/2024 20:54, Maciej S. Szmigiero wrote: External email: Use caution open

Re: [PATCH] q35: Remove unused mch_mcfg_base

2024-09-19 Thread Dr. David Alan Gilbert
* Bernhard Beschow (shen...@gmail.com) wrote: > > > Am 18. September 2024 00:51:32 UTC schrieb d...@treblig.org: > >From: "Dr. David Alan Gilbert" > > > >mch_mcfg_base has been unused since it was added by > > 6f1426ab0f ("ich9: APIs for pc guest info") > >back in 2013. > > Indeed. > > > > >R

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-19 Thread Maciej S. Szmigiero
On 17.09.2024 19:50, Peter Xu wrote: On Tue, Sep 17, 2024 at 07:07:10PM +0200, Cédric Le Goater wrote: [ ... ] I as a patch writer always like to do that when it's essential. Normally the case is I don't have enough reviewer resources to help me get a better design, or discuss about it. Rig

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-19 Thread Maciej S. Szmigiero
On 9.09.2024 21:40, Peter Xu wrote: On Fri, Aug 30, 2024 at 10:02:40AM -0300, Fabiano Rosas wrote: @@ -397,20 +404,16 @@ bool multifd_send(MultiFDSendData **send_data) p = &multifd_send_state->params[i]; /* - * Lockless read to p->pending_job is safe, because o

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-19 Thread Maciej S. Szmigiero
On 10.09.2024 18:06, Peter Xu wrote: On Tue, Aug 27, 2024 at 07:54:31PM +0200, Maciej S. Szmigiero wrote: +bool multifd_queue_device_state(char *idstr, uint32_t instance_id, +char *data, size_t len) +{ +/* Device state submissions can come from multiple thread

Re: [PATCH v2 09/17] migration/multifd: Device state transfer support - receive side

2024-09-19 Thread Maciej S. Szmigiero
On 9.09.2024 21:52, Peter Xu wrote: On Mon, Sep 02, 2024 at 10:12:01PM +0200, Maciej S. Szmigiero wrote: diff --git a/migration/multifd.h b/migration/multifd.h index a3e35196d179..a8f3e4838c01 100644 --- a/migration/multifd.h +++ b/migration/multifd.h @@ -45,6 +45,12 @@ MultiFDRecvData *multifd_

Re: [PATCH v2 12/17] migration/multifd: Device state transfer support - send side

2024-09-19 Thread Maciej S. Szmigiero
On 10.09.2024 21:48, Peter Xu wrote: On Wed, Aug 28, 2024 at 09:41:17PM -0300, Fabiano Rosas wrote: +size_t multifd_device_state_payload_size(void) +{ +return sizeof(MultiFDDeviceState_t); +} This will not be necessary because the payload size is the same as the data type. We only need it

Re: [PATCH v2 08/17] migration: Add load_finish handler and associated functions

2024-09-19 Thread Maciej S. Szmigiero
On 9.09.2024 22:03, Peter Xu wrote: On Tue, Aug 27, 2024 at 07:54:27PM +0200, Maciej S. Szmigiero wrote: From: "Maciej S. Szmigiero" load_finish SaveVMHandler allows migration code to poll whether a device-specific asynchronous device state loading operation had finished. In order to avoid ca

[PATCH v5 1/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Michael Vogt
This commit adds support for the `openat2()` syscall in the `linux-user` userspace emulator. It is implemented by extracting a new helper `maybe_do_fake_open()` out of the exiting `do_guest_openat()` and share that with the new `do_guest_openat2()`. Unfortunately we cannot just make do_guest_opena

[PATCH v5 0/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Michael Vogt
Hi, This is v5 of the openat2 support in linux-user. Thanks for the excellent feedback from Laurent Vivier on v4. This version is very close to v4 and only tweaks/simplifies based on the code review comments from Laurent, see the below changes for details. Thanks again, Michael v4 -> v5 - drop

Re: [PATCH v2 06/17] migration: Add save_live_complete_precopy_{begin,end} handlers

2024-09-19 Thread Maciej S. Szmigiero
On 9.09.2024 21:08, Peter Xu wrote: On Mon, Sep 09, 2024 at 08:32:45PM +0200, Maciej S. Szmigiero wrote: On 9.09.2024 19:59, Peter Xu wrote: On Thu, Sep 05, 2024 at 04:45:48PM +0300, Avihai Horon wrote: On 27/08/2024 20:54, Maciej S. Szmigiero wrote: External email: Use caution opening links

Re: [PATCH v2 06/17] migration: Add save_live_complete_precopy_{begin,end} handlers

2024-09-19 Thread Maciej S. Szmigiero
On 9.09.2024 21:32, Peter Xu wrote: On Mon, Sep 09, 2024 at 03:08:40PM -0400, Peter Xu wrote: On Mon, Sep 09, 2024 at 08:32:45PM +0200, Maciej S. Szmigiero wrote: On 9.09.2024 19:59, Peter Xu wrote: On Thu, Sep 05, 2024 at 04:45:48PM +0300, Avihai Horon wrote: On 27/08/2024 20:54, Maciej S.

[PATCH 7/7] tests/functional: Convert the r2d sh4 Avocado test

2024-09-19 Thread Thomas Huth
This is the last test that is using the do_test_advcal_2018() function, so we can now remove that function from boot_linux_console.py, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 25 --- tests/functiona

[PATCH 6/7] tests/functional: Convert the mac ppc Avocado tests

2024-09-19 Thread Thomas Huth
The g3beige and mac99 tests use the same asset, so put them together in a new test_ppc_mac.py file. Signed-off-by: Thomas Huth --- MAINTAINERS | 2 ++ tests/avocado/boot_linux_console.py | 30 --- tests/functional/meson.build| 1 + tests/func

[PATCH 3/7] tests/functional: Convert the xtensa lx60 Avocado test

2024-09-19 Thread Thomas Huth
Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 9 - tests/functional/meson.build | 4 tests/functional/test_xtensa_lx60.py | 26

[PATCH 2/7] tests/functional: Convert the vexpressa9 Avocado test

2024-09-19 Thread Thomas Huth
Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 9 - tests/functional/meson.build | 1 + tests/functional/test_arm_vexpress.py | 26 +++

[PATCH 0/7] tests/functional: Convert the advent calendar tests

2024-09-19 Thread Thomas Huth
Convert the advent calendar avocado tests to the new functional framework. Since most tests are doing pretty much the same (add a "-kernel" parameter and maybe "-initrd" and "-dtb", then launch QEMU and wait for a string on the serial console), we first introduce a helper function to shorten this r

[PATCH 5/7] tests/functional: Convert the e500 ppc64 Avocado test

2024-09-19 Thread Thomas Huth
Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 11 --- tests/functional/meson.build| 1 + tests/functional/test_ppc64_e500.py | 25 +

[PATCH 4/7] tests/functional: Convert the SPARCStation Avocado test

2024-09-19 Thread Thomas Huth
Use the new launch_kernel function to convert this test in a simple way. Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + tests/avocado/boot_linux_console.py | 8 tests/functional/meson.build | 4 tests/functional/test_sparc_sun4m.py | 25 +

[PATCH 1/7] tests/functional/qemu_test: Add a function for launching kernels more easily

2024-09-19 Thread Thomas Huth
The task for launching a kernel is quite repetitive: Set the serial console, set the -kernel and maybe -initrd and -dtb parameters, launch the VM and then wait for the expected console output. So it's easier in some tests to provide these steps via a separate function. Signed-off-by: Thomas Huth

Re: [PATCH v1 1/7] migration: Introduce structs for background sync

2024-09-19 Thread Peter Xu
On Tue, Sep 17, 2024 at 02:48:03PM +0800, Yong Huang wrote: > On Tue, Sep 17, 2024 at 5:11 AM Fabiano Rosas wrote: > > > Hyman Huang writes: > > > > > shadow_bmap, iter_bmap and iter_dirty_pages are introduced > > > to satisfy the need for background sync. > > > > > > Meanwhile, introduce enumer

Re: [PATCH] q35: Remove unused mch_mcfg_base

2024-09-19 Thread Bernhard Beschow
Am 18. September 2024 00:51:32 UTC schrieb d...@treblig.org: >From: "Dr. David Alan Gilbert" > >mch_mcfg_base has been unused since it was added by > 6f1426ab0f ("ich9: APIs for pc guest info") >back in 2013. Indeed. > >Remove it. > >Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Bernh

Re: [PATCH v3] i386/cpu: fixup number of addressable IDs for logical processors in the physical package

2024-09-19 Thread Zhao Liu
Hi Chuang and Igor, Sorry for late reply, On Wed, Sep 18, 2024 at 09:18:15PM +0800, Chuang Xu wrote: > Date: Wed, 18 Sep 2024 21:18:15 +0800 > From: Chuang Xu > Subject: [PATCH v3] i386/cpu: fixup number of addressable IDs for logical > processors in the physical package > X-Mailer: git-send-em

Re: [PATCH v2 6/7] migration/postcopy: Use uffd helpers

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 02:46:25PM +0100, d...@treblig.org wrote: > From: "Dr. David Alan Gilbert" > > Use the uffd_copy_page, uffd_zero_page and uffd_wakeup helpers > rather than calling ioctl ourselves. > > They return -errno on error, and print an error_report themselves. > I think this actua

Re: [PATCH v1 1/4] xen: Expose handle_bufioreq in xen_register_ioreq

2024-09-19 Thread Edgar E. Iglesias
On Mon, Sep 16, 2024 at 04:45:34PM -0700, Stefano Stabellini wrote: > On Mon, 16 Sep 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Expose handle_bufioreq in xen_register_ioreq(). > > This is to allow machines to enable or disable buffered ioreqs. > > > > No functional chan

Re: [PATCH] migration/multifd: Ensure packet->ramblock is null-terminated

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 12:06:11PM -0300, Fabiano Rosas wrote: > Coverity points out that the current usage of strncpy to write the > ramblock name allows the field to not have an ending '\0' in case > idstr is already not null-terminated (e.g. if it's larger than 256 > bytes). > > This is current

Re: [PATCH v2 5/7] util/userfaultfd: Return -errno on error

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 02:46:24PM +0100, d...@treblig.org wrote: > From: "Dr. David Alan Gilbert" > > Convert (the currently unused) uffd_wakeup, uffd_copy_page and > uffd_zero_page to return -errno on error rather than -1. > > That will make it easier to reuse in postcopy. > > Signed-off-by:

Re: [PATCH v2 3/7] migration: Deprecate zero-blocks capability

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 02:46:22PM +0100, d...@treblig.org wrote: > From: Fabiano Rosas > > The zero-blocks capability was meant to be used along with the block > migration, which has been removed already in commit eef0bae3a7 > ("migration: Remove block migration"). > > Setting zero-blocks is cu

Re: [PATCH v2 7/7] util/userfaultfd: Remove unused uffd_poll_events

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 02:46:26PM +0100, d...@treblig.org wrote: > From: "Dr. David Alan Gilbert" > > uffd_poll_events has been unused since it was added; it's also > just a wrapper around a plain old poll call, so doesn't add anything. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: P

Re: [PATCH v2 2/7] migration: Remove unused migrate_zero_blocks

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 02:46:21PM +0100, d...@treblig.org wrote: > From: "Dr. David Alan Gilbert" > > migrate_zero_blocks is unused since > eef0bae3a7 ("migration: Remove block migration") > > Remove it. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu -- Peter Xu

[PULL v2 00/18] tcg plugins (deprecations, mem apis, contrib plugins)

2024-09-19 Thread Alex Bennée
The following changes since commit 14556211bc6d7125a44d5b5df90caba019b0ec0e: Merge tag 'qemu-macppc-20240918' of https://github.com/mcayland/qemu into staging (2024-09-18 20:59:10 +0100) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-tcg-plugin-memory-

Re: [PATCH] remote: Remove unused remote_iohub_finalize

2024-09-19 Thread Jag Raman
> On Sep 19, 2024, at 12:59 PM, d...@treblig.org wrote: > > From: "Dr. David Alan Gilbert" > > remote_iohub_finalize has never been used. > > Remove it. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Jagannathan Raman Thanks, Dave! > --- > hw/remote/iohub.c | 13

[PATCH] remote: Remove unused remote_iohub_finalize

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" remote_iohub_finalize has never been used. Remove it. Signed-off-by: Dr. David Alan Gilbert --- hw/remote/iohub.c | 13 - include/hw/remote/iohub.h | 1 - 2 files changed, 14 deletions(-) diff --git a/hw/remote/iohub.c b/hw/remote/iohub.c i

Re: [RFC RESEND 0/6] hugetlbfs largepage RAS project

2024-09-19 Thread William Roche
Hello David, I hope my last week email answered your interrogations about:     - retrieving the valid data from the lost hugepage     - the need of smaller pages to replace a failed large page     - the interaction of memory error and VM migration     - the non-symmetrical access to a poisoned me

Re: [PULL v2 0/6] Migration 20240917 patches

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 12:29:43PM -0400, Peter Xu wrote: > > > CID 1527402: In migrate_fd_cleanup() Coverity thinks there's > > > a race because we read s->to_dst_file in the "if (s->to_dst_file)" > > > check without holding the qemu_file_lock. This might be a > > > false-positive because the race

[PATCH] migration: Cleanup migrate_fd_cleanup() on accessing to_dst_file

2024-09-19 Thread Peter Xu
The cleanup function can in many cases needs cleanup on its own. The major thing we want to do here is not referencing to_dst_file when without the file mutex. When at it, touch things elsewhere too to make it look slightly better in general. One thing to mention is, migration_thread has its own

Re: [PULL v2 0/6] Migration 20240917 patches

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 11:05:28AM -0300, Fabiano Rosas wrote: > Peter Maydell writes: > > > On Thu, 19 Sept 2024 at 12:59, Peter Xu wrote: > >> > >> On Thu, Sep 19, 2024 at 10:08:25AM +0100, Peter Maydell wrote: > >> > Thanks for looking at the issues with the migration tests. > >> > This run w

Re: [PATCH V2] arm/kvm: add support for MTE

2024-09-19 Thread Cornelia Huck
On Thu, Sep 19 2024, Ganapatrao Kulkarni wrote: > I have modified as below diff to keep TCG if loop as it is and adding if > for KVM case to clear/mask the MTE bits if MTE in KVM mode is not > enabled by user command(if no mte=on). > > Is below diff makes sense? > > diff --git a/target/arm/cpu

Re: [PATCH v4 1/1] linux-user: add openat2 support in linux-user

2024-09-19 Thread Laurent Vivier
Le 06/09/2024 à 09:39, Michael Vogt a écrit : This commit adds support for the `openat2()` syscall in the `linux-user` userspace emulator. It is implemented by extracting a new helper `maybe_do_fake_open()` out of the exiting `do_guest_openat()` and share that with the new `do_guest_openat2()`.

Disabling Monitor Commands

2024-09-19 Thread Richard Schmitt
We would like to deploy a hardened version of QEMU where certain monitor commands are disabled. I have found references on the web to a `-monitor-disable-cmds` option to qemu yet it appears non standard and not in the mail tree. Is anyone familiar with a fork of QEMU that supports this option?

Re: [PATCH V2] arm/kvm: add support for MTE

2024-09-19 Thread Ganapatrao Kulkarni
On 19-09-2024 08:35 pm, Cornelia Huck wrote: On Thu, Sep 19 2024, Ganapatrao Kulkarni wrote: I have modified as below diff to keep TCG if loop as it is and adding if for KVM case to clear/mask the MTE bits if MTE in KVM mode is not enabled by user command(if no mte=on). Is below diff make

[PATCH] migration/multifd: Ensure packet->ramblock is null-terminated

2024-09-19 Thread Fabiano Rosas
Coverity points out that the current usage of strncpy to write the ramblock name allows the field to not have an ending '\0' in case idstr is already not null-terminated (e.g. if it's larger than 256 bytes). This is currently harmless because the packet->ramblock field is never touched again on th

Re: [PATCH v1 2/4] hw/xen: xenpvh: Disable buffered IOREQs for ARM

2024-09-19 Thread Edgar E. Iglesias
On Mon, Sep 16, 2024 at 04:47:43PM -0700, Stefano Stabellini wrote: > On Mon, 16 Sep 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Add a way to enable/disable buffered IOREQs for PVH machines > > and disable them for ARM. ARM does not support buffered > > IOREQ's nor the le

Re: of remote_iohub_finalize

2024-09-19 Thread Jag Raman
Hi Dave, Thanks for checking! remote_iohub_finalize() is a relic from when remote iohub was a separate type. We aren't calling it anywhere; we can remove it. Cheers, Jag > On Sep 18, 2024, at 1:00 PM, Dr. David Alan Gilbert wrote: > > Hi Jag, > One of my scripts noticed that 'remote_iohub_f

Re: of remote_iohub_finalize

2024-09-19 Thread Dr. David Alan Gilbert
* Jag Raman (jag.ra...@oracle.com) wrote: > Hi Dave, > > Thanks for checking! > > remote_iohub_finalize() is a relic from when remote iohub was a separate > type. We aren't calling it anywhere; we can remove it. OK, I'll send a patch later. Dave > Cheers, > Jag > > > On Sep 18, 2024, at 1:00

[PATCH] tests/docker: Fix microblaze atomics

2024-09-19 Thread Ilya Leoshkevich
GCC produces invalid code for microblaze atomics. The fix is unfortunately not upstream, so fetch it from an external location and apply it locally. Suggested-by: Peter Maydell Signed-off-by: Ilya Leoshkevich --- .../debian-microblaze-cross.d/build-toolchain.sh | 8 tests/doc

[PATCH v2] qemu-timer: Remove unused timer functions

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" qemu_clock_get_main_loop_timerlist and timerlist_get_clock have been unused since they were originally added in ff83c66ecc ("aio / timers: Split QEMUClock into QEMUClock and QEMUTimerList") Remove them. Signed-off-by: Dr. David Alan Gilbert --- include/qemu/ti

Re: [PATCH] qemu-timer: Remove unused qemu_clock_get_main_loop_timerlist

2024-09-19 Thread Dr. David Alan Gilbert
* d...@treblig.org (d...@treblig.org) wrote: > From: "Dr. David Alan Gilbert" > > qemu_clock_get_main_loop_timerlist has been unused since it was > originally added in > ff83c66ecc ("aio / timers: Split QEMUClock into QEMUClock and > QEMUTimerList") > > Remove it. > > Signed-off-by: Dr. Davi

Re: [PULL 00/18] tcg plugins (deprecations, mem apis, contrib plugins)

2024-09-19 Thread Alex Bennée
Peter Maydell writes: > On Thu, 19 Sept 2024 at 14:11, Alex Bennée wrote: >> >> Peter Maydell writes: >> > While I'm looking at the code, this caught my eye: >> > >> > case QEMU_PLUGIN_MEM_VALUE_U64: >> > { >> > uint64_t *p = (uint64_t *) &ri->data[offset]; >> > uint64_t

Re: [PULL v2 0/6] Migration 20240917 patches

2024-09-19 Thread Fabiano Rosas
Peter Maydell writes: > On Thu, 19 Sept 2024 at 12:59, Peter Xu wrote: >> >> On Thu, Sep 19, 2024 at 10:08:25AM +0100, Peter Maydell wrote: >> > Thanks for looking at the issues with the migration tests. >> > This run went through first time without my needing to retry any >> > jobs, so fingers

[PATCH v2 6/7] migration/postcopy: Use uffd helpers

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" Use the uffd_copy_page, uffd_zero_page and uffd_wakeup helpers rather than calling ioctl ourselves. They return -errno on error, and print an error_report themselves. I think this actually makes postcopy_place_page actually more consistent in it's callers. Signed-

[PATCH v2 7/7] util/userfaultfd: Remove unused uffd_poll_events

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" uffd_poll_events has been unused since it was added; it's also just a wrapper around a plain old poll call, so doesn't add anything. Signed-off-by: Dr. David Alan Gilbert --- include/qemu/userfaultfd.h | 1 - util/userfaultfd.c | 28 -

Re: [PATCH v3 1/1] virtio-pci: Add lookup subregion of VirtIOPCIRegion MR

2024-09-19 Thread Gao,Shiyuan
>> Now virtio_address_space_lookup only lookup common/isr/device/notify >> MR and exclude their subregions. >> >> When VHOST_USER_PROTOCOL_F_HOST_NOTIFIER enable, the notify MR has >> host-notifier subregions and we need use host-notifier MR to >> notify the hardware accelerator directly instead of

Re: [PATCH] tests/tcg/multiarch: Define _LARGEFILE64_SOURCE

2024-09-19 Thread Brian Cain
On 9/16/2024 11:31 AM, Brian Cain wrote: On 9/16/2024 11:05 AM, Brian Cain wrote: On 9/16/2024 10:47 AM, Alex Bennée wrote: Brian Cain writes: On 9/16/2024 8:12 AM, Alex Bennée wrote: Brian Cain writes: On 9/6/2024 9:39 PM, Brian Cain wrote: With newer clang builds (19.x), there's a

[PATCH v2 1/7] migration: Remove migrate_cap_set

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" migrate_cap_set has been unused since 18d154f575 ("migration: Remove 'blk/-b' option from migrate commands") Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Fabiano Rosas --- migration/options.c | 20 migration/options.h |

[PATCH v2 5/7] util/userfaultfd: Return -errno on error

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" Convert (the currently unused) uffd_wakeup, uffd_copy_page and uffd_zero_page to return -errno on error rather than -1. That will make it easier to reuse in postcopy. Signed-off-by: Dr. David Alan Gilbert --- util/userfaultfd.c | 21 - 1 file

[PATCH v2 4/7] migration: Remove unused socket_send_channel_create_sync

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" socket_send_channel_create_sync only use was removed by d0edb8a173 ("migration: Create the postcopy preempt channel asynchronously") Remove it. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Fabiano Rosas --- migration/socket.c | 18 -- mi

[PATCH v2 2/7] migration: Remove unused migrate_zero_blocks

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" migrate_zero_blocks is unused since eef0bae3a7 ("migration: Remove block migration") Remove it. Signed-off-by: Dr. David Alan Gilbert --- migration/options.c | 7 --- migration/options.h | 1 - 2 files changed, 8 deletions(-) diff --git a/migration/option

[PATCH v2 3/7] migration: Deprecate zero-blocks capability

2024-09-19 Thread dave
From: Fabiano Rosas The zero-blocks capability was meant to be used along with the block migration, which has been removed already in commit eef0bae3a7 ("migration: Remove block migration"). Setting zero-blocks is currently a noop, but the outright removal of the capability would cause and error

[PATCH v2 0/7] Migration deadcode removal

2024-09-19 Thread dave
From: "Dr. David Alan Gilbert" This is a set of deadcode removal around migration found by looking for unused symbols. v2 Don't remove the zero-blocks capability yet add Fabiano's deprecation text patch. Use the uffd helpers in postcopy rather than removing most of them. Remov

Re: [PULL v2 0/6] Migration 20240917 patches

2024-09-19 Thread Peter Maydell
On Thu, 19 Sept 2024 at 12:59, Peter Xu wrote: > > On Thu, Sep 19, 2024 at 10:08:25AM +0100, Peter Maydell wrote: > > Thanks for looking at the issues with the migration tests. > > This run went through first time without my needing to retry any > > jobs, so fingers crossed that we have at least i

Re: [PATCH 2/3] migration: Remove unused zero-blocks capability

2024-09-19 Thread Peter Xu
On Thu, Sep 19, 2024 at 01:00:34PM +, Dr. David Alan Gilbert wrote: > * Fabiano Rosas (faro...@suse.de) wrote: > > Markus Armbruster writes: > > > > > Peter Xu writes: > > > > > >> On Wed, Sep 18, 2024 at 07:52:56AM +0200, Markus Armbruster wrote: > > >>> d...@treblig.org writes: > > >>> >

[PATCH] target/i386: Add more features enumerated by CPUID.7.2.EDX

2024-09-19 Thread Chao Gao
Following 5 bits in CPUID.7.2.EDX are supported by KVM. Add their supports in QEMU. Each of them indicates certain bits of IA32_SPEC_CTRL are supported. Those bits can control CPU speculation behavior which can be used to defend against side-channel attacks. bit0: intel-psfd if 1, indicates bit

[PULL 33/38] tests: expand timeout information for aarch64/sbsa-ref

2024-09-19 Thread Peter Maydell
From: Marcin Juszkiewicz 'Test might timeout' means nothing. Replace it with useful information that it is emulation of pointer authentication what makes this test run too long. Signed-off-by: Marcin Juszkiewicz Message-id: 20240910-b4-move-to-freebsd-v5-3-0fb66d803...@linaro.org Reviewed-by: P

[PULL 09/38] target/arm: Simplify do_reduction_op

2024-09-19 Thread Peter Maydell
From: Richard Henderson Use simple shift and add instead of ctpop, ctz, shift and mask. Unlike SVE, there is no predicate to disable elements. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-10-richard.hender...@linaro.org Signed-off-by: Peter May

[PULL 23/38] target/arm: Convert handle_scalar_simd_shri to decodetree

2024-09-19 Thread Peter Maydell
From: Richard Henderson This includes SSHR, USHR, SSRA, USRA, SRSHR, URSHR, SRSRA, URSRA, SRI. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-24-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 16

[PULL 13/38] target/arm: Convert MOVI, FMOV, ORR, BIC (vector immediate) to decodetree

2024-09-19 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-14-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 9 +++ target/arm/tcg/translate-a64.c | 117 ++

[PULL 26/38] target/arm: Widen NeonGenNarrowEnvFn return to 64 bits

2024-09-19 Thread Peter Maydell
From: Richard Henderson While these functions really do return a 32-bit value, widening the return type means that we need do less marshalling between TCG types. Remove NeonGenNarrowEnvFn typedef; add NeonGenOne64OpEnvFn. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id:

[PULL 07/38] target/arm: Convert TBL, TBX to decodetree

2024-09-19 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-8-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 4 +++ target/arm/tcg/translate-a64.c |

[PULL 38/38] docs/devel: Remove nested-papr.txt

2024-09-19 Thread Peter Maydell
docs/devel/nested-papr.txt is entirely (apart from the initial paragraph) a partial copy of the kernel documentation https://docs.kernel.org/arch/powerpc/kvm-nested.html There's no benefit to the QEMU docs to converting this to rST, so instead delete it. Anybody needing to know the API and protoco

[PULL 18/38] target/arm: Use {, s}extract in handle_vec_simd_wshli

2024-09-19 Thread Peter Maydell
From: Richard Henderson Combine the right shift with the extension via the tcg extract operations. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-19-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/translate-a64.c |

[PULL 20/38] target/arm: Push tcg_rnd into handle_shri_with_rndacc

2024-09-19 Thread Peter Maydell
From: Richard Henderson We always pass the same value for round; compute it within common code. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-21-richard.hender...@linaro.org Signed-off-by: Peter Maydell ---

[PULL 17/38] target/arm: Convert handle_vec_simd_shli to decodetree

2024-09-19 Thread Peter Maydell
From: Richard Henderson This includes SHL and SLI. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-18-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 15 +++ target/arm/tcg/translate-a64

Re: [PULL 00/18] tcg plugins (deprecations, mem apis, contrib plugins)

2024-09-19 Thread Peter Maydell
On Thu, 19 Sept 2024 at 14:11, Alex Bennée wrote: > > Peter Maydell writes: > > While I'm looking at the code, this caught my eye: > > > > case QEMU_PLUGIN_MEM_VALUE_U64: > > { > > uint64_t *p = (uint64_t *) &ri->data[offset]; > > uint64_t val = be ? htobe64(value.data.u64

[PULL 15/38] target/arm: Fix whitespace near gen_srshr64_i64

2024-09-19 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-16-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/gengvec.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PULL 28/38] target/arm: Convert vector [US]QSHRN, [US]QRSHRN, SQSHRUN to decodetree

2024-09-19 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-29-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 24 + target/arm/tcg/translate-a64.c | 176

[PULL 11/38] target/arm: Convert FMAXNMV, FMINNMV, FMAXV, FMINV to decodetree

2024-09-19 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-12-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 14 +++ target/arm/tcg/translate-a64.c | 176 ++

[PULL 08/38] target/arm: Convert UZP, TRN, ZIP to decodetree

2024-09-19 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20240912024114.1097832-9-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/a64.decode | 9 ++ target/arm/tcg/translate-a64.c | 158 ++--

  1   2   >