akaros.git
3 years agoRefactor to move prov stuff to coreprov.c (1/4)
Kevin Klues [Mon, 28 Sep 2015 21:16:04 +0000 (14:16 -0700)]
Refactor to move prov stuff to coreprov.c (1/4)

In this commit we first move the primary logic for actually provisioning
a core out of schedule.c and into coreprov.c. In subsequent commits we
will move the rest of the functionality out as well.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMove spc2pcoreid and pcoreid2spc into header file
Kevin Klues [Mon, 28 Sep 2015 21:52:33 +0000 (14:52 -0700)]
Move spc2pcoreid and pcoreid2spc into header file

All of schedule.c, coreprov.c and corealloc.c will need access to these
functions, and we want them to be fast. To make this possible, we move
the *definition* of these functions into the corerequest.h header file
(otherwise we would just put their declaration in the header). It's a
little unfortunate that we need to extern in the all_pcores variable
(mostly because this ties us to an implementation where all pcores are
allocated next to each other in memory), but it's worth it to make this
call fast.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMove sched_pcore and friends to corerequest.h
Kevin Klues [Mon, 28 Sep 2015 21:04:10 +0000 (14:04 -0700)]
Move sched_pcore and friends to corerequest.h

We are now starting to begin our separation of corerequest logic from
scheduler logic so that alternate core request strategies can be chosen.
This commit simply moves the sched_pcore struct and parts of the
sched_proc_data into corelloc.h (which is now contained in a standalong
corerequest_data struct). We still need access to corerequest_data
inside sched_proc_data, we just embed it now as its own type in a field
called 'crd' (for core_request_data). As such, we've had to modify
schedule.c to access this data through that field.

Eventually, all code that ever references 'crd' will sit inside
coreprov.c and corealloc.c, and schedule.c will not reference it
directly.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFirst step to move corerequest API from schedule.c
leymariv [Wed, 23 Sep 2015 20:57:59 +0000 (13:57 -0700)]
First step to move corerequest API from schedule.c

This is the first step to refactor the akaros kernel scheduler to move
the core-provisioning and core-allocation APIs into 3 new files:
corerequest.h, coreprov.c and corealloc.c. The corerequest.h file
contains the full API for both allocating and provisioning cores, while
the coreprov.c and corealloc.c files implement the provisiong and
allocation APIs respectively.  We separate these implementation so that
alternate core provisioning and core allocation strategies can be
implemented without duplicating code.

In the next commits we will eventually move the code for provisioning
into coreprov.c and the code for core allocation into corealloc.c

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoCreate ak-kill-9pserver.sh that kills ufs server
Edward Hyunkoo Jee [Tue, 17 Nov 2015 20:58:15 +0000 (12:58 -0800)]
Create ak-kill-9pserver.sh that kills ufs server

Signed-off-by: Edward Hyunkoo Jee <edjee@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoIgnore build output for snc and kprof2perf in git
Barret Rhoden [Wed, 18 Nov 2015 18:17:42 +0000 (10:17 -0800)]
Ignore build output for snc and kprof2perf in git

Any byproducts of building must be ignored by git.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded test case for circular buffer code
Davide Libenzi [Fri, 6 Nov 2015 02:04:48 +0000 (18:04 -0800)]
Added test case for circular buffer code

Added test case for circular buffer code.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRemoved lingering error string variables
Davide Libenzi [Mon, 2 Nov 2015 03:05:29 +0000 (19:05 -0800)]
Removed lingering error string variables

Removed lingering error string variables, leftovers after the migration
to the new error handling code.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded simple netcat client for Akaros
Davide Libenzi [Mon, 26 Oct 2015 01:09:55 +0000 (18:09 -0700)]
Added simple netcat client for Akaros

Added simple netcat client for Akaros. It allows to cat files to remote
servers listening with real netcat.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded patch to Linux perf to allow it to work with Akaros
Davide Libenzi [Wed, 28 Oct 2015 17:45:45 +0000 (10:45 -0700)]
Added patch to Linux perf to allow it to work with Akaros

Added patch to Linux perf to allow it to work with Akaros.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded kprof to perf converter
Davide Libenzi [Tue, 24 Nov 2015 02:47:16 +0000 (18:47 -0800)]
Added kprof to perf converter

Added kprof to perf converter.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoEnabled /prof/kptrace collection of anything which goes into cprintf
Davide Libenzi [Sun, 8 Nov 2015 02:47:16 +0000 (18:47 -0800)]
Enabled /prof/kptrace collection of anything which goes into cprintf

Enabled /prof/kptrace collection of anything which goes into cprintf,
printk, and its associates.
The kptrace collector is a circular buffer whose default size is 128KB.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoImplemented the new profiler
Davide Libenzi [Wed, 21 Oct 2015 23:39:04 +0000 (16:39 -0700)]
Implemented the new profiler

