Re: [PULL 3/6] qemu/osdep: Split qemu_close_all_open_fd() and add fallback

2024-08-29 Thread Daniel P . Berrangé
On Thu, Aug 29, 2024 at 08:47:27AM +1000, Richard Henderson wrote: > On 8/28/24 22:48, Daniel P. Berrangé wrote: > > > dir = opendir("/proc/self/fd"); > > > > IIUC from previous threads this is valid on Linux and on Solaris. > > > > On FreeBSD & macOS, you need /dev/fd though. > > Fair, bu

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Michael S. Tsirkin
On Wed, Aug 28, 2024 at 03:39:14PM +0530, Prasad Pandit wrote: > From: Prasad Pandit > > QEMU threads use vhost_user_write/read calls to send > and receive request/reply messages from a vhost-user > device. When multiple threads communicate with the > same vhost-user device, they can receive each

[PATCH 0/2] linux-user/syscall.c remove explicit mentions of LFS

2024-08-29 Thread Michael Tokarev
Qemu is always built with -D_FILE_OFFSET_BITS=64, so there's no need to use 64bit variants of file functions explicitly, since regular variants of all functions and structs are 64bit automatically. Michael Tokarev (2): linux-user/syscall.c: drop 64 suffix from flock64 &Co linux-user/syscall.c:

[PATCH 2/2] linux-user/syscall.c: eliminate other explicit LFS usages

2024-08-29 Thread Michael Tokarev
Since we alwasy build with LFS enabled, and with -D_FILE_OFFSET_BITS=64 in particular, there is no need to use 64bit versions of various system calls and constants, regular ones will do just fine. Eliminate a few last uses of the following constructs in linux-user/syscall.c: off64_t ftruncate6

[PATCH] mark with for-crc32 in a consistent manner

2024-08-29 Thread Michael Tokarev
in many cases, is only included for crc32 function, and in some of them, there's a comment saying that, but in a different way. In one place (hw/net/rtl8139.c), there was another #include added between the comment and include. Make all such comments to be on the same line as #include, make it c

qemu-devel@nongnu.org

2024-08-29 Thread Michael Tokarev
Since we are always building with LFS enabled, in particular with -D_FILE_OFFSET_BITS=64, we should always have struct flock mapped to the 64bit variant (with off64_t), and F_GETLK mapped to F_GETLK64 etc, automatically. So there should be no need to explicitly use the "64" suffix for these things

Re: [PATCH] mark with for-crc32 in a consistent manner

2024-08-29 Thread Michael Tokarev
29.08.2024 10:52, Michael Tokarev wrote: ... This is a resent which shouldn't be here (a forgotten 0001-foo.patch in the working dir). Please ignore :) /mjt

Re: [PATCH v5 7/8] machine/nitro-enclave: New machine type for AWS Nitro Enclaves

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 28, 2024 at 09:50:25PM +0600, Dorjoy Chowdhury wrote: > Hi Daniel, > > On Wed, Aug 28, 2024 at 9:39 PM Daniel P. Berrangé > wrote: > > > > On Thu, Aug 22, 2024 at 09:08:48PM +0600, Dorjoy Chowdhury wrote: > > > AWS nitro enclaves[1] is an Amazon EC2[2] feature that allows creating >

Re: [PATCH 03/13] ppc/xive2: Support TIMA "Pull OS Context to Odd Thread Reporting Line"

2024-08-29 Thread Cédric Le Goater
On 8/1/24 22:29, Michael Kowal wrote: From: Frederic Barrat Adds support for single byte writes to offset 0xC18 of the TIMA address space. When this offset is written to, the hardware disables the OS context and copies the current state information to the odd cache line of the pair specified b

[PATCH] target/riscv: Stop timer with infinite timecmp

2024-08-29 Thread Andrew Jones
While the spec doesn't state it, setting timecmp to UINT64_MAX is another way to stop a timer, as it's considered setting the next timer event to occur at infinity. And, even if the time CSR does eventually reach UINT64_MAX, the very next tick will bring it back to zero, once again less than timecm

[PATCH v10 06/10] block/nvme: add reservation command protocol constants

2024-08-29 Thread Changqi Lu
Add constants for the NVMe persistent command protocol. The constants include the reservation command opcode and reservation type values defined in section 7 of the NVMe 2.0 specification. Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/block/nvme.h

[PATCH v10 01/10] block: add persistent reservation in/out api

2024-08-29 Thread Changqi Lu
Add persistent reservation in/out operations at the block level. The following operations are included: - read_keys:retrieves the list of registered keys. - read_reservation: retrieves the current reservation status. - register: registers a new reservation key. - reserve:

[PATCH v10 05/10] hw/scsi: add persistent reservation in/out api for scsi device

2024-08-29 Thread Changqi Lu
Add persistent reservation in/out operations in the SCSI device layer. By introducing the persistent reservation in/out api, this enables the SCSI device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservation keys, initiating and releasin

