Skip to content

Commit eaa03d3

Browse files
andrea-parriliuw
authored andcommitted
Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb()
Following the recommendation in Documentation/memory-barriers.txt for virtual machine guests. Fixes: 8b6a877 ("Drivers: hv: vmbus: Replace the per-CPU channel lists with a global array of channels") Signed-off-by: Andrea Parri (Microsoft) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
1 parent be58027 commit eaa03d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hv/channel_mgmt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ void vmbus_channel_map_relid(struct vmbus_channel *channel)
380380
* execute:
381381
*
382382
* (a) In the "normal (i.e., not resuming from hibernation)" path,
383-
* the full barrier in smp_store_mb() guarantees that the store
383+
* the full barrier in virt_store_mb() guarantees that the store
384384
* is propagated to all CPUs before the add_channel_work work
385385
* is queued. In turn, add_channel_work is queued before the
386386
* channel's ring buffer is allocated/initialized and the
@@ -392,14 +392,14 @@ void vmbus_channel_map_relid(struct vmbus_channel *channel)
392392
* recv_int_page before retrieving the channel pointer from the
393393
* array of channels.
394394
*
395-
* (b) In the "resuming from hibernation" path, the smp_store_mb()
395+
* (b) In the "resuming from hibernation" path, the virt_store_mb()
396396
* guarantees that the store is propagated to all CPUs before
397397
* the VMBus connection is marked as ready for the resume event
398398
* (cf. check_ready_for_resume_event()). The interrupt handler
399399
* of the VMBus driver and vmbus_chan_sched() can not run before
400400
* vmbus_bus_resume() has completed execution (cf. resume_noirq).
401401
*/
402-
smp_store_mb(
402+
virt_store_mb(
403403
vmbus_connection.channels[channel->offermsg.child_relid],
404404
channel);
405405
}

0 commit comments

Comments
 (0)