[BitVisor-devel-en:83] BitVisor 2.0 released

Hideki EIRAKU hdk at igel.co.jp
Mon Dec 4 19:44:22 JST 2017


Hello,

We are happy to announce that BitVisor 2.0 has been released:

    http://sourceforge.net/projects/bitvisor/files/

The differences between BitVisor 2.0 and BitVisor 1.4 are:

1. Improve PCI Device Drivers

PCI device drivers are changed a lot.  A way to specify a driver for
each device, a way to register a driver, and a way to access PCI
configuration space from drivers are changed.

Every driver always registers itself without referencing config.  Each
driver is enabled or disabled by the string specified in the
config.vmm.driver.pci.

The config.vmm.driver.pci is a comma separated string of elements.
Each element has the following 3 items specifying a driver and is
separated with a keyword "and" if there are multiple elements:

    DeviceSelection (0 or more)
    SpecifyDriver (1)
    DriverOptions (0 or more)

DeviceSelection comes from expression below.  Right-hand value can
have wildcard character (*, ?) or | symbol meaning OR.  If it is
omitted, it is treated as device=DriverName.  If multiple expressions
are specified, devices that match every expression at a time is
selected.

   slot=%02x:%02x.%u           (bus_no, device_no, func_no)
   class=%04x                  (class_code >> 8)
   id=%04x:%04x                (vendor_id, device_id)
   subsystem=%04x:%04x         (sub_vendor_id, sub_device_id)
   revision=%02x               (revision_id)
   rev=%02x                    (revision_id)
   programming_interface=%02x  (programming_interface)
   if=%02x                     (programming_interface)
   class_code=%06x             (class_code)
   header_type=%02x            (header_type)
   device=%s                   (device name)
   number=%d                   (number)

The format of SpecifyDriver is driver=DriverName.  DriverName can be
specified like the following:

    ahci
    ata
    bnx
    conceal
    ehci
    ieee1394
    ieee1394log
    monitor
    pro100
    pro1000
    raid
    rtl8169
    uhci
    vga_intel
    x540

DriverOptions which depends on each driver is key=value format and can
be multiple.

The conceal is a special driver for concealing a device.  It can be
used in place of config.vmm.driver.pci_conceal.  DeviceSelection
should be specified since device=conceal does not select any device.

The monitor is a driver for debugging.  It records I/O for the device
and provides the record via dbgsh.  DeviceSelection should be
specified since device=monitor does not select any device.
DriverOptions is used for specifying which I/O is recorded.  See
drivers/pci_monitor.c for details.

Legacy config are converted for compatibility, but
config.vmm.driver.pci is needed to use new drivers introduced in this
version or later.

See drivers/pci_match.c and drivers/pci_match_compat.c for more
details.

A way to register a driver has been changed.  Drivers linked to the
VMM call pci_register_driver() function without referencing config.
The struct pci_driver now needs the device member formatted as
DeviceSelection above instead of the id member and the class member.
The driver_option member is used for DriverOptions above.

About PCI configuration space access, functions and locks are
refactored to fix race conditions and problems in case of that
memory-mapped configuration is not available.  The following functions
are removed:

    - pci_read_config_data_port
    - pci_write_config_data_port
    - pci_read_config_data8
    - pci_read_config_data16
    - pci_read_config_data32
    - pci_write_config_data8
    - pci_write_config_data16
    - pci_write_config_data32

Instead, the following functions are added:

    - pci_readwrite_config_pmio
    - pci_read_config_pmio
    - pci_write_config_pmio
    - pci_config_read
    - pci_config_write

By this change, drivers can access PCI configuration space any time
regardless of the guest operating system conditions.

2. Improve Network

Netapi has been introduced to delink network drivers and VPN modules
and make network drivers usable for a purpose other than VPN.  Log
outputs are also done via netapi instead of each driver
implementation, so now log can send from multiple network devices.

TCP/IP stack (lwIP), UDP/IP syslog output and virtio-net emulation on
some network drivers are also added.

It is configured by DriverOptions for network drivers.  The following
options are available:

- net (all network drivers): specifies a network module.  vpn, ip,
  ippass, pass, or, empty string can be specified.
- tty (bnx, pro1000, rtl8169): specifies whether it is used for log
  outputs.  Log outputs from devices of tty=1.  Log output destination
  and protocol are specified by config.vmm.tty_mac_address,
  config.vmm.tty_syslog.enable, config.vmm.tty_syslog.src_ipaddr, and,
  config.vmm.tty_syslog.dst_ipaddr.
