Commit Graph
574 Commits
Author SHA1 Message Date
Jan Beulich 9d465658b4 update Xen version to 4.20.1-pre 2025-03-20 12:46:52 +01:00
Andrew Cooper 89fd1ba884 Config.mk: Bump tags to final
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2025-03-04 16:41:08 +00:00
Maximilian Engelhardt 8aaf5dc2c9 build: Set DATE to SOURCE_DATE_EPOCH if available
Use the solution described in [1] to provide a wrapper to the 'date'
command that uses SOURCE_DATE_EPOCH if available.  This is needed for
reproducible builds.

The -d "@..." syntax was introduced in GNU date about 2005 (but only
added to the docuemntation in 2011), so I assume a version supporting
this syntax is available, if SOURCE_DATE_EPOCH is defined. If
SOURCE_DATE_EPOCH is not defined, nothing changes with respect to the
current behavior.

Update all users of 'date' in the tree to use the new wrapper.

[1] https://reproducible-builds.org/docs/source-date-epoch/

Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2025-01-13 13:51:42 +00:00
Andrew Cooper 3604d15d1a Config.mk: Pin QEMU_UPSTREAM_REVISION
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@vates.tech>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2025-01-10 15:26:41 +00:00
Andrew Cooper b661fe107d build: Remove -fno-stack-protector-all from EMBEDDED_EXTRA_CFLAGS
This seems to have been introduced in commit f8beb54e24 ("Disable PIE/SSP
features when building Xen, if GCC supports them.") in 2004.

However, neither GCC nor Clang appear to have ever supported taking the
negated form of -fstack-protector-all, meaning this been useless since its
introduction.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2024-11-25 13:44:56 +00:00
Andrew Cooper eb4042e3c5 Config: Update MiniOS revision
Commit 6d5159e8410b ("Add missing symbol exports for grub-pv")

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2024-10-31 10:34:13 +00:00
Juergen Gross 906cee8718 config: update Mini-OS commit
Update the Mini-OS upstream revision.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2024-10-11 11:09:52 +01:00
Julien Grall b181bb9fdb Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1)"
The branch is unstable again.

This reverts commit 7584e39986.
2024-07-18 15:40:44 +01:00
Julien Grall 7584e39986 Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1)
Signed-off-by: Julien Grall <jgrall@amazon.com>
2024-07-01 18:21:01 +01:00
Jan Beulich 4712e3b376 Config.mk: update MiniOS commit
Pull in the gcc14 build fix there.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
2024-06-26 12:49:08 +02:00
Juergen Gross 90c0b97e27 config: update Mini-OS commit
Update the Mini-OS upstream revision.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2024-02-29 16:59:46 +01:00
Juergen Gross 4e5bd87d24 config: update Mini-OS commit
Update the Mini-OS upstream revision.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2024-02-09 08:18:04 +01:00
Andrew Cooper e6e8c5831a Config: Update MiniOS revision
Fixes for CI breakages

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2023-12-07 20:10:57 +00:00
Julien Grall 40be6307ec Only compile the hypervisor with -Wdeclaration-after-statement
Right now, all tools and hypervisor will be complied with the option
-Wdeclaration-after-statement. While most of the code in the hypervisor
is controlled by us, for tools we may import external libraries.

The build will fail if one of them are using the construct we are
trying to prevent. This is the case when building against Python 3.12
and Yocto:

| In file included from /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/Python.h:44,
|                  from xen/lowlevel/xc/xc.c:8:
| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/object.h: In function 'Py_SIZE':
| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/object.h:233:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
|   233 |     PyVarObject *var_ob = _PyVarObject_CAST(ob);
|       |     ^~~~~~~~~~~
| In file included from /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/Python.h:53:
| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/cpython/longintrepr.h: In function '_PyLong_CompactValue':
| /srv/storage/alex/yocto/build-virt/tmp/work/core2-64-poky-linux/xen-tools/4.17+stable/recipe-sysroot/usr/include/python3.12/cpython/longintrepr.h:121:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
|   121 |     Py_ssize_t sign = 1 - (op->long_value.lv_tag & _PyLong_SIGN_MASK);
|       |     ^~~~~~~~~~
| cc1: all warnings being treated as errors

