Skip to content

vm-exit-codes.d: read the VMCB directly rather than copying it per exit - #1249

Draft
citrus-it wants to merge 1 commit into
masterfrom
nocopy
Draft

citrus-it wants to merge 1 commit into
masterfrom
nocopy

Conversation

@citrus-it

Copy link
Copy Markdown
Contributor

I was running this script on a busy host yesterday and it kept dropping
data because the dynamic variable space was exhausted. The problem is
that fbt::svm_vmexit:entry is copying the whole of vmcb->ctrl and
vmcb->state into thread locals on every VM exit - that's about 4 KiB.

Now that vmcb is a pointer, we can just avoid doing those copies.

@acfoltzer acfoltzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, it's good to know these kinds of memory considerations are important in these scripts

@iximeow iximeow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please and thank you!

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.

4 participants