Implemented the new profiler format and added simple userspace
stack trace (waiting for copy_from_user()).

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
[checkpatch touchups]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded API to append data into a circular buffer
Davide Libenzi [Fri, 6 Nov 2015 01:30:24 +0000 (17:30 -0800)]
Added API to append data into a circular buffer

Added API to append data into a circular buffer. The buffer data is
allocated once at init time, and no more allocations happen after that.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded generic backtrace functions to allow backtrace output on buffers
Davide Libenzi [Thu, 5 Nov 2015 20:31:37 +0000 (12:31 -0800)]
Added generic backtrace functions to allow backtrace output on buffers

Added generic backtrace functions to allow backtrace output on buffers.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded API to enumerate the VM regions of a process
Davide Libenzi [Tue, 27 Oct 2015 22:29:10 +0000 (15:29 -0700)]
Added API to enumerate the VM regions of a process

Added API to enumerate the VM regions of a process.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded API to retrieve the current set of processes on the system
Davide Libenzi [Tue, 27 Oct 2015 22:04:15 +0000 (15:04 -0700)]
Added API to retrieve the current set of processes on the system

Added API to retrieve the current set of processes on the system.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoExtend hash enumeration API to accept an opaque pointer
Davide Libenzi [Tue, 27 Oct 2015 21:46:49 +0000 (14:46 -0700)]
Extend hash enumeration API to accept an opaque pointer

Extend hash enumeration API to accept an opaque pointer.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded API to retrieve the full path of a struct dentry
Davide Libenzi [Sat, 24 Oct 2015 02:50:43 +0000 (19:50 -0700)]
Added API to retrieve the full path of a struct dentry

Added API to retrieve the full path of a struct dentry.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded APIs to access process startup information
Davide Libenzi [Thu, 22 Oct 2015 17:56:37 +0000 (10:56 -0700)]
Added APIs to access process startup information

Added APIs to access process startup information. For now only argc and
argv copies are supported.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded full binary path into the proc structure
Davide Libenzi [Thu, 22 Oct 2015 21:30:26 +0000 (14:30 -0700)]
Added full binary path into the proc structure

Added full binary path into the proc structure.
Fixed a bug where we would set the progname on the current process,
and not the new one.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded struct proc pointer to base of the executable args block
Davide Libenzi [Thu, 22 Oct 2015 17:32:37 +0000 (10:32 -0700)]
Added struct proc pointer to base of the executable args block

Added struct proc pointer to base of the executable args block.
This allows kernel code to be able to access the executable startup
info, which previous code would have discarded.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoDo not race when multiple init happen at the same time
Davide Libenzi [Tue, 20 Oct 2015 23:34:26 +0000 (16:34 -0700)]
Do not race when multiple init happen at the same time

Do not race when multiple init happen at the same time, and handle
proper cleanup when all users are gone.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRemoved unused old oprofile code
Davide Libenzi [Tue, 20 Oct 2015 22:57:58 +0000 (15:57 -0700)]
Removed unused old oprofile code

Removed unused old oprofile code. Most of it wasn't even used
in the previous code.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoCompletely restructured profiler code cutting all the unused code
Davide Libenzi [Tue, 20 Oct 2015 22:53:08 +0000 (15:53 -0700)]
Completely restructured profiler code cutting all the unused code

Completely restructured profiler code cutting all the unused code
that was imported from Linux.
Moved the kernel/userspace detection logic into the profiler code
to open the door to userspace stack traces.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
[checkpatch touchups]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoReplace the Inferno console driver with a less-crippled Plan 9 driver.
Dan Cross [Thu, 29 Oct 2015 18:02:23 +0000 (14:02 -0400)]
Replace the Inferno console driver with a less-crippled Plan 9 driver.

Integrate the console driver from the UCB Plan 9 release into Akaros,
in preparation for getting rid of devfs.c and moving towards getting
rid of the VFS.

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRun spatch on devcons.c
Dan Cross [Thu, 29 Oct 2015 15:34:00 +0000 (11:34 -0400)]
Run spatch on devcons.c

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRun lindent on devcons.c
Dan Cross [Thu, 15 Oct 2015 20:07:48 +0000 (16:07 -0400)]
Run lindent on devcons.c

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoImport the unmodified Plan 9 console driver.
Dan Cross [Thu, 15 Oct 2015 20:00:06 +0000 (16:00 -0400)]
Import the unmodified Plan 9 console driver.

Step 1 in replacing the relatively less-functional Inferno
console driver with the Plan 9 driver from the UCB Plan 9
release. This is the original, unmodified source from the
Plan 9 distribution.

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRemove old virtualization debugging programs
Barret Rhoden [Mon, 16 Nov 2015 23:31:43 +0000 (15:31 -0800)]
Remove old virtualization debugging programs