Looking at the tools directory, a fair few directory already add
-Wno-declaration-after-statement to inhibit the default behavior.

We have always build the hypervisor with the flag, so for now remove
only the flag for anything but the hypervisor. We can decide at later
time whether we want to relax.

Also remove the -Wno-declaration-after-statement in some subdirectory
as the flag is now unnecessary.

Part of the commit message was take from Alexander's first proposal:

Link: https://lore.kernel.org/xen-devel/20231128174729.3880113-1-alex@linutronix.de/
Reported-by: Alexander Kanavin <alex@linutronix.de>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Julien Grall <jgrall@amazon.com>
2023-12-06 19:12:40 +00:00
Juergen Gross fa9171ed05 config: update Mini-OS commit
Update the Mini-OS upstream revision.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2023-12-06 10:23:20 +01:00
Jan Beulich 3e7a3f08ce bump default SeaBIOS version to 1.16.3
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
2023-12-05 09:58:17 +01:00
Juergen Gross 4b99ce89eb config: update Mini-OS commit
Update the used commit for Mini-OS in order to be able to use the
9pfs frontend.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2023-11-22 13:37:17 +00:00
Julien Grall 7f48e34298 Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.18 RC1)"
The branch is unstable again.

This reverts commit 520d18e0ff.
2023-10-30 09:13:38 +00:00
Julien Grall 520d18e0ff Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.18 RC1)
Signed-off-by: Julien Grall <jgrall@amazon.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
2023-09-29 09:07:10 +01:00
Jan Beulich 824b5a40dd build: make cc-option properly deal with unrecognized sub-options
In options like -march=, it may be only the sub-option which is
unrecognized by the compiler. In such an event the error message often
splits option and argument, typically saying something like "bad value
'<argument>' for '<option>'. Instead of extend the grep invocation, stop
parsing compiler output altogether. Instead substitute -Wno-* options by
their -W* counterparts for probing (obviously assuming that such a
counterpart always exists).

Suggested-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
2023-08-23 09:25:52 +02:00
Anthony PERARD a07414d989 Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS immediately
With GNU make 4.4, the number of execution of the command present in
these $(shell ) increased greatly. This is probably because as of make
4.4, exported variable are also added to the environment of $(shell )
construct.

So to avoid having these command been run more than necessary, we
will replace ?= by an equivalent but with immediate expansion.

Reported-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2023-07-31 15:02:34 +02:00
Anthony PERARD c6df21062b Config.mk: update OVMF to edk2-stable202305
Update to OVMF's latest stable tag.

This is been prompt by trying to build Xen on Debian Bookworm,
where edk2-stable202108 doesn't build. Also, it's been too long since
the last update.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2023-06-19 15:47:05 +02:00
Andrew Cooper 415f7d9404 Revert "Revert "build: Change remaining xenbits.xen.org link to HTTPS""
This reverts commit b5cc3c25a2, reinstating the
original change as per e1d7508444.

We think the OSSTest failure has been addressed now.

Link: https://lore.kernel.org/xen-devel/20d41dd0-19d1-47fb-92ab-4de458ddd56f@perard/
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2023-04-04 17:35:52 +01:00
Jan Beulich d6e0b4c41a bump default SeaBIOS version to 1.16.2
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
2023-03-31 08:13:30 +02:00
Andrew Cooper b5cc3c25a2 Revert "build: Change remaining xenbits.xen.org link to HTTPS"
This reverts commit e1d7508444.

After spending ages sorting out Gitlab CI, it appears that OSSTest too has an
out-of-date Lets Encrypt cert.  Revert again in the short term while we fix
this up.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2023-03-24 20:34:53 +00:00
Demi Marie Obenour e1d7508444 build: Change remaining xenbits.xen.org link to HTTPS
Obtaining code over an insecure transport is a terrible idea for
blatently obvious reasons.  Even for non-executable data, insecure
transports are considered deprecated.

