History log of /fuchsia/zircon/kernel/vm/vm_object_paged.cpp
Revision Date Author Comments
# f0441ea7 01-Oct-2018 Travis Geiselbrecht <travisg@google.com>

[kernel][formatting] Formatting pass on core kernel code

Also ran through 'astyle -j -A2' prior to running through clang-fmt,
which adds braces to one line conditionals.

Tested: build and runtests on arm and x86

Change-Id: I888c1ce43dbe12a936a3f13d89c5f8dc16ccab6a


# 8fcba2f4 25-Sep-2018 Travis Geiselbrecht <travisg@google.com>

[kernel][pmm] convert pmm_alloc_contiguous to returning status instead of page count

Tested: runtests on both x86 and arm

Change-Id: Ib8cddb85a676115bace55d992f82518024e3a193


# afb4c092 25-Sep-2018 Travis Geiselbrecht <travisg@google.com>

[kernel][pmm] convert pmm_alloc_range() to returning a status instead of count

Tested: runtests on x86 and arm

Change-Id: Id3b550ee9affa742707b2c98ec4c543f1cca7c85


# 46a7c5a8 24-Jul-2018 Travis Geiselbrecht <travisg@google.com>

[kernel][pmm] change pmm single page alloc routines to return status

Move from returning a status and the page pointer and/or physical
address in an argument.

Tested: build and runtests on both x86 and arm

Change-Id: If10d877f152d355bfa1359338cd71f5aefbccfb4


# c920470b 17-Sep-2018 Mark Seaborn <mseaborn@google.com>

[kernel][vm] Use "status != ZX_OK" pattern instead of "status < 0"

"status != ZX_OK" is the preferred and most common pattern for
checking for an error status. "status < 0" is less common and not
preferred, so convert instances of that in kernel/vm/ to use the
preferred pattern.

Bug: none
Test: runtests
Change-Id: Ie04c9a23b416d5b614ce192329fb51c453a8e155


# f2aaaf4c 19-Jul-2018 Corey Tabaka <eieio@google.com>

[kernel] Lockdep instrument the vm and thread_lock.

- Instrument the locks used by the vm.
- Instrument the thread lock and remainning core kernel code.
- Leaving remaining arch/lib/driver code for a later CL.