[PATCH v10 10/10] block/iscsi: add persistent reservation in/out driver

2024-08-29 Thread Changqi Lu
Add persistent reservation in/out operations for iscsi driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by: z

[PATCH v10 00/10] Support persistent reservation operations

2024-08-29 Thread Changqi Lu
Hi, Patch v10 has been modified, thanks to Klaus for the code review. v9->v10: - When the driver does not support the pr operation, the error code returned by nvme changes to Invalid Command Opcode. v8->v9: - Fix double-free and remove persistent reservation operations at nvme_is_write(). v7

[PATCH v10 02/10] block/raw: add persistent reservation in/out driver

2024-08-29 Thread Changqi Lu
Add persistent reservation in/out operations for raw driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by: zhe

[PATCH v10 07/10] hw/nvme: add helper functions for converting reservation types

2024-08-29 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the reservation types used in the NVME protocol and those used in the block layer. Reviewed-by: Klaus Jensen Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/nvme.h |

[PATCH v10 08/10] hw/nvme: enable ONCS and rescap function

2024-08-29 Thread Changqi Lu
This commit enables ONCS to support the reservation function at the controller level. Also enables rescap function in the namespace by detecting the supported reservation function in the backend driver. Reviewed-by: Klaus Jensen Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi Reviewed-by: S

[PATCH v10 04/10] scsi/util: add helper functions for persistent reservation types conversion

2024-08-29 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the persistent reservation types used in the SCSI protocol and those used in the block layer. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi Reviewed-by: Stefan Hajnoczi --- include/scsi/utils.h | 8 +

[PATCH v10 03/10] scsi/constant: add persistent reservation in/out protocol constants

2024-08-29 Thread Changqi Lu
Add constants for the persistent reservation in/out protocol in the scsi/constant module. The constants include the persistent reservation command, type, and scope values defined in sections 6.13 and 6.14 of the SCSI Primary Commands-4 (SPC-4) specification. Signed-off-by: Changqi Lu Signed-off-b

[PATCH v10 09/10] hw/nvme: add reservation protocal command

2024-08-29 Thread Changqi Lu
Add reservation acquire, reservation register, reservation release and reservation report commands in the nvme device layer. By introducing these commands, this enables the nvme device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservati

Re: [PATCH 06/13] ppc/xive2: Dump the VP-group and crowd tables with 'info pic'

2024-08-29 Thread Cédric Le Goater
On 8/1/24 22:30, Michael Kowal wrote: From: Frederic Barrat The 'info pic' HMP command dumps the state of the interrupt controller. Add the dump of the NVG and NVC tables to its output to ease debug. Signed-off-by: Frederic Barrat Signed-off-by: Michael Kowal --- include/hw/ppc/xive2.h

Re: [PATCH v7 6/6] tests/tcg/multiarch: add test for plugin memory access

2024-08-29 Thread Alex Bennée
Pierrick Bouvier writes: > Add an explicit test to check expected memory values are read/written. > 8,16,32 load/store are tested for all arch. > 64,128 load/store are tested for aarch64/x64. > atomic operations (8,16,32,64) are tested for x64 only. > > By default, atomic accesses are non atomic

Re: [PATCH 0/2] linux-user/syscall.c remove explicit mentions of LFS

2024-08-29 Thread Richard Henderson
On 8/29/24 17:52, Michael Tokarev wrote: Michael Tokarev (2): linux-user/syscall.c: drop 64 suffix from flock64 &Co linux-user/syscall.c: eliminate other explicit LFS usages Reviewed-by: Richard Henderson r~

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Prasad Pandit
Hello Michael, On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > Weird. Seems to indicate some kind of deadlock? * Such a deadlock should occur across all environments I guess, not sure why it happens selectively. It is strange. > So maybe vhost_user_postcopy_end should take the BQL? =

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 02:45:45PM +0530, Prasad Pandit wrote: > Hello Michael, > > On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > > Weird. Seems to indicate some kind of deadlock? > > * Such a deadlock should occur across all environments I guess, not > sure why it happens selective

Re: [PATCH v4 04/35] Bump avocado to 103.0

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 12:34:45PM +0200, Philippe Mathieu-Daudé wrote: > On 21/8/24 10:27, Thomas Huth wrote: > > From: Cleber Rosa > > > > This bumps Avocado to latest the LTS release. > > > > An LTS release is one that can receive bugfixes and guarantees > > stability for a much longer period

Re: [PATCH v4 06/35] tests/avocado/boot_linux_console: Remove the s390x subtest

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 10:27:07AM +0200, Thomas Huth wrote: > We've got a much more sophisticated, Fedora-based test for s390x > ("test_s390x_fedora" in another file) already, so the test in > boot_linux_console.py seems to be rather a waste of precious test > cycles. Thus move the command line ch

Re: [PATCH v4 07/35] python: Install pycotap in our venv if necessary

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 10:27:08AM +0200, Thomas Huth wrote: > The upcoming functional tests will require pycotap for providing > TAP output from the python-based tests. Since we want to be able > to run some of the tests offline by default, too, let's install > it along with meson in our venv if n

