vmap_pmem_nocache()

Maps in physical memory to the kernel's VA space, but with caching
disabled (if available).  We'll need to use this for device MMIO.
MSI-X support

Adds support for MSI-X interrupts, including routing of individual
vectors to cores, via the irq_handler.

Cleaned up MSI a bit too, extracting common code (they use the same
MSI addr and data format).

Still needs a little cleanup and synchronization support.
Uses channame() in sys_fd2path()

channame() should do the trick, instead of the old chanpath() which was
removed in commit 011ab2.  If not, we should fix channame().  chanpath()
was a nxm thing; Inferno has different structs to track the name.
"chanpath(ch)" might have been put in quotes during the 9ns->inferno
change.

Using snprintf() and channame() helps with a couple things.  Previously,
fd2path() didn't check ch != 0 and could copy more than the user requested
(i.e. the full channame len instead of MIN(len, ch->name->len)).
Refactors MSI code slightly

PCI/MSI code doesn't need to know about irq_h, which makes all of the
interfaces a little cleaner.

Also puts in some checks to prevent us from trying to turn on MSI and
MSI-X at the same time.
IRQ routing

Call route_irqs() to reroute a all IRQs for a particular vector to an os
coreid.  We don't support routing to multiple cores yet.
PCI: handles BARs for PCI2PCI devices

Though it turns out my hardware doesn't have any of these, so it hasn't
turned up as an issue.
PCI device locking and synchronization

Adds some limited concurrency support to PCI operations.  The main list
of PCI devices is built at boot and is read-only, so we don't
(currently) need to worry much.
Add ability to set alarms at an absolute unix time
MSI: Fix for MSI to work when MSI-X fails

Need to turn off the MSI-X enable bit.  You can only have either MSI or
MSI-X turned on at a time.
Can vmap unaligned paddrs

The main idea is to implicitly map the phys memory below paddr, down to
its nearest page boundary.
MSI-X fixes

Allows unaligned table/pba addresses and zeros out the data entries in
the table.  Some hardware (i350 on c89) already has them zeroed, while
other (rtl8169) doesn't.
Add check for is_valid_elf() before loading in exec

If the program is not a valid elf file, then set errno to ENOEXEC.
Busybox and other shells recognize this and try to re-exec the program
through the shell itself (i.e. bash ifconfig instead of just
./ifconfig).

To support this, sh and bash symlinks have been set up to point to ash
in busybox
Fixes tcpackproc name's memory

Our ktasks (possibly foolishly) don't make a copy of the name for the
caller.  So the caller (or rather the ktask itself) needs to free the
memory for the kname when it is done.

Probably should change this.
Adds KFS symlinks for bash and sh

Symlinks to busybox; needed for running scripts as programs from
busybox (./script, ./etc).

If someone wants to put together some busybox patching, configuring,
building, and installing scripts, then go for it.
Removes user_mem_check, fixes syscall bug

This was a good one.  When not MAP_POPULATE-ing anonymous memory,
syscalls where part of the struct was on a page that hadn't been faulted
in yet would fail a user_mem_check.  Silently.  But good thing we set
that global racy variable!  Since run_local_syscall() would just return,
we'd pop back to userspace and the syscall would never complete, because
it never started.  6.5 giraffe-hours btw (* 2).
Fixes uninitialized irq_h name

Might just remove it.
Ethernet devices register there their own IRQs

The Plan 9 way was to have one IRQ per ethernet device, which devether
registers for each NIC.  Many NICs will want separate IRQ handlers, possibly
for different queues.

Now, all NICs register and manage their own IRQs.  The old plan 9 way was to do
it in the reset/pnp method.  These resets happen during the booting process,
and for now that is the only place you can do vmap_pmem calls (which you'll
need when you register_irq for MSI-X).
x86: Kernel tries to handle user page faults

We could deadlock doing this - need to review and be careful any time we access
a user pointer.

Segvs will still cause a panic, but anon memory should work.
QIO and catching rendez_sleep()

rendez_sleep() throws an error.  In qbwrite(), this is after the point
where we published the block b to the queue.  If the rendez_sleep() is
aborted, we'd error out and freeb(b), which is still on the queue.

Our use of error() in rendez_sleep() might be different than Plan 9.  We
already have slightly different rendez semantics.  Though many rendez
calls are clearly wrapped in waserrors() in other places.

I looked at some of the other rendez spots, like devmnt, and at least
put some warnings in place for the next time we have potential rendez
issues.
Process create/destroy fixups

If sys_proc_create() failed early, a variety of fragile refcntings and
other bits would be messed up.  Mostly since we want to destroy and we
haven't __proc_readied, but destroy cleans up after both alloc and
ready.