This patch enforces the use of secure transports for all xenbits.xen.org
URLs.  All altered links have been tested and are known to work.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2023-03-24 16:29:15 +00:00
Demi Marie Obenour eb23eef476 build: Use HTTPS for all xenbits.xen.org Git repos
Obtaining code over an insecure transport is a terrible idea for
blatently obvious reasons.  Even for non-executable data, insecure
transports are considered deprecated.

This patch enforces the use of secure transports for all xenbits git
repositories.  It was generated with the following shell script:

    git ls-files -z |
    xargs -0 -- sed -Ei -- 's@(git://xenbits\.xen\.org|http://xenbits\.xen\.org/git-http)/@https://xenbits.xen.org/git-http/@g'

All altered links have been tested and are known to work.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2023-03-24 16:29:13 +00:00
Jan Beulich 1c2cb0b82a half-revert "change assorted xenbits.xen.org links to HTTPS"
This reverts the build system relevant half of commit
a4557f515f, as gitlab CI can't fully cope
with the change just yet.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
2023-02-28 16:05:48 +01:00
Demi Marie Obenour a4557f515f change assorted xenbits.xen.org links to HTTPS
Also switch to xenbits.xenproject.org at this occasion.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2023-02-28 14:52:14 +01:00
Jan Beulich 83c822a13f bump default SeaBIOS version to 1.16.1
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2022-12-05 13:42:47 +01:00
Julien Grall 7190edeaaf Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.17 RC1)"
The branch is unstable again.

This reverts commit b4ddd34d3a.

Signed-off-by: Julien Grall <jgrall@amazon.com>
2022-12-01 13:56:36 +00:00
Julien Grall b4ddd34d3a Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.17 RC1)
Signed-off-by: Julien Grall <jgrall@amazon.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
2022-10-07 14:30:01 +01:00
Andrew Cooper 13a7c0074a Build: Drop -no-pie from EMBEDDED_EXTRA_CFLAGS
This breaks all Clang builds, as demostrated by Gitlab CI.

Contrary to the description in ecd6b97599, -no-pie is not even an option
passed to the linker.  GCC's actual behaviour is to inhibit the passing of
-pie to the linker, as well as selecting different cr0 artefacts to be linked.

EMBEDDED_EXTRA_CFLAGS is not used for $(CC)-doing-linking, and not liable to
gain such a usecase.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Fixes: ecd6b97599 ("Config.mk: correct PIE-related option(s) in EMBEDDED_EXTRA_CFLAGS")
2022-09-27 15:40:42 -07:00
Jan Beulich ecd6b97599 Config.mk: correct PIE-related option(s) in EMBEDDED_EXTRA_CFLAGS
I haven't been able to find evidence of "-nopie" ever having been a
supported compiler option. The correct spelling is "-no-pie".
Furthermore like "-pie" this is an option which is solely passed to the
linker. The compiler only recognizes "-fpie" / "-fPIE" / "-fno-pie", and
it doesn't infer these options from "-pie" / "-no-pie".

Add the compiler recognized form, but for the possible case of the
variable also being used somewhere for linking keep the linker option as
well (with corrected spelling).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
2022-09-08 09:25:26 +02:00
Juergen Gross 980bfb1ac9 Config.mk: use newest Mini-OS commit
Switch to use the newest Mini-OS commit in order to get the recent
fixes.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2022-07-08 09:42:27 +02:00
Jan Beulich 944e389daa bump default SeaBIOS version to 1.16.0
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
2022-05-06 14:46:52 +02:00
Roger Pau Monne e270af9428 tools/firmware: do not add a .note.gnu.property section
Prevent the assembler from creating a .note.gnu.property section on
the output objects, as it's not useful for firmware related binaries,
and breaks the resulting rombios image.

