- bsc#900418 - Dump cannot be performed on SLES12 XEN
57580bbd-kexec-allow-relaxed-placement-via-cmdline.patch - Upstream patches from Jan 575e9ca0-nested-vmx-Validate-host-VMX-MSRs-before-accessing-them.patch 57640448-xen-sched-use-default-scheduler-upon-an-invalid-sched.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=442
This commit is contained in:
parent
82ff4f51e5
commit
5859155d6b
144
57580bbd-kexec-allow-relaxed-placement-via-cmdline.patch
Normal file
144
57580bbd-kexec-allow-relaxed-placement-via-cmdline.patch
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
References: bsc#900418
|
||||||
|
|
||||||
|
# Commit cd42ccb27f4e364b6e75b6fecb06bb99ad8da988
|
||||||
|
# Date 2016-06-08 14:12:45 +0200
|
||||||
|
# Author Jan Beulich <jbeulich@suse.com>
|
||||||
|
# Committer Jan Beulich <jbeulich@suse.com>
|
||||||
|
kexec: allow relaxed placement specification via command line
|
||||||
|
|
||||||
|
Rather than just allowing a fixed address or fully automatic placement,
|
||||||
|
also allow for specifying an upper bound. Especially on EFI systems,
|
||||||
|
where firmware memory use is commonly less predictable than on legacy
|
||||||
|
BIOS ones, this makes success of the reservation more likely when
|
||||||
|
automatic placement is not an option (e.g. because of special DMA
|
||||||
|
restrictions of devices involved in actually carrying out the dump).
|
||||||
|
|
||||||
|
Also take the opportunity to actually add text to the "crashkernel"
|
||||||
|
entry in the command line option doc.
|
||||||
|
|
||||||
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||||
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||||
|
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
|
||||||
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||||
|
|
||||||
|
--- a/docs/misc/xen-command-line.markdown
|
||||||
|
+++ b/docs/misc/xen-command-line.markdown
|
||||||
|
@@ -458,7 +458,18 @@ Specify the maximum address to allocate
|
||||||
|
combination with the `low_crashinfo` command line option.
|
||||||
|
|
||||||
|
### crashkernel
|
||||||
|
-> `= <ramsize-range>:<size>[,...][@<offset>]`
|
||||||
|
+> `= <ramsize-range>:<size>[,...][{@,<}<offset>]`
|
||||||
|
+> `= <size>[{@,<}<offset>]`
|
||||||
|
+
|
||||||
|
+Specify sizes and optionally placement of the crash kernel reservation
|
||||||
|
+area. The `<ramsize-range>:<size>` pairs indicate how much memory to
|
||||||
|
+set aside for a crash kernel (`<size>`) for a given range of installed
|
||||||
|
+RAM (`<ramsize-range>`). Each `<ramsize-range>` is of the form
|
||||||
|
+`<start>-[<end>]`.
|
||||||
|
+
|
||||||
|
+A trailing `@<offset>` specifies the exact address this area should be
|
||||||
|
+placed at, whereas `<` in place of `@` just specifies an upper bound of
|
||||||
|
+the address range the area should fall into.
|
||||||
|
|
||||||
|
### credit2\_balance\_over
|
||||||
|
> `= <integer>`
|
||||||
|
--- a/xen/arch/x86/setup.c
|
||||||
|
+++ b/xen/arch/x86/setup.c
|
||||||
|
@@ -1044,13 +1044,23 @@ void __init noreturn __start_xen(unsigne
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_KEXEC
|
||||||
|
- /* Don't overlap with modules. */
|
||||||
|
- e = consider_modules(s, e, PAGE_ALIGN(kexec_crash_area.size),
|
||||||
|
- mod, mbi->mods_count, -1);
|
||||||
|
- if ( !kexec_crash_area.start && (s < e) )
|
||||||
|
+ /*
|
||||||
|
+ * Looking backwards from the crash area limit, find a large
|
||||||
|
+ * enough range that does not overlap with modules.
|
||||||
|
+ */
|
||||||
|
+ while ( !kexec_crash_area.start )
|
||||||
|
{
|
||||||
|
- e = (e - kexec_crash_area.size) & PAGE_MASK;
|
||||||
|
- kexec_crash_area.start = e;
|
||||||
|
+ /* Don't overlap with modules. */
|
||||||
|
+ e = consider_modules(s, e, PAGE_ALIGN(kexec_crash_area.size),
|
||||||
|
+ mod, mbi->mods_count, -1);
|
||||||
|
+ if ( s >= e )
|
||||||
|
+ break;
|
||||||
|
+ if ( e > kexec_crash_area_limit )
|
||||||
|
+ {
|
||||||
|
+ e = kexec_crash_area_limit & PAGE_MASK;
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ kexec_crash_area.start = (e - kexec_crash_area.size) & PAGE_MASK;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
--- a/xen/common/kexec.c
|
||||||
|
+++ b/xen/common/kexec.c
|
||||||
|
@@ -60,6 +60,7 @@ static unsigned char vmcoreinfo_data[VMC
|
||||||
|
static size_t vmcoreinfo_size = 0;
|
||||||
|
|
||||||
|
xen_kexec_reserve_t kexec_crash_area;
|
||||||
|
+paddr_t __initdata kexec_crash_area_limit = ~(paddr_t)0;
|
||||||
|
static struct {
|
||||||
|
u64 start, end;
|
||||||
|
unsigned long size;
|
||||||
|
@@ -86,7 +87,7 @@ static void *crash_heap_current = NULL,
|
||||||
|
/*
|
||||||
|
* Parse command lines in the format
|
||||||
|
*
|
||||||
|
- * crashkernel=<ramsize-range>:<size>[,...][@<offset>]
|
||||||
|
+ * crashkernel=<ramsize-range>:<size>[,...][{@,<}<address>]
|
||||||
|
*
|
||||||
|
* with <ramsize-range> being of form
|
||||||
|
*
|
||||||
|
@@ -94,7 +95,7 @@ static void *crash_heap_current = NULL,
|
||||||
|
*
|
||||||
|
* as well as the legacy ones in the format
|
||||||
|
*
|
||||||
|
- * crashkernel=<size>[@<offset>]
|
||||||
|
+ * crashkernel=<size>[{@,<}<address>]
|
||||||
|
*/
|
||||||
|
static void __init parse_crashkernel(const char *str)
|
||||||
|
{
|
||||||
|
@@ -109,7 +110,7 @@ static void __init parse_crashkernel(con
|
||||||
|
{
|
||||||
|
printk(XENLOG_WARNING "crashkernel: too many ranges\n");
|
||||||
|
cur = NULL;
|
||||||
|
- str = strchr(str, '@');
|
||||||
|
+ str = strpbrk(str, "@<");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -154,9 +155,16 @@ static void __init parse_crashkernel(con
|
||||||
|
}
|
||||||
|
else
|
||||||
|
kexec_crash_area.size = parse_size_and_unit(cur = str, &str);
|
||||||
|
- if ( cur != str && *str == '@' )
|
||||||
|
- kexec_crash_area.start = parse_size_and_unit(cur = str + 1, &str);
|
||||||
|
- if ( cur == str )
|
||||||
|
+ if ( cur != str )
|
||||||
|
+ {
|
||||||
|
+ if ( *str == '@' )
|
||||||
|
+ kexec_crash_area.start = parse_size_and_unit(cur = str + 1, &str);
|
||||||
|
+ else if ( *str == '<' )
|
||||||
|
+ kexec_crash_area_limit = parse_size_and_unit(cur = str + 1, &str);
|
||||||
|
+ else
|
||||||
|
+ printk(XENLOG_WARNING "crashkernel: '%s' ignored\n", str);
|
||||||
|
+ }
|
||||||
|
+ if ( cur && cur == str )
|
||||||
|
printk(XENLOG_WARNING "crashkernel: memory value expected\n");
|
||||||
|
}
|
||||||
|
custom_param("crashkernel", parse_crashkernel);
|
||||||
|
--- a/xen/include/xen/kexec.h
|
||||||
|
+++ b/xen/include/xen/kexec.h
|
||||||
|
@@ -14,6 +14,7 @@ typedef struct xen_kexec_reserve {
|
||||||
|
} xen_kexec_reserve_t;
|
||||||
|
|
||||||
|
extern xen_kexec_reserve_t kexec_crash_area;
|
||||||
|
+extern paddr_t kexec_crash_area_limit;
|
||||||
|
|
||||||
|
extern bool_t kexecing;
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
# Commit 5e02972646132ad98c365ebfcfcb43b40a0dde36
|
||||||
|
# Date 2016-06-13 12:44:32 +0100
|
||||||
|
# Author Euan Harris <euan.harris@citrix.com>
|
||||||
|
# Committer Andrew Cooper <andrew.cooper3@citrix.com>
|
||||||
|
nested vmx: Validate host VMX MSRs before accessing them
|
||||||
|
|
||||||
|
Some VMX MSRs may not exist on certain processor models, or may
|
||||||
|
be disabled because of configuration settings. It is only safe to
|
||||||
|
access these MSRs if configuration flags in other MSRs are set. These
|
||||||
|
prerequisites are listed in the Intel 64 and IA-32 Architectures
|
||||||
|
Software Developer’s Manual, Vol 3, Appendix A.
|
||||||
|
|
||||||
|
nvmx_msr_read_intercept() does not check the prerequisites before
|
||||||
|
accessing MSR_IA32_VMX_PROCBASED_CTLS2, MSR_IA32_VMX_EPT_VPID_CAP,
|
||||||
|
MSR_IA32_VMX_VMFUNC on the host. Accessing these MSRs from a nested
|
||||||
|
VMX guest running on a host which does not support them will cause
|
||||||
|
Xen to crash with a GPF.
|
||||||
|
|
||||||
|
Signed-off-by: Euan Harris <euan.harris@citrix.com>
|
||||||
|
Acked-by: Kevin Tian <kevin.tian@intel.com>
|
||||||
|
Reviewed-by: Jan Beulich <jbeulich@suse.com>
|
||||||
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||||
|
|
||||||
|
--- a/xen/arch/x86/hvm/vmx/vvmx.c
|
||||||
|
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
|
||||||
|
@@ -1820,11 +1820,22 @@ int nvmx_msr_read_intercept(unsigned int
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * Those MSRs are available only when bit 55 of
|
||||||
|
- * MSR_IA32_VMX_BASIC is set.
|
||||||
|
+ * These MSRs are only available when flags in other MSRs are set.
|
||||||
|
+ * These prerequisites are listed in the Intel 64 and IA-32
|
||||||
|
+ * Architectures Software Developer’s Manual, Vol 3, Appendix A.
|
||||||
|
*/
|
||||||
|
switch ( msr )
|
||||||
|
{
|
||||||
|
+ case MSR_IA32_VMX_PROCBASED_CTLS2:
|
||||||
|
+ if ( !cpu_has_vmx_secondary_exec_control )
|
||||||
|
+ return 0;
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
+ case MSR_IA32_VMX_EPT_VPID_CAP:
|
||||||
|
+ if ( !(cpu_has_vmx_ept || cpu_has_vmx_vpid) )
|
||||||
|
+ return 0;
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case MSR_IA32_VMX_TRUE_PINBASED_CTLS:
|
||||||
|
case MSR_IA32_VMX_TRUE_PROCBASED_CTLS:
|
||||||
|
case MSR_IA32_VMX_TRUE_EXIT_CTLS:
|
||||||
|
@@ -1832,6 +1843,11 @@ int nvmx_msr_read_intercept(unsigned int
|
||||||
|
if ( !(vmx_basic_msr & VMX_BASIC_DEFAULT1_ZERO) )
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
|
+
|
||||||
|
+ case MSR_IA32_VMX_VMFUNC:
|
||||||
|
+ if ( !cpu_has_vmx_vmfunc )
|
||||||
|
+ return 0;
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
|
||||||
|
rdmsrl(msr, host_data);
|
@ -0,0 +1,32 @@
|
|||||||
|
# Commit 9dec2c47406f4ef31711656722f5f70d758d6160
|
||||||
|
# Date 2016-06-17 15:08:08 +0100
|
||||||
|
# Author Dario Faggioli <dario.faggioli@citrix.com>
|
||||||
|
# Committer George Dunlap <george.dunlap@citrix.com>
|
||||||
|
xen: sched: use default scheduler upon an invalid "sched="
|
||||||
|
|
||||||
|
instead of just the first scheduler we find in the array.
|
||||||
|
|
||||||
|
In fact, right now, if someone makes a typo when passing
|
||||||
|
the "sched=" command line option to Xen, we (with all
|
||||||
|
schedulers configured in) pick ARINC653, which is most
|
||||||
|
likely not what one would expect.
|
||||||
|
|
||||||
|
Go for the default scheduler instead.
|
||||||
|
|
||||||
|
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
|
||||||
|
Acked-by: George Dunlap <george.dunlap@citrix.com>
|
||||||
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||||
|
Reviewed-By: Jonathan Creekmore <jonathan.creekmore@gmail.com>
|
||||||
|
|
||||||
|
--- a/xen/common/schedule.c
|
||||||
|
+++ b/xen/common/schedule.c
|
||||||
|
@@ -1625,7 +1625,8 @@ void __init scheduler_init(void)
|
||||||
|
{
|
||||||
|
printk("Could not find scheduler: %s\n", opt_sched);
|
||||||
|
for ( i = 0; i < NUM_SCHEDULERS; i++ )
|
||||||
|
- if ( schedulers[i] )
|
||||||
|
+ if ( schedulers[i] &&
|
||||||
|
+ !strcmp(schedulers[i]->opt_name, CONFIG_SCHED_DEFAULT) )
|
||||||
|
{
|
||||||
|
ops = *schedulers[i];
|
||||||
|
break;
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 23 09:45:38 MDT 2016 - carnold@suse.com
|
||||||
|
|
||||||
|
- bsc#900418 - Dump cannot be performed on SLES12 XEN
|
||||||
|
57580bbd-kexec-allow-relaxed-placement-via-cmdline.patch
|
||||||
|
- Upstream patches from Jan
|
||||||
|
575e9ca0-nested-vmx-Validate-host-VMX-MSRs-before-accessing-them.patch
|
||||||
|
57640448-xen-sched-use-default-scheduler-upon-an-invalid-sched.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 21 08:26:51 MDT 2016 - carnold@suse.com
|
Tue Jun 21 08:26:51 MDT 2016 - carnold@suse.com
|
||||||
|
|
||||||
|
6
xen.spec
6
xen.spec
@ -203,6 +203,9 @@ Source57: xen-utils-0.1.tar.bz2
|
|||||||
# For xen-libs
|
# For xen-libs
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
|
Patch1: 57580bbd-kexec-allow-relaxed-placement-via-cmdline.patch
|
||||||
|
Patch2: 575e9ca0-nested-vmx-Validate-host-VMX-MSRs-before-accessing-them.patch
|
||||||
|
Patch3: 57640448-xen-sched-use-default-scheduler-upon-an-invalid-sched.patch
|
||||||
# Upstream qemu-traditional patches
|
# Upstream qemu-traditional patches
|
||||||
Patch250: VNC-Support-for-ExtendedKeyEvent-client-message.patch
|
Patch250: VNC-Support-for-ExtendedKeyEvent-client-message.patch
|
||||||
Patch251: 0001-net-move-the-tap-buffer-into-TAPState.patch
|
Patch251: 0001-net-move-the-tap-buffer-into-TAPState.patch
|
||||||
@ -521,6 +524,9 @@ Authors:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %xen_build_dir -a 1 -a 2 -a 5 -a 6 -a 57
|
%setup -q -n %xen_build_dir -a 1 -a 2 -a 5 -a 6 -a 57
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
# Upstream qemu patches
|
# Upstream qemu patches
|
||||||
%patch250 -p1
|
%patch250 -p1
|
||||||
%patch251 -p1
|
%patch251 -p1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user