Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ovmf for openSUSE:Factory checked in at 2021-07-16 22:12:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ovmf (Old) and /work/SRC/openSUSE:Factory/.ovmf.new.2632 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ovmf" Fri Jul 16 22:12:27 2021 rev:65 rq:905214 version:202105 Changes: -------- --- /work/SRC/openSUSE:Factory/ovmf/ovmf.changes 2021-06-14 23:10:07.744646832 +0200 +++ /work/SRC/openSUSE:Factory/.ovmf.new.2632/ovmf.changes 2021-07-16 22:12:45.962820085 +0200 @@ -1,0 +2,14 @@ +Fri Jul 9 05:48:26 UTC 2021 - Gary Ching-Pang Lin <g...@suse.com> + +- Add ovmf-fix-xen-s3-detection.patch to fix the S3 detection in + ovmf-xen +- Add ovmf-xen-add-qemu-kernel-loader-fs.patch to add + QemuKernelLoaderFsDxe to ovmf-xen to load kernel from qemu fw_cfg + +------------------------------------------------------------------- +Fri Jul 2 01:27:35 UTC 2021 - Gary Ching-Pang Lin <g...@suse.com> + +- Add ovmf-xen-relocate-shared_info_page-map.patch to fix the + save/restore/migrate in ovmf-xen + +------------------------------------------------------------------- New: ---- ovmf-fix-xen-s3-detection.patch ovmf-xen-add-qemu-kernel-loader-fs.patch ovmf-xen-relocate-shared_info_page-map.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ovmf.spec ++++++ --- /var/tmp/diff_new_pack.ddC5W7/_old 2021-07-16 22:12:46.774814348 +0200 +++ /var/tmp/diff_new_pack.ddC5W7/_new 2021-07-16 22:12:46.774814348 +0200 @@ -52,6 +52,9 @@ Patch5: %{name}-set-fixed-enroll-time.patch Patch6: %{name}-disable-brotli.patch Patch7: %{name}-bsc1186151-fix-iscsi-overflows.patch +Patch8: %{name}-xen-relocate-shared_info_page-map.patch +Patch9: %{name}-fix-xen-s3-detection.patch +Patch10: %{name}-xen-add-qemu-kernel-loader-fs.patch BuildRequires: bc BuildRequires: cross-arm-binutils BuildRequires: cross-arm-gcc%{gcc_version} @@ -170,6 +173,9 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 # add openssl pushd CryptoPkg/Library/OpensslLib/openssl ++++++ ovmf-fix-xen-s3-detection.patch ++++++ >From 16ec4f4618e0129c51d0e31dddfb01dc667bd273 Mon Sep 17 00:00:00 2001 From: Gary Lin <g...@suse.com> Date: Wed, 7 Jul 2021 15:50:54 +0800 Subject: [RFC PATCH] OvmfPkg/OvmfXen: set PcdAcpiS3Enable at initialization There are several functions in OvmfPkg/Library using QemuFwCfgS3Enabled() to detect the S3 support status. However, in MdeModulePkg, PcdAcpiS3Enable is used to check S3 support. Since InitializeXenPlatform() didn't set PcdAcpiS3Enable as InitializePlatform() did, this made the inconsistency between drivers/functions. For example, S3SaveStateDxe checked PcdAcpiS3Enable and skipped S3BootScript because the default value is FALSE. On the other hand, PlatformBootManagerBeforeConsole() from OvmfPkg/Library called QemuFwCfgS3Enabled() and found it returned TRUE, so it invoked SaveS3BootScript(). However, S3SaveStateDxe skipped S3BootScript, so SaveS3BootScript() asserted due to EFI_NOT_FOUND. Setting PcdAcpiS3Enable at InitializeXenPlatform() "fixes" the crash reported by my colleague. The other possible direction is to replace QemuFwCfgS3Enabled() with PcdAcpiS3Enable. I'm not sure which one is the right fix. Cc: Laszlo Ersek <ler...@redhat.com> Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org> Cc: Jordan Justen <jordan.l.jus...@intel.com> Cc: Anthony Perard <anthony.per...@citrix.com> Cc: Julien Grall <jul...@xen.org> Cc: Jim Fehlig <jfeh...@suse.com> Signed-off-by: Gary Lin <g...@suse.com> --- OvmfPkg/XenPlatformPei/Platform.c | 10 ++++++++++ OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 3 +++ 2 files changed, 13 insertions(+) Index: edk2-edk2-stable202105/OvmfPkg/XenPlatformPei/Platform.c =================================================================== --- edk2-edk2-stable202105.orig/OvmfPkg/XenPlatformPei/Platform.c +++ edk2-edk2-stable202105/OvmfPkg/XenPlatformPei/Platform.c @@ -26,6 +26,8 @@ #include <Library/PciLib.h> #include <Library/PeimEntryPoint.h> #include <Library/PeiServicesLib.h> +#include <Library/QemuFwCfgLib.h> +#include <Library/QemuFwCfgS3Lib.h> #include <Library/ResourcePublicationLib.h> #include <Guid/MemoryTypeInformation.h> #include <Ppi/MasterBootMode.h> @@ -423,6 +425,8 @@ InitializeXenPlatform ( IN CONST EFI_PEI_SERVICES **PeiServices ) { + EFI_STATUS Status; + DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n")); DebugDumpCmos (); @@ -433,6 +437,12 @@ InitializeXenPlatform ( CpuDeadLoop (); } + if (QemuFwCfgS3Enabled ()) { + DEBUG ((DEBUG_INFO, "S3 support was detected on QEMU\n")); + Status = PcdSetBoolS (PcdAcpiS3Enable, TRUE); + ASSERT_EFI_ERROR (Status); + } + XenConnect (); BootModeInitialization (); Index: edk2-edk2-stable202105/OvmfPkg/XenPlatformPei/XenPlatformPei.inf =================================================================== --- edk2-edk2-stable202105.orig/OvmfPkg/XenPlatformPei/XenPlatformPei.inf +++ edk2-edk2-stable202105/OvmfPkg/XenPlatformPei/XenPlatformPei.inf @@ -57,6 +57,8 @@ ResourcePublicationLib PeiServicesLib PeimEntryPoint + QemuFwCfgLib + QemuFwCfgS3Lib MtrrLib MemEncryptSevLib PcdLib @@ -79,6 +81,7 @@ gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration ++++++ ovmf-xen-add-qemu-kernel-loader-fs.patch ++++++ >From f4b2b93645b4025741cee54d7b6ee547cfa76e0e Mon Sep 17 00:00:00 2001 From: Gary Lin <g...@suse.com> Date: Fri, 9 Jul 2021 11:13:38 +0800 Subject: [PATCH] OvmfPkg/OvmfXen: add QemuKernelLoaderFsDxe Without QemuKernelLoaderFsDxe, QemuLoadKernelImage() couldn't download the kernel, initrd, and kernel command line from QEMU's fw_cfg. Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org> cc: Jordan Justen <jordan.l.jus...@intel.com> Cc: Anthony Perard <anthony.per...@citrix.com> Cc: Julien Grall <jul...@xen.org> Cc: Jim Fehlig <jfeh...@suse.com> Signed-off-by: Gary Lin <g...@suse.com> --- OvmfPkg/OvmfXen.dsc | 1 + OvmfPkg/OvmfXen.fdf | 1 + 2 files changed, 2 insertions(+) diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc index 3c1ca6bfd493..1a9c06c164a8 100644 --- a/OvmfPkg/OvmfXen.dsc +++ b/OvmfPkg/OvmfXen.dsc @@ -587,6 +587,7 @@ [Components] NULL|OvmfPkg/Csm/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf !endif } + OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf OvmfPkg/XenIoPvhDxe/XenIoPvhDxe.inf OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf OvmfPkg/XenBusDxe/XenBusDxe.inf diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf index aeb9336fd5b7..8b5823555937 100644 --- a/OvmfPkg/OvmfXen.fdf +++ b/OvmfPkg/OvmfXen.fdf @@ -324,6 +324,7 @@ [FV.DXEFV] INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf INF MdeModulePkg/Application/UiApp/UiApp.inf +INF OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/PrintDxe/PrintDxe.inf INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf -- 2.31.1 ++++++ ovmf-xen-relocate-shared_info_page-map.patch ++++++ >From b37cfdd2807181aed2fee1e17bd7ec1190db266a Mon Sep 17 00:00:00 2001 From: Anthony PERARD <anthony.per...@citrix.com> Date: Mon, 28 Jun 2021 14:23:37 +0100 Subject: [PATCH 1/1] OvmfPkg/XenPlatformPei: Relocate shared_info page mapping Unfortunately, Xen isn't ready to deal with mapping at the top of the physical address space, so we relocate the mapping after the LAPIC location. See this thread about the issue with the mapping: - https://lore.kernel.org/xen-devel/f8c4151a-6dac-d87c-ef46-eb35ada07...@suse.com/ The PhysicalAddressIdentityMapping() call isn't going to do anything anymore since everything under 4GB is already mapped, but there is no need to remove the call. Cc: Jan Beulich <jbeul...@suse.com> Cc: Andrew Cooper <andrew.coop...@citrix.com> Signed-off-by: Anthony PERARD <anthony.per...@citrix.com> Message-Id: <20210628132337.46345-1-anthony.per...@citrix.com> Acked-by: Laszlo Ersek <ler...@redhat.com> [ler...@redhat.com: replace "CC:" with "Cc:", to pacify PatchCheck.py] --- OvmfPkg/XenPlatformPei/Xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index a4e82b356936..9c6641895970 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -569,7 +569,7 @@ CalibrateLapicTimer ( EFI_STATUS Status; - SharedInfo = (VOID*)((1ULL << mPhysMemAddressWidth) - EFI_PAGE_SIZE); + SharedInfo = (VOID*)((UINTN)PcdGet32 (PcdCpuLocalApicBaseAddress) + SIZE_1MB); Status = PhysicalAddressIdentityMapping ((EFI_PHYSICAL_ADDRESS)SharedInfo); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, -- 2.31.1