[PATCH v4 3/3] hw/nvme: Add SPDM over DOE support

2024-02-12 Thread Alistair Francis
From: Wilfred Mallawa Setup Data Object Exchance (DOE) as an extended capability for the NVME controller and connect SPDM to it (CMA) to it. Signed-off-by: Wilfred Mallawa Signed-off-by: Alistair Francis Reviewed-by: Jonathan Cameron Acked-by: Klaus Jensen --- docs/specs/index.rst|

[PATCH v4 2/3] backends: Initial support for SPDM socket support

2024-02-12 Thread Alistair Francis
From: Huai-Cheng Kuo SPDM enables authentication, attestation and key exchange to assist in providing infrastructure security enablement. It's a standard published by the DMTF [1]. SPDM supports multiple transports, including PCIe DOE and MCTP. This patch adds support to QEMU to connect to an

[PATCH v4 0/3] Initial support for SPDM Responders

2024-02-12 Thread Alistair Francis
The Security Protocol and Data Model (SPDM) Specification defines messages, data objects, and sequences for performing message exchanges over a variety of transport and physical media. - https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.3.0.pdf SPDM currently supports PCIe

[PATCH v4 1/3] hw/pci: Add all Data Object Types defined in PCIe r6.0

2024-02-12 Thread Alistair Francis
Add all of the defined protocols/features from the PCIe-SIG r6.0 "Table 6-32 PCI-SIG defined Data Object Types (Vendor ID = 0001h)" table. Signed-off-by: Alistair Francis Reviewed-by: Jonathan Cameron --- include/hw/pci/pcie_doe.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PULL 00/17] Misc fixes patches

2024-02-12 Thread Peter Maydell
On Fri, 9 Feb 2024 at 14:07, Daniel P. Berrangé wrote: > > The following changes since commit 9e34f127f419b3941b36dfdfac79640dc81e97e2: > > Merge tag 'pull-request-2024-02-06' of https://gitlab.com/thuth/qemu into > staging (2024-02-08 11:59:28 +) > > are available in the Git repository

Re: [PATCH] iotests: Make 144 deterministic again

2024-02-12 Thread Stefan Hajnoczi
On Fri, Feb 09, 2024 at 06:31:03PM +0100, Kevin Wolf wrote: > Since commit effd60c8 changed how QMP commands are processed, the order > of the block-commit return value and job events in iotests 144 wasn't > fixed and more and caused the test to fail intermittently. > > Change the test to cache

Re: [PATCH v3 07/11] hw/sh4/r2d: Realize IDE controller before accessing it

2024-02-12 Thread Yoshinori Sato
On Fri, 09 Feb 2024 03:12:40 +0900, Philippe Mathieu-Daudé wrote: > > We should not wire IRQs on unrealized device. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/sh4/r2d.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c > index

Re: [PATCH v3 02/11] hw/rx/rx62n: Reduce inclusion of 'qemu/units.h'

2024-02-12 Thread Yoshinori Sato
On Fri, 09 Feb 2024 03:12:35 +0900, Philippe Mathieu-Daudé wrote: > > "qemu/units.h" is not used in the "hw/rx/rx62n.h" > header, include it in the source where it is. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/rx/rx62n.h | 1 - > hw/rx/rx-gdbsim.c | 1 + > hw/rx/rx62n.c

Re: [PATCH v3 03/11] hw/rx/rx62n: Only call qdev_get_gpio_in() when necessary

2024-02-12 Thread Yoshinori Sato
On Fri, 09 Feb 2024 03:12:36 +0900, Philippe Mathieu-Daudé wrote: > > Instead of filling an array of all the possible IRQs, only call > qdev_get_gpio_in() when an IRQ is used. Remove the array from > RX62NState. Doing so we avoid calling qdev_get_gpio_in() on an > unrealized device. > >

[PATCH v3 7/7] pcie_sriov: Release VFs failed to realize

2024-02-12 Thread Akihiko Odaki
Release VFs failed to realize just as we do in unregister_vfs(). Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization (SR/IOV)") Signed-off-by: Akihiko Odaki --- hw/pci/pcie_sriov.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/pci/pcie_sriov.c

[PATCH v3 6/7] pcie_sriov: Reuse SR-IOV VF device instances

2024-02-12 Thread Akihiko Odaki
Disable SR-IOV VF devices by reusing code to power down PCI devices instead of removing them when the guest requests to disable VFs. This allows to realize devices and report VF realization errors at PF realization time. Signed-off-by: Akihiko Odaki --- docs/pcie_sriov.txt | 8 ++--

[PATCH v3 2/7] hw/pci: Determine if rombar is explicitly enabled

