qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QEMU APIC version ID bug?


From: Neil McGill
Subject: Re: [Qemu-devel] QEMU APIC version ID bug?
Date: Wed, 16 Apr 2014 15:38:59 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130801 Thunderbird/17.0.8


APIC ver register is 1 but *IO*APIC ver register is 3... sorry for the 
confusion/noise, qemu looks fine

neil

On 4/16/14 10:16 AM, Neil McGill wrote:

Seems there is a bug in qemu where the APIC version is being checked as
value 3. However, it should be 1.

static uint32_t apic_mem_readl(void *opaque, hwaddr addr)
{
...
     switch(index) {
     case 0x03: /* version */
         val = 0x11 | ((APIC_LVT_NB - 1) << 16); /* version 0x11 */
         break;

Comparing to KVM, it has the correct value:

static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,
                       unsigned long addr,
                       unsigned long length)
{
     unsigned long result = 0;

     switch (ioapic->ioregsel) {
     case IOAPIC_REG_VERSION:
         result = ((((IOAPIC_NUM_PINS - 1) & 0xff) << 16)
               | (IOAPIC_VERSION_ID & 0xff));
         break;

./virt/kvm/ioapic.h:#define IOAPIC_REG_VERSION 0x01

I hit this as we have on OS that was checking for the number of IRQ pins
and we were falling into the default case.

Is this a known issue? What's the best way to submit a patch/get this
committed if it is an accepted bug?

tx

neil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]