freebsd-dev/usr.sbin/bhyve
John Baldwin cbd03a9df2 Support software breakpoints in the debug server on Intel CPUs.
- Allow the userland hypervisor to intercept breakpoint exceptions
  (BP#) in the guest.  A new capability (VM_CAP_BPT_EXIT) is used to
  enable this feature.  These exceptions are reported to userland via
  a new VM_EXITCODE_BPT that includes the length of the original
  breakpoint instruction.  If userland wishes to pass the exception
  through to the guest, it must be explicitly re-injected via
  vm_inject_exception().

- Export VMCS_ENTRY_INST_LENGTH as a VM_REG_GUEST_ENTRY_INST_LENGTH
  pseudo-register.  Injecting a BP# on Intel requires setting this to
  the length of the breakpoint instruction.  AMD SVM currently ignores
  writes to this register (but reports success) and fails to read it.

- Rework the per-vCPU state tracked by the debug server.  Rather than
  a single 'stepping_vcpu' global, add a structure for each vCPU that
  tracks state about that vCPU ('stepping', 'stepped', and
  'hit_swbreak').  A global 'stopped_vcpu' tracks which vCPU is
  currently reporting an event.  Event handlers for MTRAP and
  breakpoint exits loop until the associated event is reported to the
  debugger.

  Breakpoint events are discarded if the breakpoint is not present
  when a vCPU resumes in the breakpoint handler to retry submitting
  the breakpoint event.

- Maintain a linked-list of active breakpoints in response to the GDB
  'Z0' and 'z0' packets.

Reviewed by:	markj (earlier version)
MFC after:	2 months
Differential Revision:	https://reviews.freebsd.org/D20309
2019-12-13 19:21:58 +00:00
..
acpi.c Catch up with ACPICA 20191018. 2019-10-24 22:33:46 +00:00
acpi.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ahci.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
atkbdc.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
atkbdc.h Import bhyve_graphics into CURRENT. Thanks to all who tested 2016-07-04 03:19:06 +00:00
audio.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
audio.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
bhyve.8 Support software breakpoints in the debug server on Intel CPUs. 2019-12-13 19:21:58 +00:00
bhyvegc.c When this code was introduced at r300829 the author forgot to add 2018-06-13 04:00:21 +00:00
bhyvegc.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
bhyverun.c Support software breakpoints in the debug server on Intel CPUs. 2019-12-13 19:21:58 +00:00
bhyverun.h Make bhyve SMBIOS table topology aware 2019-04-25 22:53:55 +00:00
block_if.c Increase the VirtIO segment count to support modern Windows guests. 2019-05-02 22:46:37 +00:00
block_if.h Increase the VirtIO segment count to support modern Windows guests. 2019-05-02 22:46:37 +00:00
bootrom.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
bootrom.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
console.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
console.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
consport.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
dbgport.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
dbgport.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
fwctl.c Always treat firmware request and response sizes as unsigned. 2018-12-04 18:28:25 +00:00
fwctl.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
gdb.c Support software breakpoints in the debug server on Intel CPUs. 2019-12-13 19:21:58 +00:00
gdb.h Support software breakpoints in the debug server on Intel CPUs. 2019-12-13 19:21:58 +00:00
hda_codec.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
hda_reg.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
hdac_reg.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
inout.c Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
inout.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ioapic.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ioapic.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
iov.c Fix several iov handling bugs in bhyve virtio-scsi backend. 2018-12-07 20:30:00 +00:00
iov.h Fix several iov handling bugs in bhyve virtio-scsi backend. 2018-12-07 20:30:00 +00:00
Makefile bhyve: abstraction for network backends 2019-07-07 12:15:24 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
mem.c Add support for writing to guest memory in the debug server. 2019-05-24 00:34:13 +00:00
mem.h Add support for writing to guest memory in the debug server. 2019-05-24 00:34:13 +00:00
mevent_test.c Improve bhyve exit(3) error code. 2018-07-11 03:23:09 +00:00
mevent.c bhyve: rework mevent processing to fix a race condition 2019-11-12 21:07:51 +00:00
mevent.h bhyve: add backend rx backpressure to virtio-net 2019-11-03 19:02:32 +00:00
mptbl.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
mptbl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
net_backends.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
net_backends.h bhyve: support for enabling/disabling the net backend 2019-09-28 12:02:43 +00:00
net_utils.c bhyve: add missing license identifiers in net_utils and net_backend 2019-07-09 22:04:33 +00:00
net_utils.h bhyve: add missing license identifiers in net_utils and net_backend 2019-07-09 22:04:33 +00:00
pci_ahci.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_e82545.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_emul.c Catch up with ACPICA 20191018. 2019-10-24 22:33:46 +00:00
pci_emul.h Keep the shadow PCIR_COMMAND synced with the real one for pass through. 2019-06-07 15:53:27 +00:00
pci_fbuf.c usr.sbin/bhyve: commit miss from r349918 2019-07-11 19:51:33 +00:00
pci_hda.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_hda.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
pci_hostbridge.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pci_irq.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pci_irq.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pci_lpc.c Add -s "help" and -l "help" to print a list of supported PCI and LPC devices. 2018-08-22 20:23:08 +00:00
pci_lpc.h Add -s "help" and -l "help" to print a list of supported PCI and LPC devices. 2018-08-22 20:23:08 +00:00
pci_nvme.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_passthru.c Emulate reads of the PCI command register for passthrough devices. 2019-12-11 23:41:39 +00:00
pci_uart.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pci_virtio_block.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_virtio_console.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_virtio_net.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_virtio_rnd.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_virtio_scsi.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_xhci.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
pci_xhci.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pm.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
post.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ps2kbd.c Remove printf for debug purpose forgotten on r340046. 2018-11-02 13:48:06 +00:00
ps2kbd.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
ps2mouse.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
ps2mouse.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
rfb.c bhyve: uniform printf format string newlines 2019-12-02 20:51:46 +00:00
rfb.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
rtc.c Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
rtc.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
smbiostbl.c Make bhyve SMBIOS table topology aware 2019-04-25 22:53:55 +00:00
smbiostbl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
sockstream.c Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
sockstream.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
spinup_ap.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
spinup_ap.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
task_switch.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
uart_emul.c usr.sbin/bhyve: don't leak a FD if the device is not a tty 2019-07-12 18:13:58 +00:00
uart_emul.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
usb_emul.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
usb_emul.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
usb_mouse.c Revert r343634: 2019-02-01 03:09:11 +00:00
vga.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
vga.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
virtio.c bhyve: add support for virtio-net mergeable rx buffers 2019-11-08 17:57:03 +00:00
virtio.h bhyve: add support for virtio-net mergeable rx buffers 2019-11-08 17:57:03 +00:00
xmsr.c Emulate the AMD MSR_LS_CFG MSR used for various Ryzen errata. 2019-06-03 23:17:35 +00:00
xmsr.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00