Commit Graph

9 Commits

Author SHA1 Message Date
Pedro F. Giffuni
718cf2ccb9 sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-27 14:52:40 +00:00
Neel Natu
f5f87548b9 Fix panic "_mtx_lock_sleep: recursed on non-recursive mutex ttymtx" caused when
acquiring the tty lock in bvm_tty_close(). Instead just assert that the tty
lock is held before calling callout_reset().
2014-03-09 02:07:15 +00:00
John Baldwin
8044460976 - Use a callout instead of the deprecated timeout_handle.
- Set the console name always so that the bvm console device can be used
  via conscontrol even if it isn't chosen as the default console.
2014-02-07 15:10:24 +00:00
Neel Natu
1ea1e18490 Probe for existence of the bvm debug port instead of just assuming that it is
always present.

Suggested by:	grehan
Obtained from:	NetApp
2012-10-27 22:54:23 +00:00
Sean Bruno
fe5476a6e7 Update the byve console code with stubs for cngrab and cnungrab
Reviewed by:	grehan@
2012-01-04 17:01:12 +00:00
Peter Grehan
f9f4638d7a Allow the paravirtualized debug port to override others.
Obtained from:	NetApp
2011-11-07 19:53:20 +00:00
Peter Grehan
fab4c373af IFC @ r225592
sys/dev/bvm/bvm_console.c - move up to the new alt-break order.
2011-09-15 22:14:35 +00:00
Peter Grehan
1f3025e133 Changes to allow the GENERIC+bhye kernel built from this branch to
run as a 1/2 CPU guest on an 8.1 bhyve host.

bhyve/inout.c
      inout.h
      fbsdrun.c
 - Rather than exiting on accesses to unhandled i/o ports, emulate
   hardware by returning -1 on reads and ignoring writes to unhandled
   ports. Support the previous mode by allowing a 'strict' parameter
   to be set from the command line.
   The 8.1 guest kernel was vastly cut down from GENERIC and had no
   ISA devices. Booting GENERIC exposes a massive amount of random
   touching of i/o ports (hello syscons/vga/atkbdc).

bhyve/consport.c
dev/bvm/bvm_console.c
 - implement a simplistic signature for the bvm console by returning
   'bv' for an inw on the port. Also, set the priority of the console
   to CN_REMOTE if the signature was returned. This works better in
   an environment where multiple consoles are in the kernel (hello syscons)

bhyve/rtc.c
 - return 0 for the access to RTC_EQUIPMENT (yes, you syscons)

amd64/vmm/x86.c
          x86.h
 - hide a bunch more CPUID leaf 1 bits from the guest to prevent
   cpufreq drivers from probing.
   The next step will be to move CPUID handling completely into
   user-space. This will allow the full spectrum of changes from
   presenting a lowest-common-denominator CPU type/feature set, to
   exposing (almost) everything that the host can support.

Reviewed by:	neel
Obtained from:	NetApp
2011-05-19 21:53:25 +00:00
Peter Grehan
6c4c7d0f96 bhyve import part 2 of 2, guest kernel changes.
This branch is now considered frozen: future bhyve development will take
place in a branch off -CURRENT.

sys/dev/bvm/bvm_console.c
sys/dev/bvm/bvm_dbg.c
- simple console driver/gdb debug port used for bringup. supported
  by user-space bhyve executable

sys/conf/options.amd64
sys/amd64/amd64/minidump_machdep.c
- allow NKPT to be set in the kernel config file

sys/amd64/conf/GENERIC
- mptable config options; bhyve user-space executable creates an mptable
  with number of CPUs, and optional vendor extension
- add bvm console/debug
- set NKPT to 512 to allow loading of large RAM disks from the loader
- include kdb/gdb

sys/amd64/amd64/local_apic.c
sys/amd64/amd64/apic_vector.S
sys/amd64/include/specialreg.h
- if x2apic mode available, use MSRs to access the local APIC, otherwise
  fall back to 'classic' MMIO mode

sys/amd64/amd64/mp_machdep.c
- support AP spinup on CPU models that don't have real-mode support by
  overwriting the real-mode page with a message that supplies the bhyve
  user-space executable with enough information to start the AP directly
  in 64-bit mode.

sys/amd64/amd64/vm_machdep.c
- insert pause statements into cpu shutdown busy-wait loops

sys/dev/blackhole/blackhole.c
sys/modules/blackhole/Makefile
- boot-time loadable module that claims all PCI bus/slot/funcs specified
  in an env var that are to be used for PCI passthrough

sys/amd64/amd64/intr_machdep.c
- allow round-robin assignment of device interrupts to CPUs to be disabled
  from the loader

sys/amd64/include/bus.h
- convert string ins/outs instructions to loops of individual in/out since
  bhyve doesn't support these yet

sys/kern/subr_bus.c
- if the device was no created with a fixed devclass, then remove it's
  association with the devclass it was associated with during probe.
  Otherwise, new drivers do not get a chance to probe/attach since the
  device will stay married to the first driver that it probed successfully
  but failed to attach.

Sponsored by:	NetApp, Inc.
2011-05-14 18:37:24 +00:00