These were blobs that Ron used for old virtualization debugging.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd support for EPIPE and SIGPIPE (XCC)
Kevin Klues [Tue, 27 Oct 2015 18:05:23 +0000 (11:05 -0700)]
Add support for EPIPE and SIGPIPE (XCC)

With this change, we now support proper handling of SIGPIPE.  This
allows us to now run things such as:

$ hexdump -C bin/hexdump | head

However, this only currently works for files in the vfs. Things are
still broken for chans in the 9ns.  For example,

$ hexdump -C mnt/go.cpio | head

will page fault in the kernel with an error of "rpc tags".  The SIGPIPE
is still generated properly. but the call to sys_proc_destroy in the
SIGPIPE signal handler never completes. Specifically, the kernel never
returns from the call to close_fdt() in proc_destroy(). My guess is a
call to cclose() on the fd for 'mnt/go.cpio' is sleeping on its
kref->release(), and never recovering properly.

For now we can ignore this, since a workaround is to just copy the file
into the vfs, but we will need to figure this out eventually.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd a sigself() signal_op
Kevin Klues [Wed, 11 Nov 2015 08:46:25 +0000 (00:46 -0800)]
Add a sigself() signal_op

All of the existing signal_ops map directly to traditional signal
operations fro glibc. This commit introduces a new operation, called sigself().
This operation is meant to trigger a signal immediately on the calling
thread.  Before this call returns, the signal passed into it will be
generated and run to compeltion.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd signal support to our basic thread0 scheduler
Kevin Klues [Wed, 11 Nov 2015 08:43:59 +0000 (00:43 -0800)]
Add signal support to our basic thread0 scheduler

As part of this, I needed to add an implementation of thread_paused()
since the signal stuff relies on this.  Since it would do nothing other
than call thread0_thread_runnable, I just reuse this function directly
in the function pointer table.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMigrate signal code from pthread.c to signal.c
Kevin Klues [Wed, 11 Nov 2015 03:00:04 +0000 (19:00 -0800)]
Migrate signal code from pthread.c to signal.c

Previously all of the code to support intraprocess signals was isolated
to the pthread library.  However, the actual functionality it provided
was quite generic.  This commit pushes all of that code into
parlib/signal.c and makes uthreads aware of the ability handle posix
signals. It is still up to the specific 2LS to actually use these
facilities in their scheduler though. For 2LSs that don't require posix
signals, the only waste is a few words in the uthread struct, and a few
unnecessary instructions to clear these fields when a uthread is first
initialized.  There is no actual performance hit unless the APIs from
parlib/signal.h are actually called (as they are in pthread.c now).

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd uthread_paused() API call
Kevin Klues [Wed, 11 Nov 2015 02:10:27 +0000 (18:10 -0800)]
Add uthread_paused() API call

This call is much like uthread_has_blocked(), except that it indicates
that some external component has temporarily paused a uthread, rather
than blocked it. That is, the external component calls uthread_yield()
directly, but then wishes to hand control of the uthread back to the 2LS
in the body of theyield callback.

It is the job of the 2LS to implement sched_ops->paused() such that the
thread becomes runnable again. This sched op actually already exists
because things like preemption can trigger it. Now it is triggerable by
any external component that wishes to temporarily pause a uthread with
its own yield call.

This functionality will prove useful when pausing a temporarily pausing
thread to run a signal handler in its place.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoEncapsulate pthread sigstate into a single struct
Kevin Klues [Tue, 10 Nov 2015 22:58:14 +0000 (14:58 -0800)]
Encapsulate pthread sigstate into a single struct

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRemove need for externally alloced sigdata struct
Kevin Klues [Tue, 10 Nov 2015 21:52:31 +0000 (13:52 -0800)]
Remove need for externally alloced sigdata struct

We now use space on the stack for storing the original user context and
and any signal specific state when triggering a posix signal on a
pthread.

As a side effect, we should now be able to safely longjmp out of a
signal handler because there is no longer any external state
to clean up when the signal handler completes.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd arch independent accessor for user ctx stack
Kevin Klues [Tue, 10 Nov 2015 21:50:52 +0000 (13:50 -0800)]
Add arch independent accessor for user ctx stack

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoWeasel apart parlib/libc symbols for signals (XCC)
Kevin Klues [Tue, 10 Nov 2015 02:45:25 +0000 (18:45 -0800)]
Weasel apart parlib/libc symbols for signals (XCC)

