* Re: [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure [not found] <169AC8FC9129752E.29477@groups.io> @ 2021-08-16 7:14 ` Lin, Gary (HPS OE-Linux) 0 siblings, 0 replies; 4+ messages in thread From: Lin, Gary (HPS OE-Linux) @ 2021-08-16 7:14 UTC (permalink / raw) To: devel Cc: Ard Biesheuvel, Jiewen Yao, Jordan Justen, Anthony Perard, Julien Grall, Jim Fehlig, Joey Li On Fri, Aug 13, 2021 at 02:13:00PM +0800, Lin, Gary (HPS OE-Linux) wrote: > When using HVM Direct kernel boot with OvmfXen, it could fail at the > S3BootScript due to the inconsistency between QemuFwCfgS3Enabled() > and PcdAcpiS3Enable. Besides, QemuKernelLoaderFsDxe wasn't included > in OvmfXen, so the firmware couldn't fetch kernel/initrd from fw_cfg. > > This patch series initializes PcdAcpiS3Enable and adds > QemuKernelLoaderFsDxe into OvmfXen. Besides, QemuFwCfgS3Enabled() is > replaced with PcdAcpiS3Enable in several OVMF libraries to avoid the > potential inconsistency. > > v2: > - Amend the description and address "HVM Direct Kernel Boot" > - Add the comment for the conditional test of QemuFwCfgS3Enabled() > - Remove unused QemuFwCfgLib > - Update my email address > Add the missing Cc tags Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Julien Grall <julien@xen.org> Cc: Jim Fehlig <jfehlig@suse.com> Cc: Joey Li <jlee@suse.com> Signed-off-by: Gary Lin <gary.lin@hpe.com> > Gary Lin (5): > OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization > OvmfPkg/OvmfXen: add QemuKernelLoaderFsDxe > OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support > OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 > support > OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support > > OvmfPkg/OvmfXen.dsc | 1 + > OvmfPkg/OvmfXen.fdf | 1 + > OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf | 3 +-- > .../PlatformBootManagerLib.inf | 1 + > OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf | 2 ++ > OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 2 ++ > OvmfPkg/Library/LockBoxLib/LockBoxDxe.c | 4 +--- > .../Library/PlatformBootManagerLib/BdsPlatform.c | 2 +- > OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | 4 +--- > OvmfPkg/XenPlatformPei/Platform.c | 13 +++++++++++++ > 10 files changed, 24 insertions(+), 9 deletions(-) > > -- > 2.31.1 > > > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure @ 2021-08-13 6:13 Lin, Gary (HPS OE-Linux) 2021-08-13 9:55 ` [edk2-devel] " Yao, Jiewen 0 siblings, 1 reply; 4+ messages in thread From: Lin, Gary (HPS OE-Linux) @ 2021-08-13 6:13 UTC (permalink / raw) To: devel When using HVM Direct kernel boot with OvmfXen, it could fail at the S3BootScript due to the inconsistency between QemuFwCfgS3Enabled() and PcdAcpiS3Enable. Besides, QemuKernelLoaderFsDxe wasn't included in OvmfXen, so the firmware couldn't fetch kernel/initrd from fw_cfg. This patch series initializes PcdAcpiS3Enable and adds QemuKernelLoaderFsDxe into OvmfXen. Besides, QemuFwCfgS3Enabled() is replaced with PcdAcpiS3Enable in several OVMF libraries to avoid the potential inconsistency. v2: - Amend the description and address "HVM Direct Kernel Boot" - Add the comment for the conditional test of QemuFwCfgS3Enabled() - Remove unused QemuFwCfgLib - Update my email address Gary Lin (5): OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization OvmfPkg/OvmfXen: add QemuKernelLoaderFsDxe OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 support OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support OvmfPkg/OvmfXen.dsc | 1 + OvmfPkg/OvmfXen.fdf | 1 + OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf | 3 +-- .../PlatformBootManagerLib.inf | 1 + OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf | 2 ++ OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 2 ++ OvmfPkg/Library/LockBoxLib/LockBoxDxe.c | 4 +--- .../Library/PlatformBootManagerLib/BdsPlatform.c | 2 +- OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | 4 +--- OvmfPkg/XenPlatformPei/Platform.c | 13 +++++++++++++ 10 files changed, 24 insertions(+), 9 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure 2021-08-13 6:13 Lin, Gary (HPS OE-Linux) @ 2021-08-13 9:55 ` Yao, Jiewen 2021-08-16 1:34 ` Lin, Gary (HPS OE-Linux) 0 siblings, 1 reply; 4+ messages in thread From: Yao, Jiewen @ 2021-08-13 9:55 UTC (permalink / raw) To: devel@edk2.groups.io, gary.lin@hpe.com HI Gary Several comment: 1) According to our process, we need a Bugzilla. Would you please file it? 2) I do not understand how HVM direct kernel boot is related to S3 enabling. It seems 1/3/4/5 are for S3, while 2 is for missing driver. Should we split them to 2 patch set? 3) Does the S3 issue only happen in direct kernel boot? Or is it a generic issue. 4) Have you validated non direct kernel boot to ensure it still works? > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Lin, Gary > (HPS OE-Linux) > Sent: Friday, August 13, 2021 2:13 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot > failure > > When using HVM Direct kernel boot with OvmfXen, it could fail at the > S3BootScript due to the inconsistency between QemuFwCfgS3Enabled() > and PcdAcpiS3Enable. Besides, QemuKernelLoaderFsDxe wasn't included > in OvmfXen, so the firmware couldn't fetch kernel/initrd from fw_cfg. > > This patch series initializes PcdAcpiS3Enable and adds > QemuKernelLoaderFsDxe into OvmfXen. Besides, QemuFwCfgS3Enabled() is > replaced with PcdAcpiS3Enable in several OVMF libraries to avoid the > potential inconsistency. > > v2: > - Amend the description and address "HVM Direct Kernel Boot" > - Add the comment for the conditional test of QemuFwCfgS3Enabled() > - Remove unused QemuFwCfgLib > - Update my email address > > Gary Lin (5): > OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization > OvmfPkg/OvmfXen: add QemuKernelLoaderFsDxe > OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support > OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 > support > OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support > > OvmfPkg/OvmfXen.dsc | 1 + > OvmfPkg/OvmfXen.fdf | 1 + > OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf | 3 +-- > .../PlatformBootManagerLib.inf | 1 + > OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf | 2 ++ > OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 2 ++ > OvmfPkg/Library/LockBoxLib/LockBoxDxe.c | 4 +--- > .../Library/PlatformBootManagerLib/BdsPlatform.c | 2 +- > OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | 4 +--- > OvmfPkg/XenPlatformPei/Platform.c | 13 +++++++++++++ > 10 files changed, 24 insertions(+), 9 deletions(-) > > -- > 2.31.1 > > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure 2021-08-13 9:55 ` [edk2-devel] " Yao, Jiewen @ 2021-08-16 1:34 ` Lin, Gary (HPS OE-Linux) 2021-08-16 17:14 ` Jim Fehlig 0 siblings, 1 reply; 4+ messages in thread From: Lin, Gary (HPS OE-Linux) @ 2021-08-16 1:34 UTC (permalink / raw) To: Yao, Jiewen, Jim Fehlig; +Cc: devel@edk2.groups.io On Fri, Aug 13, 2021 at 09:55:48AM +0000, Yao, Jiewen wrote: > HI Gary Hi Jiewen, > Several comment: > > 1) According to our process, we need a Bugzilla. Would you please file it? > Okay, will create a bugzilla entry to track the issue. > 2) I do not understand how HVM direct kernel boot is related to S3 enabling. > It seems 1/3/4/5 are for S3, while 2 is for missing driver. > Should we split them to 2 patch set? > Actually the inconsistency between QemuFwCfgS3Enabled() and PcdAcpiS3Enable casued the boot failure of HVM direct kernel boot. S3SaveStateDxe checked PcdAcpiS3Enable(=FALSE) and skipped S3BootScript. On the other hand, PlatformBootManagerBeforeConsole() invoked QemuFwCfgS3Enabled()(=TRUE) and tried to locate S3BootScript. Since S3BootScript wasn't installed, it failed with EFI_NOT_FOUND and stopped the booting. So Patch 1 and 2 are mainly for the booting issues in OvmfXen. For Patch 3~5, I just try to eliminate the inconsistency to avoid the potential problems. I can split them into 2 or 3 patch sets if necessary. > 3) Does the S3 issue only happen in direct kernel boot? Or is it a generic issue. > > 4) Have you validated non direct kernel boot to ensure it still works? > Jim, Did you encounter any problem with non direct kernel boot VM? Cheers, Gary Lin > > > -----Original Message----- > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Lin, Gary > > (HPS OE-Linux) > > Sent: Friday, August 13, 2021 2:13 PM > > To: devel@edk2.groups.io > > Subject: [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot > > failure > > > > When using HVM Direct kernel boot with OvmfXen, it could fail at the > > S3BootScript due to the inconsistency between QemuFwCfgS3Enabled() > > and PcdAcpiS3Enable. Besides, QemuKernelLoaderFsDxe wasn't included > > in OvmfXen, so the firmware couldn't fetch kernel/initrd from fw_cfg. > > > > This patch series initializes PcdAcpiS3Enable and adds > > QemuKernelLoaderFsDxe into OvmfXen. Besides, QemuFwCfgS3Enabled() is > > replaced with PcdAcpiS3Enable in several OVMF libraries to avoid the > > potential inconsistency. > > > > v2: > > - Amend the description and address "HVM Direct Kernel Boot" > > - Add the comment for the conditional test of QemuFwCfgS3Enabled() > > - Remove unused QemuFwCfgLib > > - Update my email address > > > > Gary Lin (5): > > OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization > > OvmfPkg/OvmfXen: add QemuKernelLoaderFsDxe > > OvmfPkg/LockBoxLib: use PcdAcpiS3Enable to detect S3 support > > OvmfPkg/PlatformBootManagerLib: use PcdAcpiS3Enable to detect S3 > > support > > OvmfPkg/SmmControl2Dxe: use PcdAcpiS3Enable to detect S3 support > > > > OvmfPkg/OvmfXen.dsc | 1 + > > OvmfPkg/OvmfXen.fdf | 1 + > > OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf | 3 +-- > > .../PlatformBootManagerLib.inf | 1 + > > OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.inf | 2 ++ > > OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 2 ++ > > OvmfPkg/Library/LockBoxLib/LockBoxDxe.c | 4 +--- > > .../Library/PlatformBootManagerLib/BdsPlatform.c | 2 +- > > OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | 4 +--- > > OvmfPkg/XenPlatformPei/Platform.c | 13 +++++++++++++ > > 10 files changed, 24 insertions(+), 9 deletions(-) > > > > -- > > 2.31.1 > > > > > > > > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure 2021-08-16 1:34 ` Lin, Gary (HPS OE-Linux) @ 2021-08-16 17:14 ` Jim Fehlig 0 siblings, 0 replies; 4+ messages in thread From: Jim Fehlig @ 2021-08-16 17:14 UTC (permalink / raw) To: Gary Lin (HPS OE-Linux TDC), Yao, Jiewen; +Cc: devel@edk2.groups.io On 8/15/21 7:34 PM, Gary Lin (HPS OE-Linux TDC) wrote: > On Fri, Aug 13, 2021 at 09:55:48AM +0000, Yao, Jiewen wrote: >> HI Gary > Hi Jiewen, > >> Several comment: >> >> 1) According to our process, we need a Bugzilla. Would you please file it? >> > Okay, will create a bugzilla entry to track the issue. > >> 2) I do not understand how HVM direct kernel boot is related to S3 enabling. >> It seems 1/3/4/5 are for S3, while 2 is for missing driver. >> Should we split them to 2 patch set? >> > Actually the inconsistency between QemuFwCfgS3Enabled() and > PcdAcpiS3Enable casued the boot failure of HVM direct kernel boot. > S3SaveStateDxe checked PcdAcpiS3Enable(=FALSE) and skipped S3BootScript. > On the other hand, PlatformBootManagerBeforeConsole() invoked > QemuFwCfgS3Enabled()(=TRUE) and tried to locate S3BootScript. Since > S3BootScript wasn't installed, it failed with EFI_NOT_FOUND and stopped > the booting. So Patch 1 and 2 are mainly for the booting issues in > OvmfXen. For Patch 3~5, I just try to eliminate the inconsistency to > avoid the potential problems. > > I can split them into 2 or 3 patch sets if necessary. > >> 3) Does the S3 issue only happen in direct kernel boot? Or is it a generic issue. >> >> 4) Have you validated non direct kernel boot to ensure it still works? >> > Jim, > > Did you encounter any problem with non direct kernel boot VM? No problems encountered, works fine in my testing. Although I did not test these patches specifically, only the ones in the openSUSE Factory ovmf package. Regards, Jim ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-16 17:14 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <169AC8FC9129752E.29477@groups.io> 2021-08-16 7:14 ` [edk2-devel] [PATCH v2 0/5] Fix OvmfXen HVM Direct kernel boot failure Lin, Gary (HPS OE-Linux) 2021-08-13 6:13 Lin, Gary (HPS OE-Linux) 2021-08-13 9:55 ` [edk2-devel] " Yao, Jiewen 2021-08-16 1:34 ` Lin, Gary (HPS OE-Linux) 2021-08-16 17:14 ` Jim Fehlig
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox