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

Re: [Xen-devel] [PATCH v4 07/27] ARM: GICv3 ITS: introduce host LPI array



Hi Andre,

On 04/04/2017 12:07 AM, Julien Grall wrote:
On 04/03/2017 09:28 PM, Andre Przywara wrote:
+        if ( !new_chunk )
+        {
+            spin_unlock(&lpi_data.host_lpis_lock);
+            return -ENOMEM;
+        }
+
+        for ( i = 0; i < HOST_LPIS_PER_PAGE; i += LPI_BLOCK )
+            new_chunk[i].dom_id = DOMID_INVALID;

As host_lpis could be read without lock, I would add a barrier here to
make sure new_chunk[*].dom_id have been written before setting up the page.

A similar barrier would be needed in the do_lpi(...) path.

Looking at the code, this should be in get_host_lpi between reading the block and retrieving the data.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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