Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTrace script to inspect VM exit reasons #859

Merged
merged 1 commit into from
Feb 18, 2025
Merged

DTrace script to inspect VM exit reasons #859

merged 1 commit into from
Feb 18, 2025

Conversation

iximeow
Copy link
Member

@iximeow iximeow commented Feb 14, 2025

This script reports the SVM exit codes for vCPUs as well as some information for select exit codes that include additional information (port IO accesses and NPF/nested #PF).

The script also describes causes of Bogus exits out to the VMM. Other VM_EXITCODE_* causes are probably interesting too, but I'm not immediately sure what I'd want to know there.

The output looks something like this, from a mildly loaded propolis-standalone that happens to use the ACPI PM timer (seen as accesses to IO port 0xb008):

=== Exit summary, one second ending at 2025 Feb 14 23:47:33 ===
  SVM code  Count
        78        16
        64       514
        60       806
       400      1065
        7b      2611
IOIO SVM exits:
  Port   Op  OpSz  Addr  Count
  b008   in   32b   64b   2611
NPF SVM exits:
  Guest PA          Guest RIP         #PF flags  Count
          80011008  ffffffffc02521dd      D-UW-         0
          8001100c  ffffffffc02549dc      D-UW-         0
          fee00300  ffffffffa8065029      D-UR-         8
          fee00300  ffffffffa806504c      D-UW-         8
          fee00310  ffffffffa8065038      D-UW-         8
          fee000b0  ffffffffa806b472      D-UW-       516
          fee00380  ffffffffa806b472      D-UW-       525
vm_run() VM_EXITCODE_BOGUS reasons:
         early_bailout      108

This script reports the SVM exit codes for vCPUs as well as some
information for select exit codes that include additional information
(port IO accesses and NPF/nested #PF).

The script also describes causes of Bogus exits out to the VMM. Other
VM_EXITCODE_* causes are probably interesting too, but I'm not
immediately sure what I'd want to know there.

The output looks something lke this, from a mildly loaded
`propolis-standalone` that happens to use the ACPI PM timer (seen as
accesses to IO port 0xb008):

```
=== Exit summary, one second ending at 2025 Feb 14 23:47:33 ===
  SVM code  Count
        78        16
        64       514
        60       806
       400      1065
        7b      2611
IOIO SVM exits:
  Port   Op  OpSz  Addr  Count
  b008   in   32b   64b   2611
NPF SVM exits:
  Guest PA          Guest RIP         #PF flags  Count
          80011008  ffffffffc02521dd      D-UW-         0
          8001100c  ffffffffc02549dc      D-UW-         0
          fee00300  ffffffffa8065029      D-UR-         8
          fee00300  ffffffffa806504c      D-UW-         8
          fee00310  ffffffffa8065038      D-UW-         8
          fee000b0  ffffffffa806b472      D-UW-       516
          fee00380  ffffffffa806b472      D-UW-       525
vm_run() VM_EXITCODE_BOGUS reasons:
         early_bailout      108
```
@iximeow iximeow marked this pull request as ready for review February 15, 2025 00:14
@iximeow iximeow merged commit 4ab0189 into master Feb 18, 2025
11 checks passed
@iximeow iximeow deleted the ixi/exits-d branch February 18, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants