Repository navigation
Conversation
Select native Apple GIC and SMC PSCI for nested configurations, supply trapped register mappings, and align DT/ACPI interrupt descriptions. Use CNTHP and the physical counter in EL2 firmware while preserving the EL1 virtual timer path. Document host and GIC ITS requirements. Validated with a source-built 7.2.20 headless host and ARM64 firmware: Debian initializes KVM, and an explicit -accel kvm Linux L2 boots and powers off. A cold nested-off boot also succeeds. Refs VirtualBox#915
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enabling
--nested-hw-virt onon an Apple M3 Pro with stock VirtualBox 7.2.20 fails at PC=0 withVERR_NOT_SUPPORTEDwhile synchronizing CNTHP registers. With these integration changes, a source-built headless VirtualBox and ARM64 firmware boot Debian at EL2, initialize KVM, and boot and power off an ARM64 Linux L2 using explicit-accel kvm.Refs #915, which contains the source-build QMP result, nested console output, L1 KVM initialization, and nested-off evidence.
This draft connects the existing native Apple GIC backend to nested EL2:
CNTHCTL_EL2andMDCCINT_EL1, with write-ignore masks of zero, plus a RAZ/WILORC_EL1entry. Existing debug-register mappings remain intact.Validation completed on the official 7.2.20 source release, Apple M3 Pro, macOS 26.7:
VBoxDD2.6.12.111+deb13-arm64, two vCPUs at EL2; KVM initialization and/dev/kvm.query-kvmreturned{"enabled":true,"present":true}, bothNESTED_KVM_LINUX_BOOT_OKandNESTED_KVM_TEST_COMPLETEappeared, and QEMU exited 0 after poweroff.HYP mode not available.The patch applies to this PR's base
a85a9b457af490dade7671c2c99de1db899804e1; that main revision has not been built or runtime-tested. Preparing this branch added only comments and whitespace changes to the tested patch.git diff --checkpasses. Thescmattempt could not establish a style pass because SVN is unavailable in this checkout.To validate manually:
build-efi-arm64target. Ensure the newly builtQEMU_EFI.fdis embedded inVBoxDD2; the ordinary host build can otherwise use the prebuilt firmware.--nested-hw-virt on, boot Debian, and check EL2/KVM initialization and/dev/kvm.qemu-system-aarch64 -accel kvm -machine virt,gic-version=3 -cpu host -smp 1 -m 256, a serial console, and QMP. Requirequery-kvmenabled/present, actual L2 execution, and normal shutdown. The complete tested command and output are in [Req]: Darwin/ARM64 nested KVM: source-built proof and integration fixes #915.Build/runtime qualifications: the tested local macOS build required separate build-tool adaptations and two XPCOM fixes from Roberto Nibali's #747 (
cc84c586c87ca34b2ac0a7ce6bad147a83afb0aa,d10be7f8f93339c744aaf6c52527990024958ef7). Those changes are excluded from this PR and are not attributed to this contribution. Successful source runtime tests usedVBoxInternal/PDM/AsyncCompletion/File/IoMgr=Simpleafter an async-I/O stall. The installedVBoxManageserved only as the guest-control IPC client because source CLI password-file authentication failed; the executing Headless, VBoxC, VMM, and embedded firmware were all source-built.Review is still needed for register masks/feature exposure, timer/PPI ownership, compatibility gating, and saved-state handling. An L1 warning concerning PPI INTID 30 remains. Individual necessity of the native-GIC IRQ/FIQ guard was not isolated by an ablation test. No L2 SMP, stress, save/restore, snapshot, migration, or other host/OS coverage is claimed. The ACPI timer correction also affects ARM configurations outside Darwin nested mode and needs broader validation. No public API or
.xidlchanges.OCA status: formal signing/verification is pending; the OCA portal returned a technical error. This is a draft for technical review, not ready for acceptance under
CONTRIBUTING.md.