softmmu/physmem: Hint that "readonly=on,rom=off" exists when opening file R/W for...
authorDavid Hildenbrand <david@redhat.com>
Wed, 6 Sep 2023 12:05:02 +0000 (14:05 +0200)
committerDavid Hildenbrand <david@redhat.com>
Tue, 19 Sep 2023 08:23:21 +0000 (10:23 +0200)
commit6da4b1c25d89cc8e8d1be40b96602d08a3e88e0c
tree0530f99aad6da4cdb606326b367d59b313b334bc
parent9cd9313fc3cb94243512bf36d0d67d4dbd60d6f1
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: ThinerLogoer <logoerthiner1@163.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
softmmu/physmem.c