Re: [PATCH v4 11/35] tests/functional: Prepare the meson build system for the functional tests

2024-08-29 Thread Daniel P . Berrangé
On Mon, Aug 26, 2024 at 10:18:44AM +0200, Thomas Huth wrote: > On 23/08/2024 14.54, Philippe Mathieu-Daudé wrote: > > On 21/8/24 10:27, Thomas Huth wrote: > > > Provide a meson.build file for the upcoming python-based functional > > > tests, and add some wrapper glue targets to the tests/Makefile.i

Re: [PATCH v4 14/35] tests/functional: add a module for handling asset download & caching

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 04:49:42PM +0200, Philippe Mathieu-Daudé wrote: > On 21/8/24 10:27, Thomas Huth wrote: > > From: Daniel P. Berrangé > > > > The 'Asset' class is a simple module that declares a downloadable > > asset that can be cached locally. Downloads are stored in the user's > > home d

Re: [PATCH RFC V3 00/29] Support of Virtual CPU Hotplug for ARMv8 Arch

2024-08-29 Thread Alex Bennée
Gustavo Romero writes: > Hi Salil, > > On 6/13/24 8:36 PM, Salil Mehta via wrote: >> (VI) Commands Used >> == >> A. Qemu launch commands to init the machine: >> $ qemu-system-aarch64 --enable-kvm -machine virt,gic-version=3 >> \ >>-cpu host -smp cpus=4,maxcpus=6 \ >>

Re: [PATCH v4 14/35] tests/functional: add a module for handling asset download & caching

2024-08-29 Thread Daniel P . Berrangé
On Fri, Aug 23, 2024 at 08:24:45AM +0200, Philippe Mathieu-Daudé wrote: > Hi, > > On 21/8/24 10:27, Thomas Huth wrote: > > From: Daniel P. Berrangé > > > > The 'Asset' class is a simple module that declares a downloadable > > asset that can be cached locally. Downloads are stored in the user's >

Re: [PATCH v4 15/35] tests/functional: enable pre-emptive caching of assets

2024-08-29 Thread Daniel P . Berrangé
On Tue, Aug 27, 2024 at 04:24:59PM +0200, Thomas Huth wrote: > On 27/08/2024 15.16, Thomas Huth wrote: > > On 23/08/2024 09.28, Philippe Mathieu-Daudé wrote: > > > Hi, > > > > > > On 21/8/24 10:27, Thomas Huth wrote: > > > > From: Daniel P. Berrangé > > > > > > > > Many tests need to access asse

Re: [PATCH v4 33/35] docs/devel/testing: Split the Avocado documentation into a separate file

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 10:27:34AM +0200, Thomas Huth wrote: > The main testing documentation file got very overloaded already. > Thus let's split the Avocado information into a separate file. > > Signed-off-by: Thomas Huth > --- > docs/devel/testing/avocado.rst | 581 +++

Re: [PATCH v4 34/35] docs/devel/testing: Rename avocado_qemu.Test class

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 10:27:35AM +0200, Thomas Huth wrote: > The avocado_qemu.Test class has been renamed a while back in commit > 2283b627bc ("tests/avocado: Rename avocado_qemu.Test -> QemuSystemTest"), > so we should reflect this now in the documentation, too. > > Signed-off-by: Thomas Huth

Re: [PATCH v4 35/35] docs/devel/testing: Add documentation for functional tests

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 10:27:36AM +0200, Thomas Huth wrote: > Document the new functional testing framework. The text is originally > based on the Avocado documentation, but heavily modified to match the > new framework. > > Signed-off-by: Thomas Huth > --- > docs/devel/testing/functional.rst |

Re: [PATCH v4 35/35] docs/devel/testing: Add documentation for functional tests

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 21, 2024 at 10:27:36AM +0200, Thomas Huth wrote: > Document the new functional testing framework. The text is originally > based on the Avocado documentation, but heavily modified to match the > new framework. > > Signed-off-by: Thomas Huth > --- > docs/devel/testing/functional.rst |

[PATCH] iotests: fix expected output from gnutls in NBD test

2024-08-29 Thread Daniel P . Berrangé
Error reporting from gnutls was improved by: commit 57941c9c86357a6a642f9ee3279d881df4043b6d Author: Daniel P. Berrangé Date: Fri Mar 15 14:07:58 2024 + crypto: push error reporting into TLS session I/O APIs This has the effect of changing the output from one of the NBD tests.

Re: [PULL 10/11] crypto: push error reporting into TLS session I/O APIs

2024-08-29 Thread Daniel P . Berrangé
On Wed, Aug 28, 2024 at 10:32:15AM +0200, Thomas Huth wrote: > On 27/08/2024 09.05, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > On Mon, Aug 12, 2024 at 05:38:41PM +0200, Thomas Huth wrote: > > > > On 24/07/2024 11.47, Daniel P. Berrangé wrote: > > > > > The current TLS sessi

