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

2025-01-06 Thread James Bottomley
On Thu, 2024-12-19 at 17:39 +, Daniel P. Berrangé wrote: > On Thu, Dec 12, 2024 at 12:05:28PM -0500, James Bottomley wrote: > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specification. > > > > https://github.com/

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

2024-12-12 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 v11 2/2] tpm: add backend for mssim

2024-12-12 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 Armbr

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

2024-12-12 Thread James Bottomley
CR values are wrong). 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 | 1 + backends/tpm/tpm_emulat

Re: Unmapping KVM Guest Memory from Host Kernel

2024-05-13 Thread Gowans, James
On Mon, 2024-05-13 at 10:09 -0700, Sean Christopherson wrote: > On Mon, May 13, 2024, James Gowans wrote: > > On Mon, 2024-05-13 at 08:39 -0700, Sean Christopherson wrote: > > > > Sean, you mentioned that you envision guest_memfd also supporting > > > > non-C

Re: Unmapping KVM Guest Memory from Host Kernel

2024-05-13 Thread Gowans, James
On Mon, 2024-05-13 at 08:39 -0700, Sean Christopherson wrote: > > Sean, you mentioned that you envision guest_memfd also supporting non-CoCo > > VMs. > > Do you have some thoughts about how to make the above cases work in the > > guest_memfd context? > > Yes.  The hand-wavy plan is to allow selec

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 backend

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 > requ

