From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web11.13377.1583418596379639403 for ; Thu, 05 Mar 2020 06:29:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Sbav1Wdj; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583418595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QadDlK11suCCR7NGKvs+XJlcoDL2YzG80WYpn+t7VYo=; b=Sbav1WdjF3VGlhbIhVU/iaj7cJClQ92b89BET5kYRNRZI3IJO0NHOfVN4R9ySY0lu/wdHX KzxlH3tr6eUp1yOcUK1azimoCxqf63G3UcwWLgC2wHf3FlyiGEgDpkIrMPWmjGVSzHr6V9 ROmFcIXNmpDZ5jmdGGXHEmDpTeAXBLY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-91-tvd01Hh3OyWqavB_XoRGfA-1; Thu, 05 Mar 2020 09:29:53 -0500 X-MC-Unique: tvd01Hh3OyWqavB_XoRGfA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6B87A8017CC; Thu, 5 Mar 2020 14:29:52 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-216.ams2.redhat.com [10.36.117.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE43D272D3; Thu, 5 Mar 2020 14:29:51 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 09/14] OvmfPkg: create protocol and GUID header for legacy loaded images To: Ard Biesheuvel , edk2-devel-groups-io References: <20200304095233.21046-1-ard.biesheuvel@linaro.org> <20200304095233.21046-10-ard.biesheuvel@linaro.org> From: "Laszlo Ersek" Message-ID: Date: Thu, 5 Mar 2020 15:29:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 03/05/20 11:40, Ard Biesheuvel wrote: > On Thu, 5 Mar 2020 at 11:31, Laszlo Ersek wrote: >> >> On 03/04/20 10:52, Ard Biesheuvel wrote: >>> In preparation of moving the legacy x86 loading to an implementation >>> of the QEMU load image library class, introduce a protocol header >>> and GUID that we will use to identify legacy loaded images in the >>> protocol database. >>> >>> Signed-off-by: Ard Biesheuvel >>> --- >>> OvmfPkg/Include/Protocol/X86QemuKernelLoadedImage.h | 19 +++++++++++++++++++ >>> OvmfPkg/OvmfPkg.dec | 1 + >>> 2 files changed, 20 insertions(+) >>> >>> diff --git a/OvmfPkg/Include/Protocol/X86QemuKernelLoadedImage.h b/OvmfPkg/Include/Protocol/X86QemuKernelLoadedImage.h >>> new file mode 100644 >>> index 000000000000..7e1bebaa6a07 >>> --- /dev/null >>> +++ b/OvmfPkg/Include/Protocol/X86QemuKernelLoadedImage.h >>> @@ -0,0 +1,19 @@ >>> +/** @file >>> + Protocol/GUID definition to describe a kernel image loaded by the legacy X86 >>> + loader from the file specified on the QEMU command line via the -kernel >>> + option. >> >> (1) Please add a comment that the interface structure associated with >> this protocol GUID is subject to change, and should not be used outside >> of the EDK II tree. >> >> (I'm requesting this comment regardless of point (5) below.) >> > > Now that we're bikeshedding: :-) I don't feel we are :) All the things I've asked for are existing practice in edk2. In particular (1) would mirror the note in "VirtioDevice.h". > > Given the internal nature of this protocol, perhaps the name should > reflect it? And if we're changing it, perhaps make it more precise? > > It is internal to OVMF so > > gOvmfLoadedX86LinuxKernelProtocolGuid > > and for the type > > OVMF_LOADED_X86_LINUX_KERNEL > > (given that the only thing it can represent is a loaded x86 Linux > kernel, but that is not specific to QEMU in principle) > > This ignores the initrd aspect as well as the command line, but EFI's > loaded image subsumes the command line as well, so I think that is > fine. Great suggestions, I like them. Thanks! Laszlo