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

Re: [Xen-devel] [RFC 11/16] irq: skip action avalability check for guest's IRQ



Hi,

On 12/12/2018 13:51, Andrii Anisov wrote:
Julien,


On 12.12.18 13:59, Julien Grall wrote:
An ASSERT(...) is already embed in irq_get_guest_info(desc).
Yep.

I thought about the ASSERT(...) over the current printk yesterday. But I discarded it because it does not give you more information if something went really wrong as the stack trace would not really be helpful in that context.
But ASSERT also prints a failed condition text.

ASSERT only tells you that desc->action was NULL. It does not tell you which IRQ has the desc->action == NULL. It is a bit a shame we don't have way to provide another message with ASSERT to help you debugging.


So I would prefer the #ifdef NDEBUG solution.
I'm a bit confused about your suggestion.
Do you want to see two identical pieces of code before and after the `if ( test_bit(_IRQ_GUEST, &desc->status) )`? One with `#ifndef NDEBUG`, other without.
Is my understanding correct?

No, I am suggesting to have the current if ( test_bit(...) ) protecred with #ifndef NDEBUG. No code duplication.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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