- 26 Oct, 2016 40 commits
-
-
Also fixed a couple apparent bugs along the way in ipc.c.
-
-
Revoke wasn't available before. Put it in there for completeness.
-
All about the same, modified to use more general memory object and new libcap interface.
-
-
I just use %r8, %r9, etc. for syscall args.
-
Switching over to using registers for syscall args, rather than being sloppy and using the UTCB. (This was getting silly for ipc syscalls, because the caller also wants to store data to be transferred in the UTCB.) Simple re-factor of lcd putchar into a separate file.
-
Code for arbitrary host addresses is also materializing (via the more abstract struct lcd_memory_object).
-
Updates code for libcap.
-
Moved to a new file, cap_types.c. The microkernel will use one shared type system for all LCD cspaces. This is initialized in cap_types.c when the microkernel initializes.
-
code to create trampoline structs for function pointers defined in projections and as parameters in rpcs
-
-
Kicks off autoconf and configure, and then the full build, in our Makefile in lcd-domains. So, you can still just do: make inside lcd-domains and it will do the right thing, with the correct configure. Source code not modified yet to use libcap. That comes next.
-
In lcd-domains/libcap.
-
fixed bug in parser causing container struct to be inserted in incorrect scope. added typedef to type function in helper.cpp. removed extra semicolon being printed when writing structures to file
-
- we use a combination of EPT and PAT memory type to support ioremap.
-
Function pointers in projections are now treated as Rpcs and stubs are generated for them as well. Also include their extra params. container structs are now created at parse time.
-
changed FunctionPointer to Function. Added code to resolve types after parsing. Added code to create rpcs from function pointers defined in projections, a missing thing.
-
Simple illustrative example in test-mods/string_example. Ping-pongs a string 'hello' back and forth a few times. The string/data needs to be contained inside a single page for now. This should hopefully handle most of our immediate use cases. Idea: The sender grants the receiver access to the page that contains the data. The receiver maps it in their address space. This is clearly too slow for the main data path, and it's a bit hackie. But it works for strings that are passed in control plane interactions (rather than trying to cram the darn thing inside the message buffer). Wiki to be updated soon with more details.
-
-
-
-
-
The example fails right now. Michael and I will debug. Async (THC) runtime init/exit integrated into LCD boot/shutdown. This is working properly. This commit also fixes a serious bug in the page allocator, and fixes some kmalloc configuration. As I will note on the wiki, the maximum allowed alloc size for kmalloc is 32 pages (128 KBs). This was chosen so that the async runtime will work (lazy stacks are about 17 pages). There is a limit on the max size because of how I allocate groups of pages (I use an array allocated on the stack inside the page allocator at some point, and this array can't be too big). In the future, we may improve on this.
-
The utcb is in a separate page of memory now. The stack can now be made bigger than a page if necessary. This isn't a final solution, but it will work for now while trying to get async working. (Obviously, calling send/recv async won't work right now since there is just one global message buffer.)
-
-
-
Not integrated into liblcd yet. Conflicts: drivers/Kconfig drivers/Makefile include/linux/sched.h virt/lcd-domains/thcsync.c Resolved-by:
Vikram Narayanan <vikram186@gmail.com>
-
Full kernel build no longer required. Yay! This should cut down on dev time a lot. I moved all of the LCD source into $(kernel-src)/lcd-domains/, so it's all in one spot. There is now a top-level makefile in there that triggers building liblcd, the microkernel, and the examples. This is built as an *external* build now, even though the directory is in the kernel source. The build now takes under a minute to do everything LCD related. This should also make verification easier in the future (e.g. building with clang) if we aren't ensnared in the kernel source. Of course, to use the microkernel and examples, you have to build the patched kernel and install it. But now when you make a few lines of changes in e.g. an example, you don't have to trigger a top-level kernel build to rebuild it. Running the full kernel build takes on average about 3 - 4 minutes (some files are generated everytime, linking is done, and so on), and can take upwards of 30 minutes for a full build if you re-config'd. Which brings me to my other change: no more config for LCDs in menuconfig. If we create menu entries for every example and so on, we end up changing the config too often, and this triggers full kernel rebuilds == waste of time. We can use macros by setting them via compiler flags (e.g., -DSOME_FLAG). Furthermore, it wasn't making sense to me to do conditional compilation for LCD support (we always want to compile for that). Yes, changes aren't clearly delineated with macros, but you can see changes made by just doing 'git diff v3.10.14 some-file-or-dir'. The wiki has been fully updated with instructions for building, and other relevant parts (updated paths to files). I also took the opportunity to clean up some old stuff lying around that is dead (like lcdguest). I incorporated all of the documentation in Documentation/lcd-domains into the wiki so it's all in one spot now (including some helpful debug tips).
-
bdi init/destroy in place. Fixed some data store bugs. file system type function pointers not set up yet. Need to figure out strategy for handling them (during mount).
-
Along with a few cache initializations in PMFS init. I haven't fixed up the function pointers yet. Coming soon. Next up: bdi init.
-
I left out the node unlock during insert and delete. This didn't matter inside an LCD because locks are elided. But it does in kliblcd. Fixed in liblcd and kliblcd.
-
Sets up vfs klcd, and most of the code in place in boot module for setting up pmfs and vfs. (Need to squash and merge some code from the mainline.)
-
This is a trivial commit, but I want to get this fixed before it bites us in the future. The problem: the host kernel uses a struct to represent an installed kernel module. But this struct is literally embedded in the module's program bits. We're mapping the entire module inside the LCD. Thus, the LCD can do whatever it wants to the struct, and this could affect the host. Yes, all of the other parts of the module are technically exposed to the host. But it's important we isolate this struct because this is something the host will actually touch. The solution: I duplicate the page that contains the struct, so that the LCD has a separate copy of the struct. Open issues: we still need to come up with a solution for an LCD to pass its struct module as an argument, via rpc. I'm going to hack it for now with PMFS.
-
This is a simple commit that pulls some common dispatch loop infrastructure (struct defs, etc.) into include/lcd-domains/dispatch_loop.h. Updated glue example, all working.
-
-
-
-
I've hidden the nasty bits of the trampoline code as much as I can for now behind some macros, defined in include/lcd-domains/trampoline.h and trampoline_link.h. I updated the glue code example. Everything is working. Hopefully this should make trampolines easier to write, generate, and eventually verify (the macros I wrote will "expand" to some kind of models when we verify).
-
-