17854f1c81
25833-32on64-bogus-pt_base-adjust.patch 25835-adjust-rcu-lock-domain.patch 25836-VT-d-S3-MSI-resume.patch 25850-tmem-xsa-15-1.patch 25851-tmem-xsa-15-2.patch 25852-tmem-xsa-15-3.patch 25853-tmem-xsa-15-4.patch 25854-tmem-xsa-15-5.patch 25855-tmem-xsa-15-6.patch 25856-tmem-xsa-15-7.patch 25857-tmem-xsa-15-8.patch 25858-tmem-xsa-15-9.patch 25859-tmem-missing-break.patch 25860-tmem-cleanup.patch 25861-x86-early-fixmap.patch 25862-sercon-non-com.patch 25863-sercon-ehci-dbgp.patch 25864-sercon-unused.patch 25866-sercon-ns16550-pci-irq.patch 25867-sercon-ns16550-parse.patch 25874-x86-EFI-chain-cfg.patch 25909-xenpm-consistent.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=201
71 lines
2.6 KiB
Diff
71 lines
2.6 KiB
Diff
# HG changeset patch
|
|
# User Jan Beulich <jbeulich@suse.com>
|
|
# Date 1347437974 -7200
|
|
# Node ID 8c0aa97d529a55de2ab96be1a5a6e9ed6a9c6bf0
|
|
# Parent ac8f4afccd6c6786a3fd5691e8b0c9b38c47e994
|
|
x86-64/EFI: allow chaining of config files
|
|
|
|
Namely when making use the CONFIG_XEN_COMPAT_* options in the legacy
|
|
Linux kernels, newer kernels may not be compatible with older
|
|
hypervisors, so trying to boot such a combination makes little sense.
|
|
Booting older kernels on newer hypervisors, however, has to always
|
|
work.
|
|
|
|
With the way xen.efi looks for its configuration file, allowing
|
|
individual configuration files to refer only to compatible kernels,
|
|
and referring from an older- to a newer-hypervisor one (the kernels
|
|
of which will, as said, necessarily be compatible with the older
|
|
hypervisor) allows to greatly reduce redundancy at least in
|
|
development environments where one frequently wants multiple
|
|
hypervisors and kernles to be installed in parallel.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: Keir Fraser <keir@xen.org>
|
|
|
|
--- a/docs/misc/efi.markdown
|
|
+++ b/docs/misc/efi.markdown
|
|
@@ -75,6 +75,13 @@ Specifies an XSM module to load.
|
|
|
|
Specifies a CPU microcode blob to load.
|
|
|
|
+###`chain=<filename>`
|
|
+
|
|
+Specifies an alternate configuration file to use in case the specified section
|
|
+(and in particular its `kernel=` setting) can't be found in the default (or
|
|
+specified) configuration file. This is only meaningful in the [global] section
|
|
+and really not meant to be used together with the `-cfg=` command line option.
|
|
+
|
|
Filenames must be specified relative to the location of the EFI binary.
|
|
|
|
Extra options to be passed to Xen can also be specified on the command line,
|
|
--- a/xen/arch/x86/efi/boot.c
|
|
+++ b/xen/arch/x86/efi/boot.c
|
|
@@ -797,7 +797,26 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SY
|
|
else
|
|
section.s = get_value(&cfg, "global", "default");
|
|
|
|
- name.s = get_value(&cfg, section.s, "kernel");
|
|
+ for ( ; ; )
|
|
+ {
|
|
+ name.s = get_value(&cfg, section.s, "kernel");
|
|
+ if ( name.s )
|
|
+ break;
|
|
+ name.s = get_value(&cfg, "global", "chain");
|
|
+ if ( !name.s )
|
|
+ break;
|
|
+ efi_bs->FreePages(cfg.addr, PFN_UP(cfg.size));
|
|
+ cfg.addr = 0;
|
|
+ if ( !read_file(dir_handle, s2w(&name), &cfg) )
|
|
+ {
|
|
+ PrintStr(L"Chained configuration file '");
|
|
+ PrintStr(name.w);
|
|
+ efi_bs->FreePool(name.w);
|
|
+ blexit(L"'not found\r\n");
|
|
+ }
|
|
+ pre_parse(&cfg);
|
|
+ efi_bs->FreePool(name.w);
|
|
+ }
|
|
if ( !name.s )
|
|
blexit(L"No Dom0 kernel image specified\r\n");
|
|
split_value(name.s);
|