Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread James Bottomley
On Wed, 2024-05-01 at 13:20 -0400, Stefan Berger wrote: > > > On 5/1/24 12:52, James Bottomley wrote: > > On Wed, 2024-05-01 at 12:31 -0400, Stefan Berger wrote: > > > > > > > > > On 5/1/24 12:21, James Bottomley wrote: > > > >

Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread James Bottomley
On Wed, 2024-05-01 at 12:31 -0400, Stefan Berger wrote: > > > On 5/1/24 12:21, James Bottomley wrote: > > On Tue, 2024-04-30 at 17:12 -0400, Stefan Berger wrote: > > > On 4/30/24 15:08, James Bottomley wrote: > > [...] > > > > +The mssim b

Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread James Bottomley
On Tue, 2024-04-30 at 17:12 -0400, Stefan Berger wrote: > On 4/30/24 15:08, James Bottomley wrote: [...] > > +The mssim backend supports snapshotting and migration by not > > resetting > > I don't thing snapshotting is supported because snapshooting would > requi

[PATCH v10 2/2] tpm: add backend for mssim

2024-04-30 Thread James Bottomley
with -tpmdev "{'type':'mssim','id':'tpm0','command':{'type':inet,'host':'remote','port':'2321'}}" tpm-tis also works as the backend. Signed-off-by: James Bottomley Acked-by: Markus Armbruster --- v2: convert to SocketAddr json and use qio_channel_socket_connect_sync() v3: gate control

[PATCH v10 1/2] tpm: convert tpmdev options processing to new visitor format

2024-04-30 Thread James Bottomley
Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley Tested-by: Stefan Berger Reviewed-by: Stefan Berger --- v4: add TpmConfiOptions v5: exit(0) for help

[PATCH v10 0/2] tpm: add mssim backend

2024-04-30 Thread James Bottomley
ion v10 Fix more merge conflicts and update API versions James --- James Bottomley (2): tpm: convert tpmdev options processing to new visitor format tpm: add backend for mssim MAINTAINERS| 6 + backends/tpm/Kconfig | 5 + backends/tpm/meson.build |

Re: RFC i386/sev: kernel-hashes, reference measurements and event logs

2024-02-12 Thread James Bottomley
On Mon, 2024-02-12 at 12:16 -0800, Dionna Amalie Glaze wrote: > This is not a patch but it felt inappropriate to derail a recent > patch that's just refactoring the kernel-hashes object_class_property > definition. Apologies if this has been discussed before, as I'm not > particularly active here.

Re: [PATCH v8 2/2] tpm: add backend for mssim

2023-10-05 Thread James Bottomley
On Thu, 2023-10-05 at 18:11 +0200, Philippe Mathieu-Daudé wrote: > On 5/10/23 15:57, James Bottomley wrote: > > On Thu, 2023-10-05 at 08:49 +0200, Philippe Mathieu-Daudé wrote: > > > On 4/10/23 20:42, James Bottomley wrote: > > > > From: James Bottomley [...] &g

Re: [PATCH v8 2/2] tpm: add backend for mssim

2023-10-05 Thread James Bottomley
On Thu, 2023-10-05 at 08:49 +0200, Philippe Mathieu-Daudé wrote: > Hi James, > > On 4/10/23 20:42, James Bottomley wrote: > > From: James Bottomley > > > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specifica

[PATCH v8 2/2] tpm: add backend for mssim

2023-10-04 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket based protocol on two sockets, one for command (default 2321) and one

[PATCH v8 1/2] tpm: convert tpmdev options processing to new visitor format

2023-10-04 Thread James Bottomley
From: James Bottomley Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley Tested-by: Stefan Berger Reviewed-by: Stefan Berger --- v4: add

[PATCH v8 0/2] tpm: add mssim backend

2023-10-04 Thread James Bottomley
From: James Bottomley The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status

Re: [PATCH v7 2/2] tpm: add backend for mssim

2023-09-28 Thread James Bottomley
On Thu, 2023-09-28 at 07:29 +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Wed, Sep 27, 2023 at 12:49:08PM -0400, James Bottomley wrote: > > > From: James Bottomley > > > > > > The Microsoft Simulator (mssim) is the reference emu

[PATCH v7 1/2] tpm: convert tpmdev options processing to new visitor format

2023-09-27 Thread James Bottomley
From: James Bottomley Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley --- v4: add TpmConfiOptions v5: exit(0) for help v7: adjust line lengths, free