- virtio (bnx, pro1000): specifies whether virtio-net is used.  If 1
  is specified, the device is detected as a virtio-net device from the
  guest operating system.  If net is empty string or ip, the driver is
  in concealing mode, and if the driver does not support concealing
  mode or virtio=1, all transferred packets from the guest operating
  system are dropped.  If net is not empty string and is not ip, the
  driver is in para-passthrough mode, and if virtio is not specified
  or virtio=0, VMM does not initialize the device, and network
  transfer is started after NIC initialization by the guest operating
  system.  If virtio=1, VMM initializes the NIC, and the guest
  operating system can communicate with using virtio-net.  The bnx
  driver does not support para-passthrough mode without using
  virtio-net.

To use TCP/IP stack, specify net=ip or net=ippass for a network driver
and set config.ip.use_dhcp, config.ip.ipaddr, config.ip.netmask and
config.ip.gateway properly.  The echo-server/client sample program
which can be started by echoctl command in the dbgsh is included.

3. Improve UEFI Support

boot/uefi-loader-login is a boot loader which supports password
authentication for UEFI environment.  Since the boot/uefi-loader is
also changed, it is not compatible with previous version.

To avoid collision with firmware driver, firmware drivers are
disconnected before initializing devices by some drivers, including
network drivers.

4. New Drivers

- bnx: add a Broadcom NetXtreme GbE driver
- xhci: add xHCI driver
- add 10GbE X540 driver for tty

5. Performance and Memory Usage Improvement

- svm: share msrbmp with other vcpus
- svm, vt: share iobmp with other vcpus
- vt, svm: cache nested paging pointers
- vt: use CR0 and CR4 guest/host mask to decrease number of VM exits
- vt: control CR3-load/store exiting bit to decrease number of VM
  exits
- svm, vt: use msrbmp to reduce number of VM exits
- svm, vt: make some MSRs be able to be pass-through
- vt, svm: use 2MiB pages in nested paging
- vt: make another 5 MSRs be able to be pass-through
- vt: use lazy switching MSRs for processes to improve performance
- vt: reduce overhead of switching registers for VM entry/exit
- asm: use setne instead of je/inc to improve performance
- core_io: reduce number of VM exits after unregistering pio handlers
- thread: add CONFIG_THREAD_1CPU that disables parallel thread
  processing

6. Bug Fixes and Small Improvements

ACPI
- acpi_dsdt: apply ObjectList removal in ACPI spec 6.1 Errata A
- acpi_dsdt: apply DefExternal update in ACPI spec 6.0
- acpi_dsdt: apply FieldElement update in ACPI spec 5.0
- acpi_dsdt: apply MethodInvocation update in ACPI spec 5.0
- acpi_dsdt: apply NamedObj update in ACPI spec 5.0 to the comment
- acpi_dsdt: add debug macros
- acpi_dsdt: ThinkPad L570 workaround
- acpi: add CONFIG_ACPI_IGNORE_ERROR for ignoring errors
- acpi: prevent dereferencing NULL pointers when MCFG or FACP is not
  found
- acpi: put variable declaration in the correct position in case of
  unchecked ACPI_DSDT.

Core
- cache: check whether SYSCFG MSR is writable
- cpuid_pass: conceal INVPCID instruction
- x2APIC support
- delete a function prototype of an undefined function in time.h
- assert: evaluate an argument even when CONFIG_ENABLE_ASSERT=0
- initfunc: sort by filename to fix the order of dbsp and pcpu
- gmm_access: make write_gphys_q work properly when crossing a page
  boundary
- mm: fix race condition in mm_page_alloc()

AMD SVM
- svm: use nRIP or interpreter to support rdmsr/wrmsr with prefixes
  that previously supported before changeset a47c448f1855
- svm: add unsafe_nested_virtualization support

Intel VT-x
- msr_pass: microcode update passthrough on Intel CPUs like on AMD
  CPUs
- acpi: add CONFIG_DISABLE_VTD option to disable VT-d DMA-remapping
  translation if enabled by firmware
- vt: fix NMI handling problems
- vt: enable RDTSCP
- vt: xsaves/xrstors support
- vt: show VM-instruction error number when VM entry failed
- vt: print VM-entry interruption fields in panic dump
- add message of printexitreason()
- vt_io: always enable iobmp like svm_io for simplification

Thread
- thread: add thread_pcpu_data containing thread-related data for each
  pcpu
- thread: use ticketlock in schedule()

Debugging
- remove definition and configs of FWDBG
- add tty_ieee1394
- vt: add number of each exit reason to status
- tools/vmmstatus-gtk: fix a bug in timer_callback function
- ieee1394: remove an unused variable and a function that accesses the
  variable
