Skip to content
Snippets Groups Projects
  • David Hildenbrand's avatar
    6da4b1c2
    softmmu/physmem: Hint that "readonly=on,rom=off" exists when opening file R/W... · 6da4b1c2
    David Hildenbrand authored
    softmmu/physmem: Hint that "readonly=on,rom=off" exists when opening file R/W for private mapping fails
    
    It's easy to miss that memory-backend-file with "share=off" (default)
    will always try opening the file R/W as default, and fail if we don't
    have write permissions to the file.
    
    In that case, the user has to explicit specify "readonly=on,rom=off" to
    get usable RAM, for example, for VM templating.
    
    Let's hint that '-object memory-backend-file,readonly=on,rom=off,...'
    exists to consume R/O files in a private mapping to create writable RAM,
    but only if we have permissions to open the file read-only.
    
    Message-ID: <20230906120503.359863-11-david@redhat.com>
    Suggested-by: default avatarThinerLogoer <logoerthiner1@163.com>
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    6da4b1c2
    History
    softmmu/physmem: Hint that "readonly=on,rom=off" exists when opening file R/W...
    David Hildenbrand authored
    softmmu/physmem: Hint that "readonly=on,rom=off" exists when opening file R/W for private mapping fails
    
    It's easy to miss that memory-backend-file with "share=off" (default)
    will always try opening the file R/W as default, and fail if we don't
    have write permissions to the file.
    
    In that case, the user has to explicit specify "readonly=on,rom=off" to
    get usable RAM, for example, for VM templating.
    
    Let's hint that '-object memory-backend-file,readonly=on,rom=off,...'
    exists to consume R/O files in a private mapping to create writable RAM,
    but only if we have permissions to open the file read-only.
    
    Message-ID: <20230906120503.359863-11-david@redhat.com>
    Suggested-by: default avatarThinerLogoer <logoerthiner1@163.com>
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>