mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
vm-virtio: queue: Use a SeqCst fence on get_used_event
On x86_64, a hint to the compiler is not enough, we need to issue a MFENCE instruction. Replace the Acquire fence with a SeqCst one. Without this, it's still possible to miss an used_event update, leading to the omission of a notification, possibly stalling the vring. Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
parent
63eeed29cc
commit
6329219749
@ -597,7 +597,7 @@ impl Queue {
|
||||
};
|
||||
|
||||
// This fence ensures we're seeing the latest update from the guest.
|
||||
fence(Ordering::Acquire);
|
||||
fence(Ordering::SeqCst);
|
||||
match mem.read_obj::<u16>(used_event_addr) {
|
||||
Ok(ret) => Some(Wrapping(ret)),
|
||||
Err(_) => None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user