virtio: Make avail and used ring pointers volatile

The contents of those descriptor rings can be modified by the device.
Mark them as volatile so the compiler does not make any assumptions
about them.

Issue #4264
This commit is contained in:
Piotr Tworek 2021-01-13 21:43:40 +01:00 committed by Norman Feske
parent c0a7696c71
commit b7f66626c2

View File

@ -121,8 +121,8 @@ class Virtio::Queue
Genode::uint16_t const _buffer_size;
Genode::Attached_ram_dataspace _ram_ds;
Descriptor *_desc_table = nullptr;
Avail *_avail = nullptr;
Used *_used = nullptr;
Avail volatile *_avail = nullptr;
Used volatile *_used = nullptr;
Genode::addr_t _buffer_phys_base = 0;
Genode::addr_t _buffer_local_base = 0;
Genode::uint16_t _last_used_idx = 0;