qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH v2 05/22] ppc/xics: introduce a QOM interface to h


From: Cédric Le Goater
Subject: Re: [Qemu-ppc] [PATCH v2 05/22] ppc/xics: introduce a QOM interface to handle ICSs
Date: Fri, 24 Feb 2017 11:55:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 02/23/2017 03:18 AM, David Gibson wrote:
> On Thu, Feb 16, 2017 at 02:47:28PM +0100, Cédric Le Goater wrote:
>> This QOM interface provides two simple handlers. One is to get an ICS
>> object from an irq number and a second to resend the irqs when needed.
> 
> Maybe call this XICSFabric rather than XicsInterface.  While it's an
> interface from the QOM point-of-view, that doesn't really describe
> where it sits in the hardware model, and it's the ics and icp objects
> which provide all the interfaces which are visible to the guest or to
> interrupt generating devices.

Curiously, this is the only email that was not trashed by my bogus 
filters and so this is the only change I did in v3 ... 
 
C. 


> Apart from that,
> 
> Reviewed-by: David Gibson <address@hidden>
> 
>> Signed-off-by: Cédric Le Goater <address@hidden>
>> ---
>>  hw/intc/xics.c        |  7 +++++++
>>  include/hw/ppc/xics.h | 18 ++++++++++++++++++
>>  2 files changed, 25 insertions(+)
>>
>> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
>> index b1294417a0ae..3e80d2d0f0d9 100644
>> --- a/hw/intc/xics.c
>> +++ b/hw/intc/xics.c
>> @@ -726,6 +726,12 @@ static const TypeInfo ics_base_info = {
>>      .class_size = sizeof(ICSStateClass),
>>  };
>>  
>> +static const TypeInfo xics_interface_info = {
>> +    .name = TYPE_XICS_INTERFACE,
>> +    .parent = TYPE_INTERFACE,
>> +    .class_size = sizeof(XICSInterfaceClass),
>> +};
>> +
>>  /*
>>   * Exported functions
>>   */
>> @@ -766,6 +772,7 @@ static void xics_register_types(void)
>>      type_register_static(&ics_simple_info);
>>      type_register_static(&ics_base_info);
>>      type_register_static(&icp_info);
>> +    type_register_static(&xics_interface_info);
>>  }
>>  
>>  type_init(xics_register_types)
>> diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
>> index 6d443ce09dba..fe2bb5c8ef54 100644
>> --- a/include/hw/ppc/xics.h
>> +++ b/include/hw/ppc/xics.h
>> @@ -177,6 +177,24 @@ struct ICSIRQState {
>>      uint8_t flags;
>>  };
>>  
>> +typedef struct XICSInterface {
>> +    Object parent;
>> +} XICSInterface;
>> +
>> +#define TYPE_XICS_INTERFACE "xics-interface"
>> +#define XICS_INTERFACE(obj)                                     \
>> +    OBJECT_CHECK(XICSInterface, (obj), TYPE_XICS_INTERFACE)
>> +#define XICS_INTERFACE_CLASS(klass)                                     \
>> +    OBJECT_CLASS_CHECK(XICSInterfaceClass, (klass), TYPE_XICS_INTERFACE)
>> +#define XICS_INTERFACE_GET_CLASS(obj)                                   \
>> +    OBJECT_GET_CLASS(XICSInterfaceClass, (obj), TYPE_XICS_INTERFACE)
>> +
>> +typedef struct XICSInterfaceClass {
>> +    InterfaceClass parent;
>> +    ICSState *(*ics_get)(XICSInterface *xi, int irq);
>> +    void (*ics_resend)(XICSInterface *xi);
>> +} XICSInterfaceClass;
>> +
>>  #define XICS_IRQS_SPAPR               1024
>>  
>>  qemu_irq xics_get_qirq(XICSState *icp, int irq);
> 




reply via email to

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