File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tools/testing/selftests/kvm Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 17
17
#include <linux/bitmap.h>
18
18
#include <linux/bitops.h>
19
19
#include <linux/atomic.h>
20
+ #include <asm/barrier.h>
20
21
21
22
#include "kvm_util.h"
22
23
#include "test_util.h"
@@ -279,12 +280,12 @@ static void dirty_ring_create_vm_done(struct kvm_vm *vm)
279
280
280
281
static inline bool dirty_gfn_is_dirtied (struct kvm_dirty_gfn * gfn )
281
282
{
282
- return gfn -> flags == KVM_DIRTY_GFN_F_DIRTY ;
283
+ return smp_load_acquire ( & gfn -> flags ) == KVM_DIRTY_GFN_F_DIRTY ;
283
284
}
284
285
285
286
static inline void dirty_gfn_set_collected (struct kvm_dirty_gfn * gfn )
286
287
{
287
- gfn -> flags = KVM_DIRTY_GFN_F_RESET ;
288
+ smp_store_release ( & gfn -> flags , KVM_DIRTY_GFN_F_RESET ) ;
288
289
}
289
290
290
291
static uint32_t dirty_ring_collect_one (struct kvm_dirty_gfn * dirty_gfns ,
You can’t perform that action at this time.
0 commit comments