IOAPIC doesn't handle byte writes
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:
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
Quoted 8 lines · Julian Stecklina
Hello,
KVM emulates an IOAPIC that doesn't handle byte writes to its
IOAPIC_REG_SELECTregister, 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.
Quoted 5 lines
The code in question is:
This breaks IOAPIC code in OSes that adhere to the spec.
Agree, the code is broken.
Quoted 2 lines
I would file a bug, but the kernel bugzilla seems to be down at the moment.
Care to post a patch instead?
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 8 lines · Julian Stecklina
Hello,
KVM emulates an IOAPIC that doesn't handle byte writes to its
IOAPIC_REG_SELECTregister, 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 same spec also says that access to data register has to be dword, but new code as of 1b8cf174cf2c0f0c66030fe81af818e9abf4f302 does not enforce this. Old code never enforced it for read too :(
--
Gleb.