[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/55] mmap-alloc: tweak a comment on ppc64
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 01/55] mmap-alloc: tweak a comment on ppc64 |
Date: |
Tue, 22 Dec 2015 18:52:39 +0200 |
The comment I put in mmap-alloc to document the ppc64 rules
refers to the previous revision of the patch:
we don't look at memory alignment anymore, we check
the fs from which the fd is mapped, instead.
It's also not clear what does "in this case" refer
to, rearrange text to make it clearer.
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
util/mmap-alloc.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
index 54793a5..5cd7f71 100644
--- a/util/mmap-alloc.c
+++ b/util/mmap-alloc.c
@@ -50,10 +50,11 @@ void *qemu_ram_mmap(int fd, size_t size, size_t align, bool
shared)
#if defined(__powerpc64__) && defined(__linux__)
/* On ppc64 mappings in the same segment (aka slice) must share the same
* page size. Since we will be re-allocating part of this segment
- * from the supplied fd, we should make sure to use the same page size,
- * unless we are using the system page size, in which case anonymous memory
- * is OK. Use align as a hint for the page size.
- * In this case, set MAP_NORESERVE to avoid allocating backing store
memory.
+ * from the supplied fd, we should make sure to use the same page size, to
+ * this end we mmap the supplied fd. In this case, set MAP_NORESERVE to
+ * avoid allocating backing store memory.
+ * We do this unless we are using the system page size, in which case
+ * anonymous memory is OK.
*/
int anonfd = fd == -1 || qemu_fd_getpagesize(fd) == getpagesize() ? -1 :
fd;
int flags = anonfd == -1 ? MAP_ANONYMOUS : MAP_NORESERVE;
--
MST
- [Qemu-devel] [PULL 00/55] acpi, pc features, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 01/55] mmap-alloc: tweak a comment on ppc64,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 02/55] pc: Move compat boolean globals to PCMachineClass, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 03/55] pc: Move legacy_acpi_table_size global to PCMachineClass, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 05/55] pc: Move enforce_aligned_dimm to PCMachineClass, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 04/55] pc: Move acpi_data_size global to PCMachineClass, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 06/55] pc: Remove enforce-aligned-dimm QOM property, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 08/55] hw/acpi: merge pxb adjacent memory/IO ranges, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 07/55] pc: Move option_rom_has_mr/rom_file_has_mr globals to MachineClass, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 10/55] hw/i386: extend pxb query for all PC machines, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 09/55] hw/pxb: introduce pxb-pcie expander for PCIe machines, Michael S. Tsirkin, 2015/12/22
- [Qemu-devel] [PULL 11/55] q35: Remove MCHPCIState.guest_info field, Michael S. Tsirkin, 2015/12/22