From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: "Alexey Kardashevskiy" <aik@ozlabs.ru>,
qemu-ppc@nongnu.org, "Alexander Graf" <agraf@suse.de>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 5/8] xics: disable flags reset on xics reset
Date: Fri, 14 Mar 2014 15:18:06 +1100 [thread overview]
Message-ID: <1394770689-29039-6-git-send-email-aik@ozlabs.ru> (raw)
In-Reply-To: <1394770689-29039-1-git-send-email-aik@ozlabs.ru>
Since islsi[] array has been merged into the ICSState struct,
we must not reset flags as they tell if the interrupt is in use.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
hw/intc/xics.c | 4 +++-
hw/intc/xics_kvm.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 39c33bc..e5195bf 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -522,10 +522,12 @@ static void ics_reset(DeviceState *dev)
ICSState *ics = ICS(dev);
int i;
- memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
for (i = 0; i < ics->nr_irqs; i++) {
+ ics->irqs[i].server = 0;
ics->irqs[i].priority = 0xff;
ics->irqs[i].saved_priority = 0xff;
+ ics->irqs[i].status = 0;
+ /* Do not reset @flags as IRQ might be allocated */
}
}
diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
index 8073827..a0f43ba 100644
--- a/hw/intc/xics_kvm.c
+++ b/hw/intc/xics_kvm.c
@@ -272,10 +272,12 @@ static void ics_kvm_reset(DeviceState *dev)
ICSState *ics = ICS(dev);
int i;
- memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
for (i = 0; i < ics->nr_irqs; i++) {
+ ics->irqs[i].server = 0;
ics->irqs[i].priority = 0xff;
ics->irqs[i].saved_priority = 0xff;
+ ics->irqs[i].status = 0;
+ /* Do not reset @flags as IRQ might be allocated */
}
ics_set_kvm_state(ics, 1);
--
1.8.4.rc4
next prev parent reply other threads:[~2014-03-14 4:18 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 4:18 [Qemu-devel] [PATCH 0/8] spapr: fix IOMMU and XICS/IRQs migration Alexey Kardashevskiy
2014-03-14 4:18 ` [Qemu-devel] [PATCH 1/8] spapr-iommu: add a bus for spapr-iommu devices Alexey Kardashevskiy
2014-04-10 12:40 ` Alexander Graf
2014-04-10 14:40 ` Alexey Kardashevskiy
2014-04-10 14:52 ` Andreas Färber
2014-04-10 15:18 ` Alexey Kardashevskiy
2014-03-14 4:18 ` [Qemu-devel] [PATCH 2/8] xics: add flags for interrupts Alexey Kardashevskiy
2014-04-10 12:43 ` Alexander Graf
2014-03-14 4:18 ` [Qemu-devel] [PATCH 3/8] xics: add find_server Alexey Kardashevskiy
2014-03-14 4:18 ` [Qemu-devel] [PATCH 4/8] xics: add pre_load() hook to ICSStateClass Alexey Kardashevskiy
2014-03-14 4:18 ` Alexey Kardashevskiy [this message]
2014-03-14 4:18 ` [Qemu-devel] [PATCH 6/8] spapr: move interrupt allocator to xics Alexey Kardashevskiy
2014-04-10 12:51 ` Alexander Graf
2014-04-10 13:24 ` Alexey Kardashevskiy
2014-04-10 13:26 ` Alexander Graf
2014-04-10 14:43 ` Alexey Kardashevskiy
2014-04-11 9:24 ` Alexander Graf
2014-04-11 12:38 ` Alexey Kardashevskiy
2014-04-11 13:58 ` Alexander Graf
2014-04-11 14:50 ` Alexey Kardashevskiy
2014-04-11 14:58 ` Alexander Graf
2014-04-11 15:27 ` Alexey Kardashevskiy
2014-04-11 15:38 ` Alexander Graf
2014-04-11 16:01 ` Alexey Kardashevskiy
2014-04-11 16:15 ` Alexander Graf
2014-04-11 16:30 ` Alexey Kardashevskiy
2014-03-14 4:18 ` [Qemu-devel] [PATCH 7/8] spapr: remove @next_irq Alexey Kardashevskiy
2014-03-14 7:19 ` Thomas Huth
2014-03-14 4:18 ` [Qemu-devel] [PATCH 8/8] xics: enable interrupt configuration reset on migration Alexey Kardashevskiy
2014-04-10 12:55 ` Alexander Graf
2014-03-20 1:25 ` [Qemu-devel] [PATCH 0/8] spapr: fix IOMMU and XICS/IRQs migration Andreas Färber
2014-04-04 5:53 ` Alexey Kardashevskiy
2014-05-04 13:56 ` Alexey Kardashevskiy
2014-05-04 21:52 ` Paolo Bonzini
2014-05-04 23:48 ` Alexey Kardashevskiy
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=1394770689-29039-6-git-send-email-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).