Previously, all of the akaros signal handling code was in parlib, which meant
that none of the glibc functions could use it. Moreover, there was no
good way for an individul 2LS to overwrite many of the commong signal
handling functions with its own functionality.  This commit weasels
apart some of this mess, allowing a 2LS to hook in its own set of
functions for common functions for masking/relaying posix signals.
Moreover, it allows glibc to now access the generic signal_ops struct,
so any function pointers a 2LS wishes to set in there can be called from
glibc if desired.  This will prove useful when implementing SIGPIPE in a
subsequent commit.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd parlib-compat.c for weak symbols with parlib
Kevin Klues [Mon, 9 Nov 2015 22:56:26 +0000 (14:56 -0800)]
Add parlib-compat.c for weak symbols with parlib

This commit requires a rebuild of glibc (XCC)

Historically, parlib and glibc have been 2 separate entities. In spirit,
however, they both serve to provide low level functionalitity required
by higher level libraries. In theory, all of the functionality we
provide in parlib could (and arguably should) eventually be pushed down
into the akaros port of glibc. However, for now, we have opted to keep
parlib and glibc separate to maintain a faster turn-around time with
building parlib vs. glibc.

Unfortunately, keeping parlib and glibc separate is not very clean when
it comes to building glibc. Glibc is designed to be the lowest level
library on the system, and as such, doesn't like it when it has
unresolved symbols from parlib at link time. Since all executables
eventually link with parlib, this is not a problem (in theory), but
glibc doesn't like it nonetheless, and we have problems building our
cross compiler if any parlib symbols are referenced inside our akaros
port of glibc.

To help with this, I've introduced a new file called parlib-compat.c,
to define weak symbols for any parlib symbol that needs to be accessed
internally by glibc. This way, the symbol will exist at the time libc is
linked (to get our cross compiler build to stop complaining), but those
symbols will be overridden by parlib.a in any final executable that
gets linked.

Unfortunately, this trick only works so long as we leave parlib as a
static library. If we ever decide to make parlib a .so, then we will
have to revisit this and use function pointers at runtime or something
similar. Maybe by then we will have pushed all of parlib's functionality
down into glibc, so the point will be moot anyway.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFix bug in pthread_sigmask() semantics.
Kevin Klues [Tue, 27 Oct 2015 17:12:37 +0000 (10:12 -0700)]
Fix bug in pthread_sigmask() semantics.

Previously, the 'how' parameter was not being ignored correctly if 'set'
was NULL. Moreover, we were not setting the value of 'oset' properly in
cases where 'set' was NULL and 'how' should be ignored. This patch
attempts to fix these semantics to match the specification in:

http://linux.die.net/man/2/sigprocmask

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoTabified file carrying spaces
Davide Libenzi [Sun, 1 Nov 2015 01:31:15 +0000 (18:31 -0700)]
Tabified file carrying spaces

Tabified file carrying spaces.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMigrated user memory copy APIs to use the new exception table guards
Davide Libenzi [Sat, 31 Oct 2015 01:31:15 +0000 (18:31 -0700)]
Migrated user memory copy APIs to use the new exception table guards

Migrated user memory copy APIs to use the new exception table guards.
Added string copy APIs as well.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd RISCV uaccess.h
Barret Rhoden [Mon, 16 Nov 2015 21:02:25 +0000 (13:02 -0800)]
Add RISCV uaccess.h

This was written by Davide, but got lost in a rebase involving
6cc759554b02 ("Plugged the exception handling code") on his branch,
which was already c7c7f1ceb352 ("Plugged the exception handling code")
on master.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMake userspace think it has at least one vcore
Barret Rhoden [Fri, 13 Nov 2015 20:29:56 +0000 (15:29 -0500)]
Make userspace think it has at least one vcore

This popped up if you ran Akaros on a single core machine.  In that case, you'd
have 0 CG cores, which means the kernel gives you 0 vcores.  However, SCPs
think they have one vcore.  If a process runs at all, it needs to think it has
at least one vcore.

Rebuild busybox.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoUpdate the user Makefrag to be more generic
Kevin Klues [Fri, 13 Nov 2015 02:51:53 +0000 (18:51 -0800)]
Update the user Makefrag to be more generic

This commit updates the makefrag for user libs so that it can handle
libraries that organize their header files using different patterns. As
part of this, we are now able to remove our custom pthread Makefile, as
one of the patterns we now support is the one used by the pthread
library.

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd space between text and url in ak-code-review
Kevin Klues [Thu, 12 Nov 2015 17:32:56 +0000 (09:32 -0800)]
Add space between text and url in ak-code-review

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoWhen starting a VM, just copy all registers in.
Ronald G. Minnich [Wed, 11 Nov 2015 01:29:28 +0000 (17:29 -0800)]
When starting a VM, just copy all registers in.

This allows the VMM to initialize registers, which we ought to do.

