aboutsummaryrefslogtreecommitdiff
path: root/system/memory_mapping.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-12-10 12:53:22 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-12-19 19:36:38 +0100
commit6b4f7b0705be31c7df6ea01c81a42a42950959a9 (patch)
tree062f78bf7a7dbeae50556c9facacedc368b91b07 /system/memory_mapping.c
parente2e0828e0f25042a09b1cbada41a436d1258fdb8 (diff)
downloadqemu-6b4f7b0705be31c7df6ea01c81a42a42950959a9.zip
qemu-6b4f7b0705be31c7df6ea01c81a42a42950959a9.tar.gz
qemu-6b4f7b0705be31c7df6ea01c81a42a42950959a9.tar.bz2
rust: pl011: fix migration stream
The Rust vmstate macros lack the type-safety of their C equivalents (so safe, much abstraction), and therefore they were predictably wrong. The registers have already been changed to 32-bits in the previous patch, but read_pos/read_count/read_trigger also have to be u32 instead of usize. The easiest way to do so is to let the FIFO use u32 indices instead of usize. My plan for making VMStateField typesafe is to have a trait to retrieve a basic VMStateField; for example something like vmstate_uint32 would become an implementation of the VMState trait on u32. Then you'd write something like "vmstate_of!(Type, field).with_version_id(2)". That is, vmstate_of retrieves the basic VMStateField and fills in the offset, and then more changes can be applied on top. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'system/memory_mapping.c')
0 files changed, 0 insertions, 0 deletions