Skip to contentSkip to conversation

tools/firmware/ovmf: Use OvmfXen platform file if exist and update OVMF

PATCH In review Anthony PERARD 2 participants 3 messages Jul 19, 2021 – Jul 27, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/firmware/ovmf: Use OvmfXen platform file if exist and update OVMF

A platform introduced in EDK II named OvmfXen is now the one to use for Xen instead of OvmfX64. It comes with PVH support.

Also, the Xen support in OvmfX64 is deprecated,
"deprecation notice: *dynamic* multi-VMM (QEMU vs. Xen) support in OvmfPkg"
https://edk2.groups.io/g/devel/message/75498
and has been removed upstream.

We need to also update to a newer version of OVMF as OvmfXen in the release "edk2-stable202105" doesn't work well with Xen, so we need the fix b37cfdd28071 ("OvmfPkg/XenPlatformPei: Relocate shared_info page mapping").

Also, don't set anymore the number of thread for parallel build when building the newer platform, OvmfPkg/build.sh is now doing parallel build by default.

---
https://xenbits.xen.org/git-http/ovmf.git master branch as been update.

I've runned a flight on osstest with this change:

    http://logs.test-lab.xenproject.org/osstest/logs/163715/
---
 Config.mk                    |  2 +-
 tools/firmware/ovmf-makefile | 10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
Config.mk +1 -1
index f9dce4549b7c..4d723eec1d0d 100644
@@ -244,7 +244,7 @@ QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-traditional.git
 SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
 MINIOS_UPSTREAM_URL ?= git://xenbits.xen.org/mini-os.git
 endif
-OVMF_UPSTREAM_REVISION ?= e1999b264f1f9d7230edf2448f757c73da567832
+OVMF_UPSTREAM_REVISION ?= b37cfdd2807181aed2fee1e17bd7ec1190db266a
 QEMU_UPSTREAM_REVISION ?= master
 MINIOS_UPSTREAM_REVISION ?= 051b87bb9c19609976fb038f386920e1ce5454c5
 
tools/firmware/ovmf-makefile +8 -2
index 55f999214545..1f619a518993 100644
@@ -17,8 +17,14 @@ all: build
 .PHONY: build
 build:
 	if test -e .git ; then $(GIT) submodule update --init --recursive ; fi
-	OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4
-	cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin
+	set -ex; \
+	if test -e OvmfPkg/OvmfXen.dsc; then \
+	  OvmfPkg/build.sh -a X64 -b $(TARGET) -p OvmfPkg/OvmfXen.dsc; \
+	  cp Build/OvmfXen/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin; \
+	else \
+	  OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4; \
+	  cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin; \
+	fi
 
 .PHONY: clean
 clean:
Signature · 1 line
Anthony PERARD
#1 lore raw

Ping: [XEN PATCH] tools/firmware/ovmf: Use OvmfXen platform file if exist and update OVMF

Quoted 13 lines · Anthony PERARD

A platform introduced in EDK II named OvmfXen is now the one to use for Xen instead of OvmfX64. It comes with PVH support.

Also, the Xen support in OvmfX64 is deprecated,
"deprecation notice: *dynamic* multi-VMM (QEMU vs. Xen) support in OvmfPkg"
https://edk2.groups.io/g/devel/message/75498
and has been removed upstream.

We need to also update to a newer version of OVMF as OvmfXen in the release "edk2-stable202105" doesn't work well with Xen, so we need the fix b37cfdd28071 ("OvmfPkg/XenPlatformPei: Relocate shared_info page mapping").

Quoted 5 lines

Also, don't set anymore the number of thread for parallel build when building the newer platform, OvmfPkg/build.sh is now doing parallel build by default.

Can we commit this soon? Thanks.

Signature · 1 line
Anthony PERARD
Acked-by
#2 lore raw

Re: Ping: [XEN PATCH] tools/firmware/ovmf: Use OvmfXen platform file if exist and update OVMF

Anthony PERARD writes ("Ping: [XEN PATCH] tools/firmware/ovmf: Use OvmfXen platform file if exist and update OVMF"):

Quoted 3 lines · Anthony PERARD
Quoted 2 lines

A platform introduced in EDK II named OvmfXen is now the one to use for Xen instead of OvmfX64. It comes with PVH support.

...

Quoted 1 line

Can we commit this soon? Thanks.

and queued. Sorry for the delay.

Ian.