We need this anyway to pass in a bootparams pointer.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoLet the toolchain Makefile respect MAKE_JOBS environment variable
Edward Hyunkoo Jee [Tue, 10 Nov 2015 19:26:05 +0000 (11:26 -0800)]
Let the toolchain Makefile respect MAKE_JOBS environment variable

Users may want to use environment variables or command-line arguments,
instead of using Makelocal file.

Signed-off-by: Edward Hyunkoo Jee <edjee@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoModified vmx_launch in vmx.c to track the phy core of the vm every exit
GanShun [Wed, 4 Nov 2015 15:24:08 +0000 (07:24 -0800)]
Modified vmx_launch in vmx.c to track the phy core of the vm every exit

This change updates the vmctl every time we exit from the vm to ensure
that we keep track of the correct core to send the IPIs to.

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded Timer thread. Started by consin thread.
GanShun [Tue, 3 Nov 2015 21:18:09 +0000 (13:18 -0800)]
Added Timer thread. Started by consin thread.

Timer thread is started by the consin thread and injects interrupts into the
guest every so often.

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMigrated Akaros code to use pragma once (XCC)
Davide Libenzi [Thu, 29 Oct 2015 13:22:45 +0000 (06:22 -0700)]
Migrated Akaros code to use pragma once (XCC)

Migrated Akaros code to use pragma once include file marker.

Rebuild glibc.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
[toolchain notice]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMigrated position dependent initialization, to label based
Davide Libenzi [Tue, 10 Nov 2015 02:31:47 +0000 (18:31 -0800)]
Migrated position dependent initialization, to label based

Migrated position dependent initialization, to label based.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded kernel test case for command line parsing code
Davide Libenzi [Tue, 3 Nov 2015 12:48:49 +0000 (04:48 -0800)]
Added kernel test case for command line parsing code

Added kernel test case for command line parsing code.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded support for multiboot protocol command line extraction
Davide Libenzi [Tue, 3 Nov 2015 03:14:32 +0000 (19:14 -0800)]
Added support for multiboot protocol command line extraction

Added support for multiboot protocol command line extraction.
Added API to fetch kernel boot command line parameters.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
[removed unnecessary null-termiate after strlcpy]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRename static_assert to avoid conflicting with C++'11 (and later) (XCC)
Dan Cross [Wed, 4 Nov 2015 19:22:26 +0000 (14:22 -0500)]
Rename static_assert to avoid conflicting with C++'11 (and later) (XCC)

The C++ standard laid claim to the name, 'static_assert' in the
C++'11 standard; our macro caused conflict trying to build C++
programs. Rename ours to avoid the conflict.

C11 also has support for _Static_assert and the 'static_assert'
macro in the 'assert.h' header. We should migrate to that.  This
is an incremental step in that direction.

