From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Bernhard Beschow" <shentey@gmail.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Hervé Poussineau" <hpoussin@reactos.org>
Subject: [PATCH v2 4/5] isa/piix4: Fix PCI IRQ levels to be preserved in VMState
Date: Sat, 12 Feb 2022 12:35:18 +0100 [thread overview]
Message-ID: <20220212113519.69527-5-shentey@gmail.com> (raw)
In-Reply-To: <20220212113519.69527-1-shentey@gmail.com>
Now that pci_irq_levels[] is part of PIIX4State, the PCI IRQ levels can
be saved and restored via the VMState mechanism. This fixes migrated VMs
to start with PCI IRQ levels zeroed, which is a bug.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/isa/piix4.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 964e09cf7f..a9322851db 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -45,7 +45,7 @@ struct PIIX4State {
qemu_irq *isa;
qemu_irq i8259[ISA_NUM_IRQS];
- int pci_irq_levels[PIIX_NUM_PIRQS];
+ int32_t pci_irq_levels[PIIX_NUM_PIRQS];
RTCState rtc;
/* Reset Control Register */
@@ -128,12 +128,14 @@ static int piix4_ide_post_load(void *opaque, int version_id)
static const VMStateDescription vmstate_piix4 = {
.name = "PIIX4",
- .version_id = 3,
+ .version_id = 4,
.minimum_version_id = 2,
.post_load = piix4_ide_post_load,
.fields = (VMStateField[]) {
VMSTATE_PCI_DEVICE(dev, PIIX4State),
VMSTATE_UINT8_V(rcr, PIIX4State, 3),
+ VMSTATE_INT32_ARRAY_V(pci_irq_levels, PIIX4State,
+ PIIX_NUM_PIRQS, 4),
VMSTATE_END_OF_LIST()
}
};
--
2.35.1
next prev parent reply other threads:[~2022-02-12 11:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 11:35 [PATCH v2 0/5] malta: Fix PCI IRQ levels to be preserved during migration Bernhard Beschow
2022-02-12 11:35 ` [PATCH v2 1/5] malta: Move PCI interrupt handling from gt64xxx to piix4 Bernhard Beschow
2022-02-12 13:18 ` BALATON Zoltan
2022-02-12 16:44 ` BALATON Zoltan
2022-02-13 14:21 ` Bernhard Beschow
2022-02-13 14:34 ` Bernhard Beschow
2022-02-12 11:35 ` [PATCH v2 2/5] pci: Always pass own DeviceState to pci_map_irq_fn's Bernhard Beschow
2022-02-12 13:27 ` BALATON Zoltan
2022-02-12 14:23 ` Bernhard Beschow
2022-02-12 16:13 ` BALATON Zoltan
2022-02-13 14:31 ` Bernhard Beschow
2022-02-13 15:22 ` BALATON Zoltan
2022-02-12 16:16 ` Peter Maydell
2022-02-12 11:35 ` [PATCH v2 3/5] isa/piix4: Resolve global variables Bernhard Beschow
2022-02-12 11:35 ` Bernhard Beschow [this message]
2022-02-12 13:42 ` [PATCH v2 4/5] isa/piix4: Fix PCI IRQ levels to be preserved in VMState BALATON Zoltan
2022-02-12 16:41 ` Peter Maydell
2022-02-12 17:02 ` BALATON Zoltan
2022-02-12 18:30 ` Peter Maydell
2022-02-12 21:44 ` BB
2022-02-12 21:46 ` Bernhard Beschow
2022-02-12 11:35 ` [PATCH v2 5/5] isa/piix4: Resolve redundant i8259[] attribute Bernhard Beschow
2022-02-12 13:19 ` BALATON Zoltan
2022-02-12 14:02 ` BB
2022-02-12 14:05 ` Bernhard Beschow
2022-02-12 15:57 ` BALATON Zoltan
2022-02-12 15:58 ` BALATON Zoltan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220212113519.69527-5-shentey@gmail.com \
--to=shentey@gmail.com \
--cc=aurelien@aurel32.net \
--cc=f4bug@amsat.org \
--cc=hpoussin@reactos.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).