1. 25 Oct, 2016 26 commits
    • Charlie Jacobsen's avatar
      Muktesh's capabilities fully incorporated. Capsicum-style enter/exit. · 6ee9a51f
      Charlie Jacobsen authored
      Builds, but not fully tested. Good tests for capability subsystem, some tests
      for kliblcd.
      
      Non-isolated kernel threads can "enter" the lcd system by doing
      klcd_enter / klcd_exit. They can create other lcd's, set them up, etc. They
      use the same interface that regular lcd's will use, so such code could be
      moved to an lcd, as we had planned. Will document this in Documentation folder
      tomorrow ( == today ).
      
      Capability system does checks now when a capability is deleted/revoked: for
      example, if it's for a page, the microkernel checks if the page is mapped, and
      unmaps it. If the last capability goes away, the page is freed. Documentation
      is in Documentation/lcd-domains/cap.txt.
      
      IPC code is in place, but not tested yet (pray for me).
      
      Debug is taking some time. Sometimes requires a power cycle which adds an
      extra 5 - 10 minutes. Build is slow the first time after reboot. Give me a user
      level program and I'll debug it in 30 seconds! argc
      
      Main arch-independent files:
      
          include/lcd-domains/kliblcd.h, types.h
      
             This is what non-isolated kernel code should include to use the
             kliblcd interface to the microkernel.
      
          virt/lcd-domains/main.c, kliblcd.c, cap.c, ipc.c, internal.h
      
             The microkernel, broken up into pieces.
      
          virt/lcd-domains/tests/
      
             The tests, in progress.
      
      Some old files are still hanging around in virt/lcd-domains and will be
      incorprated/cleaned up soon.
      
      I couldn't squash over the merge from the decomposition branch, so there's a
      bunch of junk commits coming over. (I should've just copied Muktesh's files.)
      
      Conflicts:
      	drivers/Kconfig
      	drivers/lcd-cspace/test.h
      	include/lcd-domains/cap.h
      	include/lcd-prototype/lcd.h
      	include/lcd/console.h
      	include/lcd/elfnote.h
      	include/linux/init_task.h
      	include/linux/module.h
      	include/linux/sched.h
      	virt/lcd-domains/cap.c
      	virt/lcd-domains/ipc.c
      	virt/lcd-domains/lcd-cspace-tests2.c
      Resolved-by: Vikram Narayanan's avatarVikram Narayanan <vikram186@gmail.com>
      6ee9a51f
    • Charles Jacobsen's avatar
      Support for multiple threads in lcd (limited). Major clean up of code. · ded1cd32
      Charles Jacobsen authored
      In line with more recent design discussions, we now have (limited)
      support for running multiple threads inside an lcd.
      
      Each thread will have its own hardware vm, but share a guest
      physical address space and cspace.
      
      It's limited for now because threads cannot handle interrupts/exceptions
      internally in the lcd. This will require a per-thread TSS (much like
      Linux's per-core TSS/interrupt stack). I removed the gdt/idt/tss for
      now (Cf. with Dune, they don't use gdt/idt/tss) and will tackle that later
      after finishing more important stuff.
      
      I have only tested the code for running one hardware vm inside an lcd. Some
      code is missing proper locking for the future when we have multiple threads
      inside an lcd. I'm leaving this for now.
      
      The microkernel uses a simple bitmap for guest physical page allocation.
      
      Removed blob loading - code is set up for running modules exclusively.
      
      See the headers and Documentation/lcd-domains for more info.
      
      I put a flag at the top of files that are not currently in use, and will
      probably be deleted/incorporated later.
      ded1cd32
    • Muktesh Khole's avatar
      added memory reclaim feature · ec790197
      Muktesh Khole authored
      ec790197
    • Muktesh Khole's avatar
      added revoke feature · 32ecf3ff
      Muktesh Khole authored
      32ecf3ff
    • Muktesh Khole's avatar
      added feature to grant capabilities · e1045ef9
      Muktesh Khole authored
      e1045ef9
    • root's avatar
      Working lookup, insert, and delete · a5d6ea85
      root authored
      a5d6ea85
    • Charlie Jacobsen's avatar
      First draft of lcd prototype in place. · f9c94ba0
      Charlie Jacobsen authored
      drivers/lcd-prototype contains a README with build and run information,
      the overall design, code layout, etc.
      
      include/lcd-prototype/lcd.h contains the struct lcd data structure,
      included in struct task_struct.
      
      The old client/server test is still present, inside
      drivers/lcd-prototype/test/old, but is not runnable.
      
      I removed the old ping-pong test, and the old include/lcd/lcd.h header.
      
      Aside from the lcd.h header and makefile/kconfig modifications, Anton's draft
      is still intact, inside virt/lcd. This draft of the lcd prototype does not
      have any dependencies on Anton's code right now.
      f9c94ba0
    • Anton Burtsev's avatar
      Create LCD code inside LCD API layer · ea133a9d
      Anton Burtsev authored
       -- Still need an actual function to load the module into LCD
      ea133a9d
    • Anton Burtsev's avatar
      f2609e2e
    • Anton Burtsev's avatar
    • Anton Burtsev's avatar
      First API call: create sync endpoint · 75c72eaa
      Anton Burtsev authored
      75c72eaa
    • Anton Burtsev's avatar
      LCD API client and server code · fc2675ff
      Anton Burtsev authored
        -- LCD export an API to its domains that is accessible via
        capability invocations (well, syscalls if you like)
      
        -- Kernel runs a thread that implement this API, e.g. serves
        capability invocations
      fc2675ff
    • Anton Burtsev's avatar
      Simple, list-based capability allocator · 75340d2a
      Anton Burtsev authored
        -- I've split capability allocation and cspaces, this makes much more
           sense -- complex domains can implement custom allocation policies,
           simple domains go with a static set of caps
        -- This is a list-based (zone like) allocator
      75340d2a
    • Anton Burtsev's avatar
      Kicked out Muktesh's code, wrote my own stub · 6085bcd5
      Anton Burtsev authored
      -- Mine is primitive but works, Muktesh will have to come
         back and rewrite
      -- Cspace is an array, only insert and lookup are supported
      6085bcd5
    • Anton Burtsev's avatar
    • Anton Burtsev's avatar
      Ping-pong code to test IPC · fad23810
      Anton Burtsev authored
      fad23810
    • Anton Burtsev's avatar
      6404e62e
    • Anton Burtsev's avatar
      Cleaned up (sort of) capability code · 1d9c6dfb
      Anton Burtsev authored
      1d9c6dfb
    • Anton Burtsev's avatar
      42684499
    • Charles Jacobsen's avatar
      Successful build with lcd_vmx_init and lcd_vmx_exit. · 62e4ac37
      Charles Jacobsen authored
      Added straight copy from old code of lcd_vmx_exit.
      
      Shifted lcd_vmx_init and lcd_vmx_exit to
      arch/x86/include/asm/lcd-vmx.h. Ideally, if we want
      this to be arch-independent, probably want to change
      header to asm/lcd.h, and routines to lcd_arch_init
      and lcd_arch_exit, or something similar.
      62e4ac37
    • Anton Burtsev's avatar
      Clean up user-level includes, build inskern4lcd tool · 2d55c00d
      Anton Burtsev authored
      It took me a while to figure out a suggested layout for Linux
      user-visible headers. I ended up with this:
      
        ./include/lcd/lcd.h -- includes #include <uapi/linux/lcd.h>
        ./include/uapi/linux/lcd.h -- this file will be installed to
            /usr/linux/lcd.h
      
      Note on installing user-visible header files
      
       1) Add header-y += lcd.h line to include/uapi/linux/Kbuild
      
       2) Install sanitized header files into ./usr/include
      
          sudo make install_headers
      
       3) Copy ./usr/include to /usr/include
      
          sudo find usr/include \( -name .install -o -name ..install.cmd \) -delete
          sudo cp -rv usr/include/* /usr/include
      2d55c00d
    • Anton Burtsev's avatar
      ioctl interface to LCD · 552bd976
      Anton Burtsev authored
      552bd976
    • Charlie Jacobsen's avatar
      FIXED INDENTATION TO USE TABS INSTEAD OF SPACES. · 4b722aaf
      Charlie Jacobsen authored
      Per Linux coding style spec. Updated files in
      arch/x86/lcd, drivers/lcd, include/lcd.
      4b722aaf
    • Anton Burtsev's avatar
      Working on ioctl interface for LCD · 3cbf87c0
      Anton Burtsev authored
        -- A skeleton for the IOCTL interface
        -- Public include file <linux/lcd-domains.h>
        -- Moved module load/unload from arch/x86/lcd into drivers/lcd
        -- Build crashes for modules (built-in works)
      3cbf87c0
    • Anton Burtsev's avatar
      Trying to make printk work from PV kernel · f17d9268
      Anton Burtsev authored
      f17d9268
    • Anton Burtsev's avatar
      Move things around · 0ec257ef
      Anton Burtsev authored
      Not ideal. Some problems:
      
        - The arch dependent and independent parts are not completely
          separated.
      
        - The module builds in arch/x86/lcd and this is a bit strange
      
        - I can't build with LCD buildin, but build works if I build it
          as a module
      
        - There is still a bunch of old warrnings from Weibin's code
      0ec257ef