This requires modifying the cc-option Makefile macro so it can test
assembler options (by replacing the usage of the -S flag with -c) and
also stripping the -Wa, prefix if present when checking for the test
output.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2022-04-04 12:30:07 +01:00
Andrew Cooper 3667f7f8f7 x86: Introduce support for CET-IBT
CET Indirect Branch Tracking is a hardware feature designed to provide
forward-edge control flow integrity, protecting against jump/call oriented
programming.

IBT requires the placement of endbr{32,64} instructions at the target of every
indirect call/jmp, and every entrypoint.

However, the default -fcf-protection=branch places an endbr{32,64} on every
function which far more than necessary, and reduces the quantity of protection
afforded.  Therefore, we use manual placement using the cf_check attribute.

It is necessary to check for both compiler and assembler support, as the
notrack prefix can be emitted in certain cases.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2022-02-23 15:33:42 +00:00
Wei Liu 9b7cdb83fc Config.mk: update seabios to 1.15.0
Signed-off-by: Wei Liu <wl@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
2022-01-19 22:25:21 +00:00
Juergen Gross fa52b153c5 config: use more recent mini-os commit
In order to be able to use the recent Mini-OS features switch to the
most recent commit.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2022-01-19 09:37:55 +00:00
Juergen Gross aa61568ac6 config: use more recent mini-os commit
In order to be able to use the recent Mini-OS features switch to the
most recent commit.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2022-01-18 14:58:28 +00:00
Anthony PERARD 021cd1c4b4 tools: Use config.h from autoconf instead of "buildmakevars2header"
This avoid the need to generate the _paths.h header when the
information is from autoconf anyway.

They are no more users of the "buildmakevars2header" macro, so it can
be removed from "Config.mk".

Also removed the extra "-f" flag where "$(RM)" is used (xl/Makefile).

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
2021-12-16 20:27:12 +00:00
Ian Jackson 4fe6e73a8c Revert "Config.mk: pin QEMU_UPSTREAM_REVISION (prep for Xen 4.16 RC1)"
This branch is unstable again now.

This reverts commit c9ce6afbf2.
2021-11-23 16:51:47 +00:00
Ian Jackson c9ce6afbf2 Config.mk: pin QEMU_UPSTREAM_REVISION (prep for Xen 4.16 RC1)
Signed-off-by: Ian Jackson <iwj@xenproject.org>
2021-11-01 12:33:54 +00:00
Anthony PERARD 0b000a2ce8 xen: rework checkpolicy detection when using "randconfig"
This patch allows to easily add more override which depends on the
environment.

Also, move the check out of Config.mk and into xen/ build system.
Nothing in tools/ is using that information as it's done by
./configure.

We named the new file ".allconfig.tmp" as ".*.tmp" are already ignored
via .gitignore.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2021-09-29 11:58:15 +02:00
Ian Jackson 890ceb9453 Merge remote-tracking branch 'origin/staging' into staging 2021-09-28 12:51:00 +01:00
Anthony PERARD 8d73459193 Config.mk: update OVMF to edk2-stable202108
Update to the latest stable tag.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2021-09-28 12:47:50 +01:00
Juergen Gross afacb0a98f Config: use Mini-OS commit 9f09744aa3e5982 for xen-unstable
Switch the used Mini-OS commit to 9f09744aa3e5982 in xen-unstable.

[ 9f09744aa3e5982 is current mini-os.git#master -iwj. ]

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
2021-09-27 15:34:56 +01:00
Anthony PERARD 81f2914202 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.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
2021-07-27 14:26:57 +01:00
Anthony PERARD 07d6dd51a5 Config.mk: re-pin OVMF changeset and unpin qemu-xen
qemu-xen tree have a osstest gate and doesn't need to be pinned.

On the other hand, OVMF's xen repository doesn't have a gate and needs
to be pinned. The "master" branch correspond now to the tag
"edk2-stable202105", so pin to that commit.

Fixes: a04509d34d ("Branching: Update version files etc. for newly unstable")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
2021-07-02 14:59:41 +01:00