Re: [PATCH] iotests: fix expected output from gnutls in NBD test

2024-08-29 Thread Thomas Huth
On 29/08/2024 13.02, Daniel P. Berrangé wrote: Error reporting from gnutls was improved by: commit 57941c9c86357a6a642f9ee3279d881df4043b6d Author: Daniel P. Berrangé Date: Fri Mar 15 14:07:58 2024 + crypto: push error reporting into TLS session I/O APIs This has the effec

Re: [PATCH v4 35/35] docs/devel/testing: Add documentation for functional tests

2024-08-29 Thread Thomas Huth
On 29/08/2024 12.34, Daniel P. Berrangé wrote: On Wed, Aug 21, 2024 at 10:27:36AM +0200, Thomas Huth wrote: Document the new functional testing framework. The text is originally based on the Avocado documentation, but heavily modified to match the new framework. Signed-off-by: Thomas Huth ---

Re: [PATCH v4 35/35] docs/devel/testing: Add documentation for functional tests

2024-08-29 Thread Daniel P . Berrangé
On Thu, Aug 29, 2024 at 01:35:21PM +0200, Thomas Huth wrote: > On 29/08/2024 12.34, Daniel P. Berrangé wrote: > > On Wed, Aug 21, 2024 at 10:27:36AM +0200, Thomas Huth wrote: > > > Document the new functional testing framework. The text is originally > > > based on the Avocado documentation, but he

Re: [PATCH] chardev: allow specifying finer-grained reconnect timeouts

2024-08-29 Thread Markus Armbruster
Daniil Tatianin writes: > The "reconnect" option only allows to specify the time in seconds, > which is way too long for certain workflows. > > We have a lightweight disk backend server, which takes about 20ms to > live update, but due to this limitation in QEMU, previously the guest > disk contr

[PATCH 1/1] m25p80: Add SFDP table for mt35xu01gbba flash device

2024-08-29 Thread Shiva sagar Myana
The SFDP table size is 0x100 bytes long. The basic features are available at byte 0x30. Signed-off-by: Shiva sagar Myana --- hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 37 + hw/block/m25p80_sfdp.h | 1 + 3 files changed, 40 insertions(+), 1 del

[PATCH v2 1/1] m25p80: Add SFDP table for mt35xu01g flash

2024-08-29 Thread Shiva sagar Myana
Add the SFDP table for the Micron Xccela mt35xu01g flash. Signed-off-by: Shiva sagar Myana --- V1->V2: Change subject and commit message hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 37 + hw/block/m25p80_sfdp.h | 1 + 3 files changed, 40 inserti

Re: [PATCH 09/13] ppc/xive2: Support "Pull Thread Context to Odd Thread Reporting Line"

2024-08-29 Thread Cédric Le Goater
On 8/1/24 22:30, Michael Kowal wrote: From: Glenn Miles Adds support for single byte writes to offset 0xC38 of the TIMA address space. When this offset is written to, the hardware disables the thread context and copies the current state information to the odd cache line of the pair specified b

Re: [PATCH] hw/misc: Add a virtual PCILeech device

2024-08-29 Thread Peter Maydell
On Tue, 6 Aug 2024 at 10:28, Zero Tang wrote: > > This virtual PCILeech device aims to help security researchers attack the > guest via DMA and test their IOMMU defenses. > This device is intended to support any systems with PCI, but I am only able > to test x86-based guests. > For what PCILeech

Re: [PATCH 10/13] pnv/xive: Add special handling for pool targets

2024-08-29 Thread Cédric Le Goater
On 8/1/24 22:30, Michael Kowal wrote: From: Glenn Miles Hypervisor "pool" targets do not get their own interrupt line and instead must share an interrupt line with the hypervisor "physical" targets. This also means that the pool ring must use some of the registers from the physical ring in the

Re: [PATCH] chardev: allow specifying finer-grained reconnect timeouts

2024-08-29 Thread Daniil Tatianin
On 8/29/24 2:56 PM, Markus Armbruster wrote: Daniil Tatianin writes: The "reconnect" option only allows to specify the time in seconds, which is way too long for certain workflows. We have a lightweight disk backend server, which takes about 20ms to live update, but due to this limitation in

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Nico Boehr
Quoting Peter Maydell (2024-08-28 17:46:42) [...] > Well, the series is *supposed* to be just a refactoring, not a change of > behaviour, so I'm not sure. I don't suppose you have a reproduce case > that I can run? (I do have access to an s390 machine if that helps.) Well, it's on an internal test

[ANNOUNCE] QEMU 9.1.0-rc4 is now available

2024-08-29 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fifth release candidate for the QEMU 9.1 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu.org/qemu-9.1.0-rc4.tar.xz http://download.qemu.

Re: [PATCH for-9.2] kvm: Use 'unsigned long' for request argument in functions wrapping ioctl()

