VMStateField arrays: shouldn't they be const?
Hello,
with the VMState patches there are now a lot of lines like these:
Quoted 1 line
.fields = (VMStateField []) {Am I missing something or should those actually be const, i.e.
Quoted 1 line
.fields = (const VMStateField []) {?
Last time I looked into it, gcc was unable to take the hint, but e.g. the Intel compiler puts the data then into .rodata instead of .data. While I don't know where the different OSes are in actually supporting it, having it in .rodata means it can't be (accidentally or intentionally) manipulated at runtime, shared between processes and swapped out to the binary instead of the swapfile (or for some architectures with in-place execution support it does not even need to be read from "disk", though I doubt those matter for qemu).