Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-09-06 Thread Gavin Shan
On 8/27/22 6:22 PM, Paolo Bonzini wrote: The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If the read of the fields are not ordered after the read of the flag, QEMU might see stale values. Cc: Peter Xu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6

Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-08-30 Thread Peter Xu
On Sat, Aug 27, 2022 at 10:22:18AM +0200, Paolo Bonzini wrote: > The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If > the read of the fields are not ordered after the read of the flag, > QEMU might see stale values. > > Cc: Peter Xu > Cc: Gavin Shan > Signed-off-by: Paolo

Re: [PATCH v2] KVM: dirty ring: add missing memory barrier

2022-08-30 Thread Philippe Mathieu-Daudé via
On 27/8/22 10:22, Paolo Bonzini wrote: The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If the read of the fields are not ordered after the read of the flag, QEMU might see stale values. Cc: Peter Xu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6

[PATCH v2] KVM: dirty ring: add missing memory barrier

2022-08-27 Thread Paolo Bonzini
The KVM_DIRTY_GFN_F_DIRTY flag ensures that the entry is valid. If the read of the fields are not ordered after the read of the flag, QEMU might see stale values. Cc: Peter Xu Cc: Gavin Shan Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6 +- 1 file changed, 5 insertions(+), 1