/packages/modules/Virtualization/tests/testapk/src/java/com/android/microdroid/test/ |
D | MicrodroidTests.java | 188 VirtualMachine vm = forceCreateNewVirtualMachine("test_vm", config); in createAndConnectToVmHelper() local 193 vm, in createAndConnectToVmHelper() 236 VirtualMachine vm = in vmAttestationWhenRemoteAttestationIsNotSupported() local 243 runVmAttestationService(TAG, vm, challenge, VM_ATTESTATION_MESSAGE.getBytes()); in vmAttestationWhenRemoteAttestationIsNotSupported() 262 VirtualMachine vm = in vmAttestationWithVendorPartitionWhenSupported() local 264 checkVmAttestationWithValidChallenge(vm); in vmAttestationWithVendorPartitionWhenSupported() 281 VirtualMachine vm = in vmAttestationWhenRemoteAttestationIsSupported() local 289 TAG, vm, invalidChallenge, VM_ATTESTATION_MESSAGE.getBytes()); in vmAttestationWhenRemoteAttestationIsSupported() 294 checkVmAttestationWithValidChallenge(vm); in vmAttestationWhenRemoteAttestationIsSupported() 297 private void checkVmAttestationWithValidChallenge(VirtualMachine vm) throws Exception { in checkVmAttestationWithValidChallenge() argument [all …]
|
/packages/modules/Virtualization/java/framework/src/android/system/virtualmachine/ |
D | VirtualMachineManager.java | 236 VirtualMachine vm = VirtualMachine.create(mContext, name, config); in createLocked() local 237 mVmsByName.put(name, new WeakReference<>(vm)); in createLocked() 238 return vm; in createLocked() 268 VirtualMachine vm = getVmByName(name); in getLocked() local 269 if (vm != null) return vm; in getLocked() 271 vm = VirtualMachine.load(mContext, name); in getLocked() 272 if (vm != null) { in getLocked() 273 mVmsByName.put(name, new WeakReference<>(vm)); in getLocked() 275 return vm; in getLocked() 297 VirtualMachine vm; in importFromDescriptor() local [all …]
|
D | VirtualMachineCallback.java | 141 void onPayloadStarted(@NonNull VirtualMachine vm); in onPayloadStarted() argument 147 void onPayloadReady(@NonNull VirtualMachine vm); in onPayloadReady() argument 150 void onPayloadFinished(@NonNull VirtualMachine vm, int exitCode); in onPayloadFinished() argument 153 void onError(@NonNull VirtualMachine vm, @ErrorCode int errorCode, @NonNull String message); in onError() argument 156 void onStopped(@NonNull VirtualMachine vm, @StopReason int reason); in onStopped() argument
|
D | VirtualMachine.java | 473 VirtualMachine vm; in fromDescriptor() local 476 vm = new VirtualMachine(context, name, config, VirtualizationService.getInstance()); in fromDescriptor() 477 config.serialize(vm.mConfigFilePath); in fromDescriptor() 479 vm.mInstanceFilePath.createNewFile(); in fromDescriptor() 483 vm.importInstanceFrom(vmDescriptor.getInstanceImgFd()); in fromDescriptor() 487 vm.mEncryptedStoreFilePath.createNewFile(); in fromDescriptor() 492 vm.importEncryptedStoreFrom(vmDescriptor.getEncryptedStoreFd()); in fromDescriptor() 494 if (vm.mInstanceIdPath != null) { in fromDescriptor() 495 vm.importInstanceIdFrom(vmDescriptor.getInstanceIdFd()); in fromDescriptor() 496 vm.claimInstance(); in fromDescriptor() [all …]
|
/packages/modules/Virtualization/tests/helper/src/java/com/android/microdroid/test/device/ |
D | MicrodroidDeviceTestBase.java | 300 public void runToFinish(String logTag, VirtualMachine vm) in runToFinish() argument 302 vm.setCallback(mExecutorService, this); in runToFinish() 303 vm.run(); in runToFinish() 304 if (vm.getConfig().isVmOutputCaptured()) { in runToFinish() 306 logTag, vm.getConsoleOutput(), "Console", mConsoleOutput); in runToFinish() 307 logVmOutputAndMonitorBootTimeMetrics(logTag, vm.getLogOutput(), "Log", mLogOutput); in runToFinish() 340 protected void forceStop(VirtualMachine vm) { in forceStop() argument 342 vm.stop(); in forceStop() 349 public void onPayloadStarted(VirtualMachine vm) {} in onPayloadStarted() argument 352 public void onPayloadReady(VirtualMachine vm) {} in onPayloadReady() argument [all …]
|
/packages/modules/Virtualization/tests/benchmark/src/java/com/android/microdroid/benchmark/ |
D | BenchmarkVmListener.java | 40 void onPayloadReady(VirtualMachine vm, IBenchmarkService benchmarkService) in onPayloadReady() argument 51 public final void onPayloadReady(VirtualMachine vm) { in onPayloadReady() argument 56 vm.connectToVsockServer(IBenchmarkService.PORT)); in onPayloadReady() 59 mListener.onPayloadReady(vm, benchmarkService); in onPayloadReady() 64 forceStop(vm); in onPayloadReady() 68 public void onError(VirtualMachine vm, int errorCode, String message) { in onError() argument 77 public void runToFinish(String logTag, VirtualMachine vm) in runToFinish() argument 80 super.runToFinish(logTag, vm); in runToFinish()
|
D | MicrodroidBenchmarks.java | 356 VirtualMachine vm = forceCreateNewVirtualMachine(vmName, config); in testVsockTransferFromHostToVM() local 357 BenchmarkVmListener.create(new VsockListener(transferRates, port)).runToFinish(TAG, vm); in testVsockTransferFromHostToVM() 387 VirtualMachine vm = forceCreateNewVirtualMachine(vmName, config); in testVirtioBlkReadRate() local 389 .runToFinish(TAG, vm); in testVirtioBlkReadRate() 416 public void onPayloadReady(VirtualMachine vm, IBenchmarkService benchmarkService) in onPayloadReady() argument 529 VirtualMachine vm = forceCreateNewVirtualMachine(vmName, config); in testMemoryUsage() local 534 BenchmarkVmListener.create(listener).runToFinish(TAG, vm); in testMemoryUsage() 592 public void onPayloadReady(VirtualMachine vm, IBenchmarkService service) in onPayloadReady() argument 615 VirtualMachine vm = forceCreateNewVirtualMachine(vmName, config); in testMemoryReclaim() local 617 BenchmarkVmListener.create(listener).runToFinish(TAG, vm); in testMemoryReclaim() [all …]
|
/packages/services/Car/service/jni/evs/ |
D | CarEvsService.cpp | 153 JavaVM* vm = nullptr; in createServiceHandle() local 154 env->GetJavaVM(&vm); in createServiceHandle() 155 if (vm == nullptr) { in createServiceHandle() 160 return reinterpret_cast<jlong>(EvsServiceContext::create(vm, clazz)); in createServiceHandle() 165 JavaVM* vm = nullptr; in createServiceHandleForTest() local 166 env->GetJavaVM(&vm); in createServiceHandleForTest() 167 if (vm == nullptr) { in createServiceHandleForTest() 173 EvsServiceContext::create(vm, clazz, std::make_unique<MockEvsServiceFactory>(), in createServiceHandleForTest() 204 jint initializeCarEvsService(JavaVM* vm) { in initializeCarEvsService() argument 206 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { in initializeCarEvsService()
|
/packages/modules/Virtualization/demo_native/ |
D | main.cpp | 223 std::shared_ptr<IVirtualMachine> vm; in create_virtual_machine() local 230 ScopedAStatus ret = service.createVm(config, console_out_fd, console_in_fd, log_fd, &vm); in create_virtual_machine() 234 return vm; in create_virtual_machine() 241 Callback(const std::shared_ptr<IVirtualMachine>& vm) : mVm(vm) {} in Callback() argument 307 Result<std::shared_ptr<Callback>> start_virtual_machine(std::shared_ptr<IVirtualMachine> vm) { in start_virtual_machine() argument 308 std::shared_ptr<Callback> cb = SharedRefBase::make<Callback>(vm); in start_virtual_machine() 309 ScopedAStatus ret = vm->registerCallback(cb); in start_virtual_machine() 313 ret = vm->start(); in start_virtual_machine() 325 Result<std::shared_ptr<ITestService>> connect_to_vm_payload(std::shared_ptr<IVirtualMachine> vm) { in connect_to_vm_payload() argument 333 std::shared_ptr<IVirtualMachine> vm = in connect_to_vm_payload() local [all …]
|
/packages/modules/Virtualization/vm/ |
D | Android.bp | 6 name: "vm.defaults", 7 crate_name: "vm", 34 name: "vm", 35 defaults: ["vm.defaults"], 42 name: "vm.test", 43 defaults: ["vm.defaults"],
|
D | vm_shell.sh | 54 …local available_cids=$(adb shell /apex/com.android.virt/bin/vm list | awk 'BEGIN { FS="[:,]" } /ci… 99 adb shell /apex/com.android.virt/bin/vm run-microdroid "${passthrough_args}" & 104 adb shell /apex/com.android.virt/bin/vm run-microdroid "${passthrough_args}"
|
/packages/services/Car/service/jni/ |
D | JniLoader.cpp | 23 extern jint initializeCarEvsService(JavaVM* vm); 29 JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/) { in JNI_OnLoad() argument 31 initializeCarEvsService(vm); in JNI_OnLoad() 36 JNIEXPORT void JNI_OnUnload(JavaVM* vm, void* /*reserved*/) { in JNI_OnUnload() argument 38 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { in JNI_OnUnload()
|
/packages/modules/Virtualization/rialto/tests/ |
D | test.rs | 70 let mut vm = start_service_vm(vm_type)?; in check_processing_requests() localVariable 72 check_processing_reverse_request(&mut vm)?; in check_processing_requests() 73 let key_pair = check_processing_generating_key_pair_request(&mut vm)?; in check_processing_requests() 74 check_processing_generating_certificate_request(&mut vm, &key_pair.maced_public_key)?; in check_processing_requests() 75 check_attestation_request(&mut vm, &key_pair, vm_type)?; in check_processing_requests() 79 fn check_processing_reverse_request(vm: &mut ServiceVm) -> Result<()> { in check_processing_reverse_request() 83 let response = vm.process_request(request)?; in check_processing_reverse_request() 91 fn check_processing_generating_key_pair_request(vm: &mut ServiceVm) -> Result<EcdsaP256KeyPair> { in check_processing_generating_key_pair_request() 94 let response = vm.process_request(request)?; in check_processing_generating_key_pair_request() 112 vm: &mut ServiceVm, in check_processing_generating_certificate_request() [all …]
|
/packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/ |
D | VpnUtilsTest.java | 35 final VpnManager vm = mock(VpnManager.class); in testIsAlwaysOnVpnSet() local 36 when(vm.getAlwaysOnVpnPackageForUser(0)).thenReturn("com.example.vpn"); in testIsAlwaysOnVpnSet() 37 assertThat(VpnUtils.isAlwaysOnVpnSet(vm, 0)).isTrue(); in testIsAlwaysOnVpnSet() 39 when(vm.getAlwaysOnVpnPackageForUser(0)).thenReturn(null); in testIsAlwaysOnVpnSet() 40 assertThat(VpnUtils.isAlwaysOnVpnSet(vm, 0)).isFalse(); in testIsAlwaysOnVpnSet()
|
/packages/modules/Virtualization/service_vm/manager/src/ |
D | lib.rs | 128 vm: VmInstance, field 137 let vm = protected_vm_instance(instance_img_path)?; in start() localVariable 139 let vm = Self::start_vm(vm, VmType::ProtectedVm)?; in start() localVariable 140 Ok(vm) in start() 146 pub fn start_vm(vm: VmInstance, vm_type: VmType) -> Result<Self> { in start_vm() 151 vm.start().context("Failed to start service VM")?; in start_vm() 159 peer_addr.cid() == u32::try_from(vm.cid()).unwrap(), in start_vm() 162 vm.cid() in start_vm() 167 Ok(Self { vsock_stream, vm }) in start_vm() 196 self.vm in shutdown()
|
/packages/providers/MediaProvider/jni/ |
D | jni_init.cpp | 23 int register_android_providers_media_FuseDaemon(JavaVM* vm, JNIEnv* env); 26 extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) { in JNI_OnLoad() argument 28 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { in JNI_OnLoad() 33 mediaprovider::register_android_providers_media_FuseDaemon(vm, env); in JNI_OnLoad()
|
/packages/modules/Virtualization/service_vm/test_apk/src/java/com/android/virt/vm_attestation/testapp/ |
D | VmAttestationTests.java | 81 VirtualMachine vm = forceCreateNewVirtualMachine("attestation_client", config); in requestingAttestationSucceeds() local 83 vm.enableTestAttestation(); in requestingAttestationSucceeds() 89 public void onPayloadReady(VirtualMachine vm) { in requestingAttestationSucceeds() 94 vm.connectToVsockServer(IAttestationService.PORT)); in requestingAttestationSucceeds() 102 forceStop(vm); in requestingAttestationSucceeds() 107 listener.runToFinish(TAG, vm); in requestingAttestationSucceeds()
|
/packages/modules/ImsMedia/service/src/com/android/telephony/imsmedia/lib/libimsmedia/ |
D | libimsmedia.cpp | 26 extern jint ImsMediaServiceJni_OnLoad(JavaVM* vm, JNIEnv* env); 28 jint JNI_OnLoad(JavaVM* vm, void* reserved) in JNI_OnLoad() argument 36 if (vm->GetEnv((void**)&env, IMS_MEDIA_JNI_VERSION) != JNI_OK) in JNI_OnLoad() 44 if (ImsMediaServiceJni_OnLoad(vm, env) < 0) in JNI_OnLoad()
|
/packages/modules/Virtualization/vmclient/src/ |
D | lib.rs | 124 pub vm: Strong<dyn IVirtualMachine>, field 172 let vm = in create() localVariable 175 let cid = vm.getCid()?; in create() 183 vm.registerCallback(&callback)?; in create() 184 let death_recipient = wait_for_binder_death(&mut vm.as_binder(), state.clone())?; in create() 186 Ok(Self { vm, cid, state, _death_recipient: death_recipient }) in create() 191 self.vm.start() in start() 201 self.vm.getState() in state() 246 match self.vm.connectVsock(port as i32) { in connect_service()
|
/packages/modules/Virtualization/demo/java/com/android/microdroid/demo/ |
D | MainActivity.java | 172 public void onPayloadStarted(VirtualMachine vm) {} in run() 175 public void onPayloadReady(VirtualMachine vm) { in run() 183 mService.execute(() -> testVmService(vm)); in run() 186 private void testVmService(VirtualMachine vm) { in run() 189 binder = vm.connectToVsockServer(ITestService.PORT); in run() 217 public void onPayloadFinished(VirtualMachine vm, int exitCode) { in run() 227 public void onError(VirtualMachine vm, int errorCode, String message) { in run() 238 public void onStopped(VirtualMachine vm, int reason) { in run()
|
/packages/services/Car/libs/car-evs-helper-lib/jni/ |
D | CarEvsBufferRenderer.cpp | 75 JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/) { in JNI_OnLoad() argument 77 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { in JNI_OnLoad() 101 JNIEXPORT void JNI_OnUnload(JavaVM* vm, void* /*reserved*/) { in JNI_OnUnload() argument 103 if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { in JNI_OnUnload()
|
/packages/modules/Virtualization/virtualizationmanager/src/ |
D | aidl.rs | 191 for vm in vms { in dump() 192 writeln!(writer, "VM CID: {}", vm.cid).or(Err(StatusCode::UNKNOWN_ERROR))?; in dump() 193 writeln!(writer, "\tState: {:?}", vm.vm_state.lock().unwrap()) in dump() 195 writeln!(writer, "\tPayload state {:?}", vm.payload_state()) in dump() 197 writeln!(writer, "\tProtected: {}", vm.protected).or(Err(StatusCode::UNKNOWN_ERROR))?; in dump() 198 writeln!(writer, "\ttemporary_directory: {}", vm.temporary_directory.to_string_lossy()) in dump() 200 writeln!(writer, "\trequester_uid: {}", vm.requester_uid) in dump() 202 writeln!(writer, "\trequester_debug_pid: {}", vm.requester_debug_pid) in dump() 1335 fn add_vm(&mut self, vm: Weak<VmInstance>) { in add_vm() 1337 self.vms.retain(|vm| vm.strong_count() > 0); in add_vm() [all …]
|
/packages/modules/Virtualization/tests/vmshareapp/src/java/com/android/microdroid/test/sharevm/ |
D | VmShareServiceImpl.java | 114 public void onPayloadStarted(VirtualMachine vm) { in startVm() 119 public void onPayloadReady(VirtualMachine vm) { in startVm() 124 public void onPayloadFinished(VirtualMachine vm, int exitCode) { in startVm() 129 public void onError(VirtualMachine vm, int errorCode, String message) { in startVm() 135 public void onStopped(VirtualMachine vm, int reason) { in startVm()
|
/packages/modules/Virtualization/java/jni/ |
D | android_system_virtualmachine_VirtualMachine.cpp | 57 auto vm = IVirtualMachine::fromBinder(SpAIBinder{AIBinder_fromJavaBinder(env, vmBinder)}); in Java_android_system_virtualmachine_VirtualMachine_nativeConnectToVsockServer() local 59 std::tuple args{env, vm.get(), port}; in Java_android_system_virtualmachine_VirtualMachine_nativeConnectToVsockServer() 63 auto [env, vm, port] = *static_cast<Args*>(param); in Java_android_system_virtualmachine_VirtualMachine_nativeConnectToVsockServer() 66 if (auto status = vm->connectVsock(port, &fd); !status.isOk()) { in Java_android_system_virtualmachine_VirtualMachine_nativeConnectToVsockServer()
|
/packages/modules/Virtualization/docs/debug/ |
D | gdb_kernel.md | 8 You can do this by passing `--gdb <port>` argument to the `vm run`, `vm run-app` 9 and `vm run-microdroid` commands. The `crosvm` will start the gdb server on the 17 adb shell /apex/com.android.virt/bin/vm run-microdroid --gdb 3456
|