Re: [PATCH] vvfat: fix ubsan issue in create_long_filename

2024-12-16 Thread Pierrick Bouvier
Hi everyone, gentle ping on this series. On 12/4/24 11:51, Pierrick Bouvier wrote: Found with test sbsaref introduced in [1]. [1] https://patchew.org/QEMU/20241203213629.2482806-1-pierrick.bouv...@linaro.org/ ../block/vvfat.c:433:24: runtime error: index 14 out of bounds for type 'uint8_t [

Re: [PATCH v2 6/6] migration/block: Rewrite disk activation

2024-12-16 Thread Peter Xu
On Mon, Dec 16, 2024 at 12:58:58PM -0300, Fabiano Rosas wrote: > > @@ -3286,6 +3237,11 @@ static void > > migration_iteration_finish(MigrationState *s) > > case MIGRATION_STATUS_FAILED: > > case MIGRATION_STATUS_CANCELLED: > > case MIGRATION_STATUS_CANCELLING: > > Pre-existing, but

Re: libnfs 6.0.0 breaks qemu compilation

2024-12-16 Thread Xavier Bachelot
Le 2024-12-16 11:43, Daniel P. Berrangé a écrit : On Sat, Dec 14, 2024 at 01:40:45PM +0100, Paolo Bonzini wrote: Il ven 13 dic 2024, 20:19 Richard W.M. Jones ha scritto: > On Fri, Dec 13, 2024 at 07:37:10PM +0100, Paolo Bonzini wrote: > > Yeah, and I don't think it should be merged, unless li

Re: [PATCH v2 2/6] qmp/cont: Only activate disks if migration completed

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > As the comment says, the activation of disks is for the case where > migration has completed, rather than when QEMU is still during > migration (RUN_STATE_INMIGRATE). > > Move the code over to reflect what the comment is describing. > > Cc: Kevin Wolf > Cc: Markus Armbruster

Re: [PATCH v2 3/6] migration/block: Make late-block-active the default

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > Migration capability 'late-block-active' controls when the block drives > will be activated. If enabled, block drives will only be activated until > VM starts, either src runstate was "live" (RUNNING, or SUSPENDED), or it'll > be postponed until qmp_cont(). > > Let's do this u

Re: [PATCH v2 4/6] migration/block: Apply late-block-active behavior to postcopy

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > Postcopy never cared about late-block-active. However there's no mention > in the capability that it doesn't apply to postcopy. > > Considering that we _assumed_ late activation is always good, do that too > for postcopy unconditionally, just like precopy. After this patch, w

Re: [PATCH v2 5/6] migration/block: Fix possible race with block_inactive

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > Src QEMU sets block_inactive=true very early before the invalidation takes > place. It means if something wrong happened during setting the flag but > before reaching qemu_savevm_state_complete_precopy_non_iterable() where it > did the invalidation work, it'll make block_inact

[PATCH 1/9] hw/nvme: always initialize a subsystem

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen If no nvme-subsys is explicitly configured, instantiate one. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 36 ++--- hw/nvme/ns.c | 64 -- 2 files changed, 42 insertions(+), 58 deletions

[PATCH 6/9] hw/nvme: rework csi handling

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen The controller incorrectly allows a zoned namespace to be attached even if CS.CSS is configured to only support the NVM command set for I/O queues. Rework handling of namespace command sets in general by attaching supported namespaces when the controller is started instead of,

[PATCH 4/9] nvme: fix iocs status code values

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen The status codes related to I/O Command Sets are in the wrong group. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 4 ++-- include/block/nvme.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index d544789f92

[PATCH 8/9] hw/nvme: set error status code explicitly for misc commands

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen The nvme_aio_err() does not handle Verify, Compare, Copy and other misc commands and defaults to setting the error status code to Internal Device Error. For some of these commands, we know better, so set it explicitly. For the commands using the nvme_misc_cb() callback (Copy,

[PATCH 2/9] hw/nvme: make oacs dynamic

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen Virtualization Management needs sriov-related parameters. Only report support for the command when that conditions are true. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 25 ++--- hw/nvme/nvme.h | 4 include/block/nvme.h | 3 ++- 3

[PATCH 7/9] hw/nvme: only set command abort requested when cancelled due to Abort

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen The Command Abort Requested status code should only be set if the command was explicitly cancelled due to an Abort command. Or, in the case the cancel was due to Submission Queue deletion, set the status code to Command Aborted due to SQ Deletion. Signed-off-by: Klaus Jensen

[PATCH 5/9] hw/nvme: be compliant wrt. dsm processing limits

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen The specification states that, > The controller shall set all three processing limit fields (i.e., the > DMRL, DMRSL and DMSL fields) to non-zero values or shall clear all > three processing limit fields to 0h. So, set the DMRL and DMSL fields in addition to DMRSL. Signed-of

[PATCH 3/9] hw/nvme: add knob for doorbell buffer config support

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen Add a 'dbcs' knob to allow Doorbell Buffer Config command to be disabled. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 11 --- hw/nvme/nvme.h | 1 + include/block/nvme.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/nvme

[PATCH 0/9] hw/nvme: refactor/cleanup

2024-12-16 Thread Klaus Jensen
- hw/nvme/nvme.h | 10 +- include/block/nvme.h | 22 ++- 4 files changed, 276 insertions(+), 248 deletions(-) --- base-commit: ca80a5d026a280762e0772615f1988db542b3ade change-id: 20241216-nvme-queue-f4151c5d7507 Best regards, -- Klaus Jensen

[PATCH 9/9] hw/nvme: remove nvme_aio_err()

2024-12-16 Thread Klaus Jensen
From: Klaus Jensen nvme_rw_complete_cb() is the only remaining user of nvme_aio_err(), so open code the status code setting instead. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 60 ++ 1 file changed, 23 insertions(+), 37 deletions(-)

Re: [PATCH v2 6/6] migration/block: Rewrite disk activation

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > This patch proposes a flag to maintain disk activation status globally. It > mostly rewrites disk activation mgmt for QEMU, including COLO and QMP > command xen_save_devices_state. > > Backgrounds > === > > We have two problems on disk activations, one resolved, one no

Re: libnfs 6.0.0 breaks qemu compilation

2024-12-16 Thread Daniel P . Berrangé
On Sat, Dec 14, 2024 at 01:40:45PM +0100, Paolo Bonzini wrote: > Il ven 13 dic 2024, 20:19 Richard W.M. Jones ha scritto: > > > On Fri, Dec 13, 2024 at 07:37:10PM +0100, Paolo Bonzini wrote: > > > Yeah, and I don't think it should be merged, unless libnfs support is > > dropped > > > from the QEM

Re: [PATCH] vvfat: fix ubsan issue in create_long_filename

2024-12-16 Thread Pierrick Bouvier
On 12/4/24 11:51, Pierrick Bouvier wrote: Found with test sbsaref introduced in [1]. [1] https://patchew.org/QEMU/20241203213629.2482806-1-pierrick.bouv...@linaro.org/ ../block/vvfat.c:433:24: runtime error: index 14 out of bounds for type 'uint8_t [11]' #0 0x56151a66b93a in create_long_