- tools: 64bit Windows support
- tools/log: newer Linux support
- tools/common/call_vmm: glibc version >= 2.19 support
- panic, tty: save panic log to RAM for next boot and reboot if
  vmm.panic_reboot=1
- tty: increase UDP/IP TTL to 64
- ieee1394log: improve initialization
- tools/dbgsh-uefi: add dbgsh for UEFI Shell
- tools/dbgsh: allow building without MinGW
- tools/common/call_vmm: suppress a warning of glibc version >= 2.20
- tools/common/call_vmm: position-independent executable support
- tools/ieee1394log: add retry option

AHCI
- ahci: fix command timeout 1h11m36s after VMM starts
- ahci: modify PxCLB and PxCLBU after clearing PxCMD.ST to align with
  AHCI specification
- ahci: modify PxFB and PxFBU while PxCMD.FRE=0 as described in spec
- ahci: wait for PxCMD.FR/CR to change properly when PxCMD.FRE/ST is
  modified
- ahci: passthrough PxCMD register write before ahci_port_data_init

ATA
- ata: pass-through READ LOG DMA EXT command

Intel GbE
- vpn_pro1000: look at proper descriptors when receiving packets
- pro1000: do not initialize PHY
- pro1000: enable bus master and memory space before initialization
- pro1000: check range of head/tail register value to avoid accessing
  incorrect address of memory
- pro1000: make an interrupt when intr_set() is called by virtio-net
  implementation
- pro1000: abort receiving instead of panic if head/tail register
  value is out of range
- pro1000: disable I/O space if option virtio=1 is specified
- pro1000: add 8086:15b7 I219-LM
- pro1000: add 8086:1570 I219-V
- pro1000: add 8086:15d8 I219-V
- pro1000: add 8086:15d7 I219-LM

USB
- usb: fix get_edesc_by_address() bug
- usb_mscd: handle URB_STATUS_ERRORS
- usb: introduce struct usb_init_dev_operations to prepare for xHCI
  driver

Virtio-net
- pro1000: add virtio-net emulation
- bnx, virtio-net: add multifunction option for multifunction device
  passthrough
- bnx: PCIe capabilities passthrough for virtio-net
- virtio-net: reset ISR status field to zero after read
- pro1000, virtio-net: add virtio-net MSI-X support

Idman
- idman: remove a macro definition with a very long string to avoid a
  core dump of the "global" command

PCI Bridge
- pci: save PCI/PCIe bridge info and use initial bus number for
  pci_match
- pci: PCI/PCIe bridge secondary bus number modification support
- pci: fix panic if a secondary bus number is changed to out of range
  of MCFG

PCI Driver
- pci: mask BAR value properly and ignore size detection
- pci: ignore BAR address bit63=1
- pci: fix range check bug in pci_driver_option_get_int() function
- pci: do not conceal accesses to PCIe configuration space of
  non-existent devices
- pci: call default_config_read/write from config handlers to save
  BARs by default
- pci: add functions getting BAR information
- pci: dump PCI devices and drivers if CONFIG_DUMP_PCI_DEV_LIST=1
- pci: add pci_register_intr_callback() for external interrupt
  notification
- pci: handle new device in MCFG (MMCONFIG) handler
- pci: use MCFG (MMCONFIG) if available in pci_new_device()

UEFI
- uefi: fix load error when loading a stripped binary
- calluefi: CR4.PGE=0 for a VM
- calluefi: 16-byte stack alignment

boot/loader
- boot/loader: allow to specify a compiler at command line
- boot/loader: support Mac

boot/uefi-loader
- boot/uefi-loader: allow to speficy a compiler at command line
- boot/uefi-loader: add stdint.h for C99-compliant compiler and add
  -nostdinc
- boot/uefi-loader: print and return error if 32bit binary or error in
  uefi_init

Compilation
- makefile: GNU Make 4.0 support
- add some C99 interger types to avoid a compile error
- Suppress the link time warnings
- makefile: auto-detect MinGW compilers
- process: change the name of the system call "restrict" to "setlimit"
- makefile: fix syntax errors
- edk: avoid using stdint.h
- tools/iccard: fix type of WinMain function
- fix linker error "PHDR segment not covered by LOAD segment"
- fix compiler errors if compiler is configured with
  --enable-default-pie
- tools/log: GNU Make 4.0 load directive workaround


Known Issues

The VMM does not boot properly depending on the content of ACPI
DSDT/SSDT when CONFIG_ACPI_DSDT=1.  For example, a motherboard ASUS
PRIME B350M-A provides such SSDT.

Have fun,
-- 
Hideki EIRAKU <hdk ¡÷ igel.co.jp>


More information about the BitVisor-devel-en mailing list