qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tobin Feldman-Fitzthum <tobin@linux.ibm.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: thomas.lendacky@amd.com, brijesh.singh@amd.com,
	jejb@linux.ibm.com, tobin@ibm.com, qemu-devel@nongnu.org,
	dgilbert@redhat.com, berrange@redhat.com, pbonzini@redhat.com
Subject: Re: [PATCH v7] sev: add sev-inject-launch-secret
Date: Tue, 27 Oct 2020 12:12:36 -0400	[thread overview]
Message-ID: <06d453ad1dc5866e42145a6d1dd3f764@linux.vnet.ibm.com> (raw)
In-Reply-To: <20201027133506.GC5733@habkost.net>

On 2020-10-27 09:35, Eduardo Habkost wrote:
> On Thu, Oct 22, 2020 at 01:39:09AM -0400, tobin@linux.ibm.com wrote:
>> From: Tobin Feldman-Fitzthum <tobin@linux.ibm.com>
>> 
>> AMD SEV allows a guest owner to inject a secret blob
>> into the memory of a virtual machine. The secret is
>> encrypted with the SEV Transport Encryption Key and
>> integrity is guaranteed with the Transport Integrity
>> Key. Although QEMU facilitates the injection of the
>> launch secret, it cannot access the secret.
>> 
>> Signed-off-by: Tobin Feldman-Fitzthum <tobin@linux.ibm.com>
>> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
>> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
> 
> I was going to queue it, but unfortunately it failed to build on some 
> hosts:
> 
> https://gitlab.com/ehabkost/qemu/-/jobs/814250096
> 
> [1892/5203] Compiling C object 
> libqemu-alpha-softmmu.fa.p/monitor_misc.c.o
> FAILED: libqemu-alpha-softmmu.fa.p/monitor_misc.c.o
> arm-linux-gnueabi-gcc -Ilibqemu-alpha-softmmu.fa.p -I. -I..
> -Itarget/alpha -I../target/alpha -I../capstone/include/capstone -Iqapi
> -Itrace -Iui -Iui/shader -I/usr/include/libdrm -I/usr/include/pixman-1
> -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabi/glib-2.0/include
> -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -Werror -std=gnu99
> -O2 -g -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
> -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes
> -fno-strict-aliasing -fno-common -fwrapv -Wold-style-declaration
> -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k
> -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs
> -Wendif-labels -Wexpansion-to-defined -Wno-missing-include-dirs
> -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong
> -DLEGACY_RDMA_REG_MR -isystem /builds/ehabkost/qemu/linux-headers
> -isystem linux-headers -iquote /builds/ehabkost/qemu/tcg/arm -iquote .
> -iquote /builds/ehabkost/qemu -iquote /builds/ehabkost/qemu/accel/tcg
> -iquote /builds/ehabkost/qemu/include -iquote
> /builds/ehabkost/qemu/disas/libvixl -pthread -fPIC
> -isystem../linux-headers -isystemlinux-headers -DNEED_CPU_H
> '-DCONFIG_TARGET="alpha-softmmu-config-target.h"'
> '-DCONFIG_DEVICES="alpha-softmmu-config-devices.h"' -MD -MQ
> libqemu-alpha-softmmu.fa.p/monitor_misc.c.o -MF
> libqemu-alpha-softmmu.fa.p/monitor_misc.c.o.d -o
> libqemu-alpha-softmmu.fa.p/monitor_misc.c.o -c ../monitor/misc.c
> ../monitor/misc.c: In function 'gpa2hva':
> ../monitor/misc.c:686:18: error: invalid operands to binary < (have
> 'Int128' {aka 'struct Int128'} and 'uint64_t' {aka 'long long unsigned
> int'})
>      if (mrs.size < size) {
>          ~~~~~~~~ ^
> [1893/5203] Compiling C object 
> libqemu-alpha-softmmu.fa.p/softmmu_physmem.c.o
> ninja: build stopped: subcommand failed.

I am not easily able to replicate this (perhaps an issue for ARM only?).

Either way, I think it would be better to make size into an Int128
and use the appropriate comparison function. I will submit a new 
version.
I can test this better with a bit more time. For now, up to you if you
want to try building it.

-Tobin


      reply	other threads:[~2020-10-27 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  5:39 [PATCH v7] sev: add sev-inject-launch-secret tobin
2020-10-27 13:35 ` Eduardo Habkost
2020-10-27 16:12   ` Tobin Feldman-Fitzthum [this message]

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=06d453ad1dc5866e42145a6d1dd3f764@linux.vnet.ibm.com \
    --to=tobin@linux.ibm.com \
    --cc=berrange@redhat.com \
    --cc=brijesh.singh@amd.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jejb@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thomas.lendacky@amd.com \
    --cc=tobin@ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).