1. 26 Oct, 2016 6 commits
    • Charlie Jacobsen's avatar
      liblcd-v2: Make room for RAM map region (separate from heap). · b9ce0034
      Charlie Jacobsen authored
      This is kind of like an mmap region, but only for RAM. (The guest
      virtual page tables will be configured for write back).
      Use case: You get a RAM capability from some other guy, and you
      want to map it into your physical/virtual address space. This is
      reasonable to figure out manually for big RAM chunks that are
      mapped one/two times. But for little tedious ones (string sharing),
      it's helpful to have an allocator to assist and track free parts
      of guest physical.
      The RAM map region uses very course-grained physical address space
      allocation (minimum 64 MBs). This leads to a lot of internal
      fragmentation, but it should be tolerable since the region is big.
      It also means we have a smaller bit of metadata for tracking the
    • Charlie Jacobsen's avatar
      liblcd-v2: Add higher-level interface code for page allocator. · 39a20ffe
      Charlie Jacobsen authored
      vmalloc is not implemented for now.
    • Charlie Jacobsen's avatar
      liblcd-v2: Heap allocator internals in place, first draft. · fa0aea92
      Charlie Jacobsen authored
      Uses the "generalized" allocator to manage 16 MBs of guest physical
      address space for a heap. Only the initial 4 MBs will be backed,
      and host memory is sucked in at 4 MB granularity.
      Some tuning of parameters will be necessary soon.
    • Charlie Jacobsen's avatar
      liblcd-v2: Low-level mmap done. Tweaked low-level mmap interface. · 9829af71
      Charlie Jacobsen authored
      Easier to have caller pass memory object order and gpa base for
      _lcd_mmap and _lcd_munmap, since in liblcd we can look those
      things up easily.
    • Charlie Jacobsen's avatar
      liblcd-v2: Low-level system call wrappers. · 7fe276a9
      Charlie Jacobsen authored
      I need to pause liblcd-v2 and redo the resource tree logic
      for kliblcd. Now that I'm working on liblcd, I'm seeing the way
      it should be.
    • Charlie Jacobsen's avatar
      liblcd-v2: Add memory itree code, simple LCD create code. · c99648ed
      Charlie Jacobsen authored
      Memory itree code initializes resource tree needed for
      address -> cptr translation. Provides interface for other liblcd
      code to add/remove from tree (page allocator will use that).
      Removed redundant nr_pages_order field from resource tree node. Its
      size can be computed from the interval tree node.
      Filled in some simple functions that are part of the liblcd
      interface. Some are no-ops for isolated code.