Accepting request 305344 from Virtualization
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/305344 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xen?expand=0&rev=204
This commit is contained in:
commit
54a99563cd
201
5513b458-allow-reboot-overrides-when-running-under-EFI.patch
Normal file
201
5513b458-allow-reboot-overrides-when-running-under-EFI.patch
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
Subject: x86/EFI: allow reboot= overrides when running under EFI
|
||||||
|
From: Konrad Rzeszutek Wilk konrad.wilk@oracle.com Thu Mar 26 08:25:12 2015 +0100
|
||||||
|
Date: Thu Mar 26 08:25:12 2015 +0100:
|
||||||
|
Git: 89bdb85c5cf5d71683a4eddd6143ee15cc298655
|
||||||
|
|
||||||
|
By default we will always use EFI reboot mechanism when
|
||||||
|
running under EFI platforms. However some EFI platforms
|
||||||
|
are buggy and need to use the ACPI mechanism to
|
||||||
|
reboot (such as Lenovo ThinkCentre M57). As such
|
||||||
|
respect the 'reboot=' override and DMI overrides
|
||||||
|
for EFI platforms.
|
||||||
|
|
||||||
|
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||||
|
|
||||||
|
- BOOT_INVALID is just zero
|
||||||
|
- also consider acpi_disabled in BOOT_INVALID resolution
|
||||||
|
- duplicate BOOT_INVALID resolution in machine_restart()
|
||||||
|
- don't fall back from BOOT_ACPI to BOOT_EFI (if it was overridden, it
|
||||||
|
surely was for a reason)
|
||||||
|
- adjust doc change formatting
|
||||||
|
|
||||||
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||||
|
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||||
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||||
|
|
||||||
|
x86/EFI: fix reboot after c643fb110a
|
||||||
|
|
||||||
|
acpi_disabled needs to be moved out of .init.data.
|
||||||
|
|
||||||
|
Reported-by: Ross Lagerwall <ross.lagerwall@citrix.com>
|
||||||
|
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||||
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||||
|
Tested-by: Ross Lagerwall <ross.lagerwall@citrix.com>
|
||||||
|
|
||||||
|
master commit: c643fb110a51693e82a36ca9178d54f0b9744024
|
||||||
|
master date: 2015-03-13 11:25:52 +0100
|
||||||
|
master commit: 8ff330ec11e471919621bce97c069b83b0319d15
|
||||||
|
master date: 2015-03-23 18:01:51 +0100
|
||||||
|
|
||||||
|
diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
|
||||||
|
index 0042e0f..3c2b066 100644
|
||||||
|
--- a/docs/misc/xen-command-line.markdown
|
||||||
|
+++ b/docs/misc/xen-command-line.markdown
|
||||||
|
@@ -1091,7 +1091,7 @@ The following resources are available:
|
||||||
|
* `rmid_max` indicates the max value for rmid.
|
||||||
|
|
||||||
|
### reboot
|
||||||
|
-> `= t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]`
|
||||||
|
+> `= t[riple] | k[bd] | a[cpi] | p[ci] | e[fi] | n[o] [, [w]arm | [c]old]`
|
||||||
|
|
||||||
|
> Default: `0`
|
||||||
|
|
||||||
|
@@ -1111,6 +1111,9 @@ Specify the host reboot method.
|
||||||
|
|
||||||
|
`pci` instructs Xen to reboot the host using PCI reset register (port CF9).
|
||||||
|
|
||||||
|
+'efi' instructs Xen to reboot using the EFI reboot call (in EFI mode by
|
||||||
|
+ default it will use that method first).
|
||||||
|
+
|
||||||
|
### sched
|
||||||
|
> `= credit | credit2 | sedf | arinc653`
|
||||||
|
|
||||||
|
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
|
||||||
|
index c27c49c..fefa0b7 100644
|
||||||
|
--- a/xen/arch/x86/setup.c
|
||||||
|
+++ b/xen/arch/x86/setup.c
|
||||||
|
@@ -106,7 +106,7 @@ struct cpuinfo_x86 __read_mostly boot_cpu_data = { 0, 0, 0, 0, -1 };
|
||||||
|
|
||||||
|
unsigned long __read_mostly mmu_cr4_features = XEN_MINIMAL_CR4;
|
||||||
|
|
||||||
|
-bool_t __initdata acpi_disabled;
|
||||||
|
+bool_t __read_mostly acpi_disabled;
|
||||||
|
bool_t __initdata acpi_force;
|
||||||
|
static char __initdata acpi_param[10] = "";
|
||||||
|
static void __init parse_acpi_param(char *s)
|
||||||
|
diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
|
||||||
|
index 21f6cf5..d2bb24b 100644
|
||||||
|
--- a/xen/arch/x86/shutdown.c
|
||||||
|
+++ b/xen/arch/x86/shutdown.c
|
||||||
|
@@ -28,16 +28,18 @@
|
||||||
|
#include <asm/apic.h>
|
||||||
|
|
||||||
|
enum reboot_type {
|
||||||
|
+ BOOT_INVALID,
|
||||||
|
BOOT_TRIPLE = 't',
|
||||||
|
BOOT_KBD = 'k',
|
||||||
|
BOOT_ACPI = 'a',
|
||||||
|
BOOT_CF9 = 'p',
|
||||||
|
+ BOOT_EFI = 'e',
|
||||||
|
};
|
||||||
|
|
||||||
|
static int reboot_mode;
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * reboot=t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]
|
||||||
|
+ * reboot=t[riple] | k[bd] | a[cpi] | p[ci] | n[o] | [e]fi [, [w]arm | [c]old]
|
||||||
|
* warm Don't set the cold reboot flag
|
||||||
|
* cold Set the cold reboot flag
|
||||||
|
* no Suppress automatic reboot after panics or crashes
|
||||||
|
@@ -45,8 +47,9 @@ static int reboot_mode;
|
||||||
|
* kbd Use the keyboard controller. cold reset (default)
|
||||||
|
* acpi Use the RESET_REG in the FADT
|
||||||
|
* pci Use the so-called "PCI reset register", CF9
|
||||||
|
+ * efi Use the EFI reboot (if running under EFI)
|
||||||
|
*/
|
||||||
|
-static enum reboot_type reboot_type = BOOT_ACPI;
|
||||||
|
+static enum reboot_type reboot_type = BOOT_INVALID;
|
||||||
|
static void __init set_reboot_type(char *str)
|
||||||
|
{
|
||||||
|
for ( ; ; )
|
||||||
|
@@ -63,6 +66,7 @@ static void __init set_reboot_type(char *str)
|
||||||
|
reboot_mode = 0x0;
|
||||||
|
break;
|
||||||
|
case 'a':
|
||||||
|
+ case 'e':
|
||||||
|
case 'k':
|
||||||
|
case 't':
|
||||||
|
case 'p':
|
||||||
|
@@ -106,6 +110,14 @@ void machine_halt(void)
|
||||||
|
__machine_halt(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void default_reboot_type(void)
|
||||||
|
+{
|
||||||
|
+ if ( reboot_type == BOOT_INVALID )
|
||||||
|
+ reboot_type = efi_enabled ? BOOT_EFI
|
||||||
|
+ : acpi_disabled ? BOOT_KBD
|
||||||
|
+ : BOOT_ACPI;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int __init override_reboot(struct dmi_system_id *d)
|
||||||
|
{
|
||||||
|
enum reboot_type type = (long)d->driver_data;
|
||||||
|
@@ -452,6 +464,7 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
||||||
|
|
||||||
|
static int __init reboot_init(void)
|
||||||
|
{
|
||||||
|
+ default_reboot_type();
|
||||||
|
dmi_check_system(reboot_dmi_table);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -465,7 +478,7 @@ static void noreturn __machine_restart(void *pdelay)
|
||||||
|
void machine_restart(unsigned int delay_millisecs)
|
||||||
|
{
|
||||||
|
unsigned int i, attempt;
|
||||||
|
- enum reboot_type orig_reboot_type = reboot_type;
|
||||||
|
+ enum reboot_type orig_reboot_type;
|
||||||
|
const struct desc_ptr no_idt = { 0 };
|
||||||
|
|
||||||
|
watchdog_disable();
|
||||||
|
@@ -504,15 +517,20 @@ void machine_restart(unsigned int delay_millisecs)
|
||||||
|
tboot_shutdown(TB_SHUTDOWN_REBOOT);
|
||||||
|
}
|
||||||
|
|
||||||
|
- efi_reset_system(reboot_mode != 0);
|
||||||
|
+ /* Just in case reboot_init() didn't run yet. */
|
||||||
|
+ default_reboot_type();
|
||||||
|
+ orig_reboot_type = reboot_type;
|
||||||
|
|
||||||
|
/* Rebooting needs to touch the page at absolute address 0. */
|
||||||
|
- *((unsigned short *)__va(0x472)) = reboot_mode;
|
||||||
|
+ if ( reboot_type != BOOT_EFI )
|
||||||
|
+ *((unsigned short *)__va(0x472)) = reboot_mode;
|
||||||
|
|
||||||
|
for ( attempt = 0; ; attempt++ )
|
||||||
|
{
|
||||||
|
switch ( reboot_type )
|
||||||
|
{
|
||||||
|
+ case BOOT_INVALID:
|
||||||
|
+ ASSERT_UNREACHABLE();
|
||||||
|
case BOOT_KBD:
|
||||||
|
/* Pulse the keyboard reset line. */
|
||||||
|
for ( i = 0; i < 100; i++ )
|
||||||
|
@@ -532,6 +550,11 @@ void machine_restart(unsigned int delay_millisecs)
|
||||||
|
reboot_type = (((attempt == 1) && (orig_reboot_type == BOOT_ACPI))
|
||||||
|
? BOOT_ACPI : BOOT_TRIPLE);
|
||||||
|
break;
|
||||||
|
+ case BOOT_EFI:
|
||||||
|
+ reboot_type = acpi_disabled ? BOOT_KBD : BOOT_ACPI;
|
||||||
|
+ efi_reset_system(reboot_mode != 0);
|
||||||
|
+ *((unsigned short *)__va(0x472)) = reboot_mode;
|
||||||
|
+ break;
|
||||||
|
case BOOT_TRIPLE:
|
||||||
|
asm volatile ("lidt %0; int3" : : "m" (no_idt));
|
||||||
|
reboot_type = BOOT_KBD;
|
||||||
|
diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
|
||||||
|
index f11b49e..0bb05e5 100644
|
||||||
|
--- a/xen/include/xen/lib.h
|
||||||
|
+++ b/xen/include/xen/lib.h
|
||||||
|
@@ -41,9 +41,11 @@ do { \
|
||||||
|
#ifndef NDEBUG
|
||||||
|
#define ASSERT(p) \
|
||||||
|
do { if ( unlikely(!(p)) ) assert_failed(#p); } while (0)
|
||||||
|
+#define ASSERT_UNREACHABLE() assert_failed("unreachable")
|
||||||
|
#define debug_build() 1
|
||||||
|
#else
|
||||||
|
#define ASSERT(p) do { if ( 0 && (p) ); } while (0)
|
||||||
|
+#define ASSERT_UNREACHABLE() do { } while (0)
|
||||||
|
#define debug_build() 0
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
Subject: x86: don't apply reboot quirks if reboot set by user
|
||||||
|
From: Ross Lagerwall ross.lagerwall@citrix.com Thu Mar 26 08:27:13 2015 +0100
|
||||||
|
Date: Thu Mar 26 08:27:13 2015 +0100:
|
||||||
|
Git: 7fe1c1b28581686aca42361d4fee740c643dde1b
|
||||||
|
|
||||||
|
If reboot= is specified on the command-line, don't apply reboot quirks
|
||||||
|
to allow the command-line option to take precedence.
|
||||||
|
|
||||||
|
This is a port of Linux commit 5955633e91bf ("x86/reboot: Skip DMI
|
||||||
|
checks if reboot set by user").
|
||||||
|
|
||||||
|
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
|
||||||
|
|
||||||
|
Leverage (and make apply on top of) c643fb110a ("x86/EFI: allow
|
||||||
|
reboot= overrides when running under EFI").
|
||||||
|
|
||||||
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||||
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||||
|
master commit: 9832f5e8e3575f8affceb2751f7422704bf7b446
|
||||||
|
master date: 2015-03-13 12:41:51 +0100
|
||||||
|
|
||||||
|
diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
|
||||||
|
index d2bb24b..9ec8f97 100644
|
||||||
|
--- a/xen/arch/x86/shutdown.c
|
||||||
|
+++ b/xen/arch/x86/shutdown.c
|
||||||
|
@@ -464,6 +464,13 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
|
||||||
|
|
||||||
|
static int __init reboot_init(void)
|
||||||
|
{
|
||||||
|
+ /*
|
||||||
|
+ * Only do the DMI check if reboot_type hasn't been overridden
|
||||||
|
+ * on the command line
|
||||||
|
+ */
|
||||||
|
+ if ( reboot_type != BOOT_INVALID )
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
default_reboot_type();
|
||||||
|
dmi_check_system(reboot_dmi_table);
|
||||||
|
return 0;
|
@ -12,7 +12,7 @@ Index: xen-4.5.0-testing/tools/blktap/drivers/Makefile
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- xen-4.5.0-testing.orig/tools/blktap/drivers/Makefile
|
--- xen-4.5.0-testing.orig/tools/blktap/drivers/Makefile
|
||||||
+++ xen-4.5.0-testing/tools/blktap/drivers/Makefile
|
+++ xen-4.5.0-testing/tools/blktap/drivers/Makefile
|
||||||
@@ -32,8 +32,9 @@ AIOLIBS := -laio
|
@@ -33,8 +33,9 @@ AIOLIBS := -laio
|
||||||
CFLAGS += $(PTHREAD_CFLAGS)
|
CFLAGS += $(PTHREAD_CFLAGS)
|
||||||
LDFLAGS += $(PTHREAD_LDFLAGS)
|
LDFLAGS += $(PTHREAD_LDFLAGS)
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ Index: xen-4.5.0-testing/tools/blktap/drivers/Makefile
|
|||||||
|
|
||||||
BLK-OBJS-y := block-aio.o
|
BLK-OBJS-y := block-aio.o
|
||||||
BLK-OBJS-y += block-sync.o
|
BLK-OBJS-y += block-sync.o
|
||||||
@@ -41,6 +42,7 @@ BLK-OBJS-y += block-vmdk.o
|
@@ -42,6 +43,7 @@ BLK-OBJS-y += block-vmdk.o
|
||||||
BLK-OBJS-y += block-ram.o
|
BLK-OBJS-y += block-ram.o
|
||||||
BLK-OBJS-y += block-qcow.o
|
BLK-OBJS-y += block-qcow.o
|
||||||
BLK-OBJS-y += block-qcow2.o
|
BLK-OBJS-y += block-qcow2.o
|
||||||
|
16
xen-dom0-modules.service
Normal file
16
xen-dom0-modules.service
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Load dom0 backend drivers
|
||||||
|
ConditionPathExists=/proc/xen
|
||||||
|
Before=proc-xen.mount
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=true
|
||||||
|
Environment=PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
|
||||||
|
# dummy to have always one valid line
|
||||||
|
ExecStart=-/usr/bin/env uname -a
|
||||||
|
# modules listed in /usr/lib/modules.d/xen.conf
|
||||||
|
# load them manually to avoid usage of system-modules-load.service
|
13
xen.changes
13
xen.changes
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 27 09:55:01 MDT 2015 - carnold@suse.com
|
||||||
|
|
||||||
|
- bsc#928783 - Reboot failure; Request backport of upstream Xen
|
||||||
|
patch to 4.5.0, or update pkgs to 4.5.1
|
||||||
|
5513b458-allow-reboot-overrides-when-running-under-EFI.patch
|
||||||
|
5513b4d1-dont-apply-reboot-quirks-if-reboot-set-by-user.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 21 12:21:05 UTC 2015 - ohering@suse.de
|
||||||
|
|
||||||
|
- bnc#927750 - Avoid errors reported by system-modules-load.service
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 8 10:17:41 UTC 2015 - rguenther@suse.com
|
Wed Apr 8 10:17:41 UTC 2015 - rguenther@suse.com
|
||||||
|
|
||||||
|
21
xen.spec
21
xen.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package xen
|
# spec file for package xen
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -15,7 +15,6 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# needssslcertforbuild
|
# needssslcertforbuild
|
||||||
|
|
||||||
Name: xen
|
Name: xen
|
||||||
@ -194,6 +193,7 @@ Source36: xnloader.py
|
|||||||
Source37: xen2libvirt.py
|
Source37: xen2libvirt.py
|
||||||
# Systemd service files
|
# Systemd service files
|
||||||
Source41: xencommons.service
|
Source41: xencommons.service
|
||||||
|
Source42: xen-dom0-modules.service
|
||||||
Source57: xen-utils-0.1.tar.bz2
|
Source57: xen-utils-0.1.tar.bz2
|
||||||
# For xen-libs
|
# For xen-libs
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
@ -202,6 +202,8 @@ Source20000: xenalyze.hg.tar.bz2
|
|||||||
# Upstream patches
|
# Upstream patches
|
||||||
Patch1: 5124efbe-add-qxl-support.patch
|
Patch1: 5124efbe-add-qxl-support.patch
|
||||||
Patch2: 551ac326-xentop-add-support-for-qdisk.patch
|
Patch2: 551ac326-xentop-add-support-for-qdisk.patch
|
||||||
|
Patch3: 5513b458-allow-reboot-overrides-when-running-under-EFI.patch
|
||||||
|
Patch4: 5513b4d1-dont-apply-reboot-quirks-if-reboot-set-by-user.patch
|
||||||
# Upstream qemu
|
# Upstream qemu
|
||||||
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
|
||||||
@ -503,6 +505,8 @@ Authors:
|
|||||||
# Upstream patches
|
# Upstream patches
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
# Upstream qemu patches
|
# Upstream qemu patches
|
||||||
%patch250 -p1
|
%patch250 -p1
|
||||||
%patch251 -p1
|
%patch251 -p1
|
||||||
@ -868,6 +872,19 @@ enable xendomains.service
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
cp -bavL %{S:41} $RPM_BUILD_ROOT%{_unitdir}
|
cp -bavL %{S:41} $RPM_BUILD_ROOT%{_unitdir}
|
||||||
|
bn=`basename %{S:42}`
|
||||||
|
cp -bavL %{S:42} $RPM_BUILD_ROOT%{_unitdir}/${bn}
|
||||||
|
mods="`
|
||||||
|
for conf in $(ls $RPM_BUILD_ROOT%{with_systemd_modules_load}/*.conf)
|
||||||
|
do
|
||||||
|
grep -v ^# $conf
|
||||||
|
echo -n > $conf
|
||||||
|
done
|
||||||
|
`"
|
||||||
|
for mod in $mods
|
||||||
|
do
|
||||||
|
echo "ExecStart=-/usr/bin/env modprobe $mod" >> $RPM_BUILD_ROOT%{_unitdir}/${bn}
|
||||||
|
done
|
||||||
rm -rfv $RPM_BUILD_ROOT%{_initddir}
|
rm -rfv $RPM_BUILD_ROOT%{_initddir}
|
||||||
%else
|
%else
|
||||||
# Init scripts
|
# Init scripts
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
Description=xencommons
|
Description=xencommons
|
||||||
ConditionPathExists=/proc/xen/capabilities
|
ConditionPathExists=/proc/xen/capabilities
|
||||||
|
|
||||||
|
# Avoid errors from systemd-modules-load.service
|
||||||
|
Requires=xen-dom0-modules.service
|
||||||
|
After=xen-dom0-modules.service
|
||||||
|
|
||||||
# Pull in all upstream service files
|
# Pull in all upstream service files
|
||||||
Requires=proc-xen.mount
|
Requires=proc-xen.mount
|
||||||
After=proc-xen.mount
|
After=proc-xen.mount
|
||||||
|
Loading…
Reference in New Issue
Block a user