2024-08-29 Thread Peter Maydell
Ping for code review, please? thanks -- PMM On Thu, 15 Aug 2024 at 13:27, Peter Maydell wrote: > > From: Johannes Stoelp > > Change the data type of the ioctl _request_ argument from 'int' to > 'unsigned long' for the various accel/kvm functions which are > essentially wrappers around the ioctl

Re: [PATCH 11/13] pnv/xive: Update PIPR when updating CPPR

2024-08-29 Thread Cédric Le Goater
On 8/1/24 22:30, Michael Kowal wrote: From: Glenn Miles Current code was updating the PIPR inside the xive_tctx_accept() function instead of the xive_tctx_set_cppr function, which is where the HW would have it updated. Did you confirm with the HW designer ? AFAIR, the PIPR is constructed fro

Re: [PATCH] hw/ppc: fix decrementer with BookE timers

2024-08-29 Thread Cédric Le Goater
On 8/28/24 09:21, Clément Chigot wrote: On Tue, Aug 27, 2024 at 7:40 PM Cédric Le Goater wrote: Hello Clément, On 7/15/24 10:46, Clément Chigot wrote: The BookE decrementer stops at 0, meaning that it won't decremented towards "negative" values. However, the current logic is inverted: decr i

Re: [PATCH] chardev: allow specifying finer-grained reconnect timeouts

2024-08-29 Thread Peter Krempa
On Thu, Aug 29, 2024 at 13:56:43 +0200, Markus Armbruster wrote: > Daniil Tatianin writes: [...] So firstly, libvirt models the timeout in the XML in seconds for now so making use of this will require some XML design plumbing making use of it if there'll be any users wanting it. When libvirt wo

Re: [PATCH] hw/arm/xilinx_zynq: Enable Security Extensions

2024-08-29 Thread Peter Maydell
On Wed, 28 Aug 2024 at 01:51, Sebastian Huber wrote: > > The system supports the Security Extensions (core and GIC). This change is > necessary to run tests which pass on the real hardware. > > Signed-off-by: Sebastian Huber (Added the maintainers to cc.) Does the system have any secure-only d

Re: [PATCH 11/13] pnv/xive: Update PIPR when updating CPPR

2024-08-29 Thread Cédric Le Goater
On 8/1/24 22:30, Michael Kowal wrote: From: Glenn Miles Current code was updating the PIPR inside the xive_tctx_accept() function instead of the xive_tctx_set_cppr function, which is where the HW would have it updated. Moved the update to the xive_tctx_set_cppr function which required addition

Re: [PATCH v2 1/7] hw/net/can/xlnx-versal-canfd: Fix interrupt level

2024-08-29 Thread Pavel Pisa
On Tuesday 27 of August 2024 05:49:21 Doug Brown wrote: > The interrupt level should be 0 or 1. The existing code was using the > interrupt flags to determine the level. In the only machine currently > supported (xlnx-versal-virt), the GICv3 was masking off all bits except > bit 0 when applying it,

Re: [PATCH v2 2/7] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check

