Skip to content

Commit

Permalink
Fix: Upgrading xentools to 4.19.0
Browse files Browse the repository at this point in the history
Upgraded xen/Dockerfile and xen-tools/Dockerfile to point new version (1)

Removed unused patches No. 11,12,15,16,0001,0003 (2)

Upgraded xen/Dockerfile to include the patches under xen/arch (3)

Adding new patch No. 12 to retain default qemu_thread_set_affinity for
cpu-pinning (4)

Replacing [realtime] with [overcommit] for kvm.go and kvm_test.go (5)

Included utilities required for xen (6)

Signed-off-by: Roja Eswaran <roja@zededa.com>
  • Loading branch information
roja-zededa committed Sep 16, 2024
1 parent 4732410 commit fa0e360
Show file tree
Hide file tree
Showing 27 changed files with 465 additions and 470 deletions.
4 changes: 2 additions & 2 deletions pkg/pillar/hypervisor/kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ const qemuConfTemplate = `# This file is automatically generated by domainmgr
driver = "intel-iommu"
caching-mode = "on"
{{ end }}
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down
36 changes: 18 additions & 18 deletions pkg/pillar/hypervisor/kvm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ func TestCreateDomConfigOnlyCom1(t *testing.T) {
driver = "intel-iommu"
caching-mode = "on"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -416,8 +416,8 @@ func TestCreateDomConfigOnlyCom1(t *testing.T) {
driver = "intel-iommu"
caching-mode = "on"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -664,8 +664,8 @@ func TestCreateDomConfigOnlyCom1(t *testing.T) {
append = "init=/bin/sh"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -1133,8 +1133,8 @@ func domConfigArm64() string {
append = "init=/bin/sh"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -1420,8 +1420,8 @@ func domConfigAmd64FML() string {
driver = "intel-iommu"
caching-mode = "on"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -1718,8 +1718,8 @@ func domConfigAmd64Legacy() string {
driver = "intel-iommu"
caching-mode = "on"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -2007,8 +2007,8 @@ func domConfigAmd64() string {
driver = "intel-iommu"
caching-mode = "on"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -2292,8 +2292,8 @@ func domConfigContainerVNC() string {
driver = "intel-iommu"
caching-mode = "on"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[chardev "charmonitor"]
backend = "socket"
Expand Down Expand Up @@ -2598,8 +2598,8 @@ func TestCreateDom(t *testing.T) {
property = "disable_s4"
value = "1"
[realtime]
mlock = "off"
[overcommit]
mem-lock = "off"
[rtc]
base = "localtime"
Expand Down
23 changes: 14 additions & 9 deletions pkg/xen-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

FROM lfedge/eve-uefi:d821658883d6748d8bbf0d6640c62288e3ce8c6f as uefi-build

FROM lfedge/eve-alpine:82df60e43ab9f8c935584b8c7b4d0a4b0271d608 as runx-build
FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 as runx-build
ENV BUILD_PKGS mkinitfs gcc musl-dev e2fsprogs chrony agetty
RUN eve-alpine-deploy.sh

Expand All @@ -20,16 +20,18 @@ RUN gcc -s -o /chroot2 /tmp/chroot2.c -Wall -Werror
RUN gcc -s -o /hacf /tmp/hacf.c -Wall -Werror
RUN mkinitfs -n -F base -i /init-initrd -o /runx-initrd

FROM lfedge/eve-alpine:82df60e43ab9f8c935584b8c7b4d0a4b0271d608 as build
FROM lfedge/eve-alpine:1f7685f95a475c6bbe682f0b976f12180b6c8726 as build
ENV BUILD_PKGS \
gcc make libc-dev dev86 xz-dev perl bash python3-dev \
gettext iasl util-linux-dev ncurses-dev glib-dev \
pixman-dev libaio-dev yajl-dev argp-standalone \
linux-headers git patch texinfo tar libcap-ng-dev \
attr-dev flex bison cmake libusb-dev zstd-dev
attr-dev flex bison cmake libusb-dev zstd-dev \
python3 build-base ninja

ENV BUILD_PKGS_arm64 dtc-dev

ENV PKGS alpine-baselayout musl-utils bash libaio libbz2 glib pixman yajl keyutils libusb xz-libs libuuid sudo zstd-libs
ENV PKGS alpine-baselayout libgcc bash musl-utils libaio libbz2 glib pixman yajl keyutils libusb xz-libs libuuid zstd-libs util-linux-misc
ENV PKGS_arm64 libfdt

RUN eve-alpine-deploy.sh
Expand Down Expand Up @@ -57,11 +59,11 @@ RUN rm -rf /out/usr/man
RUN strip /out/usr/lib/* || :

# When changing this version, also update SEABIOS_UPSTREAM_REVISION to whatever is in `Config.mk` in the xen source
ENV XEN_VERSION 4.15.0
ENV XEN_VERSION 4.19.0
ENV XEN_SOURCE=https://downloads.xenproject.org/release/xen/${XEN_VERSION}/xen-${XEN_VERSION}.tar.gz
ENV EXTRA_QEMUU_CONFIGURE_ARGS="--enable-libusb --enable-linux-aio \
--enable-vhost-net --enable-vhost-vsock --enable-vhost-scsi --enable-vhost-kernel \
--enable-vhost-user --enable-linux-io-uring --enable-zstd"
--enable-vhost-net --enable-vhost-kernel \
--enable-vhost-user --enable-linux-io-uring --enable-zstd"

WORKDIR /

Expand All @@ -80,7 +82,7 @@ RUN cat /patches/*.patch /patches/"$(uname -m)"/*.patch | patch -p1
# Note that Xen's `configure` command uses this env variable SEABIOS_UPSTREAM_URL to find the seabios source.
ENV SEABIOS_UPSTREAM_URL /seabios.git
# this revision should be kept in sync with the XEN_VERSION by reading `Config.mk` in the xen source
ENV SEABIOS_UPSTREAM_REVISION rel-1.14.0
ENV SEABIOS_UPSTREAM_REVISION rel-1.16.3
ADD --keep-git-dir git://xenbits.xen.org/seabios.git#${SEABIOS_UPSTREAM_REVISION} ${SEABIOS_UPSTREAM_URL}
# we need this because it will complain about ambiguous refs
RUN git config --global core.warnambiguousrefs false
Expand All @@ -89,10 +91,13 @@ RUN mkdir -p /out

# FEATURES="--enable-stubdom --enable-vtpm-stubdom --enable-vtpmmgr-stubdom"
COPY gmp.patch /xen/stubdom

WORKDIR /xen

# disable golang as it does not play well together with musl (stderr is defined as FILE* const and fails to compile)
RUN ./configure --prefix=/usr --disable-xen --disable-golang --disable-qemu-traditional --disable-docs --enable-9pfs \
--with-system-ovmf=/usr/lib/xen/boot/ovmf.bin --disable-stubdom
--with-system-ovmf=/usr/lib/xen/boot/ovmf.bin --disable-stubdom \
--enable-vhost-vsock --enable-vhost-scsi
RUN make -j "$(getconf _NPROCESSORS_ONLN)" && make dist
RUN dist/install.sh /out

Expand Down
24 changes: 0 additions & 24 deletions pkg/xen-tools/patches-4.15.0/11-char-socket-revert.patch

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit fa0e360

Please sign in to comment.