[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 02/11] softmmu/physmem: Distinguish between file access mo
From: |
Peter Xu |
Subject: |
Re: [PATCH v3 02/11] softmmu/physmem: Distinguish between file access mode and mmap protection |
Date: |
Wed, 23 Aug 2023 16:21:01 -0400 |
On Wed, Aug 23, 2023 at 05:34:02PM +0200, David Hildenbrand wrote:
> There is a difference between how we open a file and how we mmap it,
> and we want to support writable private mappings of readonly files. Let's
> define RAM_READONLY and RAM_READONLY_FD flags, to replace the single
> "readonly" parameter for file-related functions.
>
> In memory_region_init_ram_from_fd() and memory_region_init_ram_from_file(),
> initialize mr->readonly based on the new RAM_READONLY flag.
>
> While at it, add some RAM_* flags we missed to add to the list of accepted
> flags in the documentation of some functions.
>
> No change in functionality intended. We'll make use of both flags next
> and start setting them independently for memory-backend-file.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
--
Peter Xu
- [PATCH v3 00/11] memory-backend-file related improvements and VM templating support, David Hildenbrand, 2023/08/23
- [PATCH v3 01/11] nvdimm: Reject writing label data to ROM instead of crashing QEMU, David Hildenbrand, 2023/08/23
- [PATCH v3 04/11] softmmu/physmem: Remap with proper protection in qemu_ram_remap(), David Hildenbrand, 2023/08/23
- [PATCH v3 02/11] softmmu/physmem: Distinguish between file access mode and mmap protection, David Hildenbrand, 2023/08/23
- Re: [PATCH v3 02/11] softmmu/physmem: Distinguish between file access mode and mmap protection,
Peter Xu <=
- [PATCH v3 07/11] softmmu/physmem: Never return directories from file_ram_open(), David Hildenbrand, 2023/08/23
- [PATCH v3 05/11] softmmu/physmem: Bail out early in ram_block_discard_range() with readonly files, David Hildenbrand, 2023/08/23
- [PATCH v3 06/11] softmmu/physmem: Fail creation of new files in file_ram_open() with readonly=true, David Hildenbrand, 2023/08/23
- [PATCH v3 11/11] machine: Improve error message when using default RAM backend id, David Hildenbrand, 2023/08/23