[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [for-2.11 PATCH 25/26] spapr_pci: drop abusive sanity check

From: Greg Kurz
Subject: [Qemu-devel] [for-2.11 PATCH 25/26] spapr_pci: drop abusive sanity check when migrating the LSI table
Date: Tue, 25 Jul 2017 20:03:21 +0200
User-agent: StGit/0.17.1-20-gc0b1b-dirty

The guest can allocate blocks of IRQs when calling the ibm,change-msi
RTAS call. This has an impact on the IRQ numbers returned by subsequent
calls to spapr_ics_alloc_block().

It doesn't cause any problem right now because PHB are cold plugged and
the LSI table have the same numbers at the destination and the source.

But this won't be the case anymore when we support PHB hotplug. In this
case the IRQ numbers in the LSI table are state that we should migrate.

This patch hence changes the destination to always accept the LSI table
from the migration stream, like it is already done for MSIs. No effort
is made to preserve the current behavior of failing migration when LSI
numbers are different with older machine types, for simplicity.

Signed-off-by: Greg Kurz <address@hidden>
 hw/ppc/spapr_pci.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 58406a1b7e93..157867af8178 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1887,8 +1887,7 @@ static const VMStateDescription vmstate_spapr_pci_lsi = {
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {
-        VMSTATE_UINT32_EQUAL(irq, struct spapr_pci_lsi, NULL),
+        VMSTATE_UINT32(irq, struct spapr_pci_lsi),

reply via email to

[Prev in Thread] Current Thread [Next in Thread]