2024-08-29 Thread Pavel Pisa
On Tuesday 27 of August 2024 05:49:22 Doug Brown wrote: > When checking the QEMU_CAN_FRMF_TYPE_FD flag, we need to ignore other > potentially set flags. Before this change, received CAN FD frames from > SocketCAN weren't being recognized as CAN FD. > > Signed-off-by: Doug Brown > Reviewed-by: Pave

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Peter Maydell
On Thu, 29 Aug 2024 at 13:20, Nico Boehr wrote: > > Quoting Peter Maydell (2024-08-28 17:46:42) > [...] > > Well, the series is *supposed* to be just a refactoring, not a change of > > behaviour, so I'm not sure. I don't suppose you have a reproduce case > > that I can run? (I do have access to an

[PATCH 1/1] platform-bus: fix refcount leak

2024-08-29 Thread Gao Shiyuan via
Temporary object causes reference count leakage. Signed-off-by: Gao Shiyuan --- hw/core/platform-bus.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/core/platform-bus.c b/hw/core/platform-bus.c index b8487b26b6..dc58bf505a 100644 --- a/hw/core/platform-bus.c +++ b/hw

Re: [PATCH v2 3/7] hw/net/can/xlnx-versal-canfd: Translate CAN ID registers

2024-08-29 Thread Pavel Pisa
On Tuesday 27 of August 2024 05:49:23 Doug Brown wrote: > Previously the emulated CAN ID register was being set to the exact same > value stored in qemu_can_frame.can_id. This doesn't work correctly > because the Xilinx IP core uses a different bit arrangement than > qemu_can_frame for all of its I

Re: [PATCH v2 4/7] hw/net/can/xlnx-versal-canfd: Handle flags correctly

2024-08-29 Thread Pavel Pisa
On Tuesday 27 of August 2024 05:49:24 Doug Brown wrote: > Add support for QEMU_CAN_FRMF_ESI and QEMU_CAN_FRMF_BRS flags, and > ensure frame->flags is always initialized to 0. > > Note that the Xilinx IP core doesn't allow manually setting the ESI bit > during transmits, so it's only implemented for

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

2024-08-29 Thread Gao,Shiyuan
> >--- a/hw/virtio/virtio-pci.c > >+++ b/hw/virtio/virtio-pci.c > >@@ -610,19 +610,29 @@ static MemoryRegion > >*virtio_address_space_lookup(VirtIOPCIProxy *proxy, > > { > > int i; > > VirtIOPCIRegion *reg; > >+    MemoryRegion *mr = NULL; > > `mr` looks unused. > > >+    MemoryRegionSecti

Re: [PATCH v2 5/7] hw/net/can/xlnx-versal-canfd: Fix byte ordering

2024-08-29 Thread Pavel Pisa
On Tuesday 27 of August 2024 05:49:25 Doug Brown wrote: > The endianness of the CAN data was backwards in each group of 4 bytes. > For example, the following data: > > 00 11 22 33 44 55 66 77 > > was showing up like this: > > 33 22 11 00 77 66 55 44 > > Fix both the TX and RX code to put the data i

Re: [PATCH v2 6/7] hw/net/can/xlnx-versal-canfd: Simplify DLC conversions

2024-08-29 Thread Pavel Pisa
On Tuesday 27 of August 2024 05:49:26 Doug Brown wrote: > Use QEMU's helper functions can_dlc2len() and can_len2dlc() for > translating between the raw DLC value and the SocketCAN length value. > This also has the side effect of correctly handling received CAN FD > frames with a DLC of 0-8, which w

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Cédric Le Goater
(My s390 box is running Ubuntu, in case that makes a difference.) Maybe you could put the kernel and initrd somewhere I can get them from? I am also trying. See : https://www.kaod.org/qemu/s390x/ These were generated on my x86/f40 laptop. C.

Re: [PATCH v2 7/7] hw/net/can/xlnx-versal-canfd: Fix FIFO issues

2024-08-29 Thread Pavel Pisa
On Tuesday 27 of August 2024 05:49:27 Doug Brown wrote: > The read index should not be changed when storing a new message into the > RX or TX FIFO. Changing it at this point will cause the reader to get > out of sync. The wrapping of the read index is already handled by the > pre-write functions fo

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Nico Boehr
Quoting Peter Maydell (2024-08-29 15:09:44) > Thanks. I tried this repro, but mkosi falls over almost > immediately: > > ‣ Detaching namespace > ‣ Setting up package cache… > ‣ Setting up package cache /home/linux1/s390-failure/.mkosi-htsau2ot complete > ‣ Setting up temporary workspace. > ‣ Tempo

Re: [PATCH v6 RESEND 0/5] Power11 support for QEMU [PSeries]

2024-08-29 Thread Amit Machhiwal
Hi Aditya, On 2024/07/31 11:20 AM, Aditya Gupta wrote: > Overview > > > Split "Power11 support for QEMU" into 2 patch series: pseries & powernv. > > This patch series is for pseries support for Power11. > > As Power11 core is same as Power10, hence much of the code has been reused

Re: [PATCH] hw/arm/xilinx_zynq: Enable Security Extensions

2024-08-29 Thread Sebastian Huber
Hello Peter, - Am 29. Aug 2024 um 14:50 schrieb Peter Maydell peter.mayd...@linaro.org: > On Wed, 28 Aug 2024 at 01:51, Sebastian Huber > wrote: >> >> The system supports the Security Extensions (core and GIC). This change is >> necessary to run tests which pass on the real hardware. >> >>

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Peter Maydell
On Thu, 29 Aug 2024 at 14:26, Nico Boehr wrote: > > Quoting Peter Maydell (2024-08-29 15:09:44) > > Thanks. I tried this repro, but mkosi falls over almost > > immediately: > In the meantime, looks like mkosi is trying to create an block image, but > that's not what it's configured to do; are you

Re: [PATCH] hw/ppc: fix decrementer with BookE timers

2024-08-29 Thread Clément Chigot
On Thu, Aug 29, 2024 at 2:33 PM Cédric Le Goater wrote: > > On 8/28/24 09:21, Clément Chigot wrote: > > On Tue, Aug 27, 2024 at 7:40 PM Cédric Le Goater wrote: > >> > >> Hello Clément, > >> > >> On 7/15/24 10:46, Clément Chigot wrote: > >>> The BookE decrementer stops at 0, meaning that it won't

Re: qemu-hppa-user: crashes immediately in hppa chroot

2024-08-29 Thread Helge Deller
On 8/29/24 04:38, Richard Henderson wrote: On 8/29/24 03:12, Helge Deller wrote: Hi Richard, I tested qemu-user from v9.1-rc4 for hppa and noticed that it crashes immediately when starting a hppa chroot. I was able to bisect the segfault back to commit 081a0ed188d8d9d9038f00337d331d185a7ae331

Re: [PATCH v2 1/2] qdev-monitor: avoid QemuOpts in QMP device_add

2024-08-29 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Fri, Aug 02, 2024 at 10:01:20AM +0200, Markus Armbruster wrote: >> Stefan Hajnoczi writes: >> >> > The QMP device_add monitor command converts the QDict arguments to >> > QemuOpts and then back again to QDict. This process only supports scalar >> > types. Device pro

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Peter Xu
On Thu, Aug 29, 2024 at 02:45:45PM +0530, Prasad Pandit wrote: > Hello Michael, > > On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > > Weird. Seems to indicate some kind of deadlock? > > * Such a deadlock should occur across all environments I guess, not > sure why it happens selective

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Nico Boehr
Quoting Peter Maydell (2024-08-29 15:35:30) > On Thu, 29 Aug 2024 at 14:26, Nico Boehr wrote: > > > > Quoting Peter Maydell (2024-08-29 15:09:44) > > > Thanks. I tried this repro, but mkosi falls over almost > > > immediately: > > > In the meantime, looks like mkosi is trying to create an block i

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

2024-08-29 Thread Michael Vogt
Hi, This is v2 of the openat2 support in linux-user. Thanks for the excellent feedback from Richard Henderson. I reworked/updated the patch and (hopefully) addressed all comments/suggestions. Extracting the helper made it much clearer indeed. The patch still requires openat2.h from the host, But

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

2024-08-29 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()`. Unfortunatly we cannot just make do_guest_openat

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 10:29:24AM -0400, Peter Xu wrote: > On Thu, Aug 29, 2024 at 02:45:45PM +0530, Prasad Pandit wrote: > > Hello Michael, > > > > On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > > > Weird. Seems to indicate some kind of deadlock? > > > > * Such a deadlock should oc

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Peter Maydell
On Thu, 29 Aug 2024 at 15:44, Nico Boehr wrote: > > Quoting Peter Maydell (2024-08-29 15:35:30) > > On Thu, 29 Aug 2024 at 14:26, Nico Boehr wrote: > > > > > > Quoting Peter Maydell (2024-08-29 15:09:44) > > > > Thanks. I tried this repro, but mkosi falls over almost > > > > immediately: > > > >

Re: [PATCH v5 2/5] target/riscv: Handle Smrnmi interrupt and exception.

2024-08-29 Thread Tommy Wu
On Thu, Aug 15, 2024 at 9:40 AM Alvin Che-Chia Chang(張哲嘉) wrote: > > Hi Tommy, > > > -Original Message- > > From: qemu-riscv-bounces+alvinga=andestech@nongnu.org > > On Behalf Of > > Tommy Wu > > Sent: Friday, August 9, 2024 4:12 PM > > To: qemu-devel@nongnu.org; qemu-ri...@nongnu.org

Re: [PATCH RESEND] hw/openrisc/openrisc_sim: keep serial@90000000 as default

2024-08-29 Thread Stafford Horne
On Wed, Aug 28, 2024 at 04:38:49PM +0100, Peter Maydell wrote: > On Tue, 27 Aug 2024 at 19:53, Stafford Horne wrote: > > > > On Sun, Aug 25, 2024 at 03:09:20PM +0100, Peter Maydell wrote: > > > On Sun, 25 Aug 2024 at 12:35, Jason A. Donenfeld wrote: > > > > > > > > On Fri, Aug 23, 2024 at 07:28:4

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-29 Thread David Hildenbrand
I have rewritten the documentation section to make it more explicit that the reset might not happen. I would appreciate feedback if some part still needs some care or if it is clear now. If the machine supports waking up from a suspended state and needs to reset its devices during wake-up (

Re: [PATCH v2 2/4] reset: Add RESET_TYPE_WAKEUP

2024-08-29 Thread Peter Maydell
On Thu, 29 Aug 2024 at 16:48, David Hildenbrand wrote: > > > I have rewritten the documentation section to make it more explicit > > that the reset might not happen. I would appreciate feedback if some > > part still needs some care or if it is clear now. > > > >If the machine supports waking

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup

2024-08-29 Thread Peter Maydell
On Wed, 28 Aug 2024 at 09:13, Nico Boehr wrote: > > Quoting Nico Boehr (2024-08-26 14:08:20) > > There was a little hickup without the fixup to patch 2, but after Nina > > pushed the fixup, we did not observe any failures related to your > > changes in our CI. Thanks! > > Peter, after a few CI run

Re: [PATCH v5 4/5] target/riscv: Add Smrnmi mnret instruction.

2024-08-29 Thread Tommy Wu
On Mon, Aug 19, 2024 at 11:49 AM Alistair Francis wrote: > > On Fri, Aug 9, 2024 at 6:12 PM Tommy Wu wrote: > > > > This patch adds a new instruction `mnret`. `mnret` is an M-mode-only > > instruction that uses the values in `mnepc` and `mnstatus` to return to the > > program counter, privilege m

Re: [PATCH v3 0/7] vfio/igd: add passthrough support for IGDs of gen 11 and later

2024-08-29 Thread Alex Williamson
On Wed, 28 Aug 2024 15:43:21 +0200 "Corvin Köhne" wrote: > Hi, > > Qemu has experimental support for GPU passthrough of Intels integrated graphic > devices. Unfortunately, Intel has changed some bits for their gen 11 devices > and later. To support these devices, we have to account for those cha

[PATCH] sysbus-fdt: DT node generation for tegra234-mgbe assigned device

2024-08-29 Thread Eric Auger
Implement the code generating the guest device tree node for a tegra234 Multi-Gigabit Ethernet (MGBE) controller assigned device (physical function). The tricky part is the reset properties. For the device to be probed on guest side, mac and pcs resets are requested. As opposed to the clocks we ca

[PATCH v2 1/1] plugins: add API to read guest CPU memory from hwaddr

2024-08-29 Thread Rowan Hart
Signed-off-by: Rowan Hart --- include/qemu/qemu-plugin.h | 22 ++ plugins/api.c| 17 + plugins/qemu-plugins.symbols | 1 + 3 files changed, 40 insertions(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index c71c705b6

[PATCH v2 0/1] plugins: add API to read guest CPU memory from hwaddr

2024-08-29 Thread Rowan Hart
This patch adds a single API function which allows reading from a guest CPU physical address. I don't know of a good way to add a self-contained test for this feature to tests/tcg/plugins, but I did come up with a small test case to demonstrate the functionality using peiyuanix/riscv-os: First, g

Re: [RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer wrote: > > Decouples the IOVA allocator from the IOVA->HVA tree and instead adds > the allocated IOVA range to an IOVA-only tree (iova_map). This IOVA tree > will hold all IOVA ranges that have been allocated (e.g. in the > IOVA->HVA tree) and are remov

Re: [RFC 2/2] vhost-vdpa: Implement GPA->IOVA & IOVA->SVQ HVA trees

2024-08-29 Thread Eugenio Perez Martin
On Wed, Aug 21, 2024 at 2:56 PM Jonah Palmer wrote: > > Implements a GPA->IOVA and IOVA->SVQ HVA tree for handling mapping, > unmapping, and translations for guest and host-only memory, > respectively. > > By splitting up a full IOVA->HVA tree (containing both guest and > host-only memory mappings

Re: [PULL 17/20] target/arm: Do memory type alignment check when translation disabled

2024-08-29 Thread Peter Maydell
On Wed, 28 Aug 2024 at 16:51, Peter Maydell wrote: > > On Wed, 28 Aug 2024 at 08:22, Michael Tokarev wrote: > > > > 05.03.2024 16:52, Peter Maydell wrote: > > > From: Richard Henderson > > > > > > If translation is disabled, the default memory type is Device, which > > > requires alignment check

[PATCH] raw-format: Fix error message for invalid offset/size

2024-08-29 Thread Kevin Wolf
s->offset and s->size are only set at the end of the function and still contain the old values when formatting the error message. Print the parameters with the new values that we actually checked instead. Fixes: 500e2434207d ('raw-format: Split raw_read_options()') Signed-off-by: Kevin Wolf ---

Re: [PATCH] chardev: allow specifying finer-grained reconnect timeouts

2024-08-29 Thread Eric Blake
On Thu, Aug 29, 2024 at 01:56:43PM GMT, Markus Armbruster wrote: > Daniil Tatianin writes: > > > The "reconnect" option only allows to specify the time in seconds, > > which is way too long for certain workflows. ... > > @@ -287,7 +292,8 @@ > > '*telnet': 'bool', > > '*

Re: [PATCH for-9.2] kvm: Use 'unsigned long' for request argument in functions wrapping ioctl()

2024-08-29 Thread Eric Blake
On Thu, Aug 15, 2024 at 01:27:47PM GMT, Peter Maydell wrote: > From: Johannes Stoelp > > Change the data type of the ioctl _request_ argument from 'int' to > 'unsigned long' for the various accel/kvm functions which are > essentially wrappers around the ioctl() syscall. > > The correct type for

Re: [PATCH v4 6/7] memory: Do not create circular reference with subregion

2024-08-29 Thread Peter Xu
On Thu, Aug 29, 2024 at 01:39:36PM +0900, Akihiko Odaki wrote: > > > I am calling the fact that embedded memory regions are accessible in > > > instance_finalize() "live". A device can perform operations on its memory > > > regions during instance_finalize() and we should be aware of that. > > > >

Re: [PATCH v2 00/17] Multifd 🔀 device state transfer support with VFIO consumer

2024-08-29 Thread Maciej S. Szmigiero
On 29.08.2024 02:51, Fabiano Rosas wrote: "Maciej S. Szmigiero" writes: On 28.08.2024 22:46, Fabiano Rosas wrote: "Maciej S. Szmigiero" writes: From: "Maciej S. Szmigiero" This is an updated v2 patch series of the v1 series located here: https://lore.kernel.org/qemu-devel/cover.171871758

  1   2   >