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

Re: [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic()


  • To: Juergen Gross <jgross@xxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Tue, 14 Nov 2023 18:29:35 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tYrY7iKxg4pfR/RJHl5azVRlccViE2bTWR8N7od3LjM=; b=fSsYGkWgD0rl+69r1C54XgpZio7aq6g3uPhC5f09Q+gsarj1fnJgxslS+Vw6rpHGKkAwXCifRKmMhOnpum3X57mgi01+Pw/gkRJn7+rSXephw4AfO6ExIW9LXzaXBV6OpnBqeiu0ESomNLczfLv82m/QexFafOhDMD0mCuENoAgEukySVB6DJDXcvlAlOqBi4XoxK5llWaGvN632KRxbKLFwmJ4Q3Xs6SmjREFuUXZRRovRIi9floRif2tOqfWHTw2MjIKXv5NB0faftbh+/Kqk45a5SrjBZnxAPi8TgFrTZZ8zY/GM4O0nVOT2+BsdPTdSgOnKx0IwzJf/jBXbEbg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nFej8r1JAB1nuZusKnUJD3j3NXuRL8Pb7lQHcsPMxsWV3DRJV2HPvYkB8i6mjwzKz+QoCn5Q/UmWQY4ktlUFcUqH+6bjPJm69NRBEZpsBIMPDtqdN5tbQngWEeSocs7GEcwbeWQuIxzmF0C14Z3I20yQuQvdy6N8Rskqb2MW0tnaMdROOxqNlmu4lHbfsY2Ib0jTo9OfSYIG+6JUt6+HZ3fQoz4L+lVYdiwScuMCnGHr4Iq1oPNuztIZv+8nGv+YQFMVPiTXK8Ygk4NvB4AGjsJvv0hBxkb2NL6eKECoapJNN9BJap2SsudExNKQDVnfX+XfSvCwQeJrIV0ywlANTA==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 14 Nov 2023 18:29:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZ//oUYzlaLKzNvESKtKHtrAIYJrB5psyAgAAEXwCAAKXigA==
  • Thread-topic: [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic()


On 14.11.23 10:35, Juergen Gross wrote:


Hello Juergen


> On 14.11.23 09:20, Oleksandr Tyshchenko wrote:
>>
>>
>> On 16.10.23 09:28, Juergen Gross wrote:
>>
>>
>> Hello Juergen
>>
>>> Instead of having a common function for allocating a single IRQ or a
>>> consecutive number of IRQs, split up the functionality into the callers
>>> of xen_allocate_irqs_dynamic().
>>>
>>> This allows to handle any allocation error in xen_irq_init() gracefully
>>> instead of panicing the system. Let xen_irq_init() return the irq_info
>>> pointer or NULL in case of an allocation error.
>>>
>>> Additionally set the IRQ into irq_info already at allocation time, as
>>> otherwise the IRQ would be '0' (which is a valid IRQ number) until
>>> being set.
>>>
>>> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>>> ---
>>>    drivers/xen/events/events_base.c | 74 
>>> +++++++++++++++++++-------------
>>>    1 file changed, 44 insertions(+), 30 deletions(-)
>>>
>>
>> [snip]
>>
>>> @@ -1725,6 +1738,7 @@ void rebind_evtchn_irq(evtchn_port_t evtchn, 
>>> int irq)
>>>           so there should be a proper type */
>>>        BUG_ON(info->type == IRQT_UNBOUND);
>>> +    info->irq = irq;
>>
>>
>> I failed to understand why this is added here. Doesn't irq remain the
>> same, and info->irq remains valid? Could you please clarify.
> 
> The IRQ remains the same, but the event channel could change.
> 
> This setting of info->irq compensates for the related removal in
> xen_irq_info_common_setup().


Thanks for the clarification, you can add my

Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

> 
>>
>> Other changes lgtm.
> 
> 
> Juergen
> 

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.