From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web08.4709.1626766895457585845 for ; Tue, 20 Jul 2021 00:41:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ohG1rheN; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id A0270611C1 for ; Tue, 20 Jul 2021 07:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626766894; bh=Fd1PeJSFETj3BXV61+qWtEExsvvm5Hl4JrUXTpl41tA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ohG1rheNNCiiDECNX22QW0kLedeYam8Cot1OR8On+yU0xgbPK0/2nmxwcjMuFTX40 6L13U8sgxJCBcA1UMIJhavIZNnIee0PU0KBFIp7CCEF4tqsTpt9wewhpAUYBaAi9Ru zlPWMLRH90NO34SXJVCqiFI77xRJoEuZj7gk2sfL/PxrmViN5uaOYVNokRhPoDYSdv UoqatR7vehOVOECawGFO9jXWW19ilv9n9SElIc6u61z5qZJlHTGFai3DUHkP9cl4fL 4548kV9HRJPGsj6Th0oC6HNOgmwjct0prcFlQBV3EkjKpavArleRM74PM/jw04bvrC YDRYkFj+fbaEA== Received: by mail-ot1-f52.google.com with SMTP id 42-20020a9d012d0000b02904b98d90c82cso20760933otu.5 for ; Tue, 20 Jul 2021 00:41:34 -0700 (PDT) X-Gm-Message-State: AOAM533Huq26bBywpqQI8KVJ4FxPcjoPXfZ2T5aunplVqEYeYUtnB7iI 0Gw13PtdkTncNPtILAT7MfLDY9YOOtc4bE6sstE= X-Google-Smtp-Source: ABdhPJw3vOG3JaoabzunN3rFO6cm7J9Gm/Zzbz/mPjiy0yUEke8cXCGWXrpYF3ZAf8kOeyz+3zOdIY97fVrtk4EiLmg= X-Received: by 2002:a05:6830:2316:: with SMTP id u22mr21446539ote.90.1626766893940; Tue, 20 Jul 2021 00:41:33 -0700 (PDT) MIME-Version: 1.0 References: <20210706085501.1260662-1-dovmurik@linux.ibm.com> <20210706085501.1260662-4-dovmurik@linux.ibm.com> <869620c9-7eef-2442-282c-447b4e6a3b3b@amd.com> <579f60db-d8bc-dece-f391-6552ff0e0f9f@linux.ibm.com> In-Reply-To: From: "Ard Biesheuvel" Date: Tue, 20 Jul 2021 09:41:23 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 03/11] OvmfPkg: PlatformBootManagerLibGrub: Allow executing kernel via fw_cfg To: Dov Murik Cc: Tom Lendacky , edk2-devel-groups-io , Tobin Feldman-Fitzthum , Tobin Feldman-Fitzthum , Jim Cadden , James Bottomley , Hubertus Franke , Laszlo Ersek , Ard Biesheuvel , Jordan Justen , Ashish Kalra , Brijesh Singh , Erdem Aktas , Jiewen Yao , Min Xu Content-Type: text/plain; charset="UTF-8" On Tue, 20 Jul 2021 at 09:33, Dov Murik wrote: > > > > On 19/07/2021 22:14, Dov Murik wrote: > > > > > > On 19/07/2021 18:21, Tom Lendacky wrote: > >> On 7/6/21 3:54 AM, Dov Murik wrote: > >>> From: James Bottomley > >>> > >>> Support QEMU's -kernel option. > >>> > >>> OvmfPkg/Library/PlatformBootManagerLibGrub/QemuKernel.c is an exact copy > >>> of OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c . > >> > >> Just a nit, but this confused me initially. Maybe it should say something > >> along the lines of create a QemuKernel.c for PlatformBootManagerLibGrub > >> that is an exact copy of the file from PlatformBootManagerLib. > >> > > > > You're right; I'll write it clearer. > > > > > >> Is there any way that the two libraries can use the same file rather than > >> making an exact copy? > > > > I guess it's possible by extracting the file into its own library? I'll > > need to take a deeper look. > > > > > With this patch we'll have two identical files: > > OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c > OvmfPkg/Library/PlatformBootManagerLibGrub/QemuKernel.c > > but there's another QemuKernel.c, which is *almost* identical: > > ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c > > so a proper fix should consolidate all three into one library used by > all three libs. > > I suggest postponing this to a separate refactoring series. > That is fine with me.