2024-02-12 Thread Akihiko Odaki
vfio determines if rombar is explicitly enabled by inspecting QDict. Inspecting QDict is not nice because QDict is untyped and depends on the details on the external interface. Add an infrastructure to determine if rombar is explicitly enabled to hw/pci. Signed-off-by: Akihiko Odaki ---

[PATCH v3 5/7] pcie_sriov: Validate NumVFs

2024-02-12 Thread Akihiko Odaki
The guest may write NumVFs greater than TotalVFs and that can lead to buffer overflow in VF implementations. Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization (SR/IOV)") Signed-off-by: Akihiko Odaki --- hw/pci/pcie_sriov.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v3 4/7] hw/qdev: Remove opts member

2024-02-12 Thread Akihiko Odaki
It is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 4 hw/core/qdev.c | 1 - system/qdev-monitor.c | 12 +++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/qdev-core.h

[PATCH v3 0/7] hw/pci: SR-IOV related fixes and improvements

2024-02-12 Thread Akihiko Odaki
I submitted a RFC series[1] to add support for SR-IOV emulation to virtio-net-pci. During the development of the series, I fixed some trivial bugs and made improvements that I think are independently useful. This series extracts those fixes and improvements from the RFC series. Below is an

[PATCH v3 3/7] vfio: Avoid inspecting option QDict for rombar

2024-02-12 Thread Akihiko Odaki
Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly enabled. Signed-off-by: Akihiko Odaki --- hw/vfio/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index d7fe06715c4b..44178ac9355f 100644 --- a/hw/vfio/pci.c +++

[PATCH v3 1/7] hw/pci: Use -1 as a default value for rombar

2024-02-12 Thread Akihiko Odaki
Currently there is no way to distinguish the case that rombar is explicitly specified as 1 and the case that rombar is not specified. Set rombar -1 by default to distinguish these cases just as it is done for addr and romsize. It was confirmed that changing the default value to -1 will not change

Re: [PATCH v2 2/6] vfio: Avoid inspecting option QDict for rombar

2024-02-12 Thread Akihiko Odaki
On 2024/02/12 17:25, Cédric Le Goater wrote: On 2/12/24 09:04, Philippe Mathieu-Daudé wrote: On 10/2/24 11:24, Akihiko Odaki wrote: Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly enabled. Signed-off-by: Akihiko Odaki ---   hw/vfio/pci.c | 3 +--   1 file changed, 1

Re: [PATCH 06/15] qapi: Require member documentation (with loophole)

2024-02-12 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Feb 05, 2024 at 08:47:00AM +0100, Markus Armbruster wrote: >> The QAPI generator forces you to document your stuff. Except for >> command arguments, event data, and members of enum and object types: >> these the generator silently "documents" as "Not

Re: [PATCH 0/2] block: Allow concurrent BB context changes

2024-02-12 Thread Hanna Czenczek
On 10.02.24 09:46, Michael Tokarev wrote: 09.02.2024 19:51, Hanna Czenczek : On 09.02.24 15:08, Michael Tokarev wrote: 02.02.2024 17:47, Hanna Czenczek : Hi, Without the AioContext lock, a BB's context may kind of change at any time (unless it has a root node, and I/O requests are pending).

Re: [PATCH v2 2/6] vfio: Avoid inspecting option QDict for rombar

2024-02-12 Thread Cédric Le Goater
On 2/12/24 09:04, Philippe Mathieu-Daudé wrote: On 10/2/24 11:24, Akihiko Odaki wrote: Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly enabled. Signed-off-by: Akihiko Odaki ---   hw/vfio/pci.c | 3 +--   1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: [PATCH v2 3/6] hw/qdev: Remove opts member

2024-02-12 Thread Philippe Mathieu-Daudé
On 10/2/24 11:24, Akihiko Odaki wrote: It is no longer used. Signed-off-by: Akihiko Odaki --- include/hw/qdev-core.h | 4 hw/core/qdev.c | 1 - system/qdev-monitor.c | 12 +++- 3 files changed, 7 insertions(+), 10 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 2/6] vfio: Avoid inspecting option QDict for rombar

2024-02-12 Thread Philippe Mathieu-Daudé
On 10/2/24 11:24, Akihiko Odaki wrote: Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly enabled. Signed-off-by: Akihiko Odaki --- hw/vfio/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

Re: [PATCH v2 1/6] hw/pci: Determine if rombar is explicitly enabled

2024-02-12 Thread Philippe Mathieu-Daudé
Hi Akihiko, On 10/2/24 11:24, Akihiko Odaki wrote: vfio determines if rombar is explicitly enabled by inspecting QDict. Inspecting QDict is not nice because QDict is untyped and depends on the details on the external interface. Add an infrastructure to determine if rombar is explicitly enabled