Hi -

This patchset allows the dynamic creation of vthreads (virtual machine
threads whose Guest Ring 0 == Host Ring 3 space).  There's a few perks:

- You don't need to specify the number of vthreads / guest_threads /
  guest physical cores up front.
- You don't have to pass a thread ID / guest core ID to vthread_create()
- You can set FS / GS base at thread creation (TLS, if you want)
- You can call helpers to alloc and run your vthreads
- You can use built in vmcalls and easily extend it to your own
- You can join on vthreads
- And other misc fixes.

Also, for a frame of reference, it takes about 1ms to create and join on
a vthread.

Barret


The following changes since commit 8aebaf1bd17aa33c1407e9b842e161e6adcf3aea:

  vmm: Added initial pagetable setup code (2017-09-14 15:26:23 -0400)

are available in the git repository at:

  [email protected]:brho/akaros.git vmm

for you to fetch changes up to 93c0f04203e74c07a1fb0804d96d3ff3c4ba8f7f:

  vmm: Add vthread_test (2017-09-14 16:52:46 -0400)

----------------------------------------------------------------
View this online at:
https://github.com/brho/akaros/compare/8aebaf1bd17a...93c0f04203e7

----------------------------------------------------------------
Barret Rhoden (20):
      Fix /proc/self/maps MAP_SHARED flag
      parlib: Don't require zeroing for uthread_init()
      parlib: vmm: Allow VM uthreads to have no FP state
      vmm: Refactor vmm_ctl to use error()
      vmm: Use VMM_CTL to set VMM flags (XCC)
      vmm: Split VM creation into init and adding GPCs
      vmm: Rename SYS_vmm_setup -> SYS_vmm_add_gpcs (XCC)
      vmm: Allow the user to set GUEST_FS/GS_BASE (XCC)
      vmm: Remove vthread_attr_kernel_init()
      vmm: Move user_data to struct guest_thread (XCC)
      vmm: Moves gpci into guest_thread
      vmm: Use a helper for all gth lookups
      vmm: Allow dynamic growth of __gths
      vmm: Move the vmcall overrides to the VM struct
      vmm: Overhaul how vthread_create works
      vmm: Rename root_mtx
      vmm: Allow dynamic vthread creation
      vmm: Add vthread_join()
      vmm: Support basic vthread syscalls
      vmm: Add vthread_test

 kern/arch/x86/process64.c       |   8 --
 kern/arch/x86/ros/vmm.h         |   3 +-
 kern/arch/x86/trap.c            |   4 +-
 kern/arch/x86/trap64.h          |   8 ++
 kern/arch/x86/vmm/intel/vmx.c   |  20 ++-
 kern/arch/x86/vmm/vmm.c         |  95 ++++++++-----
 kern/arch/x86/vmm/vmm.h         |   6 +-
 kern/drivers/dev/proc.c         |   2 +-
 kern/include/ros/bits/syscall.h |   2 +-
 kern/include/ros/vmm.h          |  10 +-
 kern/src/syscall.c              |  73 +++++-----
 tests/dune/dune.c               |  31 ++--
 tests/mmap_file_vmm.c           |  13 +-
 tests/strace.c                  |   2 +-
 tests/vmm/Makefrag              |   2 +-
 tests/vmm/vmrunkernel.c         |  49 ++++---
 tests/vmm/vthread_test.c        |  69 +++++++++
 user/parlib/uthread.c           |  10 +-
 user/vmm/include/vmm/sched.h    |  13 +-
 user/vmm/include/vmm/vmm.h      |  41 +++++-
 user/vmm/include/vmm/vthread.h  |  73 ++++++++++
 user/vmm/pagetables.c           |   4 +-
 user/vmm/sched.c                |  71 +++++++---
 user/vmm/vmexit.c               |  12 +-
 user/vmm/vmm.c                  |   4 +-
 user/vmm/vmxmsr.c               |   8 +-
 user/vmm/vthread.c              | 306 ++++++++++++++++++++++++++++------------
 27 files changed, 651 insertions(+), 288 deletions(-)
 create mode 100644 tests/vmm/vthread_test.c
 create mode 100644 user/vmm/include/vmm/vthread.h

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to