summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Oliva <lxoliva@fsfla.org>2017-09-13 19:54:52 +0000
committerAlexandre Oliva <lxoliva@fsfla.org>2017-09-13 19:54:52 +0000
commit58ef431034551fdbb3162971cca549a17761e833 (patch)
tree7f5ffc7e231b5b697bc41995ddd04d4b41dd12a1
parent0756e2bdbf58a14d4f3316f9ea03491e4c335fab (diff)
downloadlinux-libre-raptor-58ef431034551fdbb3162971cca549a17761e833.tar.gz
linux-libre-raptor-58ef431034551fdbb3162971cca549a17761e833.zip
4.12.12-300.fc26.gnu
-rw-r--r--freed-ora/current/f26/0001-xen-balloon-don-t-online-new-memory-initially.patch116
-rw-r--r--freed-ora/current/f26/kernel.spec16
-rw-r--r--freed-ora/current/f26/patch-4.12-gnu-4.12.11-gnu.xz.sign6
-rw-r--r--freed-ora/current/f26/patch-4.12-gnu-4.12.12-gnu.xz.sign6
-rw-r--r--freed-ora/current/f26/qxl-fix-primary-surface-handling.patch87
-rw-r--r--freed-ora/current/f26/sources2
6 files changed, 225 insertions, 8 deletions
diff --git a/freed-ora/current/f26/0001-xen-balloon-don-t-online-new-memory-initially.patch b/freed-ora/current/f26/0001-xen-balloon-don-t-online-new-memory-initially.patch
new file mode 100644
index 000000000..df7cfecf2
--- /dev/null
+++ b/freed-ora/current/f26/0001-xen-balloon-don-t-online-new-memory-initially.patch
@@ -0,0 +1,116 @@
+From 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 Mon Sep 17 00:00:00 2001
+From: Juergen Gross <jgross@suse.com>
+Date: Mon, 10 Jul 2017 10:10:45 +0200
+Subject: [PATCH] xen/balloon: don't online new memory initially
+
+When setting up the Xenstore watch for the memory target size the new
+watch will fire at once. Don't try to reach the configured target size
+by onlining new memory in this case, as the current memory size will
+be smaller in almost all cases due to e.g. BIOS reserved pages.
+
+Onlining new memory will lead to more problems e.g. undesired conflicts
+with NVMe devices meant to be operated as block devices.
+
+Instead remember the difference between target size and current size
+when the watch fires for the first time and apply it to any further
+size changes, too.
+
+In order to avoid races between balloon.c and xen-balloon.c init calls
+do the xen-balloon.c initialization from balloon.c.
+
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Signed-off-by: Juergen Gross <jgross@suse.com>
+---
+ drivers/xen/balloon.c | 3 +++
+ drivers/xen/xen-balloon.c | 22 ++++++++++++----------
+ include/xen/balloon.h | 8 ++++++++
+ 3 files changed, 23 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
+index 50dcb68d8070..ab609255a0f3 100644
+--- a/drivers/xen/balloon.c
++++ b/drivers/xen/balloon.c
+@@ -780,6 +780,9 @@ static int __init balloon_init(void)
+ }
+ #endif
+
++ /* Init the xen-balloon driver. */
++ xen_balloon_init();
++
+ return 0;
+ }
+ subsys_initcall(balloon_init);
+diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c
+index e7715cb62eef..e89136ab851e 100644
+--- a/drivers/xen/xen-balloon.c
++++ b/drivers/xen/xen-balloon.c
+@@ -59,6 +59,8 @@ static void watch_target(struct xenbus_watch *watch,
+ {
+ unsigned long long new_target;
+ int err;
++ static bool watch_fired;
++ static long target_diff;
+
+ err = xenbus_scanf(XBT_NIL, "memory", "target", "%llu", &new_target);
+ if (err != 1) {
+@@ -69,7 +71,14 @@ static void watch_target(struct xenbus_watch *watch,
+ /* The given memory/target value is in KiB, so it needs converting to
+ * pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10.
+ */
+- balloon_set_new_target(new_target >> (PAGE_SHIFT - 10));
++ new_target >>= PAGE_SHIFT - 10;
++ if (watch_fired) {
++ balloon_set_new_target(new_target - target_diff);
++ return;
++ }
++
++ watch_fired = true;
++ target_diff = new_target - balloon_stats.target_pages;
+ }
+ static struct xenbus_watch target_watch = {
+ .node = "memory/target",
+@@ -94,22 +103,15 @@ static struct notifier_block xenstore_notifier = {
+ .notifier_call = balloon_init_watcher,
+ };
+
+-static int __init balloon_init(void)
++void xen_balloon_init(void)
+ {
+- if (!xen_domain())
+- return -ENODEV;
+-
+- pr_info("Initialising balloon driver\n");
+-
+ register_balloon(&balloon_dev);
+
+ register_xen_selfballooning(&balloon_dev);
+
+ register_xenstore_notifier(&xenstore_notifier);
+-
+- return 0;
+ }
+-subsys_initcall(balloon_init);
++EXPORT_SYMBOL_GPL(xen_balloon_init);
+
+ #define BALLOON_SHOW(name, format, args...) \
+ static ssize_t show_##name(struct device *dev, \
+diff --git a/include/xen/balloon.h b/include/xen/balloon.h
+index d1767dfb0d95..8906361bb50c 100644
+--- a/include/xen/balloon.h
++++ b/include/xen/balloon.h
+@@ -35,3 +35,11 @@ static inline int register_xen_selfballooning(struct device *dev)
+ return -ENOSYS;
+ }
+ #endif
++
++#ifdef CONFIG_XEN_BALLOON
++void xen_balloon_init(void);
++#else
++static inline void xen_balloon_init(void)
++{
++}
++#endif
+--
+2.13.3
+
diff --git a/freed-ora/current/f26/kernel.spec b/freed-ora/current/f26/kernel.spec
index 21418f92f..74008cd34 100644
--- a/freed-ora/current/f26/kernel.spec
+++ b/freed-ora/current/f26/kernel.spec
@@ -92,7 +92,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
-%define stable_update 11
+%define stable_update 12
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@@ -741,6 +741,12 @@ Patch716: md-raid-reset-bio-allocated-from-mempool.patch
# CVE-2017-14051 rhbz 1487126 1487127
Patch717: v2-scsi-qla2xxx-Fix-an-integer-overflow-in-sysfs-code.patch
+# Should fix our QXL issues
+Patch718: qxl-fix-primary-surface-handling.patch
+
+# rhbz 1463000
+Patch719: 0001-xen-balloon-don-t-online-new-memory-initially.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -2411,6 +2417,14 @@ fi
#
#
%changelog
+* Tue Sep 12 2017 Alexandre Oliva <lxoliva@fsfla.org> -libre
+- GNU Linux-libre 4.12.12-gnu.
+
+* Mon Sep 11 2017 Justin M. Forbes <jforbes@fedoraproject.org> - 4.12.12-300
+- Linux v4.12.12
+- QXL Fixes
+- Fix for xen ballow with AWS (rhbz 1463000)
+
* Fri Sep 8 2017 Alexandre Oliva <lxoliva@fsfla.org> -libre
- GNU Linux-libre 4.12.11-gnu.
diff --git a/freed-ora/current/f26/patch-4.12-gnu-4.12.11-gnu.xz.sign b/freed-ora/current/f26/patch-4.12-gnu-4.12.11-gnu.xz.sign
deleted file mode 100644
index bcee6a2e4..000000000
--- a/freed-ora/current/f26/patch-4.12-gnu-4.12.11-gnu.xz.sign
+++ /dev/null
@@ -1,6 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iF0EABECAB0WIQRHRALIxYLa++OJxCe8t8+Hfn1HpwUCWbIyQAAKCRC8t8+Hfn1H
-pzwNAJsEdC7QCHHvGQI/Cm9FvRT3UspplwCgnlrX5XbujXZLTA1ipZ+Hkz+l5DI=
-=H183
------END PGP SIGNATURE-----
diff --git a/freed-ora/current/f26/patch-4.12-gnu-4.12.12-gnu.xz.sign b/freed-ora/current/f26/patch-4.12-gnu-4.12.12-gnu.xz.sign
new file mode 100644
index 000000000..94a09e955
--- /dev/null
+++ b/freed-ora/current/f26/patch-4.12-gnu-4.12.12-gnu.xz.sign
@@ -0,0 +1,6 @@
+-----BEGIN PGP SIGNATURE-----
+
+iF0EABECAB0WIQRHRALIxYLa++OJxCe8t8+Hfn1HpwUCWbaFNgAKCRC8t8+Hfn1H
+p0vpAJ4sNYuZYLnZGMVwGXReoQerDKuNzgCfbaraRYPeBwhemTyd0pVS54D/OZw=
+=80EH
+-----END PGP SIGNATURE-----
diff --git a/freed-ora/current/f26/qxl-fix-primary-surface-handling.patch b/freed-ora/current/f26/qxl-fix-primary-surface-handling.patch
new file mode 100644
index 000000000..457634d21
--- /dev/null
+++ b/freed-ora/current/f26/qxl-fix-primary-surface-handling.patch
@@ -0,0 +1,87 @@
+From b16a0bb7a9d54d9dd256059b35adf6f96fddc22e Mon Sep 17 00:00:00 2001
+From: Gerd Hoffmann <kraxel@redhat.com>
+Date: Wed, 6 Sep 2017 11:31:51 +0200
+Subject: qxl: fix primary surface handling
+
+The atomic conversion of the qxl driver didn't got the primary surface
+handling completely right. It works in the common simple cases, but
+fails for example when changing the display resolution using xrandr or
+in multihead setups.
+
+The rules are simple: There is one primary surface. Before defining a
+new one you have to destroy the old one.
+
+This patch makes qxl_primary_atomic_update() destroy the primary surface
+before defining a new one. It fixes is_primary flag updates. It adds
+is_primary checks so we don't try to update the primary surface in case
+it already has the state we want it being in.
+
+Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
+---
+ drivers/gpu/drm/qxl/qxl_display.c | 34 +++++++++++++++++++---------------
+ 1 file changed, 19 insertions(+), 15 deletions(-)
+
+diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
+index 14c5613..e1dd054 100644
+--- a/drivers/gpu/drm/qxl/qxl_display.c
++++ b/drivers/gpu/drm/qxl/qxl_display.c
+@@ -509,23 +509,25 @@ static void qxl_primary_atomic_update(struct drm_plane *plane,
+ .y2 = qfb->base.height
+ };
+
+- if (!old_state->fb) {
+- qxl_io_log(qdev,
+- "create primary fb: %dx%d,%d,%d\n",
+- bo->surf.width, bo->surf.height,
+- bo->surf.stride, bo->surf.format);
++ if (old_state->fb) {
++ qfb_old = to_qxl_framebuffer(old_state->fb);
++ bo_old = gem_to_qxl_bo(qfb_old->obj);
++ } else {
++ bo_old = NULL;
++ }
+
+- qxl_io_create_primary(qdev, 0, bo);
+- bo->is_primary = true;
++ if (bo == bo_old)
+ return;
+
+- } else {
+- qfb_old = to_qxl_framebuffer(old_state->fb);
+- bo_old = gem_to_qxl_bo(qfb_old->obj);
++ if (bo_old && bo_old->is_primary) {
++ qxl_io_destroy_primary(qdev);
+ bo_old->is_primary = false;
+ }
+
+- bo->is_primary = true;
++ if (!bo->is_primary) {
++ qxl_io_create_primary(qdev, 0, bo);
++ bo->is_primary = true;
++ }
+ qxl_draw_dirty_fb(qdev, qfb, bo, 0, 0, &norect, 1, 1);
+ }
+
+@@ -534,13 +536,15 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane,
+ {
+ struct qxl_device *qdev = plane->dev->dev_private;
+
+- if (old_state->fb)
+- { struct qxl_framebuffer *qfb =
++ if (old_state->fb) {
++ struct qxl_framebuffer *qfb =
+ to_qxl_framebuffer(old_state->fb);
+ struct qxl_bo *bo = gem_to_qxl_bo(qfb->obj);
+
+- qxl_io_destroy_primary(qdev);
+- bo->is_primary = false;
++ if (bo->is_primary) {
++ qxl_io_destroy_primary(qdev);
++ bo->is_primary = false;
++ }
+ }
+ }
+
+--
+cgit v0.12
+
diff --git a/freed-ora/current/f26/sources b/freed-ora/current/f26/sources
index 6619ce8b5..47cc35d60 100644
--- a/freed-ora/current/f26/sources
+++ b/freed-ora/current/f26/sources
@@ -1,3 +1,3 @@
SHA512 (linux-libre-4.12-gnu.tar.xz) = d5586dba2e4deeb42ffe98c9305111da56e0741bb4508642d103367a0ef712c837e160366c3656d18f0d636fcd5b60c27593cb9216e10025d6abc74e6cdb05e4
SHA512 (perf-man-4.12.tar.gz) = 4d3bbda1f520dba0007c351af46f45085fe4842074eb2e01aee736fd369df595f8f72ed6c1192715f1120bf3353279777f9dca1178fe93bffe5be2de700d409c
-SHA512 (patch-4.12-gnu-4.12.11-gnu.xz) = 6ebb1636838cd5d5b96f669cf06d69ee6938be6dc9818a5a430e35bf579b956adba49907e273c5ab3c388c5181fa9d09a9a0e99a272cd649417f29fb888b797f
+SHA512 (patch-4.12-gnu-4.12.12-gnu.xz) = 72c151c5dc6ce8ed685c56180cd27f854760be45c344b144e5d459b83e4eee9025162bf402b8c1a0fede837389dcacbe854834025347d05baab9a0a1e89a4df3
OpenPOWER on IntegriCloud