Bug: ZX-23
Test: k ut all and system/test/* pass + manual testing.

Change-Id: Ie3f6a27e81bcd1890d63f2fafda3ee233f7969ef


# 30ac10bf 18-Jun-2018 Carlos Pizano <cpu@google.com>

[zircon] non-resizable VMOS

This CL introduces the first option for VMO creation
ZX_VMO_NOT_RESIZABLE that 'locks' the size of a root (non-clone) VMO

Also enables the same for COW clones via ZX_VMO_CLONE_NON_RESIZEABLE

This is meant to answer safety hazards of having a client pass
VMOs to servers which the client can resize while the server is
copying data into via a memory map.

Today this is done via ZX_INFO_HANDLE_COUNT but that turns out
is racy.

This CL also cleans up vmo-tests so they using proble_for_read
and probe_for_write instead of using unrelated syscalls to test
memory mappings.

TEST=added unittests in vmo_tests

ZX-2279 #comment progress

Change-Id: If69ce772dcccd92db83f5bda313ae2343ebb448e


# 3f5ba44d 14-May-2018 Travis Geiselbrecht <travisg@google.com>

[kernel][vm][formatting] replace few c style comments with c++

also general clang format run on the VM

Change-Id: I657dc2bc7b1758986aae8e12b3afe52d1a063bd2


# cdea48c8 18-Jul-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][pmm] first pass overhaul of the PMM

-Add a new PmmNode class that represents a pmm for a single NUMA node.
-Move main free queues into PmmNode.
-Make PmmArena be a child of PmmNode.
-Refactor the vm_page structure a bit to change how queues work. Make
the main queue node be intrinsic to the page, instead of per state.
-Move some per page helper routines into the page struct.
-Remove the KMAP flags, since they're not used on 64bit machines.

TODO:
-Make use of the LO_MEM flag for <4GB allocations
-Make use of the new active/inactive/wired queues in PmmNode
-Add support for multiple nodes in a NUMA system
-Keep page state count in PmmNode class to make page state counting less
expensive

Change-Id: I0ca5e55aad0bb2f393d2dc590b02f160e4740398


# a33ac64c 10-Apr-2018 Todd Eisenberger <teisenbe@google.com>

[kernel][vmo] Remove obsolete tracking for contiguous memory pins

ZX-1812 #done

Change-Id: I4a4f08e95013d7ed7ad4d2c52818aed24b0e05b3


# 040aa59f 10-Apr-2018 Todd Eisenberger <teisenbe@google.com>

[kernel][vmo] Add explicit is_contiguous state to VmObjectPaged

This will let IOMMU drivers match the expectation of the drivers
that originally created the VMO, rather than having to have the
IOMMU drivers guess.

ZX-1812 #comment Add the is_contiguous field

Change-Id: I14f5fb3818740acacf7654c1792c1bb675e1a7ab


# eeb6daea 10-Apr-2018 Todd Eisenberger <teisenbe@google.com>

[kernel][vmo] Simplify contiguous VMO creation

Previously committing the pages to the VMO was separate from creation,
but the CommitRangeContiguous function was only ever used at VMO
creation time to make a contiguous VMO. This is the first step in some
cleanup around contiguous VMOs to make them easier to track in the
kernel.

ZX-1812 #comment Rework contiguous VMO creation

Change-Id: I9b5bc78bfc47d4b9d80db3101d6a8434d2c32da7


# e5d429fb 28-Mar-2018 Shai Barack <shayba@google.com>

[syscall][vmo] removal of zx_vmo_{read,write}() actual parameter 16/n

Plumb removal of actual further down.
Still need to plumb into sys_process_{read,write}_memory

ZX-1802

Change-Id: Ibba8ce14815f34a9ca08abf854996418a25d1a87


# 8315096a 05-Mar-2018 Travis Geiselbrecht <travisg@google.com>

[kernel][vmo][cached] Allow setting cache policy on regular paged VMOs

Only works for plain vmos, and then only if they're not cloned, mapped,
or committed in any way.

Currently sets the cache parameters for all mappings, but will work
towards requiring the caller match the cache policy.

ZX-1213 #progress

Change-Id: Ie3e30f66048a844e48385b628373121f8bd18d44


# e4bd5d15 01-Mar-2018 Nick Kralevich <nnk@google.com>

[kernel][vm] move from safeint to compiler intrinsics

See ZX-1747

Change-Id: I3f72212fef3e92a86074ac1568a352d2b3da5d85


# 82004d30 01-Aug-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][vmo] page align the size of vmos

During creation or resize, always snap the size of the VMO to the
next page size boundary.

This will allow us to easily add more types of vmo clones and generally
sidestep a bunch of undefined situations concerning the partial last
page.

ZX-1622 #done

Change-Id: I4c60509e7b17d39c48fbbae998a34c98f25a7f3e


# e80fb0e4 03-Nov-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][memory] refactor some physical<->virtual routines, formally naming the BKM physmap

This mostly just rearranges the names of things, but add an actual name
for the big kernel map and add some bounds checking to usage.

This should let us be a bit more dynamic about the physmap in the
future, including placing it at a random location and/or giving it a
more complex mapping.

Change-Id: I062d3f0483f27436252b9607174e10b852f0f832


# 8d363c28 25-Oct-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][x86] add support for clflush/clflushopt for cache ops

-Cache clean operations aren't done much on x86, but in the few places
they are, using clflush is a massive win.
-Informal benchmarking with 'k cache_tests' seem to indicate that trying
to micro optimize the feature bit detection is barely measurable, so
go ahead and do it the simple way for now.

Change-Id: Ie178cdd01d143f1f2676219105136eb87223c474


# 709f0e57 04-Oct-2017 George Kulakowski <kulakowski@google.com>

[user_ptr] Enforce IN/OUT/INOUT semantics

Change-Id: I54e92ed999c1965114aa80aeffe8d0fc16184b40


# cc3c7767 20-Oct-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][vdso/ramdisk] allow the userboot/vdso/ramdisk vmos to free their memory

Previously an extra ref was held on these to make sure they never went
out of scope, since it was not okay to unmap a piece of the BKM.

Once the arm kernel was moved out of the BKM, we can now free the pages
once the vmos go out of scope. For safety purposes, immediately unmap
the pages from kernel space for the userboot and vdso data.

ZX-1237 #done

Change-Id: Ifa181ab63210a4a3b25bbf0901283aec098a8bd5


# 5fb8e9ed 23-Sep-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][vm] move vm.h to the new spot and remove some unused code

Change-Id: I69f1b804fb95dd44e3e0619943e8809519aa82ca


# ce187317 16-Sep-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][vm][formatting] mostly reordering includes after the rename

Change-Id: I8d94a8580ddd0233e036475bd6d4603f5881614f


# 161d9a5e 14-Sep-2017 George Kulakowski <kulakowski@google.com>

[vm][zx_status_t] Use zx_status_t throughout the vm layer

Change-Id: If40e2571cdbd382b7b90da90cdef40daf07a2bd0


# e0fbf267 12-Sep-2017 George Kulakowski <kulakowski@google.com>

[zx] Rename bug references from MG-nnn to ZX-nnn

Change-Id: I07b0ee32bd7e8cc08e344896352c156b3b420349


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# 59e644b1 07-Sep-2017 George Kulakowski <kulakowski@google.com>

[zircon][mxtl->fbl] Rename mxtl to fbl

Change-Id: Ie21b6498e1bfb0a7fa0315e40b9e5c3ee78646be


# e1490736 01-Sep-2017 Travis Geiselbrecht <travisg@google.com>

[kernel][vm] move kernel/kernel/vm to just kernel/vm

Change-Id: I8f724a9f8a61415712661d1fdd3dc4e1c70cf620