qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number spac


From: Cédric Le Goater
Subject: Re: [Qemu-devel] [PATCH v3 1/3] spapr: introduce a fixed IRQ number space
Date: Mon, 2 Jul 2018 13:11:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 07/02/2018 12:03 PM, Cédric Le Goater wrote:
>> --- a/hw/ppc/spapr_vio.c
>> +++ b/hw/ppc/spapr_vio.c
>> @@ -436,6 +436,9 @@ static void spapr_vio_busdev_reset(DeviceState *qdev)
>>      }
>>  }
>>  
>> +/* TODO : poor VIO device indexing ... */
>> +static uint32_t vio_index;
> 
> I think we could also use (dev->reg & 0xff) as an index for 
> the VIO devices.
> 
> The unit address of the virtual IOA is simply allocated using 
> an increment of bus->next_reg, next_reg being initialized at
> 0x71000000.
> 
> I did not see any restrictions in the PAPR specs or in QEMU 
> that would break the above.

That was until I discovered this macro : 

  #define DEFINE_SPAPR_PROPERTIES(type, field)           \
        DEFINE_PROP_UINT32("reg", type, field.reg, -1)


so 'reg' could have any value. We can not use it ...

C.



reply via email to

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