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)
Oct 4 2024, 11:52 PM
Unknown Object (File)
Oct 2 2024, 12:43 PM
Unknown Object (File)
Oct 2 2024, 9:33 AM
Unknown Object (File)
Oct 2 2024, 7:07 AM
Unknown Object (File)
Oct 2 2024, 4:02 AM
Unknown Object (File)
Oct 2 2024, 12:46 AM
Unknown Object (File)
Sep 30 2024, 4:20 PM
Unknown Object (File)
Sep 28 2024, 11:46 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.