On 04/05/20 12:45, Stefan Hajnoczi wrote:
>> @@ -983,7 +983,7 @@ static void device_set_realized(Object *obj, bool value, 
>> Error **errp)
>>      }
>>  
>>      assert(local_err == NULL);
>> -    dev->realized = value;
>> +    atomic_set(&dev->realized, value);
> A memory barrier is probably needed so that the atomic_read() thread
> sees up-to-date dev fields.

Yes, it should be a store-release for the false->true case.  The
true->false case probably doesn't matter as much.

Paolo

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to