Re: [PATCH 0/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-08 Thread Klaus Jensen
On Apr 8 15:56, Alan Adamson wrote: > While testing Linux atomic writes with qemu-nvme v10.0.0-rc1, Linux was > incorrectly displaying atomic_write_max_bytes > # cat /sys/block/nvme0n1/queue/atomic_write_max_bytes > 0 > # nvme id-ctrl /dev/nvme0n1 | grep awupf > awupf : 15 > # > Since AWUPF w

[PATCH 0/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-08 Thread Alan Adamson
While testing Linux atomic writes with qemu-nvme v10.0.0-rc1, Linux was incorrectly displaying atomic_write_max_bytes # cat /sys/block/nvme0n1/queue/atomic_write_max_bytes 0 # nvme id-ctrl /dev/nvme0n1 | grep awupf awupf : 15 # Since AWUPF was set to 15, it was expected atomic_write_max_bytes

Re: [PATCH v2 1/2] qapi: synchronize jobs and block-jobs documentation

2025-04-08 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Actualize documentation and synchronize it for commands which actually > call the same functions internally. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > qapi/block-core.json | 59 +--- > qapi/job.json

Re: [PATCH 06/11] docs/sphinx/qmp_lexer: Generalize elision syntax

2025-04-08 Thread John Snow
On Fri, Apr 4, 2025 at 8:14 AM Markus Armbruster wrote: > Accept "... lorem ipsum ..." in addition to "...". > > Signed-off-by: Markus Armbruster > --- > docs/devel/qapi-code-gen.rst| 6 -- > docs/sphinx/qmp_lexer.py| 2 +- > tests/qapi-schema/doc-good.json | 2 +- > tests/qapi

[PATCH 1/1] hw/nvme: create parameter to enable/disable cmic on subsystem

2025-04-08 Thread Alan Adamson
Allow the value of CMIC to to be set via a new subsystem specific parameter. This removes the requirement that all subsystems must have the CMIC bit enabled. New NVMe Subsystem QEMU Parameter (See NVMe Specification for details): ,cmic=BOOLEAN (default: off) Signed-off-by: Alan Adamson -

Re: [PATCH v6] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-08 Thread Pinku Deb Nath
Yay! 😊 On Tue, Apr 8, 2025, 8:43 a.m. Stefan Hajnoczi wrote: > On Mon, Apr 07, 2025 at 08:47:30AM -0700, Pinku Deb Nath wrote: > > Full Unit Access (FUA) is an optimization where a disk write with the > > flag set will be persisted to disk immediately instead of potentially > > remaining in the

Re: [PATCH] hw/nvme: fix attachment of private namespaces

2025-04-08 Thread Philippe Mathieu-Daudé
On 8/4/25 12:20, Klaus Jensen wrote: From: Klaus Jensen Fix regression when attaching private namespaces that gets attached to the wrong controller. Keep track of the original controller "owner" of private namespaces, and only attach if this matches on controller enablement. Fixes: 6ccca4b6bb

Re: [PATCH] hw/nvme: fix attachment of private namespaces

2025-04-08 Thread alan . adamson
On 4/8/25 3:20 AM, Klaus Jensen wrote: From: Klaus Jensen Fix regression when attaching private namespaces that gets attached to the wrong controller. Keep track of the original controller "owner" of private namespaces, and only attach if this matches on controller enablement. Tested-by: A

Re: [PATCH v6] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-08 Thread Stefan Hajnoczi
On Mon, Apr 07, 2025 at 08:47:30AM -0700, Pinku Deb Nath wrote: > Full Unit Access (FUA) is an optimization where a disk write with the > flag set will be persisted to disk immediately instead of potentially > remaining in the disk's write cache. > > This commit address the todo task > for using p

Re: hw/nvme: Issue with multiple controllers behind a subsystem

2025-04-08 Thread Klaus Jensen
On Apr 4 10:52, alan.adam...@oracle.com wrote: > I'm running into a issue with the latest qemu-nvme with v10.0.0-rc2 with > regards to multiple controllers behind a subsystem.  When I setup a > subsystem with 2 controllers, each with a private/non-shared namespace, the > two private/non-shared nam

[PULL 0/4] Block layer patches

2025-04-08 Thread Kevin Wolf
The following changes since commit dfaecc04c46d298e9ee81bd0ca96d8754f1c27ed: Merge tag 'pull-riscv-to-apply-20250407-1' of https://github.com/alistair23/qemu into staging (2025-04-07 09:18:33 -0400) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream

[PULL 4/4] test-bdrv-drain: Fix data races

2025-04-08 Thread Kevin Wolf
From: Vitalii Mordan This patch addresses potential data races involving access to Job fields in the test-bdrv-drain test. Fixes: 7253220de4 ("test-bdrv-drain: Test drain vs. block jobs") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2900 Signed-off-by: Vitalii Mordan Message-ID: <202

[PULL 2/4] qcow2: Don't crash qemu-img info with missing crypto header

2025-04-08 Thread Kevin Wolf
qcow2_refresh_limits() assumes that s->crypto is non-NULL whenever bs->encrypted is true. This is actually not the case: qcow2_do_open() allows to open an image with a missing crypto header for BDRV_O_NO_IO, and then bs->encrypted is true, but s->crypto is still NULL. It doesn't make sense to open

[PULL 3/4] scsi-disk: Apply error policy for host_status errors again

2025-04-08 Thread Kevin Wolf
Originally, all failed SG_IO requests called scsi_handle_rw_error() to apply the configured error policy. However, commit f3126d65, which was supposed to be a mere refactoring for scsi-disk.c, broke this and accidentally completed the SCSI request without considering the error policy any more if th

[PULL 1/4] qemu-img: fix division by zero in bench_cb() for zero-sized images

2025-04-08 Thread Kevin Wolf
From: Denis Rastyogin This error was discovered by fuzzing qemu-img. This commit fixes a division by zero error in the bench_cb() function that occurs when using the bench command with a zero-sized image. The issue arises because b->image_size can be zero, leading to a division by zero in the m

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-08 Thread Hanna Czenczek
On 07.04.25 17:59, Kevin Wolf wrote: Originally, all failed SG_IO requests called scsi_handle_rw_error() to apply the configured error policy. However, commit f3126d65, which was supposed to be a mere refactoring for scsi-disk.c, broke this and accidentally completed the SCSI request without cons

Re: [PATCH 02/11] qapi/rocker: Tidy up query-rocker-of-dpa-flows example

2025-04-08 Thread Markus Armbruster
Eric Blake writes: > On Fri, Apr 04, 2025 at 02:14:04PM +0200, Markus Armbruster wrote: >> The command can return any number of RockerOfDpaFlow objects. The >> example shows it returning exactly two, with the second objecy's > > object's Fixing... thanks! >> members elided. Tweak it so it el

Configuring onboard devices, in particular memory contents (was: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller)

2025-04-08 Thread Markus Armbruster
Cédric Le Goater writes: > Hello Kane, > > + Markus (for ebc29e1beab0 implementation) > > On 4/7/25 09:33, Kane Chen wrote: >> Hi Cédric/Philippe, >> OTP (One-Time Programmable) memory is a type of non-volatile memory >> in which each bit can be programmed only once. It is typically used >> to st

[PATCH] hw/nvme: fix attachment of private namespaces

2025-04-08 Thread Klaus Jensen
; ARRAY_SIZE(subsys->namespaces); nsid++) { -NvmeNamespace *ns = subsys->namespaces[nsid]; -if (ns && ns->params.shared && !ns->params.detached) { -nvme_attach_ns(n, ns); -} -} - return cntlid; } --- base-commit: dfaecc04c46d298e9ee81bd0ca96d8754f1c27ed change-id: 20250408-fix-private-ns-19b2bdf62696 Best regards, -- Klaus Jensen

Re: [PATCH] Fix data races in test-bdrv-drain test

2025-04-08 Thread Kevin Wolf
Am 02.04.2025 um 12:21 hat Vitalii Mordan geschrieben: > This patch addresses potential data races involving access to Job fields > in the test-bdrv-drain test. > > Fixes: 7253220de4 ("test-bdrv-drain: Test drain vs. block jobs") > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2900 > Sig

Re: [PATCH v3 03/12] qcow2: put discard requests in the common queue when discard-no-unref enabled

2025-04-08 Thread Jean-Louis Dupond
Hi, I hope this patchset can get merged soon, as it contains some good improvements. Next to that, the change below only improves the performance on discards? It's not that something is broken/can cause issues in the current code? Otherwise it might be a good idea to have this one merged as