[PULL 1/6] hw/nvme: Implement shadow doorbell buffer support

2022-07-15 Thread Klaus Jensen
From: Jinhao Fan Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13 in NVMe Spec 1.3). For queues created before the Doorbell Buffer Config command, the nvme_dbbuf_config function tries to associate each

[PULL 0/6] hw/nvme updates

2022-07-15 Thread Klaus Jensen
From: Klaus Jensen Hi, The following changes since commit 8482ab545e52f50facacfe1118b22b97462724ab: Merge tag 'qga-win32-pull-2022-07-13' of github.com:kostyanf14/qemu into staging (2022-07-14 14:52:16 +0100) are available in the Git repository at: git://git.infradead.org/qemu-nvme.git t

[PULL 2/6] hw/nvme: Add trace events for shadow doorbell buffer

2022-07-15 Thread Klaus Jensen
From: Jinhao Fan When shadow doorbell buffer is enabled, doorbell registers are lazily updated. The actual queue head and tail pointers are stored in Shadow Doorbell buffers. Add trace events for updates on the Shadow Doorbell buffers and EventIdx buffers. Also add trace event for the Doorbell B

[PULL 3/6] hw/nvme: fix example serial in documentation

2022-07-15 Thread Klaus Jensen
From: Niklas Cassel The serial prop on the controller is actually describing the nvme subsystem serial, which has to be identical for all controllers within the same nvme subsystem. This is enforced since commit a859eb9f8f64 ("hw/nvme: enforce common serial per subsystem"). Fix the documentatio

[PULL 6/6] hw/nvme: Use ioeventfd to handle doorbell updates

2022-07-15 Thread Klaus Jensen
From: Jinhao Fan Add property "ioeventfd" which is enabled by default. When this is enabled, updates on the doorbell registers will cause KVM to signal an event to the QEMU main loop to handle the doorbell updates. Therefore, instead of letting the vcpu thread run both guest VM and IO emulation,

[PULL 4/6] hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node

2022-07-15 Thread Klaus Jensen
From: Niklas Cassel Since commit 916b0f0b5264 ("hw/nvme: change nvme-ns 'shared' default") the default value of nvme-ns param 'shared' is set to true, regardless if there is a nvme-subsys node or not. On a system without a nvme-subsys node, a namespace will never be able to be attached to more t

[PULL 5/6] nvme: Fix misleading macro when mixed with ternary operator

2022-07-15 Thread Klaus Jensen
From: Darren Kenny Using the Parfait source code analyser and issue was found in hw/nvme/ctrl.c where the macros NVME_CAP_SET_CMBS and NVME_CAP_SET_PMRS are called with a ternary operatore in the second parameter, resulting in a potentially unexpected expansion of the form: x ? a: b & FLAG_TES

Re: [RFC PATCH 4/8] blockjob: implement .change_aio_ctx in child_job

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: child_job_change_aio_ctx() is very similar to child_job_can_set_aio_ctx(), but it implements a new transaction so that if all check pass, the new transaction's .commit() will take care of changin the BlockJob AioContext. child_job_set_aio_ctx_c

Re: [RFC PATCH 5/8] block: implement .change_aio_ctx in child_of_bds

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: bdrv_child_cb_change_aio_ctx() is identical to bdrv_child_cb_can_set_aio_ctx(), as we only need to recursively go on the parent bs. Note: bdrv_child_try_change_aio_context() is not called by anyone at this point. Signed-off-by: Emanuele Giuse

Re: [RFC PATCH 6/8] block-backend: implement .change_aio_ctx in child_root

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: blk_root_change_aio_ctx() is very similar to blk_root_can_set_aio_ctx(), but implements a new transaction so that if all check pass, the new transaction's .commit will take care of changing the BlockBackend AioContext. blk_root_set_aio_ctx_comm

Re: [PATCH v2 10/15] qemu-common: introduce a common subproject

2022-07-15 Thread Marc-André Lureau
Hi On Tue, Jul 12, 2022 at 6:58 PM Warner Losh wrote: > > > > On Tue, Jul 12, 2022 at 3:36 AM wrote: >> >> From: Marc-André Lureau >> >> Add a new meson subproject to provide common code and scripts for QEMU >> and tools. Initially, it will offer QAPI/QMP code generation and >> common utilities

Re: [RFC PATCH 7/8] block: use the new _change_ API instead of _can_set_ and _set_

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx, and call bdrv_child_try_change_aio_context() in bdrv_try_set_aio_context(), the main function called through the whole block layer. From this point onwards, ->can_set_aio_ctx an

Re: [RFC PATCH 8/8] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

2022-07-15 Thread Hanna Reitz
On 12.07.22 23:19, Emanuele Giuseppe Esposito wrote: Together with all _can_set_ and _set_ APIs, as they are not needed anymore. Signed-off-by: Emanuele Giuseppe Esposito --- block.c| 196 - block/block-backend.c | 33

Re: [PATCH v5 2/8] hw/i2c: Read FIFO during RXF_CTL change in NPCM7XX SMBus

2022-07-15 Thread Peter Maydell
On Thu, 14 Jul 2022 at 19:28, Hao Wu wrote: > > Originally we read in from SMBus when RXF_STS is cleared. However, > the driver clears RXF_STS before setting RXF_CTL, causing the SM bus > module to read incorrect amount of bytes in FIFO mode when the number > of bytes read changed. This patch fixe

Re: [PATCH v5 0/8] Misc NPCM7XX patches

2022-07-15 Thread Peter Maydell
On Thu, 14 Jul 2022 at 19:28, Hao Wu wrote: > > [NOTE: I'm reviving a bunch of patches that was in the process of > upstreaming a while ago but paused.] > > This patch set contains a few bug fixes and I2C devices for some > NPCM7XX boards. > > Patch 1~2 fix a problem that causes the SMBus module t

Re: [PULL 0/6] hw/nvme updates

2022-07-15 Thread Peter Maydell
On Fri, 15 Jul 2022 at 09:43, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi, > > The following changes since commit 8482ab545e52f50facacfe1118b22b97462724ab: > > Merge tag 'qga-win32-pull-2022-07-13' of github.com:kostyanf14/qemu into > staging (2022-07-14 14:52:16 +0100) > > are available