qemu-kvm/kvm-spapr-xive-skip-partially-initialized-vCPUs-in-prese.patch
Danilo C. L. de Paula 32a3ac0fa9 * Tue Nov 12 2019 Danilo Cesar Lemes de Paula <ddepaula@redhat.com> - 4.1.0-14.el8
- kvm-blockdev-reduce-aio_context-locked-sections-in-bitma.patch [bz#1756413]
- kvm-qapi-implement-block-dirty-bitmap-remove-transaction.patch [bz#1756413]
- kvm-iotests-test-bitmap-moving-inside-254.patch [bz#1756413]
- kvm-spapr-xive-skip-partially-initialized-vCPUs-in-prese.patch [bz#1754710]
- kvm-nbd-Grab-aio-context-lock-in-more-places.patch [bz#1741094]
- kvm-tests-Use-iothreads-during-iotest-223.patch [bz#1741094]
- Resolves: bz#1741094
  ([Upstream]Incremental backup: Qemu coredump when expose an active bitmap via pull mode(data plane enable))
- Resolves: bz#1754710
  (qemu core dumped when hotpluging vcpus)
- Resolves: bz#1756413
  (backport support for transactionable block-dirty-bitmap-remove for incremental backup support)
2019-11-12 01:37:10 +00:00

66 lines
2.2 KiB
Diff

From 3a7d0411addca79192ed60939f55ec019c27a72a Mon Sep 17 00:00:00 2001
From: David Gibson <dgibson@redhat.com>
Date: Tue, 8 Oct 2019 05:08:36 +0100
Subject: [PATCH 4/6] spapr/xive: skip partially initialized vCPUs in presenter
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
RH-Author: David Gibson <dgibson@redhat.com>
Message-id: <20191008050836.11479-1-dgibson@redhat.com>
Patchwork-id: 90994
O-Subject: [RHEL-AV-8.1.1 qemu-kvm PATCH] spapr/xive: skip partially initialized vCPUs in presenter
Bugzilla: 1754710
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
From: Cédric Le Goater <clg@kaod.org>
When vCPUs are hotplugged, they are added to the QEMU CPU list before
being fully realized. This can crash the XIVE presenter because the
'tctx' pointer is not necessarily initialized when looking for a
matching target.
These vCPUs are not valid targets for the presenter. Skip them.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20191001085722.32755-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit 627fa61746f70f7c799f08e9048bb6a482402138)
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1754710
Branch: rhel-av-8.1.1
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23900462
Testing: Could no longer reproduce bug with brewed qemu
Signed-off-by: David Gibson <dgibson@redhat.com>
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
hw/intc/xive.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/intc/xive.c b/hw/intc/xive.c
index da148e9..8f639f6 100644
--- a/hw/intc/xive.c
+++ b/hw/intc/xive.c
@@ -1345,6 +1345,14 @@ static bool xive_presenter_match(XiveRouter *xrtr, uint8_t format,
int ring;
/*
+ * Skip partially initialized vCPUs. This can happen when
+ * vCPUs are hotplugged.
+ */
+ if (!tctx) {
+ continue;
+ }
+
+ /*
* HW checks that the CPU is enabled in the Physical Thread
* Enable Register (PTER).
*/
--
1.8.3.1