From: Jonathan Cameron via <qemu-devel@nongnu.org>
To: Alistair Francis <alistair23@gmail.com>
Cc: <cbrowy@avery-design.com>, <wilfred.mallawa@wdc.com>,
<mst@redhat.com>, <lukas@wunner.de>, <kbusch@kernel.org>,
<hchkuo@avery-design.com.tw>, <its@irrelevant.dk>,
<jiewen.yao@intel.com>, <marcel.apfelbaum@gmail.com>,
<qemu-devel@nongnu.org>, Paolo Bonzini <pbonzini@redhat.com>,
<qemu-block@nongnu.org>,
Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH v2 3/3] hw/nvme: Add SPDM over DOE support
Date: Tue, 17 Oct 2023 11:18:10 +0100 [thread overview]
Message-ID: <20231017111810.00004a84@Huawei.com> (raw)
In-Reply-To: <20231017052155.173577-4-alistair.francis@wdc.com>
On Tue, 17 Oct 2023 15:21:55 +1000
Alistair Francis <alistair23@gmail.com> wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
>
> 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 <wilfred.mallawa@wdc.com>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> docs/specs/index.rst | 1 +
> docs/specs/spdm.rst | 114 ++++++++++++++++++++++++++++++++++++
> include/hw/pci/pci_device.h | 5 ++
> include/hw/pci/pcie_doe.h | 3 +
> hw/nvme/ctrl.c | 53 +++++++++++++++++
> 5 files changed, 176 insertions(+)
> create mode 100644 docs/specs/spdm.rst
>
> diff --git a/docs/specs/index.rst b/docs/specs/index.rst
> index e58be38c41..c398541388 100644
> --- a/docs/specs/index.rst
> +++ b/docs/specs/index.rst
> @@ -24,3 +24,4 @@ guest hardware that is specific to QEMU.
> acpi_erst
> sev-guest-firmware
> fw_cfg
> + spdm
> diff --git a/docs/specs/spdm.rst b/docs/specs/spdm.rst
> new file mode 100644
> index 0000000000..dfdc3cbb4d
> --- /dev/null
> +++ b/docs/specs/spdm.rst
> @@ -0,0 +1,114 @@
> +======================================================
> +QEMU Security Protocols and Data Models (SPDM) Support
> +======================================================
> +
> +SPDM enables authentication, attestation and key exchange to assist in
> +providing infrastructure security enablement. It's a standard published
> +by the `DMTF`_.
> +
> +QEMU supports connecting to a SPDM Responder implementation. This allows an
> +external application to emulate the SPDM Responder logic for an SPDM device.
> +
> +Setting up a SPDM server
> +========================
> +
> +When using QEMU with SPDM devices QEMU will connect to a server which
> +implements the SPDM functionality.
> +
> +SPDM-Utils
> +----------
> +
> +You can use `SPDM Utils`_ to emulate a Responder.
> +
> +SPDM-Utils is a Linux applications to manage, test and develop devices
> +supporting DMTF Security Protocol and Data Model (SPDM). It is written in Rust
> +and utilises libspdm.
> +
> +To use SPDM-Utils you will need to do the followoing:
Spell check needed. following
> +
> + 1. `Build SPDM Utils`_
> + 2. `Generate the certificates`_
> + 3. `Run it as a server`_
> +
> +spdm-emu
> +--------
> +
> +You can use `spdm emu`_ to model the
> +SPDM responder.
> +
> +.. code-block:: shell
> +
> + $ cd spdm-emu
> + $ git submodule init; git submodule update --recursive
> + $ mkdir build; cd build
> + $ cmake -DARCH=x64 -DTOOLCHAIN=GCC -DTARGET=Debug -DCRYPTO=openssl ..
> + $ make -j32
> + $ make copy_sample_key # Build certificates, required for SPDM authentication.
> +
> +It is worth noting that the certificates should be in compliance with
> +PCIe r6.1 sec 6.31.3. This means you will need to add the following to
> +openssl.cnf
> +
> +.. code-block::
> +
> + subjectAltName = otherName:2.23.147;UTF8:Vendor=1b36:Device=0010:CC=010802:REV=02:SSVID=1af4:SSID=1100
> + 2.23.147 = ASN1:OID:2.23.147
> +
> +and then manually regenerate some certificates with:
> +
> +.. code-block:: shell
> +
> + openssl req -nodes -newkey ec:param.pem -keyout end_responder.key -out end_responder.req -sha384 -batch -subj "/CN=DMTF libspdm ECP384 responder cert"
For these no need to have on oneline maybe some \ ?
to make it easier to read if someone looks at the rst file.
> + openssl x509 -req -in end_responder.req -out end_responder.cert -CA inter.cert -CAkey inter.key -sha384 -days 3650 -set_serial 3 -extensions v3_end -extfile ../openssl.cnf
> + openssl asn1parse -in end_responder.cert -out end_responder.cert.der
> + cat ca.cert.der inter.cert.der end_responder.cert.der > bundle_responder.certchain.der
> +
Otherwise this all looks good to me.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Alistair Francis <alistair23@gmail.com>
Cc: <cbrowy@avery-design.com>, <wilfred.mallawa@wdc.com>,
<mst@redhat.com>, <lukas@wunner.de>, <kbusch@kernel.org>,
<hchkuo@avery-design.com.tw>, <its@irrelevant.dk>,
<jiewen.yao@intel.com>, <marcel.apfelbaum@gmail.com>,
<qemu-devel@nongnu.org>, Paolo Bonzini <pbonzini@redhat.com>,
<qemu-block@nongnu.org>,
Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH v2 3/3] hw/nvme: Add SPDM over DOE support
Date: Tue, 17 Oct 2023 11:18:10 +0100 [thread overview]
Message-ID: <20231017111810.00004a84@Huawei.com> (raw)
Message-ID: <20231017101810.r_4LQjKJ9ZZiFidj2fV7yLbfzi-UFy2kj4eeAFv2Qns@z> (raw)
In-Reply-To: <20231017052155.173577-4-alistair.francis@wdc.com>
On Tue, 17 Oct 2023 15:21:55 +1000
Alistair Francis <alistair23@gmail.com> wrote:
> From: Wilfred Mallawa <wilfred.mallawa@wdc.com>
>
> 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 <wilfred.mallawa@wdc.com>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> docs/specs/index.rst | 1 +
> docs/specs/spdm.rst | 114 ++++++++++++++++++++++++++++++++++++
> include/hw/pci/pci_device.h | 5 ++
> include/hw/pci/pcie_doe.h | 3 +
> hw/nvme/ctrl.c | 53 +++++++++++++++++
> 5 files changed, 176 insertions(+)
> create mode 100644 docs/specs/spdm.rst
>
> diff --git a/docs/specs/index.rst b/docs/specs/index.rst
> index e58be38c41..c398541388 100644
> --- a/docs/specs/index.rst
> +++ b/docs/specs/index.rst
> @@ -24,3 +24,4 @@ guest hardware that is specific to QEMU.
> acpi_erst
> sev-guest-firmware
> fw_cfg
> + spdm
> diff --git a/docs/specs/spdm.rst b/docs/specs/spdm.rst
> new file mode 100644
> index 0000000000..dfdc3cbb4d
> --- /dev/null
> +++ b/docs/specs/spdm.rst
> @@ -0,0 +1,114 @@
> +======================================================
> +QEMU Security Protocols and Data Models (SPDM) Support
> +======================================================
> +
> +SPDM enables authentication, attestation and key exchange to assist in
> +providing infrastructure security enablement. It's a standard published
> +by the `DMTF`_.
> +
> +QEMU supports connecting to a SPDM Responder implementation. This allows an
> +external application to emulate the SPDM Responder logic for an SPDM device.
> +
> +Setting up a SPDM server
> +========================
> +
> +When using QEMU with SPDM devices QEMU will connect to a server which
> +implements the SPDM functionality.
> +
> +SPDM-Utils
> +----------
> +
> +You can use `SPDM Utils`_ to emulate a Responder.
> +
> +SPDM-Utils is a Linux applications to manage, test and develop devices
> +supporting DMTF Security Protocol and Data Model (SPDM). It is written in Rust
> +and utilises libspdm.
> +
> +To use SPDM-Utils you will need to do the followoing:
Spell check needed. following
> +
> + 1. `Build SPDM Utils`_
> + 2. `Generate the certificates`_
> + 3. `Run it as a server`_
> +
> +spdm-emu
> +--------
> +
> +You can use `spdm emu`_ to model the
> +SPDM responder.
> +
> +.. code-block:: shell
> +
> + $ cd spdm-emu
> + $ git submodule init; git submodule update --recursive
> + $ mkdir build; cd build
> + $ cmake -DARCH=x64 -DTOOLCHAIN=GCC -DTARGET=Debug -DCRYPTO=openssl ..
> + $ make -j32
> + $ make copy_sample_key # Build certificates, required for SPDM authentication.
> +
> +It is worth noting that the certificates should be in compliance with
> +PCIe r6.1 sec 6.31.3. This means you will need to add the following to
> +openssl.cnf
> +
> +.. code-block::
> +
> + subjectAltName = otherName:2.23.147;UTF8:Vendor=1b36:Device=0010:CC=010802:REV=02:SSVID=1af4:SSID=1100
> + 2.23.147 = ASN1:OID:2.23.147
> +
> +and then manually regenerate some certificates with:
> +
> +.. code-block:: shell
> +
> + openssl req -nodes -newkey ec:param.pem -keyout end_responder.key -out end_responder.req -sha384 -batch -subj "/CN=DMTF libspdm ECP384 responder cert"
For these no need to have on oneline maybe some \ ?
to make it easier to read if someone looks at the rst file.
> + openssl x509 -req -in end_responder.req -out end_responder.cert -CA inter.cert -CAkey inter.key -sha384 -days 3650 -set_serial 3 -extensions v3_end -extfile ../openssl.cnf
> + openssl asn1parse -in end_responder.cert -out end_responder.cert.der
> + cat ca.cert.der inter.cert.der end_responder.cert.der > bundle_responder.certchain.der
> +
Otherwise this all looks good to me.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
next prev parent reply other threads:[~2023-10-17 10:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 5:21 [PATCH v2 0/3] Initial support for SPDM Responders Alistair Francis
2023-10-17 5:21 ` [PATCH v2 1/3] hw/pci: Add all Data Object Types defined in PCIe r6.0 Alistair Francis
2023-10-17 9:57 ` Jonathan Cameron via
2023-10-17 9:57 ` Jonathan Cameron
2023-10-17 5:21 ` [PATCH v2 2/3] backends: Initial support for SPDM socket support Alistair Francis
2023-10-17 10:04 ` Jonathan Cameron via
2023-10-17 10:04 ` Jonathan Cameron
2023-10-17 5:21 ` [PATCH v2 3/3] hw/nvme: Add SPDM over DOE support Alistair Francis
2023-10-17 10:18 ` Jonathan Cameron via [this message]
2023-10-17 10:18 ` Jonathan Cameron
2023-11-15 9:29 ` Klaus Jensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231017111810.00004a84@Huawei.com \
--to=qemu-devel@nongnu.org \
--cc=Jonathan.Cameron@Huawei.com \
--cc=alistair.francis@wdc.com \
--cc=alistair23@gmail.com \
--cc=cbrowy@avery-design.com \
--cc=hchkuo@avery-design.com.tw \
--cc=its@irrelevant.dk \
--cc=jiewen.yao@intel.com \
--cc=kbusch@kernel.org \
--cc=lukas@wunner.de \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=wilfred.mallawa@wdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.