Signed-off-by: Dan Cross <crossd@gmail.com>
[removed undef of parlib_static_assert; we aren't overriding stuff]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd empty akaros-specific sysmacros.h (XCC)
Dan Cross [Tue, 3 Nov 2015 17:11:03 +0000 (12:11 -0500)]
Add empty akaros-specific sysmacros.h (XCC)

Traditionally, this header file contains macros for
accessing the major and minor portions of a device
number, as well as a macro for combing a (major,minor)
pair into a single dev num. Unfortunately, these macros
can cause conflicts with other code (the identifiers
are too generic). Since Akaros doesn't use device
numbers, we can just have an empty file.

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoPatch Busybox to use it's own version of major/minor/makedev macros
Dan Cross [Tue, 3 Nov 2015 21:19:13 +0000 (16:19 -0500)]
Patch Busybox to use it's own version of major/minor/makedev macros

These are needed for compatibility with legacy file formats (e.g.,
tar, cpio), but are absent from Akaros proper.

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd a set of ak-scripts for use by docopt-scripts
Kevin Klues [Tue, 3 Nov 2015 15:45:57 +0000 (07:45 -0800)]
Add a set of ak-scripts for use by docopt-scripts

The docopt-scripts tool provides a framework for invoking a collection
of bash scripts through a single command line interface. Its purpose is
to ease the development of these scripts with well-formed usage
semantics from docopt and collect them into a single place for easy
access.

The docopt-scripts tool can be downloaded from here:
https://github.com/google/docopt-scripts

Signed-off-by: Kevin Klues <klueska@cs.berkeley.edu>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRemove unnecessary #if.
Dan Cross [Mon, 2 Nov 2015 15:28:35 +0000 (10:28 -0500)]
Remove unnecessary #if.

Remove a #if that sets a prerequisite for GCC 4.4.  No one
uses gcc 4.4 anymore, and our toolbase is based around gcc
4.9.2 so this is unnecessary.

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMade the timer interrupt setup callback consistent in behavior
Davide Libenzi [Sat, 31 Oct 2015 23:02:18 +0000 (16:02 -0700)]
Made the timer interrupt setup callback consistent in behavior

Made the timer interrupt setup callback consistent in behavior among
local and remote CPU invocation.

Signed-off-by: Davide Libenzi <dlibenzi@google.com>
[touched up checkpatch warnings]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdd networking unit tests
Xiao Jia [Wed, 28 Oct 2015 00:36:41 +0000 (17:36 -0700)]
Add networking unit tests

Currently it includes a unit test for ptclbsum, and unit tests for
checksum benchmark.

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFix manager to run tests if KERNEL_TESTING is set
Xiao Jia [Wed, 28 Oct 2015 00:36:40 +0000 (17:36 -0700)]
Fix manager to run tests if KERNEL_TESTING is set

KERNEL_POSTBOOT_TESTING is not defined, and if USERSPACE_TESTING is
disabled, we won't run any unit tests, which is not right.

Fix it by letting the tests run whenever KERNEL_TESTING is present.

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoExplain why ptclcsum_finalize is correct
Xiao Jia [Wed, 28 Oct 2015 00:36:39 +0000 (17:36 -0700)]
Explain why ptclcsum_finalize is correct

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFix ptclbsum to handle odd offsets
Xiao Jia [Wed, 28 Oct 2015 00:36:38 +0000 (17:36 -0700)]
Fix ptclbsum to handle odd offsets

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFix ptclcsum_one to adjust odd
Xiao Jia [Wed, 28 Oct 2015 00:36:37 +0000 (17:36 -0700)]
Fix ptclcsum_one to adjust odd

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFix typo for TCP checksum offload feature
Xiao Jia [Wed, 28 Oct 2015 00:36:36 +0000 (17:36 -0700)]
Fix typo for TCP checksum offload feature

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agomlx4: Temporarily disable offload features
Xiao Jia [Wed, 28 Oct 2015 00:36:35 +0000 (17:36 -0700)]
mlx4: Temporarily disable offload features

Temporarily disable offload features before they are implemented.
This also allows us to test TCP before actually implementing them.

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agomlx4: Allow override MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE
Xiao Jia [Wed, 28 Oct 2015 00:36:34 +0000 (17:36 -0700)]
mlx4: Allow override MLX4_DEFAULT_MGM_LOG_ENTRY_SIZE

Original mlx4 driver in Linux uses module parameters to override such
configuration values.  We don't have module_param's (yet), so for now
let's use Kconfig for that purpose.

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agomlx4: Fix lock initializations
Xiao Jia [Wed, 28 Oct 2015 00:36:33 +0000 (17:36 -0700)]
mlx4: Fix lock initializations

I was getting "Lock XXX tried to spin when it shouldn't" errors when
the kernel was compiled with spinlock debugging.

Signed-off-by: Xiao Jia <stfairy@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFix binutils/gold breakage (XCC)
Dan Cross [Mon, 2 Nov 2015 20:19:59 +0000 (15:19 -0500)]
Fix binutils/gold breakage (XCC)

Binutils's safe-ctype.h plays some games with cpp macros that
are of dubious legalities as far as C++ is concerned: it is
not clear that the standard permits one to create macros with
the names of the various functions from <ctype.h>. In
particular, these are defined as functions in C++, as opposed
to macros.

"safe-ctype.h" #undef's these and #define's them to symbols that
are guaranteed to fail; this caused some problems under another
compilation environment that included C++ headers that defined
classes with member functions with the same names as the symbols
from <ctype.h>; these were being expanded to these failing
symbols.

The workaround is to move inclusion of safe-ctype.h to the end
of the list of includes. We should probably upstream this.

Signed-off-by: Dan Cross <crossd@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoBe more careful when re#defining printf (XCC)
Barret Rhoden [Tue, 3 Nov 2015 15:36:26 +0000 (10:36 -0500)]
Be more careful when re#defining printf (XCC)

The problem here was that #defining printf catches all usages of the
word printf.  We only want to #define printf when it is used as a
function.

This popped up when libgomp failed to build, complaining that
"akaros_printf" is not a format function.  What's going on is that
somewhere in libgomp they are doing an __atttribute__ ((format (printf,
1, 2))), which marks a function as a printf-style function.  The word
'printf' in there is getting expanded to akaros_printf, and gcc rejects
that.  (For more info on that, check out
https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Function-Attributes.html).

Removing parlib/stdio.h from parlib/common.h wouldn't really fix this.
It would, in the short term, but eventually libgomp would need to
 #include parlib/stdio.h, since it probably will use some 2LS / vcore
feature and want to do a printf.

Rebuild glibc.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoLimit the headers pulled in by parlib/arch.h (XCC)
Barret Rhoden [Tue, 3 Nov 2015 15:32:57 +0000 (10:32 -0500)]
Limit the headers pulled in by parlib/arch.h (XCC)

The problem here is that arch.h is used by parts of glibc.  By including
common.h, we're pulling in parlib/stdio.h, which pulls in stdio.h.
That's more than parts of glibc can handle.  string.h was unneeded as
well.

The problem manifested itself as glibc build errors, complaining about
stdio.  An alternative solution would be to remove parlib/assert.h and
parlib/stdio.h from parlib/common.h, though that would make it harder
for us to broadly include those headers.

For now, we can keep the lower-level headers (e.g. arch.h) from
including other major parts of parlib.

Rebuild glibc.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoMove ros/vmx.h to an arch-specific location (XCC)
Barret Rhoden [Tue, 3 Nov 2015 16:15:57 +0000 (11:15 -0500)]
Move ros/vmx.h to an arch-specific location (XCC)

VMX is an x86 thing, so we shouldn't have it as a top-level kernel header.
It's also an intel-specific thing, but at least that's all in the x86
directory.

Reinstall your kernel headers.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdding vmexits to proc.
GanShun [Tue, 29 Sep 2015 22:20:20 +0000 (15:20 -0700)]
Adding vmexits to proc.

Counts the number of times we do a vmexit and stores that in proc under Qvmstatus

Signed-off-by: GanShun <ganshun@gmail.com>
[moved vmexits into struct vmm]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoModified vmrunkernel consin to use read instead of fgets.
GanShun [Tue, 29 Sep 2015 22:20:20 +0000 (15:20 -0700)]
Modified vmrunkernel consin to use read instead of fgets.

Fixed a bug where only one character would be sent into the guest at a time by swapping fgets for read

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoRemoved debug prints. Fixed virtio decode function to handle full set of 16 registers.
GanShun [Sat, 26 Sep 2015 22:20:20 +0000 (15:20 -0700)]
Removed debug prints. Fixed virtio decode function to handle full set of 16 registers.

Removed all debug prints after vm has fully started.

Fixed decode function to find the correct register from the instruction and handle full set of 16 registers.

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoChanged magic number from 0xE5 to I_VMMPC_POSTED
GanShun [Sat, 26 Sep 2015 22:20:20 +0000 (15:20 -0700)]
Changed magic number from 0xE5 to I_VMMPC_POSTED

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoSend IPI using function in vmx.c through pwrite to #cons/vmtcl at offset 4096 is...
GanShun [Sat, 26 Sep 2015 22:20:20 +0000 (15:20 -0700)]
Send IPI using function in vmx.c through pwrite to #cons/vmtcl at offset 4096 is successful.

We now get an IPI sent by the consin thread automatically when we press enter

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoEOI virtualization and virtual APIC success.
GanShun [Tue, 22 Sep 2015 22:20:20 +0000 (15:20 -0700)]
EOI virtualization and virtual APIC success.

Reenabled APIC emulation for APIC reads that are not automatically virtualized by the hardware.
We are now able to inject multiple interrupts into the guest.

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVAPIC page is now actually enabled and active.
GanShun [Mon, 21 Sep 2015 22:20:20 +0000 (15:20 -0700)]
VAPIC page is now actually enabled and active.

Changed APIC_ACCESS_ADDR to be the physical address that's translated from guest physical address 0xfee00000 instead of being 0xfee00000

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoAdded emsr_fake_1b function
GanShun [Mon, 21 Sep 2015 22:20:20 +0000 (15:20 -0700)]
Added emsr_fake_1b function

Modified to return 0xfee00900 instead of reading from the msr.

Signed-off-by: GanShun <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVMMCP: Virtualized APIC is now working(sort of)
Gan Shun Lim [Tue, 8 Sep 2015 22:20:20 +0000 (15:20 -0700)]
VMMCP: Virtualized APIC is now working(sort of)

Cleared SVI to acknowledge the delivery of the virtual interrupt. Enabled debug prints and added APIC memory dump.

Signed-off-by: Gan Shun Lim <ganshun@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agovmmcp: ignore IF flags
Ronald G. Minnich [Sun, 6 Sep 2015 22:20:20 +0000 (15:20 -0700)]
vmmcp: ignore IF flags

we're using the VAPIC and don't need to worry about the processor
state any more.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVMMCP: upgrade for newer cpu.
Ronald G. Minnich [Tue, 1 Sep 2015 22:20:20 +0000 (15:20 -0700)]
VMMCP: upgrade for newer cpu.

We will allow monitor/mwait.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agovmmcp: implement optional bits setting in the 5 control registers
Ronald G. Minnich [Tue, 1 Sep 2015 22:20:20 +0000 (15:20 -0700)]
vmmcp: implement optional bits setting in the 5 control registers

There's enough weird variance in even the newer systems that we have to have it.

Tested with lots of error cases.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVMMCP: start move to systems I can't use on my mac
Ronald G. Minnich [Wed, 30 Sep 2015 22:20:20 +0000 (15:20 -0700)]
VMMCP: start move to systems I can't use on my mac

Oh well, I just wasted a day because we decided to ignore an error a few months back.

Bad Giraffe!

Anyway, I'm going to start enabling this stuff, and say goodbye to vmware fusion,
since it can no longer play the game. Damn. Gotta fine a real computer now.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agovmmcp: cut over to virtual apic; fix include mess after upgrade
Ronald G. Minnich [Wed, 30 Sep 2015 22:20:20 +0000 (15:20 -0700)]
vmmcp: cut over to virtual apic; fix include mess after upgrade

we really need to start building outside tree. This is just painful.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVMMCP:update constants for vapic
Ronald G. Minnich [Tue, 29 Sep 2015 22:20:20 +0000 (15:20 -0700)]
VMMCP:update constants for vapic

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVMMCP: misc stuff
Ronald G. Minnich [Tue, 22 Sep 2015 22:20:20 +0000 (15:20 -0700)]
VMMCP: misc stuff

i.e., use a reserved interrupt vector for virtio_mmio

virtio_mmio, it turns out, doesn't really work on x86. I will refrain
from further comment. Grrrrrrr...

So for now the guest linux will set a trap gate for 17, and we'll be smart and use it.

Awful.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVMMCP: better support incoming interrupts. Fix idiot bug where Dune stripped rflags...
Ronald G. Minnich [Tue, 22 Sep 2015 22:20:20 +0000 (15:20 -0700)]
VMMCP: better support incoming interrupts. Fix idiot bug where Dune stripped rflags and we injected interrupts when we should not

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agovmmcp/APIC: the empire strikes back.
Ronald G. Minnich [Wed, 16 Sep 2015 19:31:13 +0000 (12:31 -0700)]
vmmcp/APIC: the empire strikes back.

Some folks think we should be able to get along without these, but I've given up

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoPull ACPI into the user mode vmm
Ronald G. Minnich [Fri, 18 Sep 2015 21:02:28 +0000 (14:02 -0700)]
Pull ACPI into the user mode vmm

I hate it; we have to do it.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoVMMCP: EPT failures: don't exit, return all f's
Ronald G. Minnich [Mon, 14 Sep 2015 17:00:24 +0000 (10:00 -0700)]
VMMCP: EPT failures: don't exit, return all f's

On real hardware, a read outside memory returns all 1s. In some cases
kernels count on this. We can't rewrite every single place, so just
return all 1's for now.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agolapic and ioapic support that's Not Good Enough.
Ronald G. Minnich [Fri, 16 Oct 2015 17:04:11 +0000 (10:04 -0700)]
lapic and ioapic support that's Not Good Enough.

I really hate to do this, but I think I'm going to have to bring in the
whole enchilada from linux :-(

The linux kernel is just not happy with the level of support I'm providing.
We've tried counseling and adjustment, but this relationship is not working.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agouser level msr support for register not requiring read/write msr
Ronald G. Minnich [Fri, 4 Sep 2015 01:38:00 +0000 (18:38 -0700)]
user level msr support for register not requiring read/write msr

We can handle non-real MSRs in user mode.

Still need to split "fake" msrs out of kernel but this is a "checkpoint"
commit.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoFailed effort at moving MSR functions to user mode
Ronald G. Minnich [Tue, 1 Sep 2015 19:36:51 +0000 (12:36 -0700)]
Failed effort at moving MSR functions to user mode

Forgot, rdmsr/wrmsr require CPL0. I thought we'd be ok with
something else.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agouser/vmm: change a longstanding bug in showstatus
Ronald G. Minnich [Tue, 1 Sep 2015 17:41:28 +0000 (10:41 -0700)]
user/vmm: change a longstanding bug in showstatus

showstatus was using the wrong struct member to print the
exit type.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agovmrunkernel: Handle the INTERRUPT_WINDOW exit; print more info on unhandled exits
Ronald G. Minnich [Tue, 1 Sep 2015 17:40:09 +0000 (10:40 -0700)]
vmrunkernel: Handle the INTERRUPT_WINDOW exit; print more info on unhandled exits

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
3 years agoChange PENDING_INTERRUPT to INTERRUPT_WINDOW to have a more meaningful name.
Ronald G. Minnich [Tue, 1 Sep 2015 17:36:34 +0000 (10:36 -0700)]
Change PENDING_INTERRUPT to INTERRUPT_WINDOW to have a more meaningful name.

Allow the old one to persist for now

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>