qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] postcopy-ram: do not use qatomic_mb_read
@ 2023-04-06 10:16 Paolo Bonzini
  2023-04-10  8:40 ` Juan Quintela
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2023-04-06 10:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: quintela

It does not even pair with a qatomic_mb_set(), so it is clearer to use
load-acquire in this case; they are synonyms.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 migration/postcopy-ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
index 41c07136501a..23befd5ca8a2 100644
--- a/migration/postcopy-ram.c
+++ b/migration/postcopy-ram.c
@@ -1495,7 +1495,7 @@ static PostcopyState incoming_postcopy_state;
 
 PostcopyState  postcopy_state_get(void)
 {
-    return qatomic_mb_read(&incoming_postcopy_state);
+    return qatomic_load_acquire(&incoming_postcopy_state);
 }
 
 /* Set the state and return the old state */
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-10  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06 10:16 [PATCH] postcopy-ram: do not use qatomic_mb_read Paolo Bonzini
2023-04-10  8:40 ` Juan Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).