[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 Armbr

[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
optarg->optstr conversion 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

Unmapping KVM Guest Memory from Host Kernel

2024-03-08 Thread Gowans, James
on top of guest_memfd, for example via some flag that causes it to leave memory in the host userspace’s page tables, but removes it from the direct map? We are keen to help contribute to getting this working, we’re just looking for guidance from maintainers on what the correct way to solve this is. Che

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

2024-02-12 Thread James Bottomley
mbine and > derive the attestation report's MEASUREMENT field to accept > "evidence" objects for the core firmware component and the kernel > hashes component. This sounds like a first measurement thing. In many ways, the pre- launch measurement is equivalent to the SRTM of a physi

Re: [PATCH 2/2] linux-user: Replace use of lfs64 related functions and macros

2023-10-15 Thread Sam James
Did anything happen with this, or did it get stuck? We just had another user hit it in Gentoo at https://bugs.gentoo.org/915809. It looks like openembedded (obviously given the author) and Alpine have been using this for nearly a year. thanks, sam

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 for

[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 for

[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: &g

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

2023-09-25 Thread James Bottomley
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? > > > I thought we discusses it back then. Does it handle snapshotti

Re: [RFC PATCH v1 0/9] Hypervisor-Enforced Kernel Integrity

2023-05-26 Thread James Morris
[Side topic] Would folks be interested in a Linux Plumbers Conference MC on this topic generally, across different hypervisors, VMMs, and architectures? If so, please let me know who the key folk would be and we can try writing up an MC proposal. -- James Morris

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

2023-02-02 Thread James Bottomley
ams properly not coded it as a setup_data addition, but now we're stuck with coping with existing behaviour, which is why I thought the retro fit to boot_params would be the better path forward, but if you have any alternatives, I'm sure we could look at them. James

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

2023-02-02 Thread James Bottomley
but it does strike me we could also use all of _pad8 for the (the addition is only 48 bytes) or even _pad3 + hd0_info + hd1_info. James --- diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S index 9338c68e7413..0120ab77dac9 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.

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

2023-02-01 Thread James Bottomley
f having to expand any integrity protected files. The SEV direct boot will still work because there's a check further down that doesn't copy the modified header back over the kernel because it is ignored on efi stub boot anyway. James

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 > > > pul

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

2023-02-01 Thread James Bottomley
be too much trouble to point to the branch so we can actually test it? It does seem that the biggest problem this issue shows is that there wasn't wide enough configuration testing done on the prior commits before they were merged. James

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
t measured 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

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

2023-02-01 Thread James Bottomley
t measured 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/i38

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
having external state not stored in the migration image has the potential actually to solve the rollback problem because you could keep the TPM clock running and potentially increase the reset count, so migrations would show up in TPM quotes and you don't have control of the state of the vTPM to replay it. James

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 MS

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 that and we&#x

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

2023-01-09 Thread James Bottomley
't work, then it needs a > blocker. It works under limited circumstances ... in fact similar circumstances passthrough migration works under, which is also not documented. The external MSSIM TPM emulator has to be kept running to preserve the state. If you restart it, the migration will fail. James

[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 for

[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 > > +

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

2023-01-05 Thread James Bottomley
tor backend driver > VNC server running on ::1:5900 So I think if I parse this correctly, your complaint is the help option no longer exit(1)'s? It shouldn't do that because it's not a failure, but I can code it to exit(0). James

[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 for

[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 > >   case QEMU_OPTION_tpmd

[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 for

[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
d. Well, it makes the diffstat less favourable, but how about this (I'm also assuming I don't need to wrapper the new mssim options)? James --- backends/tpm/tpm_emulator.c| 24 - backends/tpm/tpm_passthrough.c | 27 +++--- include/sysemu/tpm.h

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 rethreading

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 the bac

[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 for

[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. > >

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 > > +kept r

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

2022-12-16 Thread James Bottomley
mssim network protocol, and has the ability to serialize > > its state. Whether such an impl exists today or not is separate. > > Then let's document the scenarios so someone can repeat them, I think > this is just fair. James said he tested state migration scenarios and > it

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

2022-12-16 Thread James Bottomley
is not as seemlessly integrated with swtpm is, but it is still > > technically posssible todo the right thing with migration from > > QEMU's POV. Whether or not the app/person managing mssim instance > > actually does the right thing in practice is not a concern of QEMU. > > I don't see a need for a migration blocker here. > > I do see it because the *volatile state* cannot be extracted from > this device. The state of the PCRs is going to be lost. Installing a migration blocker would prevent me from exercising the S3 paths, which I want to test. James

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. > &g

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 for

[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. > > > > > >

Re: [PATCH] tpm: add backend for mssim

2022-12-14 Thread James Bottomley
PM by say its EK name. James

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 expect t

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 e

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

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,

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

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 antici

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-tpm

[PATCH] tpm: add backend for mssim

2022-12-10 Thread James Bottomley
line 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 +++ backend

Re: LTP test perf_event_open02.c: possible rounding issue on aarch64 KVM

2021-12-09 Thread James Clark
On 09/12/2021 12:20, Petr Vorel wrote: > Hi, > > I have problem with LTP test perf_event_open02.c [1] on QEMU using KVM on > openSUSE aarch64 kernel 5.15.5-1-default (not much different from stable > kernel > from kernel.org): > > # /opt/ltp/testcases/bin/perf_event_open02 > ... > perf_event_o

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. Technically, the problem is we can't overwrite running code and once the guest is re-sited to the target, the OVMF there has to match exactly what was on the source for the RT to still function. Once the migration has run, the OVMF on the target must be identical to what was on the source (including internally allocated OVMF memory), and if we can't copy the MH code, we have to rely on the target image providing this identical code and we copy the rest. James

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 the

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

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
nterface code, do we need to interface > with this added KVM code via the QEMU accelerator framework, or > simply invoke this KVM code statically ? I think we need to design the interface as cleanly as possible, so it just depends what's easiest. We certainly need some KVM support for the mirror CPUs, I think but it's not clear to me yet what the simplest way to do the interface is. James

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
I really think we should look at S3 suspend, where we shut down the drivers and then reattach on S3 resume as the potential pathway to getting migration working both for virtual functions and this use case. James

Re: P2P problem on QEMU

2021-05-27 Thread James Harvey
On Wed, May 26, 2021 at 1:44 PM Gabriele Borello wrote: > The following kernel version was used: Linux 5.9.0-rc8 x86_64, > ... > The kernel was compiled by configuring peer-to-peer as described in the > p2pmem-test guide. Trying to run the command suggested in the p2pmem-test > guide ( ./p2pmem

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 vect

Re: Incorrect NVMe DLFEAT?

2021-04-29 Thread Harris, James R
On 4/29/21, 10:22 AM, "Klaus Jensen" wrote: On Apr 29 16:51, Harris, James R wrote: >Hi, > Hi Jim, >I’m seeing SPDK test failures with QEMU NVMe controllers that I’ve >bisected to QEMU commit 2605257a26 (“hw/block/nvme: add the dataset

Incorrect NVMe DLFEAT?

2021-04-29 Thread Harris, James R
Hi, I’m seeing SPDK test failures with QEMU NVMe controllers that I’ve bisected to QEMU commit 2605257a26 (“hw/block/nvme: add the dataset management command”). The failing tests are related to write zeroes handling. If an NVMe controller supports DSM, and DLFEAT indicates that deallocated blo

Re: [PATCH 13/24] hw/misc/aspeed_xdma: Add AST2600 support

2021-04-07 Thread Eddie James
> and this breaks kexec. > > Add a AspeedXDMAClass to take into account the register differences. Thanks Cedric! Reviewed-by: Eddie James > > Cc: Eddie James > Signed-off-by: Cédric Le Goater > --- > include/hw/misc/aspeed_xdma.h | 17 - > hw/arm/aspeed_ast

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 priori

Re: Interactive launch over QMP socket?

2021-02-10 Thread James Bottomley
deliver secrets > > 6. Guest owner could send a "cont" command and the VM can launch > > Any advice on how to accomplish adding this degree of interaction to > supplying inputs to specific parts of the launch process this is > greatly appreciated. I've attached

  1   2   3   4   5   6   7   8   >