[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/2] x86/sev: generate SEV kernel loader hashes in x86_loa
From: |
Dov Murik |
Subject: |
Re: [PATCH v3 2/2] x86/sev: generate SEV kernel loader hashes in x86_load_linux |
Date: |
Wed, 29 Sep 2021 12:42:12 +0300 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 27/09/2021 20:03, Daniel P. Berrangé wrote:
> On Wed, Aug 25, 2021 at 07:35:38AM +0000, Dov Murik wrote:
>> If SEV is enabled and a kernel is passed via -kernel, pass the hashes of
>> kernel/initrd/cmdline in an encrypted guest page to OVMF for SEV
>> measured boot.
>>
>> Co-developed-by: James Bottomley <jejb@linux.ibm.com>
>> Signed-off-by: James Bottomley <jejb@linux.ibm.com>
>> Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
>> Reviewed-by: Connor Kuehl <ckuehl@redhat.com>
>> ---
>> hw/i386/x86.c | 25 ++++++++++++++++++++++++-
>> 1 file changed, 24 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/i386/x86.c b/hw/i386/x86.c
>> index 00448ed55a..4044104cfe 100644
>> --- a/hw/i386/x86.c
>> +++ b/hw/i386/x86.c
>> @@ -45,6 +45,7 @@
>> #include "hw/i386/fw_cfg.h"
>> #include "hw/intc/i8259.h"
>> #include "hw/rtc/mc146818rtc.h"
>> +#include "target/i386/sev_i386.h"
>>
>> #include "hw/acpi/cpu_hotplug.h"
>> #include "hw/irq.h"
>> @@ -778,6 +779,7 @@ void x86_load_linux(X86MachineState *x86ms,
>> const char *initrd_filename = machine->initrd_filename;
>> const char *dtb_filename = machine->dtb;
>> const char *kernel_cmdline = machine->kernel_cmdline;
>> + KernelLoaderContext kernel_loader_context = {};
>
> I think the variable name is overly verbose but could also benefit
> from a 'sev_' prefix. eg how about just calling the var 'sev_context'.
I'll consider a rename which includes 'sev_' and is a bit shorter.
>
> In any case, its functionally fine, so can add
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>
Thanks!
-Dov
>
> Regards,
> Daniel
>