Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-07-03 Thread Michael S. Tsirkin
On Sun, Jul 04, 2021 at 09:16:59AM +0300, Dov Murik wrote: > Hi Michael, > > [+cc Connor, Dave] > > On 03/07/2021 19:42, Michael S. Tsirkin wrote: > > On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: > >> From: James Bottomley > >> > >> If the VM is using memory encryption and also spe

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-07-03 Thread Dov Murik
Hi Michael, [+cc Connor, Dave] On 03/07/2021 19:42, Michael S. Tsirkin wrote: > On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: >> From: James Bottomley >> >> If the VM is using memory encryption and also specifies a kernel/initrd >> or appended command line, calculate the hashes and

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-07-03 Thread Michael S. Tsirkin
On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: > From: James Bottomley > > If the VM is using memory encryption and also specifies a kernel/initrd > or appended command line, calculate the hashes and add them to the > encrypted data. For this to work, OVMF must support an encrypted a

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-21 Thread Philippe Mathieu-Daudé
On 6/21/21 11:15 AM, Philippe Mathieu-Daudé wrote: > On 6/21/21 10:44 AM, Thomas Huth wrote: >> On 17/06/2021 17.48, Philippe Mathieu-Daudé wrote: >> [...] >>> This works, but I'd rather use: >>> >>>    if (sev_enabled()) { >>>    sev_kernel_loader_calc_cmdline_hash(&sev_loader_context, >>>    

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-21 Thread Philippe Mathieu-Daudé
On 6/21/21 10:44 AM, Thomas Huth wrote: > On 17/06/2021 17.48, Philippe Mathieu-Daudé wrote: > [...] >> This works, but I'd rather use: >> >>    if (sev_enabled()) { >>    sev_kernel_loader_calc_cmdline_hash(&sev_loader_context, >>    kernel_cmdline); >>

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-21 Thread Thomas Huth
On 17/06/2021 17.48, Philippe Mathieu-Daudé wrote: [...] This works, but I'd rather use: if (sev_enabled()) { sev_kernel_loader_calc_cmdline_hash(&sev_loader_context, kernel_cmdline); } And have sev_enabled() defined as: #ifdef CONFIG_SEV

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-17 Thread Eduardo Habkost
On Thu, Jun 17, 2021 at 3:17 PM Dov Murik wrote: > > > > On 17/06/2021 20:22, Eduardo Habkost wrote: > > On Thu, Jun 17, 2021 at 03:48:52PM +0300, Dov Murik wrote: > >> > >> > >> On 15/06/2021 22:53, Philippe Mathieu-Daudé wrote: > >>> Hi Dov, James, > >>> > >>> +Connor who asked to be reviewer. >

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-17 Thread Dov Murik
On 17/06/2021 20:22, Eduardo Habkost wrote: > On Thu, Jun 17, 2021 at 03:48:52PM +0300, Dov Murik wrote: >> >> >> On 15/06/2021 22:53, Philippe Mathieu-Daudé wrote: >>> Hi Dov, James, >>> >>> +Connor who asked to be reviewer. >>> >>> On 6/15/21 5:20 PM, Eduardo Habkost wrote: On Tue, May 25

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-17 Thread Philippe Mathieu-Daudé
Hi Dov, +Thomas On 6/17/21 2:48 PM, Dov Murik wrote: > On 15/06/2021 22:53, Philippe Mathieu-Daudé wrote: >> Hi Dov, James, >> >> +Connor who asked to be reviewer. >> >> On 6/15/21 5:20 PM, Eduardo Habkost wrote: >>> On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: From: James Bott

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-17 Thread Eduardo Habkost
On Thu, Jun 17, 2021 at 03:48:52PM +0300, Dov Murik wrote: > > > On 15/06/2021 22:53, Philippe Mathieu-Daudé wrote: > > Hi Dov, James, > > > > +Connor who asked to be reviewer. > > > > On 6/15/21 5:20 PM, Eduardo Habkost wrote: > >> On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: > >

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-17 Thread Dov Murik
On 15/06/2021 22:53, Philippe Mathieu-Daudé wrote: > Hi Dov, James, > > +Connor who asked to be reviewer. > > On 6/15/21 5:20 PM, Eduardo Habkost wrote: >> On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: >>> From: James Bottomley >>> >>> If the VM is using memory encryption and als

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-16 Thread Dov Murik
Hi Eduardo, On 15/06/2021 18:20, Eduardo Habkost wrote: > On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: >> From: James Bottomley >> >> If the VM is using memory encryption and also specifies a kernel/initrd >> or appended command line, calculate the hashes and add them to the >> encr

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-15 Thread Philippe Mathieu-Daudé
Hi Dov, James, +Connor who asked to be reviewer. On 6/15/21 5:20 PM, Eduardo Habkost wrote: > On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: >> From: James Bottomley >> >> If the VM is using memory encryption and also specifies a kernel/initrd >> or appended command line, calculate t

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-15 Thread Eduardo Habkost
On Tue, May 25, 2021 at 06:59:31AM +, Dov Murik wrote: > From: James Bottomley > > If the VM is using memory encryption and also specifies a kernel/initrd > or appended command line, calculate the hashes and add them to the > encrypted data. For this to work, OVMF must support an encrypted a

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-06-14 Thread Dov Murik
ping Reminder: this is to support secure (measured) boot with AMD SEV with QEMU's -kernel/-initrd/-append switches. The OVMF side of the implementation is under review (with some changes requested), but so far no functional changes are exepcted from the QEMU side, on top of this proposed patch.

Re: [PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-05-25 Thread Dov Murik
On 25/05/2021 9:59, Dov Murik wrote: > From: James Bottomley > > If the VM is using memory encryption and also specifies a kernel/initrd > or appended command line, calculate the hashes and add them to the > encrypted data. For this to work, OVMF must support an encrypted area > to place the

[PATCH] x86: add SEV hashing to fw_cfg for kernel/initrd/cmdline

2021-05-25 Thread Dov Murik
From: James Bottomley If the VM is using memory encryption and also specifies a kernel/initrd or appended command line, calculate the hashes and add them to the encrypted data. For this to work, OVMF must support an encrypted area to place the data which is advertised via a special GUID in the O