Page MenuHomeFreeBSD

vmm: enable software breakpoints for AMD CPUs
ClosedPublic

Authored by bnovkov on Oct 19 2023, 3:41 PM.
Tags
Referenced Files
Unknown Object (File)
Tue, Apr 30, 3:58 PM
Unknown Object (File)
Tue, Apr 30, 3:55 PM
Unknown Object (File)
Tue, Apr 30, 3:55 PM
Unknown Object (File)
Tue, Apr 30, 3:55 PM
Unknown Object (File)
Tue, Apr 30, 8:38 AM
Unknown Object (File)
Sun, Apr 21, 2:18 PM
Unknown Object (File)
Sun, Apr 21, 12:36 PM
Unknown Object (File)
Sun, Apr 21, 7:35 AM

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 Not Applicable
Unit
Tests Not Applicable

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
1453

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.