[PATCH v7 2/2] tpm: add backend for mssim

2023-09-27 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket based protocol on two sockets, one for command (default 2321) and one

[PATCH v7 0/2] tpm: add mssim backend

2023-09-27 Thread James Bottomley
From: James Bottomley The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-25 Thread James Bottomley
On Fri, 2023-09-22 at 08:00 +0200, Markus Armbruster wrote: > Found this cleaning out old mail, sorry for missing it until now! > > I think we owe James a quick decision wether we're willing to take > the > feature.  Stefan, thoughts? > > James Bottomley writes: > &

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-25 Thread James Bottomley
On Fri, 2023-09-22 at 09:27 -0400, Stefan Berger wrote: > > On 9/22/23 09:02, Daniel P. Berrangé wrote: > > On Fri, Sep 22, 2023 at 08:41:19AM -0400, Stefan Berger wrote: > > > On 9/22/23 02:00, Markus Armbruster wrote: > > > > Found this cleaning out old mail, sorry for missing it until > > > >

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-02 Thread James Bottomley
On Thu, 2023-02-02 at 07:03 -0800, H. Peter Anvin wrote: [...] > NAK. We need to fix the actual problem of the kernel stomping on > memory it shouldn't, not paper around it. This is a first boot situation, not kexec (I just updated kexec because it should use any new mechanism we propose).

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-02 Thread James Bottomley
On Wed, 2023-02-01 at 15:48 -0500, Jason A. Donenfeld wrote: [...] > But it sounds like you might now have a concrete suggestion on > something even better. I'm CCing hpa, as this is his wheelhouse, and > maybe you two can divise the next step while I'm away. Maybe the pad9 > thing you mentioned

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
On Wed, 2023-02-01 at 12:51 -0500, Jason A. Donenfeld wrote: > It's not a secret, but I have so little internet right now that I > can't even load a webpage, and I'm on my phone, hence the short > HTMLified emails. > > In brief, though, it gets rid of all modifications to the kernel > image all

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
On Wed, 2023-02-01 at 16:50 +, Peter Maydell wrote: > On Wed, 1 Feb 2023 at 15:25, James Bottomley > wrote: > > > > On Wed, 2023-02-01 at 10:10 -0500, Jason A. Donenfeld wrote: > > > This is already fixed via the patch that MST just sent in his > >

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
On Wed, 2023-02-01 at 10:10 -0500, Jason A. Donenfeld wrote: > This is already fixed via the patch that MST just sent in his pull. > So wait a few days for that to be merged and it'll be all set. > > No need for this patch here. Do not merge. If it's not a secret, would it be too much trouble to

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
On Wed, 2023-02-01 at 14:35 +, Daniel P. Berrangé wrote: > On Wed, Feb 01, 2023 at 08:57:10AM -0500, James Bottomley wrote: > > The origin commit for rng seeding 67f7e426e5 ("hw/i386: pass RNG > > seed > > via setup_data entry") modifies the kernel image f

[PATCH v2] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
sured boot, but I don't think anyone cares about that now. Signed-off-by: James Bottomley --- v2: with non wrapped lines this time hw/i386/pc_q35.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 83c57c6eb1..11e8dd7ca7 100644 ---

[PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
sured boot, but I don't think anyone cares about that now. Signed-off-by: James Bottomley --- hw/i386/pc_q35.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 83c57c6eb1..11e8dd7ca7 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-10 Thread James Bottomley
On Tue, 2023-01-10 at 09:47 -0500, Stefan Berger wrote: > On 1/10/23 09:14, James Bottomley wrote: > > On Mon, 2023-01-09 at 16:06 -0500, Stefan Berger wrote: > > > On 1/9/23 14:01, Stefan Berger wrote: > > [...] > > > If you use TPM 2 for attestation then ce

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-10 Thread James Bottomley
On Mon, 2023-01-09 at 16:06 -0500, Stefan Berger wrote: > On 1/9/23 14:01, Stefan Berger wrote: [...] > If you use TPM 2 for attestation then certain TPM 2 state migration > scenarios may become problematic. One could construct a scenario > where attestation preceeds some action that requires

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 18:54 +, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: > > On Mon, 2023-01-09 at 13:34 -0500, Stefan Berger wrote: > > > > > > > > > On 1/9/23 12:55, James Bottomley wrote: > > > > On Mon, 2

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 13:34 -0500, Stefan Berger wrote: > > > On 1/9/23 12:55, James Bottomley wrote: > > On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: > > > * James Bottomley (j...@linux.ibm.com) wrote: > > [...] > > > > external

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: [...] > > external MSSIM TPM emulator has to be kept running to preserve the > > state.  If you restart it, the migration will fail. > > Document t

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 16:59 +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Fri, Dec 16, 2022 at 08:32:44AM -0500, Stefan Berger wrote: [...] > > > I do see it because the *volatile state* cannot be extracted from > > > this device. The state of the

[PATCH v6 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket based protocol on two sockets, one for command (default 2321) and one

[PATCH v6 1/2] tpm: convert tpmdev options processing to new visitor format

2023-01-09 Thread James Bottomley
From: James Bottomley Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley --- v4: add TpmConfiOptions v5: exit(0) for help --- backends/tpm

[PATCH v6 0/2] tpm: add mssim backend

2023-01-09 Thread James Bottomley
From: James Bottomley The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status

Re: [PATCH v5 2/2] tpm: add backend for mssim

2023-01-05 Thread James Bottomley
On Thu, 2023-01-05 at 11:20 -0500, Stefan Berger wrote: > > > On 1/5/23 08:00, James Bottomley wrote: [...] > > +The mssim backend supports snapshotting and migration, but the > > state > > +of the Microsoft Simulator server must be preserved (or the server > &g

Re: [PATCH v5 1/2] tpm: convert tpmdev options processing to new visitor format

2023-01-05 Thread James Bottomley
On Thu, 2023-01-05 at 09:59 -0500, Stefan Berger wrote: [...] > > @@ -2658,7 +2646,6 @@ void qemu_init(int argc, char **argv) > >   qemu_add_opts(_boot_opts); > >   qemu_add_opts(_add_fd_opts); > >   qemu_add_opts(_object_opts); > > -    qemu_add_opts(_tpmdev_opts); > >  

[PATCH v5 1/2] tpm: convert tpmdev options processing to new visitor format

2023-01-05 Thread James Bottomley
From: James Bottomley Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley --- v4: add TpmConfiOptions --- backends/tpm/tpm_emulator.c| 24

[PATCH v5 2/2] tpm: add backend for mssim

2023-01-05 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket based protocol on two sockets, one for command (default 2321) and one

[PATCH v5 0/2] tpm: add mssim backend

2023-01-05 Thread James Bottomley
From: James Bottomley The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status

Re: [PATCH v4 1/2] tpm: convert tpmdev options processing to new visitor format

2022-12-30 Thread James Bottomley
On Fri, 2022-12-30 at 12:01 -0500, Stefan Berger wrote: > On 12/30/22 10:24, James Bottomley wrote: [...] > > @@ -2906,9 +2893,7 @@ void qemu_init(int argc, char **argv) > >   break; > >   #ifdef CONFIG_TPM > >   

[PATCH v4 2/2] tpm: add backend for mssim

2022-12-30 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket based protocol on two sockets, one for command (default 2321) and one

[PATCH v4 1/2] tpm: convert tpmdev options processing to new visitor format

2022-12-30 Thread James Bottomley
From: James Bottomley Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley --- v4: add TpmConfiOptions --- backends/tpm/tpm_emulator.c| 24

[PATCH v4 0/2] tpm: add mssim backend

2022-12-30 Thread James Bottomley
From: James Bottomley The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status

Re: [PATCH v3 1/2] tpm: convert tpmdev options processing to new visitor format

2022-12-21 Thread James Bottomley
On Wed, 2022-12-21 at 16:32 +, Daniel P. Berrangé wrote: > This isn't a valid change todo, as it affects the public facing > data structure for the  query-tpm command. > > I understand why you're doing it though, to get rid fo the > extra nesting, which is a hangover from earlier QAPI days >

Re: [PATCH v3 0/2] tpm: add mssim backend

2022-12-19 Thread James Bottomley
On Mon, 2022-12-19 at 10:16 -0500, Stefan Berger wrote: > > > On 12/19/22 08:13, James Bottomley wrote: > > From: James Bottomley > > > > The requested feedback was to convert the tpmdev handler to being > > json > > based, which requires rethr

Re: [PATCH v3 0/2] tpm: add mssim backend

2022-12-19 Thread James Bottomley
On Mon, 2022-12-19 at 09:15 -0500, Stefan Berger wrote: > > > On 12/19/22 08:55, James Bottomley wrote: > > On Mon, 2022-12-19 at 08:51 -0500, Stefan Berger wrote: > > > > > > > > > On 12/19/22 08:13, James Bottomley wrote: > > > > From: Ja

Re: [PATCH v3 0/2] tpm: add mssim backend

2022-12-19 Thread James Bottomley
On Mon, 2022-12-19 at 08:51 -0500, Stefan Berger wrote: > > > On 12/19/22 08:13, James Bottomley wrote: > > From: James Bottomley > > > > The requested feedback was to convert the tpmdev handler to being > > json based, which requires rethreading all

[PATCH v3 2/2] tpm: add backend for mssim

2022-12-19 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket based protocol on two sockets, one for command (default 2321) and one

[PATCH v3 0/2] tpm: add mssim backend

2022-12-19 Thread James Bottomley
From: James Bottomley The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status

[PATCH v3 1/2] tpm: convert tpmdev options processing to new visitor format

2022-12-19 Thread James Bottomley
From: James Bottomley Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley --- backends/tpm/tpm_emulator.c| 35 ++--- backends/tpm

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-19 Thread James Bottomley
On Mon, 2022-12-19 at 06:49 -0500, Stefan Berger wrote: > > > On 12/16/22 08:53, James Bottomley wrote: > > > > > I could do a blog post, but I really don't think you want this in > > official documentation because that creates support expectations. > > We

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread James Bottomley
On Fri, 2022-12-16 at 11:08 -0500, Stefan Berger wrote: > On 12/16/22 10:48, James Bottomley wrote: [...] > > +The mssim backend supports snapshotting and migration, but the > > state > > +of the Microsoft Simulator server must be preserved (or the server > > +ke

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread James Bottomley
On Fri, 2022-12-16 at 09:55 -0500, Stefan Berger wrote: > > > On 12/16/22 09:29, Daniel P. Berrangé wrote: > > > > > All the objections you're raising are related to the current > > specifics of the implementation of the mssim remote server. > > While valid, this is of no concern to QEMU when

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread James Bottomley
On Fri, 2022-12-16 at 08:32 -0500, Stefan Berger wrote: > On 12/16/22 07:54, Daniel P. Berrangé wrote: > > On Fri, Dec 16, 2022 at 07:28:59AM -0500, Stefan Berger wrote: [...] > > > Nevertheless it needs documentation and has to handle migration > > > scenarios either via a blocker or it has to

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 15:22 -0500, Stefan Berger wrote: > On 12/15/22 15:07, James Bottomley wrote: [...] > > don't really have much interest in the migration use case, but I > > knew it should work like the passthrough case, so that's what I > > tested. > > I think

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 14:57 -0500, Stefan Berger wrote: > On 12/15/22 14:40, James Bottomley wrote: > > On Thu, 2022-12-15 at 14:35 -0500, Stefan Berger wrote: [...] > > > You should also add a description to docs/specs/tpm.rst. > > > > Description of what?  It func

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 14:35 -0500, Stefan Berger wrote: > > > On 12/15/22 14:22, James Bottomley wrote: > > On Thu, 2022-12-15 at 13:46 -0500, Stefan Berger wrote: > > > > > > > > > On 12/15/22 13:01, James Bottomley wrote: > > > >

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 13:46 -0500, Stefan Berger wrote: > > > On 12/15/22 13:01, James Bottomley wrote: > > From: James Bottomley > > > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specification. > > >

[PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket baset protocol on two sockets, one for command (default 2321) and one

[PATCH 1/2] tpm: convert tpmdev options processing to new visitor format

2022-12-15 Thread James Bottomley
From: James Bottomley Instead of processing the tpmdev options using the old qemu options, convert to the new visitor format which also allows the passing of json on the command line. Signed-off-by: James Bottomley --- backends/tpm/tpm_emulator.c| 35 ++ backends/tpm

[PATCH 0/2] tpm: add mssim backend

2022-12-15 Thread James Bottomley
From: James Bottomley The requested feedback was to convert the tpmdev handler to being json based, which requires rethreading all the backends. The good news is this reduced quite a bit of code (especially as I converted it to error_fatal handling as well, which removes the return status

Re: [PATCH] tpm: add backend for mssim

2022-12-14 Thread James Bottomley
On Wed, 2022-12-14 at 11:31 +, Daniel P. Berrangé wrote: > On Mon, Dec 12, 2022 at 05:06:05PM -0500, James Bottomley wrote: > > On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: > > > Copy'ing Markus for QAPI design feedback. > > > > > > On S

Re: [PATCH] tpm: add backend for mssim

2022-12-14 Thread James Bottomley
On Wed, 2022-12-14 at 11:52 +, Daniel P. Berrangé wrote: > It is a shame there isn't a standardized protocol for software TPM > communication, as that'd avoid the need for multiple backends. Technically the mssim protocol is the standard, being part of the reference implementation, but

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 17:02 -0500, Stefan Berger wrote: > > > On 12/12/22 16:36, James Bottomley wrote: > > On Mon, 2022-12-12 at 14:32 -0500, Stefan Berger wrote: [...] > > >   Either way, what is the latency that this introduces because I > > > would expe

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: > Copy'ing Markus for QAPI design feedback. > > On Sat, Dec 10, 2022 at 12:10:18PM -0500, James Bottomley wrote: [...] > > +## > > +# @TPMmssimOptions: > > +# > > +# Information for the mssim emulat

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 14:32 -0500, Stefan Berger wrote: > > > On 12/12/22 14:12, James Bottomley wrote: > > On Mon, 2022-12-12 at 13:58 -0500, Stefan Berger wrote: > > > On 12/12/22 13:48, James Bottomley wrote: > > > > On Mon, 2022-12-12 at 11:59 -0500, Ste

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 13:58 -0500, Stefan Berger wrote: > On 12/12/22 13:48, James Bottomley wrote: > > On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: > > > On 12/12/22 11:38, James Bottomley wrote: [...] > > > > the kernel use of the TPM, but I'm trying to f

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 11:59 -0500, Stefan Berger wrote: > > > On 12/12/22 11:38, James Bottomley wrote: > > On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: > > > Copy'ing Markus for QAPI design feedback. > > > > > > On Sat, Dec 10, 2022

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 15:47 +, Daniel P. Berrangé wrote: > Copy'ing Markus for QAPI design feedback. > > On Sat, Dec 10, 2022 at 12:10:18PM -0500, James Bottomley wrote: > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 10:20 -0500, Stefan Berger wrote: > On 12/12/22 09:47, James Bottomley wrote: [...] > > I don't actually use virsh in my harness.  I'm mostly interested in > > the running the kernel TPM selftests against the reference model.  > > But I anticipate it wo

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 09:44 -0500, Stefan Berger wrote: > > > On 12/12/22 09:32, James Bottomley wrote: > > On Mon, 2022-12-12 at 09:27 -0500, Stefan Berger wrote: > > > > > > > > > On 12/12/22 08:59, James Bottomley wrote: > > > >

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 09:27 -0500, Stefan Berger wrote: > > > On 12/12/22 08:59, James Bottomley wrote: > > On Mon, 2022-12-12 at 08:43 -0500, Stefan Berger wrote: > > > > > > > > > On 12/10/22 12:10, James Bottomley wrote: > > > > The

Re: [PATCH] tpm: add backend for mssim

2022-12-12 Thread James Bottomley
On Mon, 2022-12-12 at 08:43 -0500, Stefan Berger wrote: > > > On 12/10/22 12:10, James Bottomley wrote: > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specification. > > > > https://github.com/Microsoft/ms-t

[PATCH] tpm: add backend for mssim

2022-12-10 Thread James Bottomley
with -tpmdev mssim,it=tpm0,host=remote.host,port=4455,ctrl=4457 \ tpm-tis also works as the backend. Signed-off-by: James Bottomley --- backends/tpm/Kconfig | 5 + backends/tpm/meson.build | 1 + backends/tpm/tpm_mssim.c | 266 +++ backends/tpm

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-19 Thread James Bottomley
On Thu, 2021-08-19 at 15:28 +0100, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: > > On Thu, 2021-08-19 at 09:22 +0100, Dr. David Alan Gilbert wrote: [...] > > > I think it really does have to cope with migration to a new > > > version of

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-19 Thread James Bottomley
On Thu, 2021-08-19 at 09:22 +0100, Dr. David Alan Gilbert wrote: > * Tobin Feldman-Fitzthum (to...@linux.ibm.com) wrote: > > On 8/18/21 3:04 PM, Dr. David Alan Gilbert wrote: > > > * Tobin Feldman-Fitzthum (to...@linux.ibm.com) wrote: > > > > On 8/17/21 6:04 PM, Steve Rutherford wrote: > > > > >

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-18 Thread James Bottomley
On Wed, 2021-08-18 at 18:30 +0100, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: > > On Wed, 2021-08-18 at 16:43 +0100, Dr. David Alan Gilbert wrote: > > > * James Bottomley (j...@linux.ibm.com) wrote: > > [...] > > > > Given

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-18 Thread James Bottomley
On Wed, 2021-08-18 at 16:43 +0100, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: [...] > > Given the lack of SMI, we can't guarantee that with plain SEV and > > -ES. Once we move to -SNP, we can use VMPLs to achieve this. > > Doesn't the MH hav

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-18 Thread James Bottomley
On Wed, 2021-08-18 at 16:31 +0100, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: > > On Wed, 2021-08-18 at 10:31 +, Ashish Kalra wrote: > > > Hello Paolo, > > > > > > On Mon, Aug 16, 2021 at 05:38:55PM +0200, Paolo Bonz

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-18 Thread James Bottomley
On Wed, 2021-08-18 at 10:31 +, Ashish Kalra wrote: > Hello Paolo, > > On Mon, Aug 16, 2021 at 05:38:55PM +0200, Paolo Bonzini wrote: > > On 16/08/21 17:13, Ashish Kalra wrote: > > > > > I think that once the mirror VM starts booting and running > > > > > the UEFI code, it might be only during

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-17 Thread James Bottomley
On Tue, 2021-08-17 at 16:10 -0700, Steve Rutherford wrote: > On Tue, Aug 17, 2021 at 3:57 PM James Bottomley > wrote: > > Realistically, migration is becoming a royal pain, not just for > > confidential computing, but for virtual functions in general. I > > really th

Re: [RFC PATCH 00/13] Add support for Mirror VM.

2021-08-17 Thread James Bottomley
On Wed, 2021-08-18 at 00:37 +0200, Paolo Bonzini wrote: > On Tue, Aug 17, 2021 at 11:54 PM Steve Rutherford > wrote: > > > 1) the easy one: the bottom 4G of guest memory are mapped in the > > > mirror > > > VM 1:1. The ram_addr_t-based addresses are shifted by either 4G > > > or a > > > huge

Re: [PULL 02/19] sev: update sev-inject-launch-secret to make gpa optional

2021-05-20 Thread James Bottomley
On Thu, 2021-05-20 at 23:36 +0200, Philippe Mathieu-Daudé wrote: > On 2/15/21 2:16 PM, Paolo Bonzini wrote: > > From: James Bottomley > > > > If the gpa isn't specified, it's value is extracted from the OVMF > > properties table located below the reset vector (and if

Re: Interactive launch over QMP socket?

2021-02-10 Thread James Bottomley
On Wed, 2021-02-10 at 12:46 -0600, Connor Kuehl wrote: > On 2/10/21 12:14 PM, James Bottomley wrote: > > > I would like to add a message type to QMP which allows guest > > > owners to supply this data over a socket and _not_ require these > > > components a pri

Re: Interactive launch over QMP socket?

2021-02-10 Thread James Bottomley
On Wed, 2021-02-10 at 12:01 -0600, Connor Kuehl wrote: > Hello, > > Does QEMU have an internal API which would allow VM construction to > wait at a *very specific point* until specific data/QMP message(s) > are supplied via the QMP socket? Yes, the -S flag tells qemu to pause before starting the

[PATCH v3 2/2] sev: update sev-inject-launch-secret to make gpa optional

2021-02-04 Thread James Bottomley
are uint32_t. We extract and use it as the gpa for the injection. Note: it is expected that the injected secret will also be GUID described but since qemu can't interpret it, the format is left undefined here. Signed-off-by: James Bottomley --- v2: fix line length warning, add more comments

[PATCH v3 1/2] pc: add parser for OVMF reset block

2021-02-04 Thread James Bottomley
before the end of the firmware file. Add a parser for the ovmf reset block which takes a copy of the block, if the table foot guid is found, minus the footer and a function for later traversal to return the data area of any specified GUIDs. Signed-off-by: James Bottomley --- v2: fix brace warnings

[PATCH v3 0/2] sev: enable secret injection to a self described area in OVMF

2021-02-04 Thread James Bottomley
of the table is described in the patch itself) and also adds a hook to pull out the description of the SEV secret area location and use it in place of the sev-inject-launch-secret gpa. James --- James Bottomley (2): pc: add parser for OVMF reset block sev: update sev-inject-launch-secret to make gpa

Re: [PATCH v2 2/2] sev: update sev-inject-launch-secret to make gpa optional

2021-02-02 Thread James Bottomley
On Tue, 2021-01-26 at 12:32 +, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: > > If the gpa isn't specified, it's value is extracted from the OVMF > > properties table located below the reset vector (and if this > > doesn't > >

Re: [PATCH v2 1/2] pc: add parser for OVMF reset block

2021-02-02 Thread James Bottomley
On Tue, 2021-01-26 at 12:22 +, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: > > OVMF is developing a mechanism for depositing a GUIDed table just > > below the known location of the reset vector. The table goes > > backwards in

Re: [PATCH v2] target/i386/sev: add support to query the attestation report

2021-01-05 Thread James Bottomley
and the ATTESATION_REPORT command can be called while the guest > is running. > > Add a QMP interface "query-sev-attestation-report" that can be used > to get the report encoded in base64. > > Cc: James Bottomley > Cc: Tom Lendacky > Cc: Eric Blake > Cc: Pa

[PATCH v2 2/2] sev: update sev-inject-launch-secret to make gpa optional

2020-12-14 Thread James Bottomley
are uint32_t. We extract and use it as the gpa for the injection. Note: it is expected that the injected secret will also be GUID described but since qemu can't interpret it, the format is left undefined here. Signed-off-by: James Bottomley --- v2: fix line length warning, add more comments

[PATCH v2 1/2] pc: add parser for OVMF reset block

2020-12-14 Thread James Bottomley
before the end of the firmware file. Add a parser for the ovmf reset block which takes a copy of the block, if the table foot guid is found, minus the footer and a function for later traversal to return the data area of any specified GUIDs. Signed-off-by: James Bottomley --- v2: fix brace warnings

[PATCH v2 0/2] sev: enable secret injection to a self described area in OVMF

2020-12-14 Thread James Bottomley
a hook to pull out the description of the SEV secret area location and use it in place of the sev-inject-launch-secret gpa. James --- James Bottomley (2): pc: add parser for OVMF reset block sev: update sev-inject-launch-secret to make gpa optional hw/i386/pc_sysfw.c| 106

Re: [PATCH 3/3] sev: update sev-inject-launch-secret to make gpa optional

2020-12-11 Thread James Bottomley
On Fri, 2020-12-11 at 16:00 -0600, Tom Lendacky wrote: > On 12/9/20 11:23 AM, James Bottomley wrote: > > If the gpa isn't specified, it's value is extracted from the OVMF > > properties table located below the reset vector (and if this > > doesn't > > exist, an er

Re: [PATCH] target/i386/sev: add the support to query the attestation report

2020-12-10 Thread James Bottomley
and the ATTESATION_REPORT command can be called while the guest > is running. > > Add a QMP interface "query-sev-attestation-report" that can be used > to get the report encoded in base64. > > Cc: James Bottomley > Cc: Tom Lendacky > Cc: Eric Blake > Cc: Pa

Re: [PATCH 0/3] sev: enable seret injection to a self described area in OVMF

2020-12-09 Thread James Bottomley
On Wed, 2020-12-09 at 09:23 -0800, James Bottomley wrote: > This patch series includes one from Tobin that has already been > posted > and reviewed: > > https://lore.kernel.org/qemu-devel/20201027170303.47550-1-to...@linux.ibm.com/ > > I'm adding it here because it's

[PATCH 3/3] sev: update sev-inject-launch-secret to make gpa optional

2020-12-09 Thread James Bottomley
are uint32_t. We extract and use it as the gpa for the injection. Note: it is expected that the injected secret will also be GUID described but since qemu can't interpret it, the format is left undefined here. Signed-off-by: James Bottomley --- qapi/misc-target.json | 2 +- target/i386

[PATCH 1/3] sev: add sev-inject-launch-secret

2020-12-09 Thread James Bottomley
of the launch secret, it cannot access the secret. Signed-off-by: Tobin Feldman-Fitzthum Reviewed-by: Daniel P. Berrangé Reviewed-by: Brijesh Singh Signed-off-by: James Bottomley --- include/monitor/monitor.h | 3 ++ include/sysemu/sev.h | 2 ++ monitor/misc.c| 17 +++--- qapi/misc

  1   2   >