Loading virtualization/capabilities_service/README.md 0 → 100644 +9 −0 Original line number Diff line number Diff line The IVmCapabilitiesService HAL is used in a flow to grant a pVM a capability to issue vendor-specific SMCs. For more information see: TODO(ioffe): link the docs Here is a brief overview of the subdirectories structure: * default/ - a reference implementation of the HAL that partners can integrate in their products. * noop/ - a no-op implementation is used in cuttlefish for mixed build testing. * vts/ - VTS tests for this HAL. virtualization/capabilities_service/noop/Android.bp 0 → 100644 +34 −0 Original line number Diff line number Diff line package { default_team: "trendy_team_virtualization", default_applicable_licenses: ["Android-Apache-2.0"], } rust_binary { name: "android.hardware.virtualization.capabilities.capabilities_service-noop", relative_install_path: "hw", vendor: true, installable: true, prefer_rlib: true, rustlibs: [ "android.hardware.virtualization.capabilities.capabilities_service-V1-rust", "libanyhow", "libandroid_logger", "libbinder_rs", "liblog_rust", ], srcs: [ "src/main.rs", ], init_rc: [ "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.rc", ], vintf_fragment_modules: [ "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml", ], } vintf_fragment { name: "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml", src: "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml", vendor: true, } virtualization/capabilities_service/noop/android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.rc 0 → 100644 +6 −0 Original line number Diff line number Diff line service vendor.vm_capabilities_service /vendor/bin/hw/android.hardware.virtualization.capabilities.capabilities_service-noop interface aidl android.hardware.virtualization.capabilities.IVmCapabilitiesService/noop class hal disabled user nobody group nobody virtualization/capabilities_service/noop/android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml 0 → 100644 +10 −0 Original line number Diff line number Diff line <manifest version="1.0" type="device"> <hal format="aidl"> <name>android.hardware.virtualization.capabilities</name> <version>1</version> <interface> <name>IVmCapabilitiesService</name> <instance>noop</instance> </interface> </hal> </manifest> virtualization/capabilities_service/noop/src/aidl.rs 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ //! No-op implementation of the IVmCapabilitiesService AIDL interface. use android_hardware_virtualization_capabilities_capabilities_service::aidl::android::hardware::virtualization::capabilities::IVmCapabilitiesService::IVmCapabilitiesService; use binder::{Interface, ParcelFileDescriptor}; use log::info; /// No-op implementation of IVmCapabilitiesService pub struct NoOpVmCapabilitiesService {} impl NoOpVmCapabilitiesService { pub fn init() -> NoOpVmCapabilitiesService { let service = NoOpVmCapabilitiesService {}; service } } impl Interface for NoOpVmCapabilitiesService {} impl IVmCapabilitiesService for NoOpVmCapabilitiesService { fn grantAccessToVendorTeeServices(&self, vm_fd: &ParcelFileDescriptor, tee_services: &[String]) -> binder::Result<()> { info!("received {vm_fd:?} {tee_services:?}"); Ok(()) } } Loading
virtualization/capabilities_service/README.md 0 → 100644 +9 −0 Original line number Diff line number Diff line The IVmCapabilitiesService HAL is used in a flow to grant a pVM a capability to issue vendor-specific SMCs. For more information see: TODO(ioffe): link the docs Here is a brief overview of the subdirectories structure: * default/ - a reference implementation of the HAL that partners can integrate in their products. * noop/ - a no-op implementation is used in cuttlefish for mixed build testing. * vts/ - VTS tests for this HAL.
virtualization/capabilities_service/noop/Android.bp 0 → 100644 +34 −0 Original line number Diff line number Diff line package { default_team: "trendy_team_virtualization", default_applicable_licenses: ["Android-Apache-2.0"], } rust_binary { name: "android.hardware.virtualization.capabilities.capabilities_service-noop", relative_install_path: "hw", vendor: true, installable: true, prefer_rlib: true, rustlibs: [ "android.hardware.virtualization.capabilities.capabilities_service-V1-rust", "libanyhow", "libandroid_logger", "libbinder_rs", "liblog_rust", ], srcs: [ "src/main.rs", ], init_rc: [ "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.rc", ], vintf_fragment_modules: [ "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml", ], } vintf_fragment { name: "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml", src: "android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml", vendor: true, }
virtualization/capabilities_service/noop/android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.rc 0 → 100644 +6 −0 Original line number Diff line number Diff line service vendor.vm_capabilities_service /vendor/bin/hw/android.hardware.virtualization.capabilities.capabilities_service-noop interface aidl android.hardware.virtualization.capabilities.IVmCapabilitiesService/noop class hal disabled user nobody group nobody
virtualization/capabilities_service/noop/android.hardware.virtualization.capabilities.no_op_vm_capabilities_service.xml 0 → 100644 +10 −0 Original line number Diff line number Diff line <manifest version="1.0" type="device"> <hal format="aidl"> <name>android.hardware.virtualization.capabilities</name> <version>1</version> <interface> <name>IVmCapabilitiesService</name> <instance>noop</instance> </interface> </hal> </manifest>
virtualization/capabilities_service/noop/src/aidl.rs 0 → 100644 +42 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ //! No-op implementation of the IVmCapabilitiesService AIDL interface. use android_hardware_virtualization_capabilities_capabilities_service::aidl::android::hardware::virtualization::capabilities::IVmCapabilitiesService::IVmCapabilitiesService; use binder::{Interface, ParcelFileDescriptor}; use log::info; /// No-op implementation of IVmCapabilitiesService pub struct NoOpVmCapabilitiesService {} impl NoOpVmCapabilitiesService { pub fn init() -> NoOpVmCapabilitiesService { let service = NoOpVmCapabilitiesService {}; service } } impl Interface for NoOpVmCapabilitiesService {} impl IVmCapabilitiesService for NoOpVmCapabilitiesService { fn grantAccessToVendorTeeServices(&self, vm_fd: &ParcelFileDescriptor, tee_services: &[String]) -> binder::Result<()> { info!("received {vm_fd:?} {tee_services:?}"); Ok(()) } }