Skip to content

KVM: Dynamically size IPA and fault blocks on ARM64#13581

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test/cl938863212
Jul 8, 2026
Merged

KVM: Dynamically size IPA and fault blocks on ARM64#13581
copybara-service[bot] merged 1 commit into
masterfrom
test/cl938863212

Conversation

@copybara-service

Copy link
Copy Markdown

KVM: Dynamically size IPA and fault blocks on ARM64

KVM on ARM64 defaults to 40-bit IPA, but can be dynamically limited by the host.
Previously, we assumed a fixed 40-bit IPA and used large fault block sizes (up
to 4TB), which could lead to GPAs exceeding the guest's IPA space. This caused
sentry to crash with "set memory region failed" (EFAULT/EINVAL) during platform
initialization.

Fix this by:

  1. Dynamically detecting host max IPA and limiting PhysicalAddressBits (up to
    40).
  2. Reducing faultBlockSize to 1GB (from 8GB) on ARM64 if IPA is <= 39-bit to
    pack GPAs tighter.

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Jun 27, 2026
KVM on ARM64 defaults to 40-bit IPA, but can be dynamically limited by the host.
Previously, we assumed a fixed 40-bit IPA and used large fault block sizes (up
to 4TB), which could lead to GPAs exceeding the guest's IPA space. This caused
sentry to crash with "set memory region failed" (EFAULT/EINVAL) during platform
initialization.

Fix this by:
1. Dynamically detecting host max IPA and limiting PhysicalAddressBits (up to
   40).
2. Reducing faultBlockSize to 1GB (from 8GB) on ARM64 if IPA is <= 39-bit to
   pack GPAs tighter.

PiperOrigin-RevId: 944592838
@copybara-service copybara-service Bot merged commit cc40923 into master Jul 8, 2026
1 check was pending
@copybara-service copybara-service Bot deleted the test/cl938863212 branch July 8, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant