-
Notifications
You must be signed in to change notification settings - Fork 164
openhcl: Add HvSintEnabled flag to UEFI config for aarch64 #2715
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
base: main
Are you sure you want to change the base?
Conversation
Wire the HvSintEnabled flag (bit 29) through the GET protocol pipeline to enable PPI-based SINT ACPI device for ARM64 Linux L1VH. Changes: - config.rs: Add bit 29 to Flags, reduce reserved from 35 to 34 - dps_json.rs: Add to HclDevicePlatformSettingsV2Static JSON schema - api.rs: Add to platform_settings::General struct - client.rs: Wire JSON to API conversion - loader/mod.rs: Set flag in write_uefi_config() - worker.rs: Add to exhaustive pattern match - get_resources: Add to GuestEmulationDeviceHandle - guest_emulation_device: Add to GuestConfig and resolver - openvmm_entry: Add to CLI config (default false) - petri: Add to test framework config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR plumbs a new HvSintEnabled flag from host-provided device platform settings through GET into the UEFI configuration flags, enabling an ACPI device to reserve an interrupt for hypervisor SINTs (primarily for aarch64/ARM64 Linux L1VH scenarios).
Changes:
- Extend the UEFI
Flagsbitfield with a newhv_sint_enabledbit and wire it from the host’s Device Platform Settings through GET’s JSON (HclDevicePlatformSettingsV2Static) and transport APIs. - Update GET host- and device-side configurations (
GuestConfig,GuestEmulationDeviceHandle, resolver, transport client) and OpenVMM/Petri construction paths to carry thehv_sint_enabledboolean, defaulting it tofalsewhere it is not yet user-configurable. - Integrate
hv_sint_enabledinto OpenHCL’s loader so that the new flag is reflected in the UEFI configuration blob while keeping isolated configuration validation unchanged (the new flag is currently ignored for isolation checks).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
vm/loader/src/uefi/config.rs |
Adds hv_sint_enabled to the UEFI Flags bitfield and adjusts the reserved bit count to keep the layout at 64 bits. |
vm/devices/get/guest_emulation_transport/src/api.rs |
Extends platform_settings::General with an hv_sint_enabled field so DPS data can expose this flag to Underhill. |
vm/devices/get/guest_emulation_transport/src/client.rs |
Wires json.v2.r#static.hv_sint_enabled into platform_settings::General::hv_sint_enabled when reading DPS from GET. |
vm/devices/get/get_protocol/src/dps_json.rs |
Adds hv_sint_enabled (with #[serde(default)]) to HclDevicePlatformSettingsV2Static to carry the flag over JSON while maintaining backward compatibility. |
vm/devices/get/get_resources/src/lib.rs |
Adds hv_sint_enabled to ged::GuestEmulationDeviceHandle so the host can configure the flag for GET. |
vm/devices/get/guest_emulation_device/src/lib.rs |
Extends GuestConfig with hv_sint_enabled and includes it when emitting DPS v2 JSON (HclDevicePlatformSettingsV2Static). |
vm/devices/get/guest_emulation_device/src/resolver.rs |
Forwards resource.hv_sint_enabled from the GET resource handle into GuestConfig used by the device implementation. |
vm/devices/get/guest_emulation_device/src/test_utilities.rs |
Initializes the new GuestConfig::hv_sint_enabled field to false in test helper configuration. |
vm/devices/get/get_resources/src/lib.rs |
Documents and exposes hv_sint_enabled on the host-facing GuestEmulationDeviceHandle resource. |
petri/src/vm/openvmm/construct.rs |
Sets hv_sint_enabled to false in the Petri/OpenVMM test GED handle configuration. |
openvmm/openvmm_entry/src/lib.rs |
Sets hv_sint_enabled to false when constructing the GED handle from the command line VM configuration. |
openhcl/underhill_core/src/worker.rs |
Updates the General { ... } pattern in validate_isolated_configuration to bind and currently ignore hv_sint_enabled. |
openhcl/underhill_core/src/loader/mod.rs |
Propagates platform_config.general.hv_sint_enabled to the UEFI config via flags.set_hv_sint_enabled(...) in the generated BIOS/UEFI blob. |
|
Can you add a vmm_test for this somehow, that we can enable later when we pickup host changes? |
adding on to this, if this is pursued we'd have to finish the plumbing on the openvmm + petri side with the new flag. A petri test would just need to turn this flag on for a linux ARM64 guest, and then maybe additional petri agent stuff to interact with the sint |
Wire the UEFI HvSintEnabled flag on aarch64. This flag enables an ACPI device whose purpose is to reserve an interrupt for a VMM to use for hypervisor SINTs.