Skip to content

vmx: don't inject an OOM exception into the guest on EPT ENOMEM#1

Merged
tianyuzhou95 merged 1 commit into
antgroup:mainfrom
tianyuzhou95:albert/remove-oom-inject
Jun 13, 2026
Merged

vmx: don't inject an OOM exception into the guest on EPT ENOMEM#1
tianyuzhou95 merged 1 commit into
antgroup:mainfrom
tianyuzhou95:albert/remove-oom-inject

Conversation

@tianyuzhou95

@tianyuzhou95 tianyuzhou95 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

When EPT page allocation fails with -ENOMEM, the module used to try to inject an OOM exception (T0_OOM_VECTOR) into the guest so the sentry could handle the OOM in GR0, falling back to returning ENOMEM only when injection was not possible.

This patch turns to always return ENOMEM in this case.

@tianyuzhou95 tianyuzhou95 requested a review from btw616 June 12, 2026 03:20

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request removes the guest OOM exception injection mechanism when EPT page allocation fails with -ENOMEM, opting instead to return the error directly to the host. The reviewer identified an issue where setting vcpu->status to SLIMVM_RET_EPT_VIOLATION is a dead store, as it is unconditionally overwritten with SLIMVM_RET_INTERNAL_ERROR in vmx_launch due to the negative return value.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread vmx.c Outdated
Signed-off-by: Tianyu Zhou <albert.zty@antgroup.com>
@tianyuzhou95 tianyuzhou95 force-pushed the albert/remove-oom-inject branch from 2530773 to 15769d7 Compare June 12, 2026 13:28
@tianyuzhou95 tianyuzhou95 merged commit 70cfa4e into antgroup:main Jun 13, 2026
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