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: signature.asc
Description: This is a digitally signed message part

Reply via email to