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@lists.xen.org
https://lists.xen.org/xen-devel