Page MenuHomeFreeBSD

vmm: enable software breakpoints for AMD CPUs
ClosedPublic

Authored by bnovkov on Oct 19 2023, 3:41 PM.
Tags
Referenced Files
F81199007: D42295.diff
Fri, Apr 12, 10:17 AM
Unknown Object (File)
Feb 27 2024, 8:00 AM
Unknown Object (File)
Feb 16 2024, 12:04 AM
Unknown Object (File)
Feb 16 2024, 12:04 AM
Unknown Object (File)
Feb 16 2024, 12:02 AM
Unknown Object (File)
Jan 25 2024, 8:30 AM
Unknown Object (File)
Jan 12 2024, 1:04 PM
Unknown Object (File)
Jan 5 2024, 10:33 PM

Details

Summary

This patch adds support for software breakpoint vmexits on AMD SVM.
It implements the VM_CAP_BPT_EXIT used to enable software breakpoints. When enabled, breakpoint vmexits are passed to userspace where they are handled by the GDB stub.
It is the first of five patches that enable single-stepping virtual machines on AMD hosts.

This work was sponsored by the GSoC '22 program.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bnovkov retitled this revision from vmm: enable software breakpoints for AMD SVM to vmm: enable software breakpoints for AMD CPUs.Oct 19 2023, 4:05 PM

Maybe add some more information to the commit message. Something like "This commit adds a new capability to enable software breakpoints. When enabled, vmexits are passed to userspace where they should be handled. ..."

sys/amd64/vmm/amd/svm.c
1454

Ideally should be an additional patch. See https://reviews.freebsd.org/D42298#inline-257920 for some reasons.

bnovkov edited the summary of this revision. (Show Details)

Address @corvink's comments, unrelated exception reflection change was split into its own patch (D42405), updated commit message to be more clear.

This revision is now accepted and ready to land.Nov 29 2023, 6:02 PM
sys/amd64/vmm/amd/svm.c
1429

Dropping this (merging the reflect fix first so then this isn't needed)

This revision was automatically updated to reflect the committed changes.