From: Jan Kiszka <jan.kiszka@web.de>
To: kvm-devel <kvm@vger.kernel.org>, Avi Kivity <avi@redhat.com>
Cc: Charles Duffy <Charles_Duffy@messageone.com>
Subject: [PATCH] kvm-userspace: Fix in-kernel IOAPIC reset
Date: Sat, 15 Nov 2008 09:08:34 +0100 [thread overview]
Message-ID: <491E8382.8060109@web.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
Transfer ioapic state to the in-kernel implementation on reset, fixing a
systematic reboot issue of 2.6.18 RHEL/CentOS kernels, but probably also
other, more sporadic reboot hangs (seen after Windows Vista installation
e.g.).
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
---
qemu/hw/apic.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index 20e995c..8836784 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -1246,8 +1246,14 @@ static void ioapic_reset(void *opaque)
int i;
memset(s, 0, sizeof(*s));
+ s->base_address = IOAPIC_DEFAULT_BASE_ADDRESS;
for(i = 0; i < IOAPIC_NUM_PINS; i++)
s->ioredtbl[i] = 1 << 16; /* mask LVT */
+#ifdef KVM_CAP_IRQCHIP
+ if (kvm_enabled() && qemu_kvm_irqchip_in_kernel()) {
+ kvm_kernel_ioapic_load_from_user(s);
+ }
+#endif
}
static CPUReadMemoryFunc *ioapic_mem_read[3] = {
--
1.5.6
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next reply other threads:[~2008-11-15 8:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-15 8:08 Jan Kiszka [this message]
2008-11-16 12:13 ` [PATCH] kvm-userspace: Fix in-kernel IOAPIC reset Avi Kivity
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=491E8382.8060109@web.de \
--to=jan.kiszka@web.de \
--cc=Charles_Duffy@messageone.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.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