From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julian Stecklina Subject: IOAPIC doesn't handle byte writes Date: Tue, 22 Nov 2011 14:13:02 +0100 Message-ID: <1321967582.16507.10.camel@tabernacle.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-+10usr5CsvpvLWugb175" Cc: "udo@hypervisor.org" To: kvm@vger.kernel.org Return-path: Received: from os.inf.tu-dresden.de ([141.76.48.99]:37180 "EHLO os.inf.tu-dresden.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755440Ab1KVNqj (ORCPT ); Tue, 22 Nov 2011 08:46:39 -0500 Sender: kvm-owner@vger.kernel.org List-ID: --=-+10usr5CsvpvLWugb175 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, KVM emulates an IOAPIC that doesn't handle byte writes to its IOAPIC_REG_SELECT register, although for example the ICH10 spec[1] clearly states that this is an 8-bit register. See http://www.intel.com/content/dam/doc/datasheet/io-controller-hub-10-family-= datasheet.pdf Table 13-4 on page 433. The code in question is: http://git.kernel.org/?p=3Dvirt/kvm/kvm.git;a=3Dblob;f=3Dvirt/kvm/ioapic.c;= h=3D3eed61eb48675a63dd1f31b0095217ab6bc5f646;hb=3DHEAD#l323 This breaks IOAPIC code in OSes that adhere to the spec. I've created a small testcase[1]: $ qemu-kvm -serial stdio -kernel ioapic [26303.961804] ioapic: Unsupported size 1 IOAPIC ID 00000000 [26303.970466] ioapic: Unsupported size 1 IOAPIC VER 00000000 Done qemu: terminating on signal 2 $ qemu-kvm -no-kvm-irqchip -serial stdio -kernel ioapic=20 IOAPIC ID 00000000 IOAPIC VER 00170011 Done qemu: terminating on signal 2 Expected behavior is that the IOAPIC register is not read as zero with KVM irqchip emulation. I would file a bug, but the kernel bugzilla seems to be down at the moment. Regards, Julian [1] http://os.inf.tu-dresden.de/~jsteckli/tmp/ioapic --=-+10usr5CsvpvLWugb175 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk7Ln94ACgkQ2EtjUdW3H9mc/QCgu8jac7azxlZ2AlOYYD4Rn8eu 0w4AoNeD6/JjUfiWPGvNqaIHIl4OmnN7 =dTHC -----END PGP SIGNATURE----- --=-+10usr5CsvpvLWugb175--