|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 04/10] vpci/msix: add teardown cleanup
On Mon, Jul 02, 2018 at 03:07:56PM +0100, Wei Liu wrote:
> On Mon, Jul 02, 2018 at 04:02:44PM +0200, Roger Pau Monné wrote:
> > I'm not sure I understand the question. You cannot free specific
> > entries, they are part of the msix struct (you have to free the whole
> > struct, not specific entries).
>
> I meant why isn't the code structured like:
>
> lock()
> take entry off list
> unlock()
>
> if ( msix->enabled )
> {
> /* Disable MSIX. */
> unsigned int pos = ...
>
> pci_confi_write16(...);
>
> for ( i = 0; i < msix->max_entries; i++ )
> {
> ...
> }
> }
>
> I guess that's what you're going to do anyway.
Exactly, that's my plan, modulo:
lock()
take entry off list
unlock()
if ( !msix->enabled )
{
free(msix);
return;
}
...
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |