kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Stecklina <jsteckli@os.inf.tu-dresden.de>
To: kvm@vger.kernel.org
Cc: "udo@hypervisor.org" <udo@hypervisor.org>
Subject: IOAPIC doesn't handle byte writes
Date: Tue, 22 Nov 2011 14:13:02 +0100	[thread overview]
Message-ID: <1321967582.16507.10.camel@tabernacle.lan> (raw)

[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]

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=virt/kvm/kvm.git;a=blob;f=virt/kvm/ioapic.c;h=3eed61eb48675a63dd1f31b0095217ab6bc5f646;hb=HEAD#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 
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


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2011-11-22 13:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 13:13 Julian Stecklina [this message]
2011-11-22 14:19 ` IOAPIC doesn't handle byte writes Avi Kivity
2011-12-04  9:53 ` Gleb Natapov
  -- strict thread matches above, loose matches on Subject: below --
2011-11-22 15:06 Julian Stecklina
2011-11-23 10:45 ` 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=1321967582.16507.10.camel@tabernacle.lan \
    --to=jsteckli@os.inf.tu-dresden.de \
    --cc=kvm@vger.kernel.org \
    --cc=udo@hypervisor.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).