From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] kvm-userspace: Fix in-kernel IOAPIC reset Date: Sat, 15 Nov 2008 09:08:34 +0100 Message-ID: <491E8382.8060109@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig42461D3BD6595636172C93D5" Cc: Charles Duffy To: kvm-devel , Avi Kivity Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:50098 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753313AbYKOIJW (ORCPT ); Sat, 15 Nov 2008 03:09:22 -0500 Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig42461D3BD6595636172C93D5 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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 --- 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; =20 memset(s, 0, sizeof(*s)); + s->base_address =3D IOAPIC_DEFAULT_BASE_ADDRESS; for(i =3D 0; i < IOAPIC_NUM_PINS; i++) s->ioredtbl[i] =3D 1 << 16; /* mask LVT */ +#ifdef KVM_CAP_IRQCHIP + if (kvm_enabled() && qemu_kvm_irqchip_in_kernel()) { + kvm_kernel_ioapic_load_from_user(s); + } +#endif } =20 static CPUReadMemoryFunc *ioapic_mem_read[3] =3D { --=20 1.5.6 --------------enig42461D3BD6595636172C93D5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEUEARECAAYFAkkeg4cACgkQniDOoMHTA+n2sACdGJlqAxir4teJE2L5JOxjYAkN /RgAlR8yWmOc77FFTk1ej227lSbG3yg= =S31Z -----END PGP SIGNATURE----- --------------enig42461D3BD6595636172C93D5--