├── .cargo └── config.toml ├── .config └── nextest.toml ├── .devcontainer └── devcontainer.json ├── .flowey.toml ├── .gdbinit ├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── CODEOWNERS ├── labeler.yml ├── scripts │ └── refresh_mirror │ │ ├── refresh-mirror.py │ │ └── requirements.txt └── workflows │ ├── labeler.yml │ ├── openvmm-ci.yaml │ ├── openvmm-docs-ci.yaml │ ├── openvmm-docs-pr.yaml │ ├── openvmm-pr.yaml │ ├── refresh-mirror.yml │ └── upload-petri-results.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTE.MD ├── Cargo.lock ├── Cargo.toml ├── Guide ├── .gitignore ├── book.toml ├── mdbook-openvmm-shim │ ├── Cargo.toml │ ├── README.md │ └── src │ │ └── main.rs └── src │ ├── SUMMARY.md │ ├── dev_guide │ ├── contrib.md │ ├── contrib │ │ ├── code.md │ │ ├── code_review.md │ │ ├── guide.md │ │ ├── pr.md │ │ └── release.md │ ├── dev_tools.md │ ├── dev_tools │ │ ├── guest_test_uefi.md │ │ ├── hypestv.md │ │ ├── vmgstool.md │ │ ├── xflowey.md │ │ └── xtask.md │ ├── getting_started.md │ ├── getting_started │ │ ├── build_ohcl_kernel.md │ │ ├── build_openhcl.md │ │ ├── build_openvmm.md │ │ ├── devcontainer.md │ │ ├── linux.md │ │ ├── suggested_dev_env.md │ │ └── windows.md │ ├── tests.md │ └── tests │ │ ├── fuzzing.md │ │ ├── fuzzing │ │ ├── _images │ │ │ ├── fuzz_abstraction_example.png │ │ │ └── fuzz_lcov_example.png │ │ ├── running.md │ │ └── writing.md │ │ ├── unit.md │ │ ├── vmm.md │ │ └── vmm │ │ └── azure_images.md │ ├── index.md │ ├── reference │ ├── architecture.md │ ├── architecture │ │ ├── _images │ │ │ ├── openhcl-accelnet.png │ │ │ ├── openhcl-synthetic-nw.png │ │ │ └── openhcl.png │ │ ├── openhcl.md │ │ └── openvmm.md │ ├── dev_feats │ │ ├── gdbstub.md │ │ └── kdnet.md │ ├── devices │ │ └── firmware │ │ │ ├── mu_msvm_uefi.md │ │ │ └── pcat_bios.md │ ├── openhcl.md │ ├── openhcl │ │ ├── diag.md │ │ └── diag │ │ │ ├── cvm_restrictions.md │ │ │ ├── ohcldiag_dev.md │ │ │ ├── ohcldiag_dev │ │ │ ├── pcap.md │ │ │ └── perf.md │ │ │ └── tracing.md │ ├── openvmm.md │ └── openvmm │ │ ├── graphical_console.md │ │ ├── logging.md │ │ ├── management.md │ │ └── management │ │ ├── cli.md │ │ ├── grpc.md │ │ └── interactive_console.md │ ├── rustdoc.md │ └── user_guide │ ├── openhcl.md │ ├── openhcl │ ├── next_steps.md │ ├── run.md │ ├── run │ │ ├── _images │ │ │ └── exampleWindows.png │ │ ├── hyperv.md │ │ ├── openvmm.md │ │ └── openvmm_linux.md │ └── troubleshooting.md │ ├── openvmm.md │ └── openvmm │ ├── next_steps.md │ ├── run.md │ └── troubleshooting.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md ├── build_support ├── macos │ ├── entitlements.xml │ └── sign_and_run.sh ├── setup_windows_cross.sh ├── underhill_cross │ ├── aarch64-underhill-musl-gcc │ ├── musl-gcc.specs │ └── x86_64-underhill-musl-gcc └── windows_cross │ ├── aarch64-clang-cl │ ├── aarch64-lld-link │ ├── aarch64-llvm-dlltool │ ├── aarch64-llvm-lib │ ├── aarch64-llvm-rc │ ├── aarch64-midlrt.exe │ ├── config.toml │ ├── cross_tool.py │ ├── x86_64-clang-cl │ ├── x86_64-lld-link │ ├── x86_64-llvm-dlltool │ ├── x86_64-llvm-lib │ ├── x86_64-llvm-rc │ └── x86_64-midlrt.exe ├── clippy.toml ├── flowey ├── flowey │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── flowey_cli │ ├── Cargo.toml │ └── src │ │ ├── cli │ │ ├── debug │ │ │ ├── dump_stage0_dag.rs │ │ │ ├── interrogate.rs │ │ │ ├── list_nodes.rs │ │ │ ├── list_patches.rs │ │ │ └── mod.rs │ │ ├── exec_snippet.rs │ │ ├── mod.rs │ │ ├── pipeline.rs │ │ ├── regen.rs │ │ └── var_db.rs │ │ ├── flow_resolver │ │ ├── mod.rs │ │ ├── stage0_dag.rs │ │ └── stage1_dag.rs │ │ ├── lib.rs │ │ ├── pipeline_resolver │ │ ├── ado_yaml.rs │ │ ├── common_yaml.rs │ │ ├── direct_run.rs │ │ ├── generic.rs │ │ ├── github_yaml │ │ │ ├── github_yaml_defs.rs │ │ │ └── mod.rs │ │ ├── mod.rs │ │ └── viz.rs │ │ └── var_db │ │ ├── in_memory.rs │ │ ├── mod.rs │ │ └── single_json_file.rs ├── flowey_core │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── node.rs │ │ ├── node │ │ ├── github_context.rs │ │ └── spec.rs │ │ ├── patch.rs │ │ ├── pipeline.rs │ │ ├── pipeline │ │ └── artifact.rs │ │ ├── reexports.rs │ │ └── util.rs ├── flowey_hvlite │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── main.rs │ │ ├── pipelines │ │ ├── build_docs.rs │ │ ├── build_igvm.rs │ │ ├── checkin_gates.rs │ │ ├── custom_vmfirmwareigvm_dll.rs │ │ ├── mod.rs │ │ ├── restore_packages.rs │ │ └── vmm_tests.rs │ │ └── pipelines_shared │ │ ├── cfg_common_params.rs │ │ ├── gh_flowey_bootstrap_template.rs │ │ ├── gh_flowey_bootstrap_template.yml │ │ ├── gh_pools.rs │ │ └── mod.rs ├── flowey_lib_common │ ├── Cargo.toml │ └── src │ │ ├── _util │ │ ├── cargo_output.rs │ │ ├── extract.rs │ │ ├── mod.rs │ │ └── wslpath.rs │ │ ├── ado_task_azure_key_vault.rs │ │ ├── ado_task_npm_authenticate.rs │ │ ├── ado_task_nuget_authenticate.rs │ │ ├── ado_task_nuget_tool_installer.rs │ │ ├── ado_task_publish_test_results.rs │ │ ├── cache.rs │ │ ├── cfg_cargo_common_flags.rs │ │ ├── cfg_persistent_dir_cargo_install.rs │ │ ├── check_needs_relaunch.rs │ │ ├── copy_to_artifact_dir.rs │ │ ├── download_azcopy.rs │ │ ├── download_cargo_fuzz.rs │ │ ├── download_cargo_nextest.rs │ │ ├── download_gh_artifact.rs │ │ ├── download_gh_cli.rs │ │ ├── download_gh_release.rs │ │ ├── download_mdbook.rs │ │ ├── download_mdbook_admonish.rs │ │ ├── download_mdbook_mermaid.rs │ │ ├── download_nuget_exe.rs │ │ ├── download_protoc.rs │ │ ├── gh_download_azure_key_vault_secret.rs │ │ ├── gh_task_azure_login.rs │ │ ├── gh_workflow_id.rs │ │ ├── git_checkout.rs │ │ ├── git_merge_commit.rs │ │ ├── install_azure_cli.rs │ │ ├── install_cargo_nextest.rs │ │ ├── install_dist_pkg.rs │ │ ├── install_git.rs │ │ ├── install_nodejs.rs │ │ ├── install_nuget_azure_credential_provider.rs │ │ ├── install_rust.rs │ │ ├── lib.rs │ │ ├── nuget_install_package.rs │ │ ├── publish_test_results.rs │ │ ├── run_cargo_build.rs │ │ ├── run_cargo_clippy.rs │ │ ├── run_cargo_doc.rs │ │ ├── run_cargo_nextest_archive.rs │ │ ├── run_cargo_nextest_run.rs │ │ └── use_gh_cli.rs ├── flowey_lib_hvlite │ ├── Cargo.toml │ └── src │ │ ├── _jobs │ │ ├── all_good_job.rs │ │ ├── build_and_publish_openhcl_igvm_from_recipe.rs │ │ ├── build_and_publish_openvmm_hcl_baseline.rs │ │ ├── build_and_run_doc_tests.rs │ │ ├── build_and_run_nextest_unit_tests.rs │ │ ├── build_and_run_nextest_vmm_tests.rs │ │ ├── cfg_common.rs │ │ ├── cfg_gh_azure_login.rs │ │ ├── cfg_hvlite_reposource.rs │ │ ├── cfg_versions.rs │ │ ├── check_clippy.rs │ │ ├── check_openvmm_hcl_size.rs │ │ ├── check_xtask_fmt.rs │ │ ├── consolidate_and_publish_gh_pages.rs │ │ ├── consume_and_test_nextest_unit_tests_archive.rs │ │ ├── consume_and_test_nextest_vmm_tests_archive.rs │ │ ├── local_build_and_run_nextest_vmm_tests.rs │ │ ├── local_build_igvm.rs │ │ ├── local_custom_vmfirmwareigvm_dll.rs │ │ ├── local_restore_packages.rs │ │ ├── mod.rs │ │ └── test_local_flowey_build_igvm.rs │ │ ├── artifact_openhcl_igvm_from_recipe.rs │ │ ├── artifact_openhcl_igvm_from_recipe_extras.rs │ │ ├── artifact_openvmm_hcl_sizecheck.rs │ │ ├── build_and_test_vmgs_lib.rs │ │ ├── build_guest_test_uefi.rs │ │ ├── build_guide.rs │ │ ├── build_hypestv.rs │ │ ├── build_igvmfilegen.rs │ │ ├── build_nextest_unit_tests.rs │ │ ├── build_nextest_vmm_tests.rs │ │ ├── build_ohcldiag_dev.rs │ │ ├── build_openhcl_boot.rs │ │ ├── build_openhcl_igvm_from_recipe.rs │ │ ├── build_openhcl_initrd.rs │ │ ├── build_openvmm.rs │ │ ├── build_openvmm_hcl.rs │ │ ├── build_pipette.rs │ │ ├── build_rustdoc.rs │ │ ├── build_sidecar.rs │ │ ├── build_tmk_vmm.rs │ │ ├── build_tmks.rs │ │ ├── build_vmfirmwareigvm_dll.rs │ │ ├── build_vmgstool.rs │ │ ├── build_xtask.rs │ │ ├── cfg_openvmm_magicpath.rs │ │ ├── download_lxutil.rs │ │ ├── download_openhcl_kernel_package.rs │ │ ├── download_openvmm_deps.rs │ │ ├── download_openvmm_vmm_tests_artifacts.rs │ │ ├── download_uefi_mu_msvm.rs │ │ ├── git_checkout_openvmm_repo.rs │ │ ├── init_cross_build.rs │ │ ├── init_hyperv_tests.rs │ │ ├── init_openvmm_cargo_config_deny_warnings.rs │ │ ├── init_openvmm_magicpath_linux_test_kernel.rs │ │ ├── init_openvmm_magicpath_lxutil.rs │ │ ├── init_openvmm_magicpath_openhcl_sysroot.rs │ │ ├── init_openvmm_magicpath_protoc.rs │ │ ├── init_openvmm_magicpath_uefi_mu_msvm.rs │ │ ├── init_vmm_tests_env.rs │ │ ├── install_git_credential_manager.rs │ │ ├── install_openvmm_rust_build_essential.rs │ │ ├── lib.rs │ │ ├── run_cargo_build.rs │ │ ├── run_cargo_nextest_run.rs │ │ ├── run_igvmfilegen.rs │ │ ├── run_split_debug_info.rs │ │ ├── test_nextest_unit_tests_archive.rs │ │ └── test_nextest_vmm_tests_archive.rs └── schema_ado_yaml │ ├── Cargo.toml │ └── src │ └── lib.rs ├── guest_test_uefi ├── Cargo.toml ├── README.md └── src │ ├── main.rs │ └── uefi │ ├── mod.rs │ ├── rt.rs │ ├── splash.rs │ └── tests │ └── mod.rs ├── hyperv └── tools │ └── hypestv │ ├── Cargo.toml │ └── src │ ├── main.rs │ └── windows │ ├── completions.rs │ ├── hyperv.rs │ ├── mod.rs │ ├── rustyline_printer.rs │ └── vm.rs ├── openhcl ├── Set-OpenHCL-HyperV-VM.ps1 ├── azure_profiler_proto │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── lib.rs │ │ └── profile.proto ├── bootloader_fdt_parser │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── build_info │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── diag_client │ ├── Cargo.toml │ └── src │ │ ├── kmsg_stream.rs │ │ └── lib.rs ├── diag_proto │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── diag.proto │ │ └── lib.rs ├── diag_server │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── diag_service.rs │ │ ├── lib.rs │ │ └── new_pty.rs ├── gen_init_ramfs.py ├── hcl │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── ioctl.rs │ │ ├── ioctl │ │ ├── aarch64.rs │ │ ├── deferred.rs │ │ ├── snp.rs │ │ ├── tdx.rs │ │ └── x64.rs │ │ ├── lib.rs │ │ ├── mapped_page.rs │ │ ├── protocol.rs │ │ ├── stats.rs │ │ ├── vmbus.rs │ │ └── vmsa.rs ├── hcl_mapper │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── host_fdt_parser │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── kmsg_defs │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── lower_vtl_permissions_guard │ ├── Cargo.toml │ └── src │ │ ├── device_dma.rs │ │ └── lib.rs ├── minimal_rt │ ├── Cargo.toml │ ├── aarch64-config.toml │ ├── aarch64-minimal_rt-none.json │ ├── build.rs │ ├── src │ │ ├── arch │ │ │ ├── aarch64 │ │ │ │ ├── enlightened_panic.rs │ │ │ │ ├── hypercall.rs │ │ │ │ ├── intrinsics.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── reftime.rs │ │ │ │ └── serial.rs │ │ │ ├── mod.rs │ │ │ └── x86_64 │ │ │ │ ├── enlightened_panic.rs │ │ │ │ ├── hypercall.rs │ │ │ │ ├── intrinsics.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── msr.rs │ │ │ │ ├── reftime.rs │ │ │ │ └── serial.rs │ │ ├── enlightened_panic.rs │ │ ├── lib.rs │ │ ├── reftime.rs │ │ ├── reloc.rs │ │ └── rt.rs │ └── x86_64-config.toml ├── minimal_rt_build │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── ohcldiag-dev │ ├── Cargo.toml │ └── src │ │ ├── completions.rs │ │ └── main.rs ├── openhcl_attestation_protocol │ ├── Cargo.toml │ └── src │ │ ├── igvm_attest │ │ ├── akv.rs │ │ ├── cps.rs │ │ ├── get.rs │ │ └── mod.rs │ │ ├── lib.rs │ │ └── vmgs.rs ├── openhcl_boot │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── arch │ │ ├── aarch64 │ │ │ ├── entry.S │ │ │ ├── hypercall.rs │ │ │ ├── memory.rs │ │ │ ├── mod.rs │ │ │ ├── vp.rs │ │ │ └── vsm.rs │ │ ├── mod.rs │ │ └── x86_64 │ │ │ ├── address_space.rs │ │ │ ├── entry.S │ │ │ ├── hypercall.rs │ │ │ ├── memory.rs │ │ │ ├── mod.rs │ │ │ ├── snp.rs │ │ │ ├── tdx.rs │ │ │ ├── vp.rs │ │ │ └── vsm.rs │ │ ├── boot_logger.rs │ │ ├── cmdline.rs │ │ ├── dt.rs │ │ ├── host_params │ │ ├── dt.rs │ │ ├── mmio.rs │ │ ├── mod.rs │ │ └── shim_params.rs │ │ ├── hypercall.rs │ │ ├── main.rs │ │ ├── rt.rs │ │ ├── sidecar.rs │ │ └── single_threaded.rs ├── openhcl_dma_manager │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── openvmm_hcl │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── openvmm_hcl_resources │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── lib.rs ├── perftoolsfs.config ├── profiler_worker │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── rootfs.config ├── sidecar │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── arch │ │ ├── mod.rs │ │ └── x86_64 │ │ │ ├── entry.S │ │ │ ├── init.rs │ │ │ ├── mod.rs │ │ │ ├── temporary_map.rs │ │ │ └── vp.rs │ │ └── main.rs ├── sidecar_client │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── sidecar_defs │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── underhill_attestation │ ├── Cargo.toml │ └── src │ │ ├── crypto.rs │ │ ├── hardware_key_sealing.rs │ │ ├── igvm_attest │ │ ├── ak_cert.rs │ │ ├── key_release.rs │ │ ├── mod.rs │ │ └── wrapped_key.rs │ │ ├── key_protector.rs │ │ ├── lib.rs │ │ ├── secure_key_release.rs │ │ └── vmgs.rs ├── underhill_confidentiality │ ├── Cargo.toml │ └── src │ │ ├── getters.rs │ │ └── lib.rs ├── underhill_core │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── diag.rs │ │ ├── dispatch │ │ ├── mod.rs │ │ ├── pci_shutdown.rs │ │ └── vtl2_settings_worker.rs │ │ ├── emuplat │ │ ├── firmware.rs │ │ ├── framebuffer.rs │ │ ├── i440bx_host_pci_bridge.rs │ │ ├── local_clock.rs │ │ ├── mod.rs │ │ ├── netvsp.rs │ │ ├── non_volatile_store.rs │ │ ├── tpm.rs │ │ ├── vga_proxy.rs │ │ └── watchdog.rs │ │ ├── get_tracing.rs │ │ ├── get_tracing │ │ ├── json_common.rs │ │ ├── json_layer.rs │ │ ├── kmsg_stream.rs │ │ └── kmsg_writer.rs │ │ ├── inspect_internal.rs │ │ ├── inspect_proc.rs │ │ ├── lib.rs │ │ ├── livedump.rs │ │ ├── loader │ │ ├── mod.rs │ │ ├── vtl0_config.rs │ │ └── vtl2_config │ │ │ └── mod.rs │ │ ├── nvme_manager.rs │ │ ├── options.rs │ │ ├── reference_time.rs │ │ ├── servicing.rs │ │ ├── threadpool_vm_task_backend.rs │ │ ├── vmbus_relay_unit.rs │ │ ├── vmgs_logger.rs │ │ ├── vp.rs │ │ ├── vpci.rs │ │ ├── worker.rs │ │ └── wrapped_partition.rs ├── underhill_crash │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── elf.rs │ │ ├── lib.rs │ │ ├── options.rs │ │ └── proto.rs ├── underhill_dump │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── underhill_entry │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── underhill_init │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── lib.rs │ │ ├── options.rs │ │ └── syslog.rs ├── underhill_mem │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── init.rs │ │ ├── lib.rs │ │ ├── mapping.rs │ │ └── registrar.rs ├── underhill_threadpool │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── update-rootfs.py ├── virt_mshv_vtl │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── cvm_cpuid │ │ ├── masking.rs │ │ ├── mod.rs │ │ ├── snp.rs │ │ ├── tdx.rs │ │ └── tests │ │ │ ├── mod.rs │ │ │ ├── topology.rs │ │ │ └── xfem.rs │ │ ├── devmsr.rs │ │ ├── lib.rs │ │ └── processor │ │ ├── hardware_cvm │ │ ├── apic.rs │ │ ├── mod.rs │ │ └── tlb_lock.rs │ │ ├── mod.rs │ │ ├── mshv │ │ ├── arm64.rs │ │ ├── mod.rs │ │ ├── tlb_lock.rs │ │ └── x64.rs │ │ ├── nice.rs │ │ ├── snp │ │ └── mod.rs │ │ ├── tdx │ │ ├── mod.rs │ │ └── tlb_flush.rs │ │ └── vp_state.rs └── vmfirmwareigvm_dll │ ├── Cargo.toml │ ├── build.rs │ ├── manifest.xml │ ├── resources.rc │ └── src │ └── lib.rs ├── openvmm ├── hvlite_core │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── emuplat │ │ ├── firmware.rs │ │ ├── i440bx_host_pci_bridge.rs │ │ ├── mod.rs │ │ └── watchdog.rs │ │ ├── lib.rs │ │ ├── partition.rs │ │ ├── vmgs_non_volatile_store.rs │ │ └── worker │ │ ├── dispatch.rs │ │ ├── mod.rs │ │ ├── rom.rs │ │ └── vm_loaders │ │ ├── igvm.rs │ │ ├── linux.rs │ │ ├── mod.rs │ │ ├── pcat.rs │ │ └── uefi.rs ├── hvlite_defs │ ├── Cargo.toml │ └── src │ │ ├── config.rs │ │ ├── entrypoint.rs │ │ ├── lib.rs │ │ ├── rpc.rs │ │ └── worker.rs ├── hvlite_helpers │ ├── Cargo.toml │ └── src │ │ ├── disk.rs │ │ ├── lib.rs │ │ └── underhill.rs ├── hvlite_pcat_locator │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── resource_dll_parser.rs ├── hvlite_ttrpc_vmservice │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── lib.rs │ │ └── vmservice.proto ├── membacking │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── mapping_manager │ │ ├── manager.rs │ │ ├── mappable.rs │ │ ├── mod.rs │ │ ├── object_cache.rs │ │ └── va_mapper.rs │ │ ├── memory_manager │ │ ├── device_memory.rs │ │ └── mod.rs │ │ ├── partition_mapper.rs │ │ └── region_manager.rs ├── openvmm │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ └── main.rs ├── openvmm_entry │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── cli_args.rs │ │ ├── crash_dump.rs │ │ ├── kvp.rs │ │ ├── lib.rs │ │ ├── meshworker.rs │ │ ├── serial_io.rs │ │ ├── storage_builder.rs │ │ ├── tracing_init.rs │ │ └── ttrpc │ │ └── mod.rs └── openvmm_resources │ ├── Cargo.toml │ ├── build.rs │ └── src │ └── lib.rs ├── petri ├── Cargo.toml ├── guest-bootstrap │ ├── README.md │ ├── imc.hiv │ ├── meta-data │ ├── network-config │ └── user-data ├── logview │ ├── common.js │ ├── index.html │ ├── inspect.html │ └── test.html ├── make_imc_hive │ ├── Cargo.toml │ └── src │ │ ├── main.rs │ │ └── windows │ │ ├── mod.rs │ │ └── offreg.rs ├── petri-tool │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── petri_artifacts_common │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── petri_artifacts_core │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── pipette │ ├── Cargo.toml │ ├── shutdown.wprp │ └── src │ │ ├── agent.rs │ │ ├── execute.rs │ │ ├── main.rs │ │ ├── shutdown.rs │ │ ├── trace.rs │ │ └── winsvc.rs ├── pipette_client │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── process.rs │ │ ├── send.rs │ │ └── shell.rs ├── pipette_protocol │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── src │ ├── disk_image.rs │ ├── lib.rs │ ├── linux_direct_serial_agent.rs │ ├── openhcl_diag.rs │ ├── test.rs │ ├── tracing.rs │ ├── vm │ ├── hyperv │ │ ├── hvc.rs │ │ ├── hyperv.psm1 │ │ ├── mod.rs │ │ ├── powershell.rs │ │ └── vm.rs │ ├── mod.rs │ └── openvmm │ │ ├── construct.rs │ │ ├── mod.rs │ │ ├── modify.rs │ │ ├── runtime.rs │ │ └── start.rs │ └── worker.rs ├── repo_support └── relabel_backported.py ├── rustfmt.toml ├── support ├── README.md ├── address_filter │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── arc_cyclic_builder │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── atomic_ringbuf │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── cache_topology │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── ci_logger │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── clap_dyn_complete │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── templates │ │ ├── complete.fish │ │ ├── complete.ps1 │ │ └── complete.zsh ├── closeable_mutex │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── console_relay │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── unix.rs │ │ └── windows.rs ├── debug_ptr │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── fast_select │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── fdt │ ├── Cargo.toml │ └── src │ │ ├── builder.rs │ │ ├── lib.rs │ │ ├── parser.rs │ │ └── spec.rs ├── guid │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── headervec │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── inspect │ ├── Cargo.toml │ ├── fuzz │ │ ├── Cargo.toml │ │ └── fuzz_inspect.rs │ └── src │ │ ├── defer.rs │ │ ├── initiate.rs │ │ ├── initiate │ │ └── natural_sort.rs │ │ └── lib.rs ├── inspect_counters │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── inspect_derive │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── inspect_proto │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── inspect_service.proto │ │ └── lib.rs ├── inspect_rlimit │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── inspect_task │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── kmsg │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── loan_cell │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── local_clock │ ├── Cargo.toml │ └── src │ │ ├── clock_impls.rs │ │ └── lib.rs ├── mesh │ ├── Cargo.toml │ ├── mesh_build │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── mesh_channel │ │ ├── Cargo.toml │ │ ├── benches │ │ │ └── channel.rs │ │ └── src │ │ │ ├── bidir.rs │ │ │ ├── cancel.rs │ │ │ ├── cell.rs │ │ │ ├── deadline.rs │ │ │ ├── error.rs │ │ │ ├── lazy.rs │ │ │ ├── lib.rs │ │ │ ├── pipe.rs │ │ │ └── rpc.rs │ ├── mesh_channel_core │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── deque.rs │ │ │ ├── error.rs │ │ │ ├── lib.rs │ │ │ ├── mpsc.rs │ │ │ ├── oneshot.rs │ │ │ └── sync_unsafe_cell.rs │ ├── mesh_derive │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── mesh_node │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── common.rs │ │ │ ├── lib.rs │ │ │ ├── local_node.rs │ │ │ ├── local_node │ │ │ └── protocol.rs │ │ │ ├── message.rs │ │ │ └── resource.rs │ ├── mesh_process │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── mesh_protobuf │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ │ ├── buffer.rs │ │ │ ├── encode_with.rs │ │ │ ├── encoding.rs │ │ │ ├── inplace.rs │ │ │ ├── lib.rs │ │ │ ├── message.rs │ │ │ ├── oneof.rs │ │ │ ├── prost.proto │ │ │ ├── prost.rs │ │ │ ├── protobuf.rs │ │ │ ├── protofile │ │ │ ├── mod.rs │ │ │ └── writer.rs │ │ │ ├── table │ │ │ ├── decode.rs │ │ │ ├── encode.rs │ │ │ ├── mod.rs │ │ │ └── tuple.rs │ │ │ ├── time.rs │ │ │ └── transparent.rs │ ├── mesh_remote │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── alpc_node.rs │ │ │ ├── common.rs │ │ │ ├── lib.rs │ │ │ ├── point_to_point.rs │ │ │ ├── protocol.rs │ │ │ ├── test_common.rs │ │ │ ├── unix_node.rs │ │ │ └── unix_node │ │ │ └── memfd.rs │ ├── mesh_rpc │ │ ├── Cargo.toml │ │ ├── build.rs │ │ ├── examples │ │ │ ├── example.proto │ │ │ └── rust-server.rs │ │ ├── fuzz │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ ├── fuzz_mesh_ttrpc_server.rs │ │ │ └── proto.proto │ │ └── src │ │ │ ├── client.rs │ │ │ ├── google │ │ │ └── rpc │ │ │ │ ├── code.proto │ │ │ │ └── status.proto │ │ │ ├── lib.rs │ │ │ ├── message.rs │ │ │ ├── rpc.rs │ │ │ ├── server.rs │ │ │ └── service.rs │ ├── mesh_worker │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ └── worker.rs │ └── src │ │ └── lib.rs ├── mesh_tracing │ ├── Cargo.toml │ └── src │ │ ├── bounded.rs │ │ └── lib.rs ├── minircu │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ ├── linux.rs │ │ ├── other.rs │ │ └── windows.rs ├── open_enum │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── openssl_crypto_only │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── openssl_kdf │ ├── Cargo.toml │ ├── LICENSE │ └── src │ │ ├── kdf.rs │ │ ├── lib.rs │ │ ├── params.rs │ │ └── sys │ │ ├── evp.rs │ │ ├── kdf.rs │ │ ├── mod.rs │ │ ├── ossl_typ.rs │ │ └── params.rs ├── oversized_box │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── pal │ ├── Cargo.toml │ ├── api-ms-win-security-base-private-l1-1-1.def │ ├── build.rs │ ├── pal_async │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── driver.rs │ │ │ ├── executor_tests.rs │ │ │ ├── fd.rs │ │ │ ├── interest.rs │ │ │ ├── io_pool.rs │ │ │ ├── lib.rs │ │ │ ├── local.rs │ │ │ ├── multi_waker.rs │ │ │ ├── pipe.rs │ │ │ ├── socket.rs │ │ │ ├── sparsevec.rs │ │ │ ├── task.rs │ │ │ ├── timer.rs │ │ │ ├── unix │ │ │ ├── epoll.rs │ │ │ ├── kqueue.rs │ │ │ ├── local.rs │ │ │ ├── mod.rs │ │ │ ├── pipe.rs │ │ │ └── wait.rs │ │ │ ├── wait.rs │ │ │ ├── waker.rs │ │ │ └── windows │ │ │ ├── iocp.rs │ │ │ ├── local.rs │ │ │ ├── mod.rs │ │ │ ├── overlapped.rs │ │ │ ├── pipe.rs │ │ │ ├── socket.rs │ │ │ └── tp.rs │ ├── pal_async_test │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── pal_event │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── unix.rs │ │ │ └── windows.rs │ ├── pal_uring │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── ioring.rs │ │ │ ├── lib.rs │ │ │ ├── threadpool.rs │ │ │ └── uring.rs │ └── src │ │ ├── lib.rs │ │ ├── process.rs │ │ ├── unix.rs │ │ ├── unix │ │ ├── affinity.rs │ │ ├── pipe.rs │ │ ├── process.rs │ │ ├── process │ │ │ ├── linux.rs │ │ │ └── posix_spawn.rs │ │ └── pthread.rs │ │ ├── windows.rs │ │ └── windows │ │ ├── afd.rs │ │ ├── alpc.rs │ │ ├── fs.rs │ │ ├── job.rs │ │ ├── pipe.rs │ │ ├── process.rs │ │ ├── security.rs │ │ └── tp.rs ├── safe_intrinsics │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── safeatomic │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── serde_helpers │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── sev_guest_device │ ├── Cargo.toml │ └── src │ │ ├── ioctl.rs │ │ ├── lib.rs │ │ └── protocol.rs ├── sparse_mmap │ ├── Cargo.toml │ ├── benches │ │ └── perf.rs │ ├── build.rs │ ├── fuzz │ │ ├── Cargo.toml │ │ └── fuzz_sparse_mmap.rs │ └── src │ │ ├── alloc.rs │ │ ├── lib.rs │ │ ├── trycopy.c │ │ ├── trycopy_windows_arm64.rs │ │ ├── trycopy_windows_x64.rs │ │ ├── unix.rs │ │ └── windows.rs ├── task_control │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── tdx_guest_device │ ├── Cargo.toml │ └── src │ │ ├── ioctl.rs │ │ ├── lib.rs │ │ └── protocol.rs ├── tee_call │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── term │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── test_with_tracing │ ├── Cargo.toml │ ├── src │ │ └── lib.rs │ └── test_with_tracing_macro │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── tracelimit │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── tracing_helpers │ ├── Cargo.toml │ └── src │ │ ├── formatter.rs │ │ └── lib.rs ├── ucs2 │ ├── Cargo.toml │ ├── fuzz │ │ ├── Cargo.toml │ │ └── fuzz_ucs2.rs │ └── src │ │ └── lib.rs ├── uevent │ ├── Cargo.toml │ └── src │ │ ├── bind_kobject_uevent.rs │ │ └── lib.rs ├── unix_socket │ ├── Cargo.toml │ └── src │ │ ├── lib.rs │ │ └── windows.rs ├── vmsocket │ ├── Cargo.toml │ └── src │ │ ├── af_hyperv.rs │ │ ├── af_vsock.rs │ │ └── lib.rs └── win_import_lib │ ├── Cargo.toml │ └── src │ └── lib.rs ├── tmk ├── simple_tmk │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── common.rs │ │ ├── main.rs │ │ ├── prelude.rs │ │ └── x86_64 │ │ ├── apic.rs │ │ └── mod.rs ├── tmk_core │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── aarch64.rs │ │ ├── lib.rs │ │ └── x86_64.rs ├── tmk_macros │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── tmk_protocol │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── tmk_tests │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── tmk_vmm │ ├── Cargo.toml │ ├── build.rs │ └── src │ ├── host_vmm.rs │ ├── load.rs │ ├── main.rs │ ├── paravisor_vmm.rs │ └── run.rs ├── vm ├── README.md ├── aarch64 │ ├── aarch64defs │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── gic.rs │ │ │ ├── lib.rs │ │ │ └── psci.rs │ └── aarch64emu │ │ ├── Cargo.toml │ │ ├── src │ │ ├── cpu.rs │ │ ├── emulator.rs │ │ ├── lib.rs │ │ └── opcodes.rs │ │ └── tests │ │ └── load_store.rs ├── acpi │ ├── Cargo.toml │ └── src │ │ ├── builder.rs │ │ ├── dsdt.rs │ │ ├── dsdt │ │ ├── helpers.rs │ │ ├── objects.rs │ │ ├── ops.rs │ │ └── resources.rs │ │ └── lib.rs ├── acpi_spec │ ├── Cargo.toml │ └── src │ │ ├── aspt.rs │ │ ├── fadt.rs │ │ ├── lib.rs │ │ ├── madt.rs │ │ ├── pptt.rs │ │ └── srat.rs ├── chipset_arc_mutex_device │ ├── Cargo.toml │ └── src │ │ ├── device.rs │ │ ├── lib.rs │ │ ├── services.rs │ │ └── test_chipset.rs ├── chipset_device │ ├── Cargo.toml │ └── src │ │ ├── interrupt.rs │ │ ├── io.rs │ │ ├── io │ │ └── deferred.rs │ │ ├── lib.rs │ │ ├── mmio.rs │ │ ├── pci.rs │ │ ├── pio.rs │ │ └── poll_device.rs ├── chipset_device_fuzz │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── chipset_device_resources │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── cvm_tracing │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── devices │ ├── chipset │ │ ├── Cargo.toml │ │ ├── fuzz │ │ │ ├── Cargo.toml │ │ │ ├── fuzz_battery.rs │ │ │ └── fuzz_cmos_rtc.rs │ │ └── src │ │ │ ├── battery │ │ │ ├── mod.rs │ │ │ └── resolver.rs │ │ │ ├── cmos_rtc.rs │ │ │ ├── dma.rs │ │ │ ├── i8042 │ │ │ ├── mod.rs │ │ │ ├── ps2keyboard.rs │ │ │ ├── ps2mouse.rs │ │ │ ├── resolver.rs │ │ │ └── spec.rs │ │ │ ├── ioapic.rs │ │ │ ├── lib.rs │ │ │ ├── pic.rs │ │ │ ├── pit.rs │ │ │ ├── pm.rs │ │ │ └── psp.rs │ ├── chipset_legacy │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── i440bx_host_pci_bridge.rs │ │ │ ├── lib.rs │ │ │ ├── piix4_cmos_rtc.rs │ │ │ ├── piix4_pci_bus.rs │ │ │ ├── piix4_pci_isa_bridge.rs │ │ │ ├── piix4_pm.rs │ │ │ ├── piix4_uhci.rs │ │ │ └── winbond83977_sio │ │ │ ├── mod.rs │ │ │ └── super_io.rs │ ├── chipset_resources │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── firmware │ │ ├── firmware_pcat │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bios_boot_order.rs │ │ │ │ ├── default_cmos_values.rs │ │ │ │ ├── lib.rs │ │ │ │ └── root_cpu_data.rs │ │ ├── firmware_uefi │ │ │ ├── Cargo.toml │ │ │ ├── fuzz │ │ │ │ ├── Cargo.toml │ │ │ │ ├── fuzz_firmware_uefi.rs │ │ │ │ ├── signature1.bin │ │ │ │ └── signature2.bin │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── platform │ │ │ │ ├── logger.rs │ │ │ │ ├── mod.rs │ │ │ │ └── nvram.rs │ │ │ │ └── service │ │ │ │ ├── crypto.rs │ │ │ │ ├── event_log.rs │ │ │ │ ├── generation_id.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── nvram │ │ │ │ ├── mod.rs │ │ │ │ └── spec_services │ │ │ │ │ ├── auth_var_crypto.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── nvram_services_ext.rs │ │ │ │ ├── time.rs │ │ │ │ └── uefi_watchdog.rs │ │ ├── firmware_uefi_custom_vars │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── delta.rs │ │ │ │ └── lib.rs │ │ ├── generation_id │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── hcl_compat_uefi_nvram_storage │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── storage_backend.rs │ │ ├── hyperv_secure_boot_templates │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ ├── src │ │ │ │ └── lib.rs │ │ │ └── templates │ │ │ │ ├── aarch64 │ │ │ │ ├── MicrosoftUEFICertificateAuthority_Template.json │ │ │ │ └── MicrosoftWindows_Template.json │ │ │ │ └── x64 │ │ │ │ ├── MicrosoftUEFICertificateAuthority_Template.json │ │ │ │ └── MicrosoftWindows_Template.json │ │ ├── hyperv_uefi_custom_vars_json │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── uefi_nvram_specvars │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── boot_order.rs │ │ │ │ ├── lib.rs │ │ │ │ └── signature_list.rs │ │ ├── uefi_nvram_storage │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── in_memory.rs │ │ │ │ └── lib.rs │ │ └── uefi_specs │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── hyperv │ │ │ ├── bios_event_log.rs │ │ │ ├── boot_bios_log.rs │ │ │ ├── common.rs │ │ │ ├── crypto.rs │ │ │ ├── mod.rs │ │ │ ├── nvram.rs │ │ │ └── time.rs │ │ │ ├── lib.rs │ │ │ ├── linux │ │ │ ├── mod.rs │ │ │ └── nvram.rs │ │ │ └── uefi │ │ │ ├── boot.rs │ │ │ ├── common.rs │ │ │ ├── mod.rs │ │ │ ├── nvram.rs │ │ │ ├── signing.rs │ │ │ └── time.rs │ ├── framebuffer │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── get │ │ ├── get_helpers │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── get_protocol │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── crash.rs │ │ │ │ ├── dps_json.rs │ │ │ │ ├── dps_test_json.json │ │ │ │ ├── dps_test_json_with_vtl2settings.json │ │ │ │ └── lib.rs │ │ ├── get_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── guest_crash_device │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── guest_emulation_device │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── resolver.rs │ │ │ │ └── test_utilities.rs │ │ ├── guest_emulation_log │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── guest_emulation_transport │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── api.rs │ │ │ │ ├── client.rs │ │ │ │ ├── error.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── process_loop.rs │ │ │ │ ├── resolver.rs │ │ │ │ └── worker.rs │ │ ├── underhill_config │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── errors.rs │ │ │ │ ├── lib.rs │ │ │ │ └── schema │ │ │ │ ├── mod.rs │ │ │ │ ├── v1.rs │ │ │ │ ├── vtl2s_test_compat.json │ │ │ │ ├── vtl2s_test_json.json │ │ │ │ ├── vtl2s_test_json_no_nic.json │ │ │ │ ├── vtl2s_test_max_storage_controllers.json │ │ │ │ ├── vtl2s_test_namespace.json │ │ │ │ ├── vtl2s_test_nic_namespaces.json │ │ │ │ └── vtl2s_test_storage_controllers_exceeds_limits.json │ │ └── vtl2_settings_proto │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── vtl2_settings.namespaces.proto │ │ │ └── vtl2_settings.proto │ ├── hyperv_ic │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── common.rs │ │ │ ├── kvp.rs │ │ │ ├── lib.rs │ │ │ ├── resolver.rs │ │ │ ├── shutdown.rs │ │ │ └── timesync.rs │ ├── hyperv_ic_guest │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ └── shutdown.rs │ ├── hyperv_ic_protocol │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── heartbeat.rs │ │ │ ├── kvp.rs │ │ │ ├── lib.rs │ │ │ ├── shutdown.rs │ │ │ ├── timesync.rs │ │ │ └── vss.rs │ ├── hyperv_ic_resources │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── kvp.rs │ │ │ ├── lib.rs │ │ │ ├── shutdown.rs │ │ │ └── timesync.rs │ ├── input_core │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ └── mesh_input.rs │ ├── mcr_resources │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── missing_dev │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── missing_dev_resources │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── net │ │ ├── gdma │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bnic.rs │ │ │ │ ├── dma.rs │ │ │ │ ├── hwc.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── queues.rs │ │ │ │ └── resolver.rs │ │ ├── gdma_defs │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── access.rs │ │ │ │ ├── bnic.rs │ │ │ │ └── lib.rs │ │ ├── gdma_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── linux_net_bindings │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── gen_if.rs │ │ │ │ ├── gen_if_tun.rs │ │ │ │ └── lib.rs │ │ ├── mana_driver │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bnic_driver.rs │ │ │ │ ├── gdma_driver.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── mana.rs │ │ │ │ ├── queues.rs │ │ │ │ ├── resources.rs │ │ │ │ └── tests.rs │ │ ├── net_backend │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── loopback.rs │ │ │ │ ├── null.rs │ │ │ │ ├── resolve.rs │ │ │ │ └── tests.rs │ │ ├── net_backend_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── mac_address.rs │ │ ├── net_consomme │ │ │ ├── Cargo.toml │ │ │ ├── consomme │ │ │ │ ├── Cargo.toml │ │ │ │ └── src │ │ │ │ │ ├── arp.rs │ │ │ │ │ ├── dhcp.rs │ │ │ │ │ ├── dns_unix.rs │ │ │ │ │ ├── dns_windows.rs │ │ │ │ │ ├── lib.rs │ │ │ │ │ ├── tcp.rs │ │ │ │ │ ├── tcp │ │ │ │ │ └── ring.rs │ │ │ │ │ ├── udp.rs │ │ │ │ │ └── windows.rs │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── net_dio │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── net_mana │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── net_packet_capture │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── net_tap │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── resolver.rs │ │ │ │ └── tap.rs │ │ ├── netvsp │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── buffers.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── protocol.rs │ │ │ │ ├── resolver.rs │ │ │ │ ├── rndisprot.rs │ │ │ │ ├── rx_bufs.rs │ │ │ │ ├── saved_state.rs │ │ │ │ └── test.rs │ │ ├── netvsp_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── vmswitch │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── dio.rs │ │ │ ├── hcn.rs │ │ │ ├── kernel.rs │ │ │ ├── lib.rs │ │ │ └── vmsif.rs │ ├── pci │ │ ├── pci_bus │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── pci_core │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bar_mapping.rs │ │ │ │ ├── capabilities │ │ │ │ ├── mod.rs │ │ │ │ ├── msix.rs │ │ │ │ └── read_only.rs │ │ │ │ ├── cfg_space_emu.rs │ │ │ │ ├── chipset_device_ext.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── msi.rs │ │ │ │ ├── spec.rs │ │ │ │ └── test_helpers │ │ │ │ └── mod.rs │ │ ├── pci_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── vpci │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bus.rs │ │ │ │ ├── bus_control.rs │ │ │ │ ├── device.rs │ │ │ │ ├── lib.rs │ │ │ │ └── test_helpers │ │ │ │ └── mod.rs │ │ └── vpci_protocol │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ └── lib.rs │ ├── serial │ │ ├── serial_16550 │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── resolver.rs │ │ │ │ └── spec.rs │ │ ├── serial_16550_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── serial_core │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── disconnected.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── resources.rs │ │ │ │ └── serial_io.rs │ │ ├── serial_debugcon │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── serial_debugcon_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── serial_pl011 │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── resolver.rs │ │ │ │ └── spec.rs │ │ ├── serial_pl011_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── serial_socket │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── net.rs │ │ │ │ └── windows.rs │ │ ├── vmbus_serial_guest │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── vmbus_serial_host │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── vmbus_serial_protocol │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── vmbus_serial_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ └── lib.rs │ ├── storage │ │ ├── block_crypto │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disk_backend │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── pr.rs │ │ │ │ ├── resolve.rs │ │ │ │ └── sync_wrapper.rs │ │ ├── disk_backend_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── layer.rs │ │ │ │ └── lib.rs │ │ ├── disk_blob │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── blob │ │ │ │ ├── file.rs │ │ │ │ ├── http.rs │ │ │ │ └── mod.rs │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── disk_blockdevice │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── ioctl.rs │ │ │ │ ├── lib.rs │ │ │ │ └── nvme.rs │ │ ├── disk_crypt │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── disk_crypt_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disk_file │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── readwriteat.rs │ │ ├── disk_get_vmgs │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disk_layered │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bitmap.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── resolve.rs │ │ │ │ └── resolver.rs │ │ ├── disk_nvme │ │ │ ├── Cargo.toml │ │ │ ├── nvme_driver │ │ │ │ ├── Cargo.toml │ │ │ │ ├── fuzz │ │ │ │ │ ├── Cargo.toml │ │ │ │ │ ├── fuzz_emulated_device.rs │ │ │ │ │ ├── fuzz_main.rs │ │ │ │ │ └── fuzz_nvme_driver.rs │ │ │ │ └── src │ │ │ │ │ ├── driver.rs │ │ │ │ │ ├── lib.rs │ │ │ │ │ ├── namespace.rs │ │ │ │ │ ├── queue_pair.rs │ │ │ │ │ ├── queues.rs │ │ │ │ │ ├── registers.rs │ │ │ │ │ └── tests.rs │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disk_prwrap │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disk_striped │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disk_vhd1 │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disk_vhdmp │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── disklayer_ram │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── disklayer_sqlite │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── auto_cache.rs │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── floppy │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── floppy_pcat_stub │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── floppy_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── ide │ │ │ ├── Cargo.toml │ │ │ ├── fuzz │ │ │ │ ├── Cargo.toml │ │ │ │ └── fuzz_ide.rs │ │ │ └── src │ │ │ │ ├── drive.rs │ │ │ │ ├── drive │ │ │ │ ├── atapi_drive.rs │ │ │ │ └── hard_drive.rs │ │ │ │ ├── lib.rs │ │ │ │ └── protocol.rs │ │ ├── ide_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── nvme │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── error.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── namespace.rs │ │ │ │ ├── namespace │ │ │ │ └── reservations.rs │ │ │ │ ├── pci.rs │ │ │ │ ├── prp.rs │ │ │ │ ├── queue.rs │ │ │ │ ├── resolver.rs │ │ │ │ ├── tests.rs │ │ │ │ ├── tests │ │ │ │ ├── controller_tests.rs │ │ │ │ ├── shadow_doorbell_tests.rs │ │ │ │ └── test_helpers.rs │ │ │ │ ├── workers.rs │ │ │ │ └── workers │ │ │ │ ├── admin.rs │ │ │ │ ├── coordinator.rs │ │ │ │ └── io.rs │ │ ├── nvme_common │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── nvme_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── nvme_spec │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── nvm.rs │ │ ├── scsi_buffers │ │ │ ├── Cargo.toml │ │ │ ├── fuzz │ │ │ │ ├── Cargo.toml │ │ │ │ └── fuzz_scsi_buffers.rs │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── scsi_core │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── scsi_defs │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── srb.rs │ │ ├── scsidisk │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── atapi_scsi.rs │ │ │ │ ├── getlbastatus.rs │ │ │ │ ├── inquiry.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── reservation.rs │ │ │ │ ├── resolver.rs │ │ │ │ ├── scsidvd │ │ │ │ └── mod.rs │ │ │ │ ├── tests.rs │ │ │ │ ├── tests │ │ │ │ ├── basic_tests.rs │ │ │ │ ├── pr_tests.rs │ │ │ │ └── test_helpers.rs │ │ │ │ └── unmap.rs │ │ ├── scsidisk_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── storage_string │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── storvsp │ │ │ ├── Cargo.toml │ │ │ ├── benches │ │ │ │ └── ioperf.rs │ │ │ ├── fuzz │ │ │ │ ├── Cargo.toml │ │ │ │ └── fuzz_storvsp.rs │ │ │ └── src │ │ │ │ ├── ioperf.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── resolver.rs │ │ │ │ ├── save_restore.rs │ │ │ │ └── test_helpers.rs │ │ ├── storvsp_protocol │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── storvsp_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ └── lib.rs │ ├── support │ │ ├── README.md │ │ ├── device_emulators │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── fs │ │ │ ├── fuse │ │ │ ├── Cargo.toml │ │ │ ├── fuse.h │ │ │ ├── src │ │ │ │ ├── conn.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── protocol.rs │ │ │ │ ├── reply.rs │ │ │ │ ├── request.rs │ │ │ │ ├── request │ │ │ │ │ └── macros.rs │ │ │ │ ├── session.rs │ │ │ │ └── util.rs │ │ │ └── tests │ │ │ │ └── fuse_hello.rs │ │ │ ├── lx │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── macros.rs │ │ │ │ └── string.rs │ │ │ ├── lxutil │ │ │ ├── Cargo.toml │ │ │ ├── build.rs │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── path.rs │ │ │ │ ├── unix │ │ │ │ ├── mod.rs │ │ │ │ ├── path.rs │ │ │ │ └── util.rs │ │ │ │ └── windows │ │ │ │ ├── api.rs │ │ │ │ ├── fs.rs │ │ │ │ ├── macros.rs │ │ │ │ ├── mod.rs │ │ │ │ ├── path.rs │ │ │ │ ├── readdir.rs │ │ │ │ ├── symlink.rs │ │ │ │ └── util.rs │ │ │ └── plan9 │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── fid.rs │ │ │ ├── lib.rs │ │ │ ├── protocol.rs │ │ │ └── protocol │ │ │ └── macros.rs │ ├── tpm │ │ ├── Cargo.toml │ │ ├── src │ │ │ ├── ak_cert.rs │ │ │ ├── lib.rs │ │ │ ├── logger.rs │ │ │ ├── resolver.rs │ │ │ ├── tpm20proto.rs │ │ │ └── tpm_helper.rs │ │ └── test_data │ │ │ └── vTpmState.blob │ ├── tpm_resources │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── uidevices │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── keyboard │ │ │ ├── mod.rs │ │ │ └── protocol.rs │ │ │ ├── lib.rs │ │ │ ├── mouse │ │ │ ├── mod.rs │ │ │ └── protocol.rs │ │ │ ├── resolver.rs │ │ │ └── video │ │ │ ├── mod.rs │ │ │ └── protocol.rs │ ├── uidevices_resources │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── user_driver │ │ ├── Cargo.toml │ │ ├── src │ │ │ ├── backoff.rs │ │ │ ├── interrupt.rs │ │ │ ├── lib.rs │ │ │ ├── lockmem.rs │ │ │ ├── memory.rs │ │ │ ├── page_allocator.rs │ │ │ └── vfio.rs │ │ └── vfio_sys │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ └── lib.rs │ ├── user_driver_emulated_mock │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── guest_memory_access_wrapper.rs │ │ │ └── lib.rs │ ├── vga │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── emu.rs │ │ │ ├── emu │ │ │ └── bluescreen.rs │ │ │ ├── lib.rs │ │ │ ├── non_linear.rs │ │ │ ├── render.rs │ │ │ ├── spec.rs │ │ │ └── text_mode.rs │ ├── vga_proxy │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── video_core │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── virtio │ │ ├── virtio │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── common.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── queue.rs │ │ │ │ ├── resolve.rs │ │ │ │ ├── resolver.rs │ │ │ │ ├── spec.rs │ │ │ │ └── transport │ │ │ │ ├── mmio.rs │ │ │ │ ├── mod.rs │ │ │ │ └── pci.rs │ │ ├── virtio_net │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── buffers.rs │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── virtio_p9 │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── virtio_pmem │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── resolver.rs │ │ ├── virtio_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── virtio_serial │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ └── virtiofs │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ ├── file.rs │ │ │ ├── inode.rs │ │ │ ├── lib.rs │ │ │ ├── resolver.rs │ │ │ ├── section.rs │ │ │ ├── util.rs │ │ │ ├── virtio.rs │ │ │ └── virtio_util.rs │ ├── vmbus │ │ ├── vmbfs │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── backing.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── protocol.rs │ │ │ │ ├── resolver.rs │ │ │ │ └── single_file_backing.rs │ │ ├── vmbfs_resources │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── vmbus_async │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── async_dgram.rs │ │ │ │ ├── core.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── pipe.rs │ │ │ │ └── queue.rs │ │ ├── vmbus_channel │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── bus.rs │ │ │ │ ├── channel.rs │ │ │ │ ├── gpadl.rs │ │ │ │ ├── gpadl_ring.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── offer.rs │ │ │ │ ├── resources.rs │ │ │ │ └── simple.rs │ │ ├── vmbus_client │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── hvsock.rs │ │ │ │ ├── lib.rs │ │ │ │ └── saved_state.rs │ │ ├── vmbus_client_hcl │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ └── lib.rs │ │ ├── vmbus_core │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── protocol.rs │ │ │ │ └── protocol │ │ │ │ └── macros.rs │ │ ├── vmbus_proxy │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ ├── proxyioctl.rs │ │ │ │ └── vmbusioctl.rs │ │ ├── vmbus_relay │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── legacy_saved_state.rs │ │ │ │ ├── lib.rs │ │ │ │ └── saved_state.rs │ │ ├── vmbus_relay_intercept_device │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── lib.rs │ │ │ │ └── ring_buffer.rs │ │ ├── vmbus_ring │ │ │ ├── Cargo.toml │ │ │ ├── benches │ │ │ │ └── ring.rs │ │ │ └── src │ │ │ │ ├── gparange.rs │ │ │ │ └── lib.rs │ │ ├── vmbus_server │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ │ ├── channel_bitmap.rs │ │ │ │ ├── channels.rs │ │ │ │ ├── channels │ │ │ │ └── saved_state.rs │ │ │ │ ├── event.rs │ │ │ │ ├── hvsock.rs │ │ │ │ ├── lib.rs │ │ │ │ ├── monitor.rs │ │ │ │ └── proxyintegration.rs │ │ └── vmbus_user_channel │ │ │ ├── Cargo.toml │ │ │ └── src │ │ │ └── lib.rs │ └── watchdog │ │ ├── guest_watchdog │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ │ ├── watchdog_core │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ └── platform.rs │ │ └── watchdog_vmgs_format │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── hv1 │ ├── hv1_emulator │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ │ ├── cpuid.rs │ │ │ ├── hv.rs │ │ │ ├── hypercall.rs │ │ │ ├── lib.rs │ │ │ ├── message_queues.rs │ │ │ ├── pages.rs │ │ │ ├── synic.rs │ │ │ └── x86.rs │ ├── hv1_hypercall │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── aarch64.rs │ │ │ ├── imp.rs │ │ │ ├── lib.rs │ │ │ ├── support.rs │ │ │ ├── tests.rs │ │ │ └── x86.rs │ ├── hv1_structs │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── proc_mask.rs │ │ │ └── vtl_array.rs │ └── hvdef │ │ ├── Cargo.toml │ │ └── src │ │ └── lib.rs ├── kvm │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── loader │ ├── Cargo.toml │ ├── build.rs │ ├── igvmfilegen │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── file_loader.rs │ │ │ ├── identity_mapping.rs │ │ │ ├── main.rs │ │ │ ├── signed_measurement │ │ │ ├── mod.rs │ │ │ ├── snp.rs │ │ │ ├── tdx.rs │ │ │ └── vbs.rs │ │ │ └── vp_context_builder │ │ │ ├── mod.rs │ │ │ ├── snp.rs │ │ │ ├── tdx.rs │ │ │ └── vbs.rs │ ├── igvmfilegen_config │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── loader_defs │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── lib.rs │ │ │ ├── linux.rs │ │ │ ├── paravisor.rs │ │ │ └── shim.rs │ ├── manifests │ │ ├── README.md │ │ ├── openhcl-aarch64-dev.json │ │ ├── openhcl-aarch64-release.json │ │ ├── openhcl-x64-cvm-dev.json │ │ ├── openhcl-x64-cvm-release.json │ │ ├── openhcl-x64-dev.json │ │ ├── openhcl-x64-direct-dev.json │ │ ├── openhcl-x64-direct-release.json │ │ ├── openhcl-x64-release.json │ │ ├── uefi-aarch64.json │ │ └── uefi-x64.json │ ├── page_table │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── aarch64.rs │ │ │ ├── lib.rs │ │ │ └── x64.rs │ └── src │ │ ├── common.rs │ │ ├── cpuid.rs │ │ ├── elf.rs │ │ ├── importer.rs │ │ ├── lib.rs │ │ ├── linux.rs │ │ ├── paravisor.rs │ │ ├── pcat.rs │ │ └── uefi │ │ ├── config.rs │ │ └── mod.rs ├── page_pool_alloc │ ├── Cargo.toml │ └── src │ │ ├── device_dma.rs │ │ └── lib.rs ├── power_resources │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vbs_defs │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vhd1_defs │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vmcore │ ├── Cargo.toml │ ├── build_rs_guest_arch │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── guestmem │ │ ├── Cargo.toml │ │ ├── fuzz │ │ │ ├── Cargo.toml │ │ │ └── fuzz_guestmem.rs │ │ └── src │ │ │ ├── lib.rs │ │ │ └── ranges.rs │ ├── memory_range │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── save_restore_derive │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── src │ │ ├── device_state.rs │ │ ├── interrupt.rs │ │ ├── isa_dma_channel.rs │ │ ├── lib.rs │ │ ├── line_interrupt.rs │ │ ├── local_only.rs │ │ ├── monitor.rs │ │ ├── non_volatile_store.rs │ │ ├── notify.rs │ │ ├── reference_time.rs │ │ ├── save_restore.rs │ │ ├── slim_event.rs │ │ ├── synic.rs │ │ ├── vm_task.rs │ │ ├── vmtime.rs │ │ └── vpci_msi.rs │ ├── vm_resource │ │ ├── Cargo.toml │ │ └── src │ │ │ ├── kind.rs │ │ │ └── lib.rs │ └── vm_topology │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ ├── lib.rs │ │ ├── memory.rs │ │ ├── processor.rs │ │ └── processor │ │ ├── aarch64.rs │ │ └── x86.rs ├── vmgs │ ├── vmgs │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ │ ├── encrypt │ │ │ ├── mod.rs │ │ │ ├── ossl.rs │ │ │ └── win.rs │ │ │ ├── error.rs │ │ │ ├── lib.rs │ │ │ ├── logger.rs │ │ │ ├── storage.rs │ │ │ └── vmgs_impl.rs │ ├── vmgs_broker │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ │ ├── broker.rs │ │ │ ├── client.rs │ │ │ ├── lib.rs │ │ │ ├── non_volatile_store.rs │ │ │ └── resolver.rs │ ├── vmgs_format │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ ├── vmgs_lib │ │ ├── Cargo.toml │ │ ├── examples │ │ │ └── vmgs_testlib.c │ │ ├── src │ │ │ └── lib.rs │ │ └── vmgs.h │ ├── vmgs_resources │ │ ├── Cargo.toml │ │ └── src │ │ │ └── lib.rs │ └── vmgstool │ │ ├── Cargo.toml │ │ ├── build.rs │ │ └── src │ │ ├── main.rs │ │ ├── storage_backend.rs │ │ ├── uefi_nvram.rs │ │ └── vmgs_json.rs ├── whp │ ├── Cargo.toml │ ├── WinHvPlatform.def │ ├── benches │ │ └── primitives.rs │ ├── build.rs │ └── src │ │ ├── abi.rs │ │ ├── abi │ │ ├── arm64.rs │ │ └── x64.rs │ │ ├── api.rs │ │ ├── arm64.rs │ │ ├── lib.rs │ │ ├── partition_prop.rs │ │ └── x64.rs └── x86 │ ├── tdcall │ ├── Cargo.toml │ └── src │ │ └── lib.rs │ ├── x86defs │ ├── Cargo.toml │ └── src │ │ ├── apic.rs │ │ ├── cpuid.rs │ │ ├── lib.rs │ │ ├── msi.rs │ │ ├── snp.rs │ │ ├── tdx.rs │ │ ├── vmx.rs │ │ └── xsave.rs │ └── x86emu │ ├── Cargo.toml │ ├── fuzz │ ├── Cargo.toml │ ├── cpu.rs │ └── fuzz_x86emu.rs │ ├── src │ ├── cpu.rs │ ├── emulator.rs │ ├── emulator │ │ ├── arith.rs │ │ ├── bt.rs │ │ ├── cmpxchg816.rs │ │ ├── cond.rs │ │ ├── fast_path.rs │ │ ├── instruction.rs │ │ ├── mov.rs │ │ ├── muldiv.rs │ │ ├── rep.rs │ │ ├── rflags.rs │ │ └── shift_rotate.rs │ ├── lib.rs │ └── registers.rs │ └── tests │ ├── emulation_tests.rs │ └── tests │ ├── arith │ ├── adc.rs │ ├── add.rs │ ├── and.rs │ ├── cmp.rs │ ├── cmpxchg.rs │ ├── incdec.rs │ ├── mod.rs │ ├── neg.rs │ ├── not.rs │ ├── or.rs │ ├── sbb.rs │ ├── sub.rs │ ├── test.rs │ ├── xadd.rs │ └── xor.rs │ ├── bt.rs │ ├── cmpxchg816.rs │ ├── common.rs │ ├── cond.rs │ ├── mod.rs │ ├── mov │ ├── mod.rs │ ├── others.rs │ ├── sse.rs │ └── xchg.rs │ ├── muldiv │ ├── div.rs │ ├── imul23.rs │ ├── mod.rs │ └── mul_unary.rs │ ├── rep │ ├── cmps.rs │ ├── ins.rs │ ├── lods.rs │ ├── mod.rs │ ├── movs.rs │ ├── outs.rs │ ├── scas.rs │ └── stos.rs │ ├── segments.rs │ └── shiftrotate │ ├── mod.rs │ ├── rotate.rs │ ├── shift.rs │ └── shiftd.rs ├── vmm_core ├── Cargo.toml ├── build.rs ├── src │ ├── acpi_builder.rs │ ├── cpuid │ │ ├── mod.rs │ │ └── topology.rs │ ├── device_builder.rs │ ├── emuplat │ │ ├── gic.rs │ │ ├── hcl_compat_uefi_nvram_storage.rs │ │ ├── ioapic.rs │ │ └── mod.rs │ ├── input_distributor.rs │ ├── lib.rs │ ├── partition_unit.rs │ ├── partition_unit │ │ ├── debug.rs │ │ └── vp_set.rs │ ├── platform_resolvers.rs │ ├── synic.rs │ ├── vmbus_unit.rs │ ├── vmotherboard_adapter.rs │ └── vmtime_unit.rs ├── state_unit │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── virt │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── aarch64 │ │ ├── gic_software_device.rs │ │ ├── mod.rs │ │ ├── vm.rs │ │ └── vp.rs │ │ ├── cpuid.rs │ │ ├── generic.rs │ │ ├── generic │ │ └── partition_memory_map.rs │ │ ├── io.rs │ │ ├── irqcon.rs │ │ ├── lib.rs │ │ ├── state.rs │ │ └── x86 │ │ ├── apic_software_device.rs │ │ ├── mod.rs │ │ ├── vm.rs │ │ └── vp.rs ├── virt_hvf │ ├── Cargo.toml │ └── src │ │ ├── abi.rs │ │ ├── hypercall.rs │ │ ├── lib.rs │ │ └── vp_state.rs ├── virt_kvm │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── arch.rs │ │ ├── arch │ │ ├── aarch64 │ │ │ └── mod.rs │ │ └── x86_64 │ │ │ ├── mod.rs │ │ │ ├── regs.rs │ │ │ ├── vm_state.rs │ │ │ └── vp_state.rs │ │ ├── gsi.rs │ │ └── lib.rs ├── virt_mshv │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── lib.rs │ │ ├── vm_state.rs │ │ └── vp_state.rs ├── virt_support_aarch64emu │ ├── Cargo.toml │ └── src │ │ ├── emulate.rs │ │ ├── lib.rs │ │ └── translate.rs ├── virt_support_apic │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── virt_support_gic │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── virt_support_x86emu │ ├── Cargo.toml │ ├── src │ │ ├── emulate.rs │ │ ├── lib.rs │ │ └── translate.rs │ └── tests │ │ ├── tests │ │ ├── checkvtlaccess.rs │ │ ├── common.rs │ │ ├── emulate.rs │ │ ├── mod.rs │ │ └── translate.rs │ │ └── virt_tests.rs ├── virt_whp │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── apic.rs │ │ ├── device.rs │ │ ├── emu.rs │ │ ├── hypercalls.rs │ │ ├── lib.rs │ │ ├── memory.rs │ │ ├── memory │ │ └── vtl2_mapper.rs │ │ ├── regs.rs │ │ ├── synic.rs │ │ ├── vm_state.rs │ │ ├── vp.rs │ │ ├── vp_state.rs │ │ └── vtl2.rs ├── vm_loader │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── initial_regs.rs │ │ └── lib.rs ├── vm_manifest_builder │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vmm_core_defs │ ├── Cargo.toml │ └── src │ │ ├── debug_rpc.rs │ │ └── lib.rs └── vmotherboard │ ├── Cargo.toml │ └── src │ ├── base_chipset.rs │ ├── chipset │ ├── backing │ │ ├── arc_mutex │ │ │ ├── device.rs │ │ │ ├── mod.rs │ │ │ ├── pci.rs │ │ │ ├── services.rs │ │ │ └── state_unit.rs │ │ └── mod.rs │ ├── builder │ │ ├── errors.rs │ │ └── mod.rs │ ├── io_ranges │ │ └── mod.rs │ ├── line_sets.rs │ └── mod.rs │ └── lib.rs ├── vmm_tests ├── petri_artifact_resolver_openvmm_known_paths │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── petri_artifacts_vmm_test │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vmm_test_images │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vmm_test_macros │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── vmm_tests │ ├── Cargo.toml │ ├── test_data │ └── tpm.py │ └── tests │ ├── tests │ ├── main.rs │ ├── multiarch.rs │ ├── ttrpc.rs │ ├── x86_64.rs │ ├── x86_64 │ │ ├── openhcl_linux_direct.rs │ │ ├── openhcl_servicing.rs │ │ └── openhcl_uefi.rs │ └── x86_64_exclusive.rs │ └── tmks.rs ├── workers ├── debug_worker │ ├── Cargo.toml │ └── src │ │ ├── gdb │ │ ├── arch │ │ │ ├── mod.rs │ │ │ └── x86 │ │ │ │ ├── i8086.xml │ │ │ │ ├── mod.rs │ │ │ │ └── reg │ │ │ │ ├── core32.rs │ │ │ │ ├── core64.rs │ │ │ │ ├── id.rs │ │ │ │ └── mod.rs │ │ ├── mod.rs │ │ └── targets │ │ │ ├── base.rs │ │ │ ├── breakpoints.rs │ │ │ ├── mod.rs │ │ │ ├── target_aarch64 │ │ │ └── mod.rs │ │ │ ├── target_i8086 │ │ │ └── mod.rs │ │ │ └── target_x86_64_qemu │ │ │ ├── i386-64bit.xml │ │ │ ├── mod.rs │ │ │ └── target_xml.rs │ │ └── lib.rs ├── debug_worker_defs │ ├── Cargo.toml │ └── src │ │ └── lib.rs ├── vnc_worker │ ├── Cargo.toml │ ├── src │ │ └── lib.rs │ └── vnc │ │ ├── Cargo.toml │ │ ├── examples │ │ └── vncserver.rs │ │ └── src │ │ ├── lib.rs │ │ ├── rfb.rs │ │ └── scancode.rs └── vnc_worker_defs │ ├── Cargo.toml │ └── src │ └── lib.rs ├── xsync ├── .gitignore ├── Cargo.lock ├── Cargo.toml └── xsync │ ├── Cargo.toml │ └── src │ ├── main.rs │ └── tasks │ ├── cargo_lock.rs │ ├── cargo_toml.rs │ ├── mod.rs │ ├── rust_toolchain_toml.rs │ └── rustfmt_toml.rs └── xtask ├── Cargo.toml ├── src ├── completions │ ├── complete.zsh │ └── mod.rs ├── fs_helpers.rs ├── main.rs └── tasks │ ├── fmt │ ├── house_rules.rs │ ├── house_rules │ │ ├── autogen_comment.rs │ │ ├── cfg_target_arch.rs │ │ ├── copyright.rs │ │ ├── crate_name_nodash.rs │ │ ├── package_info.rs │ │ ├── repr_packed.rs │ │ ├── trailing_newline.rs │ │ └── unsafe_code_comment.rs │ ├── mod.rs │ ├── rustfmt.rs │ ├── unused_deps.rs │ ├── verify_flowey.rs │ └── workspace.rs │ ├── fuzz │ ├── cargo_fuzz.rs │ ├── html_coverage.rs │ ├── init_from_template.rs │ ├── mod.rs │ ├── onefuzz_schema.rs │ ├── parse_fuzz_crate_toml.rs │ └── templates │ │ ├── basic.template.rs │ │ ├── basic.template.toml │ │ ├── chipset_device.template.rs │ │ └── chipset_device.template.toml │ ├── git_hooks.rs │ ├── guest_test │ ├── download_image.rs │ ├── mod.rs │ └── uefi │ │ ├── gpt_efi_disk.rs │ │ └── mod.rs │ ├── mod.rs │ └── verify_size.rs └── xtask_fuzz ├── Cargo.toml └── src └── lib.rs /.flowey.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [[pipeline.flowey_hvlite.github]] 5 | file = ".github/workflows/openvmm-pr.yaml" 6 | cmd = ["ci", "checkin-gates", "--config=pr"] 7 | 8 | [[pipeline.flowey_hvlite.github]] 9 | file = ".github/workflows/openvmm-ci.yaml" 10 | cmd = ["ci", "checkin-gates", "--config=ci"] 11 | 12 | [[pipeline.flowey_hvlite.github]] 13 | file = ".github/workflows/openvmm-docs-ci.yaml" 14 | cmd = ["ci", "build-docs", "--config=ci"] 15 | 16 | [[pipeline.flowey_hvlite.github]] 17 | file = ".github/workflows/openvmm-docs-pr.yaml" 18 | cmd = ["ci", "build-docs", "--config=pr"] 19 | -------------------------------------------------------------------------------- /.gdbinit: -------------------------------------------------------------------------------- 1 | set schedule-multiple 1 2 | set pagination off 3 | set detach-on-fork off 4 | # KVM vp exit signal 5 | handle SIG34 nostop 6 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # 2024 style edition formatting 2 | 0865f61b3eb74104e2713faf95a0d4fd8b4c4ee0 3 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | Guide: 2 | - changed-files: 3 | - any-glob-to-any-file: 'Guide/**' 4 | 5 | release_2411: 6 | - base-branch: 'release/2411' 7 | 8 | release_2505: 9 | - base-branch: 'release/2505' 10 | -------------------------------------------------------------------------------- /.github/scripts/refresh_mirror/requirements.txt: -------------------------------------------------------------------------------- 1 | click==8.1.7 2 | azure-devops==7.1.0b4 3 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Pull Request Labeler" 2 | on: 3 | - pull_request_target 4 | 5 | jobs: 6 | labeler: 7 | permissions: 8 | contents: read 9 | pull-requests: write 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/labeler@v5 13 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /Guide/.gitignore: -------------------------------------------------------------------------------- 1 | book 2 | obj 3 | _site 4 | 5 | # the shim has zero dependencies, and does not require a lockfile 6 | mdbook-openvmm-shim/Cargo.lock 7 | mdbook-openvmm-shim/target 8 | 9 | # rather than checking in the various html/js/css files that our preprocessors 10 | # require, we use a small `openvmm-mdbook-trampoline` shim to only add those files 11 | # to the `Guide` folder during build-time. 12 | mdbook-admonish.css 13 | mermaid-init.js 14 | mermaid.min.js 15 | -------------------------------------------------------------------------------- /Guide/mdbook-openvmm-shim/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mdbook-openvmm-shim" 6 | edition = "2021" 7 | 8 | [package.metadata.xtask.house-rules] 9 | # emits a binary, where kebab-case is more natural 10 | allow-dash-in-name = true 11 | excluded-from-workspace = true 12 | -------------------------------------------------------------------------------- /Guide/src/dev_guide/contrib.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | This chapter discusses various things developers should be aware of prior to 4 | submitting changes to the OpenVMM project. 5 | 6 | This includes both code-level [coding conventions](./contrib/code.md), as well 7 | as instructions on properly [submitting changes](./contrib/pr.md) to the OpenVMM 8 | GitHub repo, and expectations around [code reviews](./contrib/code_review.md). 9 | -------------------------------------------------------------------------------- /Guide/src/dev_guide/contrib/pr.md: -------------------------------------------------------------------------------- 1 | # Submitting Changes 2 | 3 | Follow the [CONTRIBUTING](https://github.com/microsoft/openvmm/blob/main/CONTRIBUTE.MD) guide. 4 | -------------------------------------------------------------------------------- /Guide/src/dev_guide/tests.md: -------------------------------------------------------------------------------- 1 | # Testing 2 | 3 | This chapter discusses the various kinds of tests you will encounter as an 4 | OpenVMM developer. 5 | -------------------------------------------------------------------------------- /Guide/src/dev_guide/tests/fuzzing.md: -------------------------------------------------------------------------------- 1 | # Fuzzing in OpenVMM 2 | 3 | Fuzzing infrastructure in OpenVMM is based on the excellent 4 | [cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz) project, which makes it super easy to get 5 | up-and-running with fuzzing in Rust projects. 6 | 7 | For the curious: Under-the-hood, `cargo-fuzz` hooks into LLVM's 8 | [libFuzzer](https://www.llvm.org/docs/LibFuzzer.html) to do the actual fuzzing. 9 | -------------------------------------------------------------------------------- /Guide/src/dev_guide/tests/fuzzing/_images/fuzz_abstraction_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/Guide/src/dev_guide/tests/fuzzing/_images/fuzz_abstraction_example.png -------------------------------------------------------------------------------- /Guide/src/dev_guide/tests/fuzzing/_images/fuzz_lcov_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/Guide/src/dev_guide/tests/fuzzing/_images/fuzz_lcov_example.png -------------------------------------------------------------------------------- /Guide/src/reference/architecture.md: -------------------------------------------------------------------------------- 1 | # Architecture 2 | 3 | This chapter discusses the architecture of various key parts of the OpenVMM 4 | codebase. 5 | -------------------------------------------------------------------------------- /Guide/src/reference/architecture/_images/openhcl-accelnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/Guide/src/reference/architecture/_images/openhcl-accelnet.png -------------------------------------------------------------------------------- /Guide/src/reference/architecture/_images/openhcl-synthetic-nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/Guide/src/reference/architecture/_images/openhcl-synthetic-nw.png -------------------------------------------------------------------------------- /Guide/src/reference/architecture/_images/openhcl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/Guide/src/reference/architecture/_images/openhcl.png -------------------------------------------------------------------------------- /Guide/src/reference/architecture/openvmm.md: -------------------------------------------------------------------------------- 1 | # OpenVMM Architecture 2 | 3 | > This page is under construction 4 | -------------------------------------------------------------------------------- /Guide/src/reference/openhcl.md: -------------------------------------------------------------------------------- 1 | # OpenHCL Features 2 | 3 | This section discuss various features that are exclusive to OpenHCL. 4 | -------------------------------------------------------------------------------- /Guide/src/reference/openhcl/diag.md: -------------------------------------------------------------------------------- 1 | # Diagnostics 2 | 3 | This chapter discusses several of the diagnostic tools available when working 4 | with OpenHCL. 5 | -------------------------------------------------------------------------------- /Guide/src/reference/openvmm.md: -------------------------------------------------------------------------------- 1 | # OpenVMM Features 2 | 3 | This section discuss various features that are exclusive to OpenVMM. 4 | -------------------------------------------------------------------------------- /Guide/src/rustdoc.md: -------------------------------------------------------------------------------- 1 | # OpenVMM Rust Crate API Docs 2 | 3 | Rust crate API documentation generated by `cargo doc` is available at the 4 | following URLs: 5 | 6 | - Linux x86 - 7 | - Windows x86 - 8 | -------------------------------------------------------------------------------- /Guide/src/user_guide/openhcl/run/_images/exampleWindows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/Guide/src/user_guide/openhcl/run/_images/exampleWindows.png -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support 2 | 3 | ## How to file issues and get help 4 | 5 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 6 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 7 | feature request as a new Issue. 8 | 9 | For help and questions about using this project, please reach out to us on [Zulip](https://openvmm.zulipchat.com/). 10 | 11 | ## Microsoft Support Policy 12 | 13 | Support for this **PROJECT** is limited to the resources listed above. 14 | -------------------------------------------------------------------------------- /build_support/macos/entitlements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.hypervisor 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /build_support/macos/sign_and_run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | case "$CARGO_PKG_NAME" in 6 | "openvmm"|"tmk_vmm") 7 | # Add entitlements for using hypervisor framework. 8 | entitlements=$(dirname "$0")/entitlements.xml 9 | codesign --entitlements "$entitlements" -f -s - "$1" > /dev/null 10 | ;; 11 | *) 12 | ;; 13 | esac 14 | 15 | exec "$@" 16 | -------------------------------------------------------------------------------- /build_support/underhill_cross/aarch64-underhill-musl-gcc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | script_dir="$(dirname "$0")" 4 | MUSL_ARCH=aarch64 MUSL_SYSROOT="$AARCH64_SYSROOT" exec "${REALGCC:-aarch64-linux-gnu-gcc}" "$@" -specs "$script_dir/musl-gcc.specs" 5 | -------------------------------------------------------------------------------- /build_support/underhill_cross/x86_64-underhill-musl-gcc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | script_dir="$(dirname "$0")" 4 | MUSL_ARCH=x86_64 MUSL_SYSROOT="$X86_64_SYSROOT" exec "${REALGCC:-x86_64-linux-gnu-gcc}" "$@" -specs "$script_dir/musl-gcc.specs" 5 | -------------------------------------------------------------------------------- /build_support/windows_cross/aarch64-clang-cl: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/aarch64-lld-link: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/aarch64-llvm-dlltool: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/aarch64-llvm-lib: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/aarch64-llvm-rc: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/aarch64-midlrt.exe: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/x86_64-clang-cl: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/x86_64-lld-link: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/x86_64-llvm-dlltool: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/x86_64-llvm-lib: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/x86_64-llvm-rc: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /build_support/windows_cross/x86_64-midlrt.exe: -------------------------------------------------------------------------------- 1 | cross_tool.py -------------------------------------------------------------------------------- /flowey/flowey/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "flowey" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | flowey_core.workspace = true 11 | 12 | anyhow.workspace = true 13 | fs-err.workspace = true 14 | log.workspace = true 15 | serde = { workspace = true, features = ["derive"] } 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /flowey/flowey_cli/src/cli/debug/list_nodes.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | /// (debug) list all registered flowey nodes 5 | #[derive(clap::Args)] 6 | pub struct ListNodes; 7 | 8 | impl ListNodes { 9 | pub fn run(self) -> anyhow::Result<()> { 10 | // FUTURE: it might be worth improving this output to leverage the DAG? 11 | let mut v = flowey_core::node::list_all_registered_nodes() 12 | .map(|h| h.modpath()) 13 | .collect::>(); 14 | v.sort(); 15 | for node in v { 16 | println!("{node}") 17 | } 18 | 19 | Ok(()) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /flowey/flowey_cli/src/cli/debug/list_patches.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | /// (debug) list all registered patches 5 | #[derive(clap::Args)] 6 | pub struct ListPatches; 7 | 8 | impl ListPatches { 9 | pub fn run(self) -> anyhow::Result<()> { 10 | let mut v = flowey_core::patch::patchfn_by_modpath() 11 | .keys() 12 | .collect::>(); 13 | v.sort(); 14 | for fn_name in v { 15 | println!("{fn_name}") 16 | } 17 | 18 | Ok(()) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /flowey/flowey_cli/src/flow_resolver/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Pipeline-backend agnostic code which resolves flow node sequences. 5 | 6 | pub mod stage0_dag; 7 | pub mod stage1_dag; 8 | -------------------------------------------------------------------------------- /flowey/flowey_cli/src/pipeline_resolver/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Code which resolves user-defined 5 | //! [`Pipeline`](flowey_core::pipeline::Pipeline) objects into runnable code. 6 | //! 7 | //! Depending on the selected backend, different [`crate::flow_resolver`] 8 | //! implementations will be used. 9 | 10 | pub mod ado_yaml; 11 | // pub mod bash; // not maintained at the moment 12 | pub mod common_yaml; 13 | pub mod direct_run; 14 | pub mod generic; 15 | pub mod github_yaml; 16 | pub mod viz; 17 | -------------------------------------------------------------------------------- /flowey/flowey_cli/src/var_db/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Implementations of different runtime variable database backends 5 | 6 | pub mod in_memory; 7 | pub mod single_json_file; 8 | -------------------------------------------------------------------------------- /flowey/flowey_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "flowey_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | anyhow.workspace = true 11 | fs-err.workspace = true 12 | linkme.workspace = true 13 | serde = { workspace = true, features = ["derive"] } 14 | serde_json.workspace = true 15 | serde_yaml.workspace = true 16 | 17 | [dev-dependencies] 18 | tempfile.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /flowey/flowey_core/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Core types and traits shared between user-facing and internal flowey code. 5 | //! 6 | //! **If you are a flowey node / pipeline author, you should not directly import 7 | //! this crate!** The crate you should be using is called `flowey`, which only 8 | //! exports user-facing types / traits. 9 | 10 | #![expect(missing_docs)] 11 | 12 | pub mod node; 13 | pub mod patch; 14 | pub mod pipeline; 15 | pub mod reexports; 16 | pub mod util; 17 | -------------------------------------------------------------------------------- /flowey/flowey_core/src/node/spec.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Type definitions from GitHub events and payloads. 5 | 6 | use serde::Deserialize; 7 | use serde::Serialize; 8 | 9 | #[derive(Serialize, Deserialize)] 10 | pub struct Head { 11 | #[serde(rename = "ref")] 12 | pub head_ref: String, 13 | } 14 | 15 | #[derive(Serialize, Deserialize)] 16 | pub struct GhContextVarReaderEventPullRequest { 17 | pub head: Head, 18 | pub number: u32, 19 | } 20 | -------------------------------------------------------------------------------- /flowey/flowey_core/src/reexports.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Reexports of third-party crates used by flowey. 5 | 6 | #![doc(hidden)] 7 | 8 | pub use serde::Deserialize; 9 | pub use serde::Serialize; 10 | -------------------------------------------------------------------------------- /flowey/flowey_hvlite/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Flowey pipelines used by the OpenVMM project 5 | 6 | fn main() { 7 | flowey_cli::flowey_main::( 8 | "flowey_hvlite", 9 | &flowey_hvlite::repo_root(), 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /flowey/flowey_hvlite/src/pipelines_shared/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Shared constants and helper functionality used across multiple pipelines. 5 | 6 | pub mod cfg_common_params; 7 | pub mod gh_flowey_bootstrap_template; 8 | pub mod gh_pools; 9 | -------------------------------------------------------------------------------- /flowey/flowey_lib_common/src/_util/cargo_output.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Type definitions for the output of `cargo build --message-format=json`. 5 | 6 | use serde::Deserialize; 7 | use std::path::PathBuf; 8 | 9 | #[derive(Deserialize, Debug)] 10 | #[serde(tag = "reason")] 11 | pub enum Message { 12 | #[serde(rename = "compiler-artifact")] 13 | CompilerArtifact { 14 | target: Target, 15 | filenames: Vec, 16 | }, 17 | #[serde(other)] 18 | Other, 19 | } 20 | 21 | #[derive(Deserialize, Debug)] 22 | pub struct Target { 23 | pub kind: Vec, 24 | pub name: String, 25 | } 26 | -------------------------------------------------------------------------------- /flowey/schema_ado_yaml/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "schema_ado_yaml" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | serde = { workspace = true, features = ["derive"] } 11 | serde_yaml.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /guest_test_uefi/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "guest_test_uefi" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | uefi = { workspace = true, features = ["alloc", "global_allocator"] } 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /guest_test_uefi/README.md: -------------------------------------------------------------------------------- 1 | # `guest_test_uefi` 2 | 3 | See the guide for more info on how to build/run the code in this crate. 4 | -------------------------------------------------------------------------------- /guest_test_uefi/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![doc = include_str!("../README.md")] 5 | // HACK: workaround for building guest_test_uefi as part of the workspace in CI. 6 | #![cfg_attr(all(not(test), target_os = "uefi"), no_main)] 7 | #![cfg_attr(all(not(test), target_os = "uefi"), no_std)] 8 | 9 | // HACK: workaround for building guest_test_uefi as part of the workspace in CI 10 | // 11 | // Actual entrypoint is `uefi::uefi_main`, via the `#[entry]` macro 12 | #[cfg(any(test, not(target_os = "uefi")))] 13 | fn main() {} 14 | 15 | #[macro_use] 16 | extern crate alloc; 17 | 18 | mod uefi; 19 | -------------------------------------------------------------------------------- /hyperv/tools/hypestv/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Interactive CLI for Hyper-V VMs. 5 | 6 | mod windows; 7 | 8 | #[cfg(windows)] 9 | fn main() -> anyhow::Result<()> { 10 | pal_async::DefaultPool::run_with(windows::main) 11 | } 12 | 13 | #[cfg(not(windows))] 14 | fn main() { 15 | eprintln!("not supported on this platform"); 16 | std::process::exit(1); 17 | } 18 | -------------------------------------------------------------------------------- /openhcl/azure_profiler_proto/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "azure_profiler_proto" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | mesh.workspace = true 12 | mesh_rpc.workspace = true 13 | 14 | prost.workspace = true 15 | 16 | [build-dependencies] 17 | mesh_build.workspace = true 18 | prost-build.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /openhcl/azure_profiler_proto/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | prost_build::Config::new() 8 | .type_attribute(".", "#[derive(mesh::MeshPayload)]") 9 | .type_attribute(".", "#[mesh(prost)]") 10 | .service_generator(Box::new(mesh_build::MeshServiceGenerator::new())) 11 | .compile_protos(&["src/profile.proto"], &["src/"]) 12 | .unwrap(); 13 | } 14 | -------------------------------------------------------------------------------- /openhcl/azure_profiler_proto/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! The Azure Profiler service protocol definitions. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | // Crates used by generated code. Reference them explicitly to ensure that 10 | // automated tools do not remove them. 11 | use inspect as _; 12 | use mesh_rpc as _; 13 | use prost as _; 14 | 15 | include!(concat!(env!("OUT_DIR"), "/profile.rs")); 16 | -------------------------------------------------------------------------------- /openhcl/azure_profiler_proto/src/profile.proto: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | syntax = "proto3"; 5 | 6 | package profile; 7 | 8 | import "google/protobuf/empty.proto"; 9 | 10 | service AzureProfiler { 11 | rpc Profile(ProfileRequest) returns (google.protobuf.Empty); 12 | } 13 | 14 | message ProfileRequest { 15 | uint64 conn = 1; 16 | uint64 duration = 2; 17 | repeated string profiler_args = 3; 18 | } 19 | -------------------------------------------------------------------------------- /openhcl/bootloader_fdt_parser/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "bootloader_fdt_parser" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | fdt.workspace = true 11 | inspect.workspace = true 12 | loader_defs = { workspace = true, features = ["inspect"] } 13 | memory_range = { workspace = true, features = ["inspect"] } 14 | vm_topology = { workspace = true, features = ["inspect"] } 15 | 16 | anyhow.workspace = true 17 | fs-err.workspace = true 18 | igvm_defs.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /openhcl/build_info/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "build_info" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | 12 | [build-dependencies] 13 | vergen = { workspace = true, features = ["git", "gitcl"] } 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /openhcl/build_info/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | vergen::EmitBuilder::builder().all_git().emit().unwrap(); 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/diag_proto/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "diag_proto" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | mesh.workspace = true 12 | mesh_rpc.workspace = true 13 | 14 | prost.workspace = true 15 | 16 | [build-dependencies] 17 | mesh_build.workspace = true 18 | prost-build.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /openhcl/diag_proto/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | prost_build::Config::new() 8 | .type_attribute(".", "#[derive(mesh::MeshPayload)]") 9 | .type_attribute(".", "#[mesh(prost)]") 10 | .service_generator(Box::new(mesh_build::MeshServiceGenerator::new())) 11 | .compile_protos(&["src/diag.proto"], &["src/"]) 12 | .unwrap(); 13 | } 14 | -------------------------------------------------------------------------------- /openhcl/diag_server/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/hcl/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/hcl_mapper/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hcl_mapper" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | hcl.workspace = true 11 | page_pool_alloc.workspace = true 12 | 13 | inspect.workspace = true 14 | sparse_mmap.workspace = true 15 | 16 | anyhow.workspace = true 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /openhcl/host_fdt_parser/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "host_fdt_parser" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | tracing = ["dep:tracing"] 11 | inspect = ["dep:inspect", "memory_range/inspect"] 12 | 13 | [dependencies] 14 | hvdef.workspace = true 15 | memory_range.workspace = true 16 | 17 | fdt.workspace = true 18 | inspect = { workspace = true, optional = true } 19 | 20 | arrayvec.workspace = true 21 | igvm_defs.workspace = true 22 | tracing = { workspace = true, optional = true } 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /openhcl/kmsg_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "kmsg_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lints] 10 | workspace = true 11 | -------------------------------------------------------------------------------- /openhcl/lower_vtl_permissions_guard/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "lower_vtl_permissions_guard" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | hvdef.workspace = true 11 | inspect.workspace = true 12 | user_driver.workspace = true 13 | virt.workspace = true 14 | 15 | anyhow.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "minimal_rt" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | hvdef.workspace = true 11 | 12 | arrayvec.workspace = true 13 | cfg-if.workspace = true 14 | zerocopy.workspace = true 15 | [build-dependencies] 16 | minimal_rt_build.workspace = true 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/aarch64-config.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | # Config file to use to build minimal_rt binaries for aarch64. 5 | # 6 | # The dependency on build-std requires setting RUSTC_BOOTSTRAP=1, or an 7 | # unstable toolchain. Consider using the aarch64-unknown-linux-musl 8 | # target if you want to avoid this. 9 | 10 | [build] 11 | # Custom target needed to enable static PIE support, which is not 12 | # supported by aarch64-minimal. 13 | target = "minimal_rt/aarch64-minimal_rt-none.json" 14 | 15 | [unstable] 16 | build-std = ["core"] 17 | 18 | [env] 19 | MINIMAL_RT_BUILD = "1" 20 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/aarch64-minimal_rt-none.json: -------------------------------------------------------------------------------- 1 | { 2 | "arch": "aarch64", 3 | "crt-objects-fallback": "false", 4 | "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32", 5 | "disable-redzone": true, 6 | "features": "+v8a,+strict-align,+neon,+fp-armv8", 7 | "linker": "rust-lld", 8 | "linker-flavor": "gnu-lld", 9 | "llvm-target": "aarch64-unknown-none", 10 | "max-atomic-width": 128, 11 | "panic-strategy": "abort", 12 | "position-independent-executables": true, 13 | "static-position-independent-executables": true, 14 | "stack-probes": { 15 | "kind": "inline" 16 | }, 17 | "target-pointer-width": "64" 18 | } 19 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | minimal_rt_build::init(); 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/src/arch/aarch64/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![cfg(target_arch = "aarch64")] 5 | 6 | //! aarch64 specifics. 7 | 8 | pub mod enlightened_panic; 9 | pub mod hypercall; 10 | pub mod intrinsics; 11 | pub mod reftime; 12 | pub mod serial; 13 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/src/arch/aarch64/reftime.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | use super::hypercall::get_register_fast; 5 | 6 | pub fn reference_time() -> u64 { 7 | get_register_fast(hvdef::HvArm64RegisterName::TimeRefCount.into()) 8 | .expect("failed to query reference time") 9 | .as_u64() 10 | } 11 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/src/arch/x86_64/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![cfg(target_arch = "x86_64")] 5 | 6 | //! x86_64 architecture-specific implementations. 7 | 8 | pub mod enlightened_panic; 9 | pub mod hypercall; 10 | pub mod intrinsics; 11 | pub mod msr; 12 | pub mod reftime; 13 | pub mod serial; 14 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/src/arch/x86_64/reftime.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | use super::msr::read_msr; 5 | 6 | pub fn reference_time() -> u64 { 7 | // SAFETY: no safety requirements. 8 | unsafe { read_msr(hvdef::HV_X64_MSR_TIME_REF_COUNT) } 9 | } 10 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Minimal support runtime for `openhcl_boot` and other kernel-mode 5 | //! environments. 6 | 7 | #![no_std] 8 | // UNSAFETY: Interacting with low level hardware and bootloader primitives. 9 | #![expect(unsafe_code)] 10 | 11 | pub mod arch; 12 | pub mod enlightened_panic; 13 | pub mod reftime; 14 | pub mod reloc; 15 | pub mod rt; 16 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/src/reftime.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Hypervisor reference time. 5 | 6 | /// Returns the current reference time from the hypervisor, in 100ns units. 7 | pub fn reference_time() -> u64 { 8 | crate::arch::reference_time() 9 | } 10 | -------------------------------------------------------------------------------- /openhcl/minimal_rt/x86_64-config.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | # Config file to use to build minimal_rt binaries for x86_64. 5 | 6 | [build] 7 | target = "x86_64-unknown-none" 8 | 9 | [env] 10 | MINIMAL_RT_BUILD = "1" 11 | -------------------------------------------------------------------------------- /openhcl/minimal_rt_build/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "minimal_rt_build" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /openhcl/openhcl_attestation_protocol/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "openhcl_attestation_protocol" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | open_enum.workspace = true 11 | guid.workspace = true 12 | mesh.workspace = true 13 | sev_guest_device.workspace = true 14 | tdx_guest_device.workspace = true 15 | 16 | base64.workspace = true 17 | base64-serde.workspace = true 18 | hex.workspace = true 19 | serde = { workspace = true, features = ["derive"] } 20 | serde_json.workspace = true 21 | zerocopy.workspace = true 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /openhcl/openhcl_attestation_protocol/src/igvm_attest/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Include modules that define the data structures used in `IGVM_ATTEST` GET message. 5 | 6 | pub mod akv; 7 | pub mod cps; 8 | pub mod get; 9 | -------------------------------------------------------------------------------- /openhcl/openhcl_attestation_protocol/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Include modules the protocol used by the attestation process. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod igvm_attest; 10 | pub mod vmgs; 11 | -------------------------------------------------------------------------------- /openhcl/openhcl_boot/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | minimal_rt_build::init(); 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/openhcl_boot/src/arch/aarch64/vsm.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Arch-specific VSM details. 5 | 6 | use crate::host_params::shim_params::IsolationType; 7 | use loader_defs::shim::SupportedIsolationType; 8 | 9 | pub fn get_isolation_type(supported_isolation_type: SupportedIsolationType) -> IsolationType { 10 | if supported_isolation_type != SupportedIsolationType::VBS { 11 | let _ = IsolationType::Vbs; 12 | panic!("unexpected isolation type {:?}", supported_isolation_type) 13 | } 14 | 15 | IsolationType::None 16 | } 17 | -------------------------------------------------------------------------------- /openhcl/openhcl_boot/src/arch/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Imports and re-exports architecture-specific implementations. 5 | 6 | mod aarch64; 7 | mod x86_64; 8 | 9 | cfg_if::cfg_if!( 10 | if #[cfg(target_arch = "x86_64")] { 11 | pub use x86_64::*; 12 | } else if #[cfg(target_arch = "aarch64")] { 13 | pub use aarch64::*; 14 | } else { 15 | compile_error!("target_arch is not supported"); 16 | } 17 | ); 18 | -------------------------------------------------------------------------------- /openhcl/openhcl_boot/src/arch/x86_64/vp.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Setting up VTL2 VPs 5 | 6 | use crate::host_params::PartitionInfo; 7 | 8 | pub fn setup_vtl2_vp(_partition_info: &PartitionInfo) { 9 | // X64 doesn't require any special VTL2 VP setup in the boot loader at the 10 | // moment. 11 | } 12 | -------------------------------------------------------------------------------- /openhcl/openhcl_dma_manager/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "openhcl_dma_manager" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | hcl.workspace = true 11 | hcl_mapper.workspace = true 12 | lower_vtl_permissions_guard.workspace = true 13 | 14 | hvdef.workspace = true 15 | inspect.workspace = true 16 | memory_range.workspace = true 17 | mesh.workspace = true 18 | page_pool_alloc.workspace = true 19 | user_driver.workspace = true 20 | virt.workspace = true 21 | vmcore.workspace = true 22 | 23 | anyhow.workspace = true 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /openhcl/openvmm_hcl/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Root binary crate for builds of OpenVMM-HCL. 5 | 6 | // Link resources. 7 | #[cfg(target_os = "linux")] 8 | use openvmm_hcl_resources as _; 9 | 10 | #[cfg(not(target_os = "linux"))] 11 | fn main() { 12 | unimplemented!("openvmm_hcl only runs on Linux"); 13 | } 14 | 15 | #[cfg(target_os = "linux")] 16 | use underhill_entry::underhill_main as main; 17 | -------------------------------------------------------------------------------- /openhcl/openvmm_hcl_resources/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/perftoolsfs.config: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | file /usr/bin/perf ${OPENHCL_KERNEL_PATH}/build/native/bin/${OPENHCL_KERNEL_ARCH}/tools/perf/bin/perf 0755 0 0 5 | file /usr/bin/trace ${OPENHCL_KERNEL_PATH}/build/native/bin/${OPENHCL_KERNEL_ARCH}/tools/perf/bin/trace 0755 0 0 6 | -------------------------------------------------------------------------------- /openhcl/profiler_worker/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "profiler_worker" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh = { workspace = true, features = ["socket2"] } 11 | mesh_worker.workspace = true 12 | pal_async.workspace = true 13 | 14 | anyhow.workspace = true 15 | fs-err.workspace = true 16 | futures.workspace = true 17 | tracing.workspace = true 18 | socket2.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /openhcl/sidecar/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | minimal_rt_build::init(); 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/sidecar/src/arch/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Per-architecture sidecar code. 5 | 6 | mod x86_64; 7 | -------------------------------------------------------------------------------- /openhcl/sidecar_client/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "sidecar_client" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | hvdef.workspace = true 11 | sidecar_defs.workspace = true 12 | 13 | pal_async.workspace = true 14 | 15 | parking_lot.workspace = true 16 | thiserror.workspace = true 17 | tracing.workspace = true 18 | zerocopy.workspace = true 19 | fs-err.workspace = true 20 | libc.workspace = true 21 | nix = { workspace = true, features = ["ioctl"] } 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /openhcl/sidecar_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "sidecar_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | hvdef.workspace = true 11 | open_enum.workspace = true 12 | x86defs.workspace = true 13 | 14 | zerocopy.workspace = true 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /openhcl/underhill_confidentiality/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "underhill_confidentiality" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | std = [] 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /openhcl/underhill_core/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/underhill_crash/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | vergen::EmitBuilder::builder().all_git().emit().unwrap(); 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/underhill_dump/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "underhill_dump" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | elfcore.workspace = true 11 | 12 | underhill_confidentiality = { workspace = true, features = ["std"] } 13 | 14 | anyhow.workspace = true 15 | libc.workspace = true 16 | tracing.workspace = true 17 | tracing-subscriber.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /openhcl/underhill_init/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | vergen::EmitBuilder::builder().all_git().emit().unwrap(); 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/underhill_mem/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/underhill_threadpool/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "underhill_threadpool" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | cvm_tracing.workspace = true 11 | inspect = { workspace = true, features = ["std"] } 12 | loan_cell.workspace = true 13 | pal.workspace = true 14 | pal_async.workspace = true 15 | pal_uring.workspace = true 16 | 17 | fs-err.workspace = true 18 | parking_lot.workspace = true 19 | thiserror.workspace = true 20 | tracing.workspace = true 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /openhcl/virt_mshv_vtl/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openhcl/virt_mshv_vtl/src/processor/nice.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | // UNSAFETY: Calling nice. 5 | #![expect(unsafe_code)] 6 | 7 | pub(crate) fn nice(i: i32) { 8 | // SAFETY: calling as documented. 9 | unsafe { 10 | libc::nice(i); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /openhcl/vmfirmwareigvm_dll/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmfirmwareigvm_dll" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | ci = [] 11 | 12 | [lib] 13 | crate-type = ["cdylib"] 14 | 15 | [build-dependencies] 16 | embed-resource.workspace = true 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /openhcl/vmfirmwareigvm_dll/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /openhcl/vmfirmwareigvm_dll/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! A empty Rust crate, whose only purpose is to serve as a "build system" for a 5 | //! resource-only DLL containing an OpenHCL IGVM file. 6 | //! 7 | //! The real magic is all in build.rs. See that file for more info. 8 | 9 | #![cfg_attr(not(any(test, feature = "ci")), no_std)] 10 | #![forbid(unsafe_code)] 11 | 12 | // required by the Rust compiler, even though we don't include any code 13 | #[cfg(not(any(test, feature = "ci")))] 14 | #[panic_handler] 15 | fn panic_handler(_panic: &core::panic::PanicInfo<'_>) -> ! { 16 | unreachable!() 17 | } 18 | -------------------------------------------------------------------------------- /openvmm/hvlite_core/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openvmm/hvlite_core/src/emuplat/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | pub mod firmware; 5 | pub mod i440bx_host_pci_bridge; 6 | pub mod watchdog; 7 | -------------------------------------------------------------------------------- /openvmm/hvlite_core/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! This crate implements the core VM worker for hvlite. This includes static 5 | //! configuration of hvlite platform resources, such as the clock source and 6 | //! memory management. 7 | //! 8 | //! Try not to add new functionality to this crate. Add it to other crates, and 9 | //! reference new functionality via `Resource`s when you can to minimize build 10 | //! time. 11 | 12 | #![forbid(unsafe_code)] 13 | 14 | mod emuplat; 15 | mod partition; 16 | mod vmgs_non_volatile_store; 17 | mod worker; 18 | 19 | pub use worker::dispatch::VmWorker; 20 | -------------------------------------------------------------------------------- /openvmm/hvlite_core/src/worker/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | pub mod dispatch; 5 | mod rom; 6 | pub mod vm_loaders; 7 | -------------------------------------------------------------------------------- /openvmm/hvlite_core/src/worker/vm_loaders/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | // TODO: move to a separate crate. 5 | 6 | pub mod igvm; 7 | pub mod linux; 8 | pub mod pcat; 9 | pub mod uefi; 10 | -------------------------------------------------------------------------------- /openvmm/hvlite_defs/src/entrypoint.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Definitions for the mesh entrypoint. 5 | //! 6 | //! These are here instead of in `openvmm_entry` to support launching hvlite from 7 | //! a foreign mesh host. The only supported use case is launching hvlite from 8 | //! petri for testing. 9 | 10 | use mesh::MeshPayload; 11 | use mesh_worker::WorkerHostRunner; 12 | 13 | /// The initial message to send when launching a mesh child process. 14 | #[derive(MeshPayload)] 15 | pub struct MeshHostParams { 16 | pub runner: WorkerHostRunner, 17 | } 18 | -------------------------------------------------------------------------------- /openvmm/hvlite_defs/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Client-facing definitions for the VM worker. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod config; 10 | pub mod entrypoint; 11 | pub mod rpc; 12 | pub mod worker; 13 | -------------------------------------------------------------------------------- /openvmm/hvlite_helpers/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hvlite_helpers" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | disk_backend_resources.workspace = true 11 | disk_vhd1.workspace = true 12 | get_resources.workspace = true 13 | hvlite_defs.workspace = true 14 | vm_resource.workspace = true 15 | 16 | mesh.workspace = true 17 | 18 | anyhow.workspace = true 19 | tracing.workspace = true 20 | 21 | [target.'cfg(windows)'.dependencies] 22 | disk_vhdmp.workspace = true 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /openvmm/hvlite_helpers/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Functions used by hvlite entry points to help construct resources. 5 | 6 | #![forbid(unsafe_code)] 7 | 8 | pub mod disk; 9 | pub mod underhill; 10 | -------------------------------------------------------------------------------- /openvmm/hvlite_pcat_locator/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hvlite_pcat_locator" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | 12 | anyhow.workspace = true 13 | fs-err.workspace = true 14 | object = { workspace = true, features = ["pe", "read_core", "std"] } 15 | tracing.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /openvmm/hvlite_ttrpc_vmservice/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hvlite_ttrpc_vmservice" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | mesh_rpc.workspace = true 12 | 13 | prost.workspace = true 14 | 15 | [build-dependencies] 16 | mesh_build.workspace = true 17 | 18 | prost-build.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /openvmm/hvlite_ttrpc_vmservice/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | prost_build::Config::new() 8 | .type_attribute(".", "#[derive(mesh::MeshPayload)]") 9 | .type_attribute(".", "#[mesh(prost)]") 10 | .service_generator(Box::new(mesh_build::MeshServiceGenerator::new())) 11 | .compile_protos(&["src/vmservice.proto"], &["src"]) 12 | .unwrap(); 13 | 14 | println!("cargo:rerun-if-changed=src/vmservice.proto"); 15 | } 16 | -------------------------------------------------------------------------------- /openvmm/hvlite_ttrpc_vmservice/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Rust binadings to the `vmservice.proto` TTRPC API 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | #![expect(clippy::enum_variant_names, clippy::large_enum_variant)] 9 | 10 | // Crates used by generated code. Reference them explicitly to ensure that 11 | // automated tools do not remove them. 12 | use mesh_rpc as _; 13 | use prost as _; 14 | 15 | include!(concat!(env!("OUT_DIR"), "/vmservice.rs")); 16 | -------------------------------------------------------------------------------- /openvmm/membacking/src/mapping_manager/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Modules related to the mapping manager. 5 | 6 | mod manager; 7 | mod mappable; 8 | mod object_cache; 9 | mod va_mapper; 10 | 11 | pub use manager::MappingManager; 12 | pub use manager::MappingManagerClient; 13 | pub use mappable::Mappable; 14 | pub use va_mapper::VaMapper; 15 | pub use va_mapper::VaMapperError; 16 | -------------------------------------------------------------------------------- /openvmm/openvmm/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | // Prevent this build script from rerunning unnecessarily. 8 | println!("cargo:rerun-if-changed=build.rs"); 9 | 10 | if std::env::var_os("CARGO_CFG_WINDOWS").is_some() { 11 | println!("cargo:rustc-link-lib=onecore_apiset"); 12 | println!("cargo:rustc-link-lib=onecoreuap_apiset"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /openvmm/openvmm/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Root binary crate for OpenVMM. 5 | 6 | // Ensure openvmm_resources gets linked. 7 | extern crate openvmm_resources as _; 8 | 9 | fn main() { 10 | openvmm_entry::hvlite_main() 11 | } 12 | -------------------------------------------------------------------------------- /openvmm/openvmm_entry/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /openvmm/openvmm_resources/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /petri/guest-bootstrap/README.md: -------------------------------------------------------------------------------- 1 | This directory contains files needed to bootstrap the guest with the pipette 2 | agent. 3 | 4 | * `meta-data` and `user-data`: cloud-init files for Linux guests 5 | * `imc.hiv`: an IMC hive for Windows guests 6 | 7 | To update `imc.hiv`, on a Windows machine run `cargo run -p make_imc_hive PATH/TO/imc.hiv` 8 | -------------------------------------------------------------------------------- /petri/guest-bootstrap/imc.hiv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/petri/guest-bootstrap/imc.hiv -------------------------------------------------------------------------------- /petri/guest-bootstrap/meta-data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/petri/guest-bootstrap/meta-data -------------------------------------------------------------------------------- /petri/guest-bootstrap/network-config: -------------------------------------------------------------------------------- 1 | # Specify an optional device to work around https://github.com/canonical/cloud-init/issues/5511 2 | version: 1 3 | config: 4 | - type: physical 5 | name: eth0 6 | optional: true 7 | subnets: 8 | - type: dhcp 9 | -------------------------------------------------------------------------------- /petri/make_imc_hive/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "make_imc_hive" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(windows)'.dependencies] 10 | windows-sys = { workspace = true, features = ["Wdk_System_OfflineRegistry", "Win32_Foundation", "Win32_Security", "Win32_System_Registry"] } 11 | 12 | anyhow.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /petri/make_imc_hive/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Tool to make an IMC hive for injecting pipette into a Windows guest. 5 | 6 | #[cfg(windows)] 7 | mod windows; 8 | 9 | #[cfg(not(windows))] 10 | fn main() { 11 | eprintln!("not supported on this OS"); 12 | std::process::exit(1); 13 | } 14 | 15 | #[cfg(windows)] 16 | fn main() -> anyhow::Result<()> { 17 | windows::main() 18 | } 19 | -------------------------------------------------------------------------------- /petri/petri-tool/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "petri-tool" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | petri.workspace = true 11 | petri_artifacts_common.workspace = true 12 | petri_artifact_resolver_openvmm_known_paths.workspace = true 13 | 14 | anyhow.workspace = true 15 | clap = { workspace = true, features = ["derive"] } 16 | 17 | [lints] 18 | workspace = true 19 | 20 | [package.metadata.xtask.house-rules] 21 | # emits a binary, where kebab-case is more natural 22 | allow-dash-in-name = true 23 | -------------------------------------------------------------------------------- /petri/petri_artifacts_common/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "petri_artifacts_common" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | petri_artifacts_core.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /petri/petri_artifacts_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "petri_artifacts_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | anyhow.workspace = true 11 | paste.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /petri/pipette_client/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "pipette_client" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | pipette_protocol.workspace = true 11 | 12 | pal_async.workspace = true 13 | mesh.workspace = true 14 | mesh_remote.workspace = true 15 | 16 | anyhow.workspace = true 17 | fs-err.workspace = true 18 | futures.workspace = true 19 | futures-concurrency.workspace = true 20 | tracing.workspace = true 21 | typed-path.workspace = true 22 | xshell-macros.workspace = true 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /petri/pipette_protocol/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "pipette_protocol" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /rustfmt.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | newline_style="unix" 5 | use_field_init_shorthand=true 6 | style_edition="2024" 7 | -------------------------------------------------------------------------------- /support/address_filter/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "address_filter" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | 12 | thiserror.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /support/arc_cyclic_builder/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "arc_cyclic_builder" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dev-dependencies] 10 | futures-executor.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /support/atomic_ringbuf/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "atomic_ringbuf" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | cfg-if.workspace = true 11 | inspect.workspace = true 12 | parking_lot.workspace = true 13 | 14 | [target.'cfg(target_arch = "x86_64")'.dev-dependencies] 15 | loom.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /support/cache_topology/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "cache_topology" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | thiserror.workspace = true 11 | 12 | [target.'cfg(target_os = "linux")'.dependencies] 13 | fs-err.workspace = true 14 | 15 | [target.'cfg(windows)'.dependencies] 16 | windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_System_SystemInformation"] } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /support/ci_logger/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "ci_logger" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | env_logger.workspace = true 11 | log.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /support/clap_dyn_complete/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "clap_dyn_complete" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | async-trait.workspace = true 11 | clap = { workspace = true, features = ["derive", "env"] } 12 | futures.workspace = true 13 | log.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /support/closeable_mutex/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "closeable_mutex" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | parking_lot.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /support/console_relay/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "console_relay" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | pal_async.workspace = true 11 | term.workspace = true 12 | unix_socket.workspace = true 13 | 14 | anyhow.workspace = true 15 | futures.workspace = true 16 | getrandom.workspace = true 17 | tracing.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /support/debug_ptr/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "debug_ptr" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /support/fast_select/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "fast_select" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | parking_lot.workspace = true 11 | 12 | [dev-dependencies] 13 | futures.workspace = true 14 | pal_async.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | 19 | [package.metadata.xtask.unused-deps] 20 | # Used in doc tests 21 | ignored = ["futures"] 22 | -------------------------------------------------------------------------------- /support/fdt/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "fdt" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | thiserror.workspace = true 11 | zerocopy.workspace = true 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /support/fdt/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! This crate contains utilities to interact with Flattened DeviceTree binary 5 | //! blobs. Included is a builder and parser, both available as no_std. 6 | 7 | #![no_std] 8 | #![forbid(unsafe_code)] 9 | 10 | pub mod builder; 11 | pub mod parser; 12 | mod spec; 13 | 14 | pub use spec::ReserveEntry; 15 | -------------------------------------------------------------------------------- /support/headervec/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "headervec" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /support/inspect_counters/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "inspect_counters" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /support/inspect_derive/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "inspect_derive" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lib] 10 | proc-macro = true 11 | 12 | [dependencies] 13 | heck.workspace = true 14 | proc-macro2.workspace = true 15 | quote.workspace = true 16 | syn = { workspace = true, features = [ "extra-traits", "full" ] } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /support/inspect_proto/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "inspect_proto" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect = { workspace = true, features = ["initiate"] } 11 | mesh.workspace = true 12 | mesh_rpc.workspace = true 13 | 14 | prost.workspace = true 15 | 16 | [build-dependencies] 17 | inspect = { workspace = true, features = ["initiate"] } 18 | mesh_build.workspace = true 19 | mesh_protobuf.workspace = true 20 | 21 | prost-build.workspace = true 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /support/inspect_rlimit/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "inspect_rlimit" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(unix)'.dependencies] 10 | inspect = { workspace = true, features = ["std"] } 11 | 12 | cfg-if.workspace = true 13 | libc.workspace = true 14 | thiserror.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /support/inspect_task/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "inspect_task" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | pal_async.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /support/kmsg/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "kmsg" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | thiserror.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /support/loan_cell/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "loan_cell" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | 11 | [dev-dependencies] 12 | static_assertions.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /support/local_clock/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "local_clock" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | default = ["time_exts", "inspect"] 11 | 12 | time_exts = ["dep:time"] 13 | inspect = ["dep:inspect"] 14 | 15 | [dependencies] 16 | inspect = { workspace = true, optional = true } 17 | 18 | parking_lot.workspace = true 19 | time = { workspace = true, optional = true } 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /support/mesh/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mesh" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | default = [] 11 | prost = ["mesh_protobuf/prost"] 12 | socket2 = ["mesh_protobuf/socket2"] 13 | 14 | [dependencies] 15 | mesh_channel.workspace = true 16 | mesh_derive.workspace = true 17 | mesh_node.workspace = true 18 | mesh_protobuf.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /support/mesh/mesh_build/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mesh_build" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | heck.workspace = true 11 | proc-macro2.workspace = true 12 | prost-build.workspace = true 13 | quote.workspace = true 14 | syn = { workspace = true, features = ["extra-traits"] } 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /support/mesh/mesh_channel_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mesh_channel_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh_protobuf.workspace = true 11 | mesh_node.workspace = true 12 | 13 | futures-core.workspace = true 14 | parking_lot.workspace = true 15 | thiserror.workspace = true 16 | tracing.workspace = true 17 | 18 | [dev-dependencies] 19 | static_assertions.workspace = true 20 | test_with_tracing.workspace = true 21 | 22 | futures.workspace = true 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /support/mesh/mesh_channel_core/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Core mesh channel functionality, supporting sending and receiving messages 5 | //! within and between nodes. 6 | //! 7 | //! This contains only the basic channel implementations, not the extra utility 8 | //! types on top that `mesh_channel` provides. 9 | 10 | mod deque; 11 | mod error; 12 | mod mpsc; 13 | mod oneshot; 14 | mod sync_unsafe_cell; 15 | 16 | pub use error::*; 17 | pub use mpsc::*; 18 | pub use oneshot::*; 19 | -------------------------------------------------------------------------------- /support/mesh/mesh_derive/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mesh_derive" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lib] 10 | proc-macro = true 11 | 12 | [dependencies] 13 | heck.workspace = true 14 | proc-macro2.workspace = true 15 | quote.workspace = true 16 | syn = { workspace = true, features = [ "extra-traits" ] } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /support/mesh/mesh_node/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Implementation of mesh port and node communication model. 5 | 6 | #![expect(missing_docs)] 7 | 8 | pub mod common; 9 | pub mod local_node; 10 | pub mod message; 11 | pub mod resource; 12 | -------------------------------------------------------------------------------- /support/mesh/mesh_protobuf/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | #[cfg(feature = "prost")] 8 | { 9 | prost_build::Config::new() 10 | .type_attribute(".", "#[derive(mesh_derive::Protobuf)]") 11 | .type_attribute(".", "#[mesh(prost)]") 12 | .compile_protos(&["src/prost.proto"], &["src/"]) 13 | .unwrap(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /support/mesh/mesh_protobuf/src/prost.proto: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | // Sample prost.proto for tests in prost.rs. 5 | 6 | syntax = "proto3"; 7 | 8 | package foo; 9 | 10 | message Foo { 11 | string bar = 1; 12 | uint32 baz = 2; 13 | oneof stuff { 14 | uint32 abc = 3; 15 | string def = 4; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /support/mesh/mesh_remote/src/common.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Common functionality for nodes. 5 | 6 | use mesh_node::common::Address; 7 | use mesh_protobuf::Protobuf; 8 | 9 | /// The protobuf-serializable portion of an invitation. 10 | /// 11 | /// This will be combined with a node-type-specific resource to form a full 12 | /// invitation. 13 | #[derive(Debug, Clone, Protobuf)] 14 | pub struct InvitationAddress { 15 | /// The local address of the port. 16 | pub local_addr: Address, 17 | /// The remote address of the port. 18 | pub remote_addr: Address, 19 | } 20 | -------------------------------------------------------------------------------- /support/mesh/mesh_rpc/fuzz/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | prost_build::Config::new() 8 | .type_attribute(".", "#[derive(mesh::MeshPayload)]") 9 | .type_attribute(".", "#[mesh(prost)]") 10 | .service_generator(Box::new(mesh_build::MeshServiceGenerator::new())) 11 | .compile_protos(&["proto.proto"], &["."]) 12 | .unwrap(); 13 | } 14 | -------------------------------------------------------------------------------- /support/mesh/mesh_rpc/src/rpc.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | use crate::service::Code; 5 | use crate::service::Status; 6 | use thiserror::Error; 7 | 8 | pub fn status_from_err(code: Code, err: impl Into) -> Status { 9 | Status { 10 | code: code as i32, 11 | message: format!("{:#}", err.into()), 12 | details: Vec::new(), 13 | } 14 | } 15 | 16 | #[derive(Debug, Error)] 17 | pub enum ProtocolError { 18 | #[error("invalid message type {0}")] 19 | InvalidMessageType(u8), 20 | #[error("stream id must be odd for client requests")] 21 | EvenStreamId, 22 | } 23 | -------------------------------------------------------------------------------- /support/mesh/mesh_worker/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mesh_worker" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect = { workspace = true, features = ["std", "defer"] } 11 | mesh.workspace = true 12 | 13 | anyhow.workspace = true 14 | futures.workspace = true 15 | futures-concurrency.workspace = true 16 | linkme.workspace = true 17 | tracing.workspace = true 18 | unicycle.workspace = true 19 | 20 | [dev-dependencies] 21 | pal_async.workspace = true 22 | test_with_tracing.workspace = true 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /support/mesh_tracing/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mesh_tracing" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | pal_async.workspace = true 12 | guid = { workspace = true, features = ["mesh"] } 13 | inspect = { workspace = true, features = ["std", "defer"] } 14 | tracing-subscriber.workspace = true 15 | tracing.workspace = true 16 | 17 | anyhow.workspace = true 18 | futures.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /support/minircu/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "minircu" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | event-listener.workspace = true 11 | parking_lot.workspace = true 12 | tracelimit.workspace = true 13 | 14 | [target.'cfg(target_os = "linux")'.dependencies] 15 | libc.workspace = true 16 | 17 | [target.'cfg(windows)'.dependencies] 18 | windows-sys = { workspace = true, features = ["Win32_System_Threading"] } 19 | 20 | [dev-dependencies] 21 | pal_async.workspace = true 22 | test_with_tracing.workspace = true 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /support/minircu/src/other.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | // Use a memory barrier on the read side since we don't have a working 5 | // membarrier implementation to force a barrier remotely from the write side. 6 | pub use std::sync::atomic::fence as access_fence; 7 | 8 | pub fn membarrier() { 9 | // No suitable implementation on this platform. 10 | } 11 | -------------------------------------------------------------------------------- /support/minircu/src/windows.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | use windows_sys::Win32::System::Threading::FlushProcessWriteBuffers; 5 | 6 | // Use a compiler fence on the read side since we have a working membarrier 7 | // implementation. 8 | pub use std::sync::atomic::compiler_fence as access_fence; 9 | 10 | pub fn membarrier() { 11 | // Use the FlushProcessWriteBuffers function to ensure that all other threads in the process 12 | // have observed the writes made by this thread. 13 | 14 | // SAFETY: no special requirements for the call. 15 | unsafe { FlushProcessWriteBuffers() } 16 | } 17 | -------------------------------------------------------------------------------- /support/open_enum/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "open_enum" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /support/openssl_crypto_only/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "openssl_crypto_only" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /support/openssl_kdf/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "openssl_kdf" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(unix)'.dependencies] 10 | libc.workspace = true 11 | openssl.workspace = true 12 | openssl-sys.workspace = true 13 | thiserror.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /support/openssl_kdf/src/sys/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | // See also the LICENSE file in the root of the crate for additional copyright 5 | // information. 6 | 7 | #![expect(dead_code)] 8 | #![expect(non_camel_case_types)] 9 | 10 | pub mod evp; 11 | pub mod kdf; 12 | pub mod ossl_typ; 13 | pub mod params; 14 | 15 | pub use evp::*; 16 | pub use kdf::*; 17 | pub use ossl_typ::*; 18 | pub use params::*; 19 | -------------------------------------------------------------------------------- /support/oversized_box/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "oversized_box" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lints] 10 | workspace = true 11 | -------------------------------------------------------------------------------- /support/pal/api-ms-win-security-base-private-l1-1-1.def: -------------------------------------------------------------------------------- 1 | LIBRARY api-ms-win-security-base-private-l1-1-1 2 | 3 | EXPORTS 4 | CreateAppContainerToken 5 | -------------------------------------------------------------------------------- /support/pal/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | if std::env::var_os("CARGO_CFG_WINDOWS").is_some() 8 | && std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "msvc" 9 | { 10 | win_import_lib::build_import_lib("api-ms-win-security-base-private-l1-1-1").unwrap(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /support/pal/pal_async_test/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "pal_async_test" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lib] 10 | proc-macro = true 11 | 12 | [dependencies] 13 | proc-macro2.workspace = true 14 | quote.workspace = true 15 | syn = { workspace = true, features = [ "full" ] } 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /support/pal/src/process.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Process-related functionality. 5 | 6 | /// Terminates the process immediately with the given exit code. 7 | /// 8 | /// This is similar to [`std::process::exit`], but it skips calling any cleanup 9 | /// functionality. This means stdout is not flushed, C++ destructors are not 10 | /// called, and Windows DLL DllMain functions are not called. 11 | pub fn terminate(exit_code: i32) -> ! { 12 | crate::sys::process::terminate(exit_code) 13 | } 14 | -------------------------------------------------------------------------------- /support/safe_intrinsics/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "safe_intrinsics" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /support/safeatomic/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "safeatomic" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | zerocopy.workspace = true 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /support/serde_helpers/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "serde_helpers" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guid.workspace = true 11 | 12 | base64.workspace = true 13 | serde = { workspace = true, features = ["derive"] } 14 | serde_json.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /support/sev_guest_device/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "sev_guest_device" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | bitfield-struct.workspace = true 11 | static_assertions.workspace = true 12 | zerocopy.workspace = true 13 | [target.'cfg(target_os = "linux")'.dependencies] 14 | nix = { workspace = true, features = ["ioctl"] } 15 | thiserror.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /support/sev_guest_device/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! The crate includes the abstraction layer of Linux SEV-SNP Guest APIs and 5 | //! definitions of data structures according to SEV-SNP specification. 6 | 7 | pub mod protocol; 8 | 9 | #[cfg(target_os = "linux")] 10 | pub mod ioctl; 11 | -------------------------------------------------------------------------------- /support/task_control/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "task_control" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | fast_select.workspace = true 11 | inspect = { workspace = true, features = ["defer", "std"] } 12 | pal_async.workspace = true 13 | 14 | parking_lot.workspace = true 15 | 16 | [dev-dependencies] 17 | futures.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /support/tdx_guest_device/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tdx_guest_device" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | static_assertions.workspace = true 11 | zerocopy.workspace = true 12 | [target.'cfg(target_os = "linux")'.dependencies] 13 | nix = { workspace = true, features = ["ioctl"] } 14 | thiserror.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /support/tdx_guest_device/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! The crate includes the abstraction layer of Linux TDX Guest APIs and 5 | //! definitions of data structures according to TDX specification. 6 | 7 | pub mod protocol; 8 | 9 | #[cfg(target_os = "linux")] 10 | pub mod ioctl; 11 | -------------------------------------------------------------------------------- /support/tee_call/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tee_call" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | sev_guest_device.workspace = true 11 | tdx_guest_device.workspace = true 12 | 13 | static_assertions.workspace = true 14 | thiserror.workspace = true 15 | zerocopy.workspace = true 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /support/test_with_tracing/test_with_tracing_macro/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "test_with_tracing_macro" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lib] 10 | proc-macro = true 11 | 12 | [dependencies] 13 | proc-macro2.workspace = true 14 | quote.workspace = true 15 | syn = { workspace = true, features = [ "full" ] } 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /support/tracelimit/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tracelimit" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | parking_lot.workspace = true 11 | tracing.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /support/tracing_helpers/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tracing_helpers" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | anyhow.workspace = true 11 | tracing.workspace = true 12 | tracing-subscriber = { workspace = true, features = ["json"] } 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /support/ucs2/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "ucs2" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | thiserror.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /support/uevent/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "uevent" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | mesh.workspace = true 11 | pal_async.workspace = true 12 | 13 | anyhow.workspace = true 14 | fs-err.workspace = true 15 | futures.workspace = true 16 | futures-concurrency.workspace = true 17 | libc.workspace = true 18 | socket2.workspace = true 19 | thiserror.workspace = true 20 | tracing.workspace = true 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /support/unix_socket/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "unix_socket" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | mesh = ["dep:mesh_protobuf"] 11 | 12 | [dependencies] 13 | 14 | [target.'cfg(windows)'.dependencies] 15 | getrandom.workspace = true 16 | socket2.workspace = true 17 | mesh_protobuf = { workspace = true, optional = true } 18 | windows-sys = { workspace = true, features = ["Win32_Networking_WinSock"] } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /support/unix_socket/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! This crate provides [`UnixStream`] and [`UnixListener`] implementations for 5 | //! Windows, and re-exposes the `std` types for UNIX. 6 | //! 7 | //! This can go away once the `std` types are available on Windows. 8 | //! 9 | //! 10 | 11 | #![cfg_attr(not(windows), forbid(unsafe_code))] 12 | 13 | mod windows; 14 | 15 | #[cfg(windows)] 16 | pub use windows::*; 17 | 18 | #[cfg(unix)] 19 | pub use std::os::unix::net::UnixListener; 20 | #[cfg(unix)] 21 | pub use std::os::unix::net::UnixStream; 22 | -------------------------------------------------------------------------------- /support/win_import_lib/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "win_import_lib" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | anyhow.workspace = true 11 | cc.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /tmk/simple_tmk/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "simple_tmk" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | tmk_core.workspace = true 11 | tmk_macros.workspace = true 12 | x86defs.workspace = true 13 | 14 | [build-dependencies] 15 | minimal_rt_build.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /tmk/simple_tmk/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Build script for the simple TMK, needed to build with `minimal_rt`. 5 | 6 | fn main() { 7 | if minimal_rt_build::init() { 8 | // Needed to preserve the `tmk_tests` section for enumerating 9 | // tests. 10 | println!("cargo:rustc-link-arg=-znostart-stop-gc"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tmk/simple_tmk/src/common.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Simple tests common to all architectures. 5 | 6 | use crate::prelude::*; 7 | 8 | #[tmk_test] 9 | fn boot(_: TestContext<'_>) { 10 | log!("hello world"); 11 | } 12 | -------------------------------------------------------------------------------- /tmk/simple_tmk/src/main.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! A simple test microkernel (TMK) for testing very basic VMM functionality. 5 | 6 | #![cfg_attr(minimal_rt, no_std, no_main)] 7 | // UNSAFETY: TMK tests are going to need to perform unsafe operations. 8 | #![allow(unsafe_code)] 9 | 10 | mod prelude; 11 | 12 | mod common; 13 | mod x86_64; 14 | 15 | #[cfg(not(minimal_rt))] 16 | fn main() { 17 | unimplemented!("build with MINIMAL_RT_BUILD to produce a working binary"); 18 | } 19 | -------------------------------------------------------------------------------- /tmk/simple_tmk/src/prelude.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Imports that are commonly needed in tests. 5 | //! 6 | //! Test modules should typically import this module: 7 | //! ```rust 8 | //! use crate::prelude::*; 9 | //! ``` 10 | 11 | #![allow(unused_imports)] 12 | 13 | pub use tmk_core::Scope; 14 | pub use tmk_core::TestContext; 15 | pub use tmk_core::log; 16 | #[cfg(target_arch = "x86_64")] 17 | pub use tmk_core::x86_64::IsrContext; 18 | pub use tmk_macros::tmk_test; 19 | -------------------------------------------------------------------------------- /tmk/tmk_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tmk_core" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | minimal_rt.workspace = true 11 | tmk_protocol.workspace = true 12 | x86defs.workspace = true 13 | 14 | arrayvec.workspace = true 15 | 16 | [build-dependencies] 17 | minimal_rt_build.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /tmk/tmk_core/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Build script for the TMK core, needed to build with `minimal_rt`. 5 | 6 | fn main() { 7 | minimal_rt_build::init(); 8 | } 9 | -------------------------------------------------------------------------------- /tmk/tmk_macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tmk_macros" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [lib] 10 | proc-macro = true 11 | 12 | [dependencies] 13 | quote.workspace = true 14 | syn.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /tmk/tmk_protocol/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tmk_protocol" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | zerocopy.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /tmk/tmk_tests/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tmk_tests" 6 | rust-version.workspace = true 7 | edition.workspace = true 8 | 9 | [dependencies] 10 | petri.workspace = true 11 | petri_artifacts_common.workspace = true 12 | petri_artifacts_vmm_test.workspace = true 13 | 14 | pal_async.workspace = true 15 | 16 | anyhow.workspace = true 17 | tracing.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /tmk/tmk_vmm/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Build script for the TMK VMM. 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vm/README.md: -------------------------------------------------------------------------------- 1 | This directory is for library and infrastructure crates that are provide 2 | VM-related functionality, _without_ being tied to any particular "VMM frontend" 3 | (e.g: OpenVMM, OpenHCL, etc...) 4 | 5 | Crates in this directly must not take any direct dependencies on any code 6 | outside of `vm/`, _except_ for crates pulled from crates.io, or crates under 7 | `../support/`. 8 | -------------------------------------------------------------------------------- /vm/aarch64/aarch64defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "aarch64defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | open_enum.workspace = true 11 | 12 | bitfield-struct.workspace = true 13 | zerocopy.workspace = true 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/aarch64/aarch64emu/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "aarch64emu" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | aarch64defs.workspace = true 11 | inspect.workspace = true 12 | 13 | thiserror.workspace = true 14 | tracing.workspace = true 15 | 16 | [dev-dependencies] 17 | futures.workspace = true 18 | getrandom.workspace = true 19 | pal_async.workspace = true 20 | parking_lot.workspace = true 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /vm/aarch64/aarch64emu/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | #![forbid(unsafe_code)] 6 | 7 | mod cpu; 8 | mod emulator; 9 | mod opcodes; 10 | 11 | pub use cpu::AccessCpuState; 12 | pub use cpu::Cpu; 13 | pub use emulator::Emulator; 14 | pub use emulator::Error; 15 | pub use emulator::InterceptState; 16 | -------------------------------------------------------------------------------- /vm/acpi/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "acpi" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | acpi_spec.workspace = true 11 | memory_range.workspace = true 12 | x86defs.workspace = true 13 | 14 | zerocopy.workspace = true 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/acpi/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Crate for dynamically creating ACPI tables. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod builder; 10 | pub mod dsdt; 11 | -------------------------------------------------------------------------------- /vm/acpi_spec/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "acpi_spec" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | default = [] 11 | 12 | alloc = [] 13 | std = ["alloc"] 14 | 15 | [dependencies] 16 | open_enum.workspace = true 17 | 18 | bitfield-struct.workspace = true 19 | static_assertions.workspace = true 20 | thiserror.workspace = true 21 | zerocopy.workspace = true 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /vm/chipset_arc_mutex_device/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "chipset_arc_mutex_device" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | chipset_device.workspace = true 11 | 12 | arc_cyclic_builder.workspace = true 13 | closeable_mutex.workspace = true 14 | range_map_vec.workspace = true 15 | 16 | parking_lot.workspace = true 17 | thiserror.workspace = true 18 | tracing.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/chipset_arc_mutex_device/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! VMM-agnostic infrastructure to wire up 5 | //! [`ChipsetDevice`](chipset_device::ChipsetDevice) instances using 6 | //! `Arc>` to communicate with the backing chipset. 7 | //! 8 | //! NOTE: this crate is no longer used by OpenVMM/OpenHCL, and only remains 9 | //! in-tree to support testing devices. 10 | 11 | #![forbid(unsafe_code)] 12 | 13 | pub mod device; 14 | pub mod services; 15 | 16 | pub mod test_chipset; 17 | -------------------------------------------------------------------------------- /vm/chipset_device/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "chipset_device" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | inspect.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/chipset_device_fuzz/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "chipset_device_fuzz" 6 | publish = false 7 | edition.workspace = true 8 | rust-version.workspace = true 9 | 10 | [dependencies] 11 | chipset_device.workspace = true 12 | chipset_arc_mutex_device.workspace = true 13 | 14 | closeable_mutex.workspace = true 15 | range_map_vec.workspace = true 16 | 17 | arbitrary = { workspace = true, features = ["derive"] } 18 | parking_lot.workspace = true 19 | zerocopy.workspace = true 20 | tracing.workspace = true 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /vm/chipset_device_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "chipset_device_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | chipset_device.workspace = true 11 | guestmem.workspace = true 12 | vmcore.workspace = true 13 | vm_resource.workspace = true 14 | 15 | inspect.workspace = true 16 | 17 | async-trait.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/cvm_tracing/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "cvm_tracing" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | tracing.workspace = true 11 | tracing-subscriber.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/devices/chipset_legacy/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Various "legacy" chipset devices that collectively implement the Hyper-V 5 | //! Generation 1 VM chipset. 6 | 7 | #![expect(missing_docs)] 8 | #![forbid(unsafe_code)] 9 | 10 | pub mod i440bx_host_pci_bridge; 11 | pub mod piix4_cmos_rtc; 12 | pub mod piix4_pci_bus; 13 | pub mod piix4_pci_isa_bridge; 14 | pub mod piix4_pm; 15 | pub mod piix4_uhci; 16 | pub mod winbond83977_sio; 17 | -------------------------------------------------------------------------------- /vm/devices/chipset_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "chipset_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | inspect.workspace = true 13 | mesh.workspace = true 14 | 15 | arbitrary = { workspace = true, optional = true, features = ["derive"] } 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/firmware/firmware_uefi/fuzz/signature1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/vm/devices/firmware/firmware_uefi/fuzz/signature1.bin -------------------------------------------------------------------------------- /vm/devices/firmware/firmware_uefi/fuzz/signature2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/vm/devices/firmware/firmware_uefi/fuzz/signature2.bin -------------------------------------------------------------------------------- /vm/devices/firmware/firmware_uefi/src/platform/logger.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Interfaces required to support UEFI event logging. 5 | 6 | use std::fmt::Debug; 7 | 8 | #[derive(Debug)] 9 | pub enum UefiEvent { 10 | BootSuccess(BootInfo), 11 | BootFailure(BootInfo), 12 | NoBootDevice, 13 | } 14 | 15 | #[derive(Debug)] 16 | pub struct BootInfo { 17 | pub secure_boot_succeeded: bool, 18 | } 19 | 20 | /// Interface to log UEFI events. 21 | pub trait UefiLogger: Send { 22 | fn log_event(&self, event: UefiEvent); 23 | } 24 | -------------------------------------------------------------------------------- /vm/devices/firmware/firmware_uefi/src/platform/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Platform interfaces required by the UEFI device. 5 | 6 | pub mod logger; 7 | pub mod nvram; 8 | -------------------------------------------------------------------------------- /vm/devices/firmware/firmware_uefi/src/service/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Various UEFI device subsystems. 5 | 6 | pub mod crypto; 7 | pub mod event_log; 8 | pub mod generation_id; 9 | pub mod nvram; 10 | pub mod time; 11 | pub mod uefi_watchdog; 12 | -------------------------------------------------------------------------------- /vm/devices/firmware/firmware_uefi_custom_vars/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "firmware_uefi_custom_vars" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | uefi_specs.workspace = true 11 | 12 | guid = { workspace = true, features = ["mesh"] } 13 | mesh_protobuf.workspace = true 14 | 15 | thiserror.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/firmware/generation_id/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "generation_id" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guestmem.workspace = true 11 | vmcore.workspace = true 12 | 13 | inspect = { workspace = true, features = ["std"] } 14 | mesh.workspace = true 15 | tracelimit.workspace = true 16 | 17 | getrandom.workspace = true 18 | tracing.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/devices/firmware/hyperv_secure_boot_templates/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hyperv_secure_boot_templates" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | firmware_uefi_custom_vars.workspace = true 11 | hyperv_uefi_custom_vars_json.workspace = true 12 | 13 | [build-dependencies] 14 | serde_json.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/devices/firmware/hyperv_uefi_custom_vars_json/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hyperv_uefi_custom_vars_json" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | firmware_uefi_custom_vars.workspace = true 11 | 12 | guid = { workspace = true, features = ["mesh"] } 13 | serde_helpers.workspace = true 14 | 15 | base64.workspace = true 16 | serde = { workspace = true, features = ["derive"] } 17 | serde_json.workspace = true 18 | thiserror.workspace = true 19 | zerocopy.workspace = true 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/devices/firmware/uefi_nvram_specvars/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "uefi_nvram_specvars" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | default = [] 11 | 12 | [dependencies] 13 | guid.workspace = true 14 | ucs2.workspace = true 15 | uefi_specs.workspace = true 16 | 17 | thiserror.workspace = true 18 | zerocopy.workspace = true 19 | [dev-dependencies] 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/firmware/uefi_specs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "uefi_specs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | default = [] 11 | 12 | inspect = ["dep:inspect"] 13 | 14 | [dependencies] 15 | guid.workspace = true 16 | inspect = { workspace = true, optional = true } 17 | open_enum.workspace = true 18 | ucs2.workspace = true 19 | 20 | bitfield-struct.workspace = true 21 | static_assertions.workspace = true 22 | wchar.workspace = true 23 | zerocopy.workspace = true 24 | [dev-dependencies] 25 | 26 | [lints] 27 | workspace = true 28 | -------------------------------------------------------------------------------- /vm/devices/firmware/uefi_specs/src/hyperv/time.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Hyper-V specific UEFI Time definitions 5 | 6 | use crate::uefi::common::EfiStatus64; 7 | use crate::uefi::time::EFI_TIME; 8 | use zerocopy::FromBytes; 9 | use zerocopy::Immutable; 10 | use zerocopy::IntoBytes; 11 | use zerocopy::KnownLayout; 12 | 13 | /// MsvmPkg: `VM_EFI_TIME`` 14 | #[repr(C, packed)] 15 | #[derive(Debug, Clone, Copy, IntoBytes, FromBytes, Immutable, KnownLayout)] 16 | pub struct VmEfiTime { 17 | pub status: EfiStatus64, 18 | pub time: EFI_TIME, 19 | } 20 | -------------------------------------------------------------------------------- /vm/devices/firmware/uefi_specs/src/linux/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Types and constants used by Linux. 5 | 6 | pub mod nvram; 7 | -------------------------------------------------------------------------------- /vm/devices/firmware/uefi_specs/src/linux/nvram.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Nvram types used by linux distros 5 | 6 | pub mod vars { 7 | use guid::Guid; 8 | 9 | const EFI_IMAGE_SECURITY_MOK_DATABASE_GUID: Guid = 10 | guid::guid!("605dab50-e046-4300-abb6-3dd810dd8b23"); 11 | 12 | defn_nvram_var!(MOK_LIST = (EFI_IMAGE_SECURITY_MOK_DATABASE_GUID, "MokList")); 13 | defn_nvram_var!(MOK_LISTX = (EFI_IMAGE_SECURITY_MOK_DATABASE_GUID, "MokListX")); 14 | } 15 | -------------------------------------------------------------------------------- /vm/devices/firmware/uefi_specs/src/uefi/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Type definitions taken directly from the UEFI spec. 5 | //! 6 | //! Each type in this module MUST include a doc comment that references the 7 | //! specific part of the UEFI spec it was pulled from. 8 | 9 | pub mod boot; 10 | pub mod common; 11 | pub mod nvram; 12 | pub mod signing; 13 | pub mod time; 14 | -------------------------------------------------------------------------------- /vm/devices/get/get_helpers/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "get_helpers" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | get_protocol.workspace = true 11 | guid.workspace = true 12 | zerocopy.workspace = true 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/devices/get/get_protocol/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "get_protocol" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guid.workspace = true 11 | open_enum.workspace = true 12 | serde_helpers.workspace = true 13 | 14 | bitfield-struct.workspace = true 15 | serde = { workspace = true, features = ["derive"] } 16 | serde_json.workspace = true 17 | static_assertions.workspace = true 18 | zerocopy.workspace = true 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/devices/get/get_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "get_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | vmgs_resources.workspace = true 12 | 13 | mesh.workspace = true 14 | 15 | thiserror.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/get/underhill_config/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "underhill_config" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guid = { workspace = true, features = ["mesh", "inspect"] } 11 | inspect.workspace = true 12 | mesh.workspace = true 13 | vtl2_settings_proto.workspace = true 14 | 15 | prost.workspace = true 16 | serde = { workspace = true, features = ["derive"] } 17 | serde_json.workspace = true 18 | thiserror.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/devices/get/underhill_config/src/schema/vtl2s_test_json_no_nic.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "V1", 3 | "fixed": { 4 | "scsi_sub_channels": 31 5 | }, 6 | "dynamic": { 7 | "storage_controllers": [ 8 | ], 9 | "nic_devices": [ 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /vm/devices/get/vtl2_settings_proto/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vtl2_settings_proto" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | pbjson.workspace = true 11 | pbjson-types.workspace = true 12 | prost.workspace = true 13 | serde.workspace = true 14 | 15 | [build-dependencies] 16 | prost-build.workspace = true 17 | pbjson-build.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/devices/hyperv_ic_protocol/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hyperv_ic_protocol" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guid.workspace = true 11 | 12 | bitfield-struct.workspace = true 13 | jiff.workspace = true 14 | open_enum.workspace = true 15 | zerocopy.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/hyperv_ic_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hyperv_ic_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | vm_resource.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/devices/hyperv_ic_resources/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Resource definitions for Hyper-V ICs. 5 | 6 | #![forbid(unsafe_code)] 7 | 8 | pub mod kvp; 9 | pub mod shutdown; 10 | pub mod timesync; 11 | -------------------------------------------------------------------------------- /vm/devices/hyperv_ic_resources/src/timesync.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Resource definitions for the timesync IC. 5 | 6 | use mesh::MeshPayload; 7 | use vm_resource::ResourceId; 8 | use vm_resource::kind::VmbusDeviceHandleKind; 9 | 10 | /// A handle to the timesync IC. 11 | #[derive(MeshPayload)] 12 | pub struct TimesyncIcHandle; 13 | 14 | impl ResourceId for TimesyncIcHandle { 15 | const ID: &'static str = "timesync_ic"; 16 | } 17 | -------------------------------------------------------------------------------- /vm/devices/input_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "input_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | futures.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/devices/mcr_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "mcr_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | guid = { workspace = true, features = ["mesh"] } 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/mcr_resources/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! TODO MCR 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | use mesh::MeshPayload; 10 | use vm_resource::ResourceId; 11 | use vm_resource::kind::PciDeviceHandleKind; 12 | 13 | #[derive(MeshPayload)] 14 | pub struct McrControllerHandle { 15 | pub instance_id: guid::Guid, 16 | } 17 | 18 | impl ResourceId for McrControllerHandle { 19 | const ID: &'static str = "mcr"; 20 | } 21 | -------------------------------------------------------------------------------- /vm/devices/missing_dev/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "missing_dev" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | chipset_device.workspace = true 11 | chipset_device_resources.workspace = true 12 | missing_dev_resources.workspace = true 13 | pci_core.workspace = true 14 | vmcore.workspace = true 15 | vm_resource.workspace = true 16 | 17 | inspect.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/devices/missing_dev_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "missing_dev_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/net/gdma_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "gdma_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guestmem.workspace = true 11 | 12 | inspect.workspace = true 13 | open_enum.workspace = true 14 | 15 | bitfield-struct.workspace = true 16 | zerocopy.workspace = true 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/net/gdma_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "gdma_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | net_backend_resources.workspace = true 11 | vm_resource.workspace = true 12 | 13 | mesh.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/net/linux_net_bindings/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "linux_net_bindings" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(unix)'.dependencies] 10 | nix = { workspace = true, features = ["ioctl"] } 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /vm/devices/net/mana_driver/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! A user-mode driver for MANA (Microsoft Azure Network Adapter) devices. 5 | 6 | #![forbid(unsafe_code)] 7 | 8 | mod bnic_driver; 9 | mod gdma_driver; 10 | pub mod mana; 11 | pub mod queues; 12 | mod resources; 13 | #[cfg(test)] 14 | mod tests; 15 | -------------------------------------------------------------------------------- /vm/devices/net/net_backend_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "net_backend_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | guid = { workspace = true, features = ["mesh"] } 13 | inspect.workspace = true 14 | mesh.workspace = true 15 | 16 | thiserror.workspace = true 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /vm/devices/net/net_dio/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "net_dio" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(windows)'.dependencies] 10 | net_backend.workspace = true 11 | net_backend_resources.workspace = true 12 | vmswitch.workspace = true 13 | 14 | vm_resource.workspace = true 15 | 16 | inspect.workspace = true 17 | guid.workspace = true 18 | pal_async.workspace = true 19 | 20 | anyhow.workspace = true 21 | async-trait.workspace = true 22 | parking_lot.workspace = true 23 | tracing.workspace = true 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /vm/devices/net/net_packet_capture/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "net_packet_capture" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guestmem.workspace = true 11 | net_backend.workspace = true 12 | mesh.workspace = true 13 | inspect.workspace = true 14 | 15 | anyhow.workspace = true 16 | async-trait.workspace = true 17 | futures.workspace = true 18 | futures-concurrency.workspace = true 19 | parking_lot.workspace = true 20 | pcap-file.workspace = true 21 | tracing.workspace = true 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /vm/devices/net/netvsp_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "netvsp_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guid.workspace = true 11 | mesh.workspace = true 12 | net_backend_resources.workspace = true 13 | vm_resource.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/net/vmswitch/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Crate to interact with the Windows vmswitch-based virtual networking 5 | //! capabilities, including the vmswitch and the HCN/HNS service. 6 | 7 | #![cfg(windows)] 8 | #![expect(missing_docs)] 9 | // UNSAFETY: Calling Win32 VMS and HCN APIs. 10 | #![expect(unsafe_code)] 11 | #![expect(clippy::undocumented_unsafe_blocks)] 12 | 13 | pub mod dio; 14 | pub mod hcn; 15 | pub mod kernel; 16 | mod vmsif; 17 | -------------------------------------------------------------------------------- /vm/devices/pci/pci_bus/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "pci_bus" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | chipset_device.workspace = true 11 | vmcore.workspace = true 12 | 13 | inspect.workspace = true 14 | mesh.workspace = true 15 | 16 | bitfield-struct.workspace = true 17 | thiserror.workspace = true 18 | tracelimit.workspace = true 19 | tracing.workspace = true 20 | zerocopy.workspace = true 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/pci/pci_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "pci_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | chipset_device.workspace = true 11 | guestmem.workspace = true 12 | vmcore.workspace = true 13 | 14 | bitfield-struct.workspace = true 15 | inspect.workspace = true 16 | mesh.workspace = true 17 | open_enum.workspace = true 18 | parking_lot.workspace = true 19 | thiserror.workspace = true 20 | tracelimit.workspace = true 21 | tracing.workspace = true 22 | zerocopy.workspace = true 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /vm/devices/pci/pci_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "pci_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | chipset_device.workspace = true 11 | chipset_device_resources.workspace = true 12 | pci_core.workspace = true 13 | guestmem.workspace = true 14 | vmcore.workspace = true 15 | vm_resource.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/pci/vpci/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Virtual PCI bus emulator, providing a PCI bus over a vmbus transport. 5 | 6 | #![forbid(unsafe_code)] 7 | 8 | pub mod bus; 9 | pub mod bus_control; 10 | mod device; 11 | pub mod test_helpers; 12 | -------------------------------------------------------------------------------- /vm/devices/pci/vpci_protocol/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vpci_protocol" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | bitfield-struct.workspace = true 11 | guid.workspace = true 12 | open_enum.workspace = true 13 | zerocopy.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/serial/serial_16550_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "serial_16550_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/serial/serial_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "serial_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | vm_resource.workspace = true 12 | 13 | mesh.workspace = true 14 | 15 | futures.workspace = true 16 | pal_async.workspace = true 17 | parking_lot.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/devices/serial/serial_debugcon_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "serial_debugcon_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/serial/serial_pl011_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "serial_pl011_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/serial/serial_socket/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "serial_socket" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | serial_core.workspace = true 11 | vm_resource.workspace = true 12 | 13 | inspect.workspace = true 14 | mesh = { workspace = true, features = ["socket2"] } 15 | pal.workspace = true 16 | unix_socket = { workspace = true, features = ["mesh"] } 17 | pal_async.workspace = true 18 | futures.workspace = true 19 | socket2.workspace = true 20 | tracing.workspace = true 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /vm/devices/serial/serial_socket/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Serial port backends based on sockets and Windows named pipes. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod net; 10 | #[cfg(windows)] 11 | pub mod windows; 12 | -------------------------------------------------------------------------------- /vm/devices/serial/vmbus_serial_protocol/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmbus_serial_protocol" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guid.workspace = true 11 | open_enum.workspace = true 12 | 13 | static_assertions.workspace = true 14 | zerocopy.workspace = true 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/serial/vmbus_serial_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmbus_serial_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | vm_resource.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/devices/storage/block_crypto/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "block_crypto" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | thiserror.workspace = true 11 | 12 | [target.'cfg(unix)'.dependencies] 13 | openssl.workspace = true 14 | 15 | [target.'cfg(windows)'.dependencies] 16 | windows = { workspace = true, features = ["Win32_Security_Cryptography"] } 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /vm/devices/storage/disk_backend/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "disk_backend" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | scsi_buffers.workspace = true 11 | 12 | guestmem.workspace = true 13 | vm_resource.workspace = true 14 | inspect = { workspace = true, features = ["std"] } 15 | 16 | async-trait.workspace = true 17 | futures.workspace = true 18 | stackfuture.workspace = true 19 | thiserror.workspace = true 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/storage/disk_backend_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "disk_backend_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/storage/disk_crypt_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "disk_crypt_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/storage/disk_file/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "disk_file" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | disk_backend.workspace = true 11 | disk_backend_resources.workspace = true 12 | scsi_buffers.workspace = true 13 | guestmem.workspace = true 14 | vm_resource.workspace = true 15 | 16 | inspect = { workspace = true, features = ["filepath"] } 17 | blocking.workspace = true 18 | thiserror.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/devices/storage/disk_nvme/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "disk_nvme" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | disk_backend.workspace = true 11 | nvme_common.workspace = true 12 | nvme_driver.workspace = true 13 | nvme_spec.workspace = true 14 | scsi_buffers.workspace = true 15 | 16 | inspect.workspace = true 17 | pal.workspace = true 18 | 19 | async-trait.workspace = true 20 | 21 | [target.'cfg(target_os = "linux")'.dev-dependencies] 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /vm/devices/storage/disk_prwrap/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "disk_prwrap" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | disk_backend.workspace = true 11 | disk_backend_resources.workspace = true 12 | inspect.workspace = true 13 | scsi_buffers.workspace = true 14 | 15 | async-trait.workspace = true 16 | vm_resource.workspace = true 17 | parking_lot.workspace = true 18 | thiserror.workspace = true 19 | tracing.workspace = true 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/storage/floppy_pcat_stub/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "floppy_pcat_stub" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | chipset_device.workspace = true 11 | vmcore.workspace = true 12 | 13 | inspect.workspace = true 14 | mesh.workspace = true 15 | open_enum.workspace = true 16 | 17 | arrayvec = { workspace = true, features = ["std"] } 18 | bitfield-struct.workspace = true 19 | tracelimit.workspace = true 20 | tracing.workspace = true 21 | 22 | [lints] 23 | workspace = true 24 | -------------------------------------------------------------------------------- /vm/devices/storage/floppy_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "floppy_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/storage/ide_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "ide_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | scsidisk_resources.workspace = true 11 | vm_resource.workspace = true 12 | 13 | inspect.workspace = true 14 | mesh.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/devices/storage/nvme/src/tests.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod controller_tests; 5 | mod shadow_doorbell_tests; 6 | mod test_helpers; 7 | -------------------------------------------------------------------------------- /vm/devices/storage/nvme_common/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "nvme_common" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | disk_backend.workspace = true 11 | nvme_spec.workspace = true 12 | 13 | thiserror.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/storage/nvme_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "nvme_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | guid = { workspace = true, features = ["mesh"] } 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/devices/storage/nvme_spec/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "nvme_spec" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | storage_string.workspace = true 11 | 12 | inspect.workspace = true 13 | 14 | bitfield-struct.workspace = true 15 | open_enum.workspace = true 16 | zerocopy.workspace = true 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/storage/scsi_buffers/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "scsi_buffers" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guestmem.workspace = true 11 | safeatomic.workspace = true 12 | 13 | smallvec.workspace = true 14 | zerocopy.workspace = true 15 | event-listener.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/storage/scsi_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "scsi_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | scsi_buffers.workspace = true 11 | scsi_defs.workspace = true 12 | vm_resource.workspace = true 13 | vmcore.workspace = true 14 | 15 | inspect.workspace = true 16 | mesh.workspace = true 17 | 18 | stackfuture.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/devices/storage/scsi_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "scsi_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | # Enable generating arbitrary values of types useful for fuzzing. 11 | arbitrary = ["dep:arbitrary"] 12 | 13 | [dependencies] 14 | arbitrary = { workspace = true, optional = true, features = ["derive"] } 15 | zerocopy.workspace = true 16 | bitfield-struct.workspace = true 17 | open_enum.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/devices/storage/scsidisk/src/tests.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod basic_tests; 5 | mod pr_tests; 6 | mod test_helpers; 7 | -------------------------------------------------------------------------------- /vm/devices/storage/scsidisk_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "scsidisk_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | storage_string.workspace = true 12 | vm_resource.workspace = true 13 | mesh.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/storage/storage_string/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "storage_string" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | mesh_protobuf.workspace = true 12 | 13 | thiserror.workspace = true 14 | zerocopy.workspace = true 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/storage/storvsp_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "storvsp_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | # Enable generating arbitrary values of types useful for fuzzing. 11 | arbitrary = ["dep:arbitrary"] 12 | 13 | [dependencies] 14 | arbitrary = { workspace = true, optional = true, features = ["derive"] } 15 | vm_resource.workspace = true 16 | 17 | guid = { workspace = true, features = ["mesh"] } 18 | mesh.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/devices/support/README.md: -------------------------------------------------------------------------------- 1 | These support crates are tailored to specific devices, and are a bit too 2 | specialized to be a part of the top level `support/` folder. 3 | -------------------------------------------------------------------------------- /vm/devices/support/device_emulators/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "device_emulators" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /vm/devices/support/fs/fuse/src/util.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | /// Helper to create a CString from a utf-8 vector and return an lx::Result if it fails. 5 | #[cfg(target_os = "linux")] 6 | pub fn create_cstr(value: impl Into>) -> lx::Result { 7 | std::ffi::CString::new(value).map_err(|_| lx::Error::EINVAL) 8 | } 9 | -------------------------------------------------------------------------------- /vm/devices/support/fs/lx/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "lx" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | thiserror.workspace = true 11 | 12 | [lints] 13 | workspace = true 14 | -------------------------------------------------------------------------------- /vm/devices/support/fs/lxutil/src/unix/path.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | use std::borrow::Cow; 5 | use std::ffi::OsStr; 6 | use std::os::unix::prelude::*; 7 | use std::path::Path; 8 | 9 | // No-op implementation of path_from_lx for Unix. 10 | pub fn path_from_lx(path: &[u8]) -> lx::Result> { 11 | Ok(Cow::Borrowed(OsStr::from_bytes(path).as_ref())) 12 | } 13 | -------------------------------------------------------------------------------- /vm/devices/support/fs/plan9/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "plan9" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | lx.workspace = true 11 | lxutil.workspace = true 12 | 13 | parking_lot.workspace = true 14 | tracing.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/devices/tpm/test_data/vTpmState.blob: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/openvmm/a451bf65fb1cf9e82cf845e0cf71726e8638aaf6/vm/devices/tpm/test_data/vTpmState.blob -------------------------------------------------------------------------------- /vm/devices/tpm_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tpm_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | inspect.workspace = true 13 | mesh.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/uidevices/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Vmbus UI devices (mouse, keyboard, video). 5 | 6 | #![forbid(unsafe_code)] 7 | 8 | pub mod keyboard; 9 | pub mod mouse; 10 | pub mod resolver; 11 | pub mod video; 12 | -------------------------------------------------------------------------------- /vm/devices/uidevices_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "uidevices_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/devices/user_driver/vfio_sys/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vfio_sys" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(unix)'.dependencies] 10 | anyhow.workspace = true 11 | bitfield-struct.workspace = true 12 | libc.workspace = true 13 | nix = { workspace = true, features = ["ioctl"] } 14 | tracing.workspace = true 15 | vfio-bindings.workspace = true 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /vm/devices/user_driver_emulated_mock/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "user_driver_emulated_mock" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | anyhow.workspace = true 11 | chipset_device.workspace = true 12 | guestmem.workspace = true 13 | inspect.workspace = true 14 | memory_range.workspace = true 15 | page_pool_alloc.workspace = true 16 | parking_lot.workspace = true 17 | pci_core.workspace = true 18 | tracing.workspace = true 19 | user_driver.workspace = true 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/vga_proxy/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vga_proxy" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | chipset_device.workspace = true 12 | vmcore.workspace = true 13 | 14 | async-trait.workspace = true 15 | tracelimit.workspace = true 16 | tracing.workspace = true 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /vm/devices/video_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "video_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | mesh.workspace = true 12 | vm_resource.workspace = true 13 | 14 | async-trait.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/devices/virtio/virtio/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Core virtio device infrastructure 5 | 6 | #![expect(missing_docs)] 7 | 8 | mod common; 9 | pub mod queue; 10 | pub mod resolve; 11 | pub mod resolver; 12 | pub mod spec; 13 | pub mod transport; 14 | 15 | pub use common::*; 16 | pub use transport::*; 17 | 18 | const QUEUE_MAX_SIZE: u16 = 0x40; // TODO: make queue size configurable 19 | -------------------------------------------------------------------------------- /vm/devices/virtio/virtio/src/transport/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Run virtio devices over different transports 5 | 6 | mod mmio; 7 | mod pci; 8 | 9 | pub use mmio::VirtioMmioDevice; 10 | pub use pci::PciInterruptModel; 11 | pub use pci::VirtioPciDevice; 12 | -------------------------------------------------------------------------------- /vm/devices/virtio/virtio_p9/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "virtio_p9" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | plan9.workspace = true 11 | 12 | virtio.workspace = true 13 | virtio_resources.workspace = true 14 | guestmem.workspace = true 15 | vm_resource.workspace = true 16 | 17 | anyhow.workspace = true 18 | async-trait.workspace = true 19 | tracing.workspace = true 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/virtio/virtio_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "virtio_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | net_backend_resources.workspace = true 11 | vm_resource.workspace = true 12 | 13 | mesh.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/devices/virtio/virtio_serial/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "virtio_serial" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | virtio.workspace = true 11 | guestmem.workspace = true 12 | 13 | anyhow.workspace = true 14 | async-trait.workspace = true 15 | parking_lot.workspace = true 16 | tracing.workspace = true 17 | 18 | [lints] 19 | workspace = true 20 | -------------------------------------------------------------------------------- /vm/devices/vmbus/vmbfs_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmbfs_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | mesh.workspace = true 11 | vm_resource.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/devices/vmbus/vmbus_async/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmbus_async" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | smallvec.workspace = true 11 | vmbus_channel.workspace = true 12 | vmbus_ring.workspace = true 13 | 14 | guestmem.workspace = true 15 | 16 | inspect.workspace = true 17 | inspect_counters.workspace = true 18 | pal_async.workspace = true 19 | 20 | futures.workspace = true 21 | thiserror.workspace = true 22 | zerocopy.workspace = true 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /vm/devices/vmbus/vmbus_async/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Vmbus channel implementations using async. 5 | 6 | #![forbid(unsafe_code)] 7 | 8 | pub mod async_dgram; 9 | mod core; 10 | pub mod pipe; 11 | pub mod queue; 12 | -------------------------------------------------------------------------------- /vm/devices/vmbus/vmbus_client_hcl/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmbus_client_hcl" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [target.'cfg(target_os = "linux")'.dependencies] 10 | hcl.workspace = true 11 | hvdef.workspace = true 12 | pal_async.workspace = true 13 | pal_event.workspace = true 14 | vmbus_async.workspace = true 15 | vmbus_client.workspace = true 16 | 17 | anyhow.workspace = true 18 | futures.workspace = true 19 | tracing.workspace = true 20 | zerocopy.workspace = true 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/vmbus/vmbus_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmbus_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | hvdef.workspace = true 11 | inspect.workspace = true 12 | guid = { workspace = true, features = ["inspect"] } 13 | mesh.workspace = true 14 | open_enum.workspace = true 15 | 16 | bitfield-struct.workspace = true 17 | futures.workspace = true 18 | static_assertions.workspace = true 19 | thiserror.workspace = true 20 | zerocopy.workspace = true 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/vmbus/vmbus_ring/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmbus_ring" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guestmem.workspace = true 11 | 12 | inspect.workspace = true 13 | safeatomic.workspace = true 14 | 15 | smallvec.workspace = true 16 | thiserror.workspace = true 17 | zerocopy.workspace = true 18 | [dev-dependencies] 19 | criterion = { workspace = true, features = ["rayon", "cargo_bench_support"] } 20 | 21 | [[bench]] 22 | name = "ring" 23 | harness = false 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /vm/devices/watchdog/guest_watchdog/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "guest_watchdog" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vmcore.workspace = true 11 | 12 | chipset_device.workspace = true 13 | watchdog_core.workspace = true 14 | 15 | inspect.workspace = true 16 | mesh.workspace = true 17 | open_enum.workspace = true 18 | tracelimit.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/devices/watchdog/watchdog_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "watchdog_core" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vmcore.workspace = true 11 | 12 | inspect.workspace = true 13 | mesh.workspace = true 14 | pal_async.workspace = true 15 | 16 | async-trait.workspace = true 17 | bitfield-struct.workspace = true 18 | tracing.workspace = true 19 | thiserror.workspace = true 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/devices/watchdog/watchdog_vmgs_format/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "watchdog_vmgs_format" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vmcore.workspace = true 11 | 12 | thiserror.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/hv1/hv1_emulator/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vm/hv1/hv1_emulator/src/x86.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! X86-specific HV1 definitions. 5 | 6 | /// The value returned by the Microsoft hypervisor for reads of the 7 | /// [`x86defs::X86X_IA32_MSR_MISC_ENABLE`] MSR. 8 | /// 9 | /// This may be tweaked if performance monitoring is available. 10 | pub const MISC_ENABLE: x86defs::MiscEnable = x86defs::MiscEnable::new() 11 | .with_fast_string(true) 12 | .with_tm1(true) 13 | .with_bts_unavailable(true) 14 | .with_pebs_unavailable(true) 15 | .with_enhanced_speedstep(true) 16 | .with_mwait(true) 17 | .with_xtpr_disable(true); 18 | -------------------------------------------------------------------------------- /vm/hv1/hv1_hypercall/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hv1_hypercall" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | hv1_structs.workspace = true 11 | hvdef.workspace = true 12 | guestmem.workspace = true 13 | tracelimit.workspace = true 14 | 15 | thiserror.workspace = true 16 | tracing.workspace = true 17 | zerocopy.workspace = true 18 | [dev-dependencies] 19 | open_enum.workspace = true 20 | sparse_mmap.workspace = true 21 | test_with_tracing.workspace = true 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /vm/hv1/hv1_structs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hv1_structs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | hvdef.workspace = true 11 | inspect.workspace = true 12 | 13 | bitvec.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/hv1/hv1_structs/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Data structures that may be useful when working with hv1_hypercall. 5 | 6 | #![forbid(unsafe_code)] 7 | 8 | mod proc_mask; 9 | mod vtl_array; 10 | 11 | pub use proc_mask::*; 12 | pub use vtl_array::*; 13 | -------------------------------------------------------------------------------- /vm/hv1/hvdef/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "hvdef" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | open_enum.workspace = true 11 | bitfield-struct.workspace = true 12 | static_assertions.workspace = true 13 | zerocopy.workspace = true 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/kvm/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "kvm" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | pal.workspace = true 11 | 12 | [target.'cfg(unix)'.dependencies] 13 | kvm-bindings.workspace = true 14 | libc.workspace = true 15 | nix = { workspace = true, features = ["ioctl"] } 16 | parking_lot.workspace = true 17 | signal-hook.workspace = true 18 | thiserror.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vm/loader/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | // TODO: loader shouldn't have any `cfg`s (or typedefs for that matter)! 8 | // 9 | // this is only here for expediency during the initial switch over to 10 | // `target_arch`. A follow-up change should switch `loader` + the code it 11 | // depends on to a more sustainable model... 12 | build_rs_guest_arch::emit_guest_arch() 13 | } 14 | -------------------------------------------------------------------------------- /vm/loader/igvmfilegen/src/signed_measurement/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Creates a digest for supported isolation types which can be signed externally. 5 | 6 | pub mod snp; 7 | pub mod tdx; 8 | pub mod vbs; 9 | 10 | pub use snp::generate_snp_measurement; 11 | pub use tdx::generate_tdx_measurement; 12 | pub use vbs::generate_vbs_measurement; 13 | 14 | const SHA_256_OUTPUT_SIZE_BYTES: usize = 32; 15 | const SHA_384_OUTPUT_SIZE_BYTES: usize = 48; 16 | -------------------------------------------------------------------------------- /vm/loader/igvmfilegen_config/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "igvmfilegen_config" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | serde = { workspace = true, features = ["derive"] } 11 | 12 | [dev-dependencies] 13 | serde_json.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/loader/loader_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "loader_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | inspect = ["dep:inspect"] 11 | 12 | [dependencies] 13 | hvdef.workspace = true 14 | open_enum.workspace = true 15 | 16 | inspect = { workspace = true, optional = true } 17 | 18 | bitfield-struct.workspace = true 19 | static_assertions.workspace = true 20 | zerocopy.workspace = true 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/loader/loader_defs/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Type definitions for loading guest firmware, available as no_std if no features are defined. 5 | 6 | #![no_std] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod linux; 10 | pub mod paravisor; 11 | pub mod shim; 12 | -------------------------------------------------------------------------------- /vm/loader/manifests/README.md: -------------------------------------------------------------------------------- 1 | This folder contains different manifest recipes to build various IGVM files. 2 | These contain the functional configuration for a given igvm recipe. 3 | 4 | The build system will automatically create the required resource file used by 5 | this tool. 6 | 7 | If you want to run this tool manually and specify a custom resource file, see 8 | igvmfilegen_config's `Resources` type and usage on how to manually create a 9 | resource file for a given recipe. 10 | -------------------------------------------------------------------------------- /vm/loader/manifests/openhcl-aarch64-dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "guest_arch": "aarch64", 3 | "guest_configs": [ 4 | { 5 | "guest_svn": 1, 6 | "max_vtl": 2, 7 | "isolation_type": "none", 8 | "image": { 9 | "openhcl": { 10 | "memory_page_count": 24576, 11 | "command_line": "console=null", 12 | "uefi": true 13 | } 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /vm/loader/manifests/openhcl-aarch64-release.json: -------------------------------------------------------------------------------- 1 | { 2 | "guest_arch": "aarch64", 3 | "guest_configs": [ 4 | { 5 | "guest_svn": 1, 6 | "max_vtl": 2, 7 | "isolation_type": "none", 8 | "image": { 9 | "openhcl": { 10 | "memory_page_count": 12288, 11 | "command_line": "console=null", 12 | "uefi": true 13 | } 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /vm/loader/manifests/openhcl-x64-dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "guest_arch": "x64", 3 | "guest_configs": [ 4 | { 5 | "guest_svn": 1, 6 | "max_vtl": 2, 7 | "isolation_type": "none", 8 | "image": { 9 | "openhcl": { 10 | "command_line": "OPENHCL_BOOT_LOG=com3", 11 | "memory_page_count": 126976, 12 | "uefi": true 13 | } 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /vm/loader/manifests/openhcl-x64-release.json: -------------------------------------------------------------------------------- 1 | { 2 | "guest_arch": "x64", 3 | "guest_configs": [ 4 | { 5 | "guest_svn": 1, 6 | "max_vtl": 2, 7 | "isolation_type": "none", 8 | "image": { 9 | "openhcl": { 10 | "initrd_path": "./underhill.cpio.gz", 11 | "command_line": "", 12 | "memory_page_count": 17920, 13 | "uefi": true 14 | } 15 | } 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /vm/loader/manifests/uefi-aarch64.json: -------------------------------------------------------------------------------- 1 | { 2 | "guest_arch": "aarch64", 3 | "guest_configs": [ 4 | { 5 | "guest_svn": 1, 6 | "max_vtl": 0, 7 | "isolation_type": "none", 8 | "image": { 9 | "uefi": { 10 | "config_type": "none" 11 | } 12 | } 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /vm/loader/page_table/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "page_table" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | bitfield-struct.workspace = true 11 | tracing.workspace = true 12 | zerocopy.workspace = true 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/loader/page_table/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Methods to construct page tables. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod aarch64; 10 | pub mod x64; 11 | 12 | /// Size of the initial identity map 13 | #[derive(Debug, Copy, Clone)] 14 | pub enum IdentityMapSize { 15 | /// Identity-map the bottom 4GB 16 | Size4Gb, 17 | /// Identity-map the bottom 8GB 18 | Size8Gb, 19 | } 20 | -------------------------------------------------------------------------------- /vm/loader/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | #![forbid(unsafe_code)] 6 | 7 | #[warn(missing_docs)] 8 | pub mod common; 9 | pub mod cpuid; 10 | pub mod elf; 11 | pub mod importer; 12 | pub mod linux; 13 | pub mod paravisor; 14 | pub mod pcat; 15 | pub mod uefi; 16 | -------------------------------------------------------------------------------- /vm/page_pool_alloc/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "page_pool_alloc" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | user_driver.workspace = true 11 | sparse_mmap.workspace = true 12 | vmcore.workspace = true 13 | memory_range = { workspace = true, features = [ "inspect", "mesh" ] } 14 | 15 | inspect.workspace = true 16 | mesh.workspace = true 17 | safeatomic.workspace = true 18 | 19 | parking_lot.workspace = true 20 | thiserror.workspace = true 21 | anyhow.workspace = true 22 | tracing.workspace = true 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /vm/power_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "power_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | 12 | mesh.workspace = true 13 | 14 | [lints] 15 | workspace = true 16 | -------------------------------------------------------------------------------- /vm/vbs_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vbs_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | bitfield-struct.workspace = true 11 | igvm_defs.workspace = true 12 | open_enum.workspace = true 13 | static_assertions.workspace = true 14 | zerocopy.workspace = true 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/vhd1_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vhd1_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | guid.workspace = true 11 | 12 | zerocopy.workspace = true 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vm/vmcore/build_rs_guest_arch/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "build_rs_guest_arch" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | 11 | [lints] 12 | workspace = true 13 | -------------------------------------------------------------------------------- /vm/vmcore/guestmem/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "guestmem" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | bitmap = ["dep:minircu"] 11 | 12 | [dependencies] 13 | inspect.workspace = true 14 | pal_event.workspace = true 15 | sparse_mmap.workspace = true 16 | minircu = { workspace = true, optional = true } 17 | 18 | thiserror.workspace = true 19 | zerocopy.workspace = true 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/vmcore/memory_range/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "memory_range" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | inspect = ["dep:inspect"] 11 | mesh = ["dep:mesh_protobuf"] 12 | 13 | [dependencies] 14 | inspect = { workspace = true, optional = true } 15 | mesh_protobuf = { workspace = true, optional = true } 16 | 17 | thiserror.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/vmcore/save_restore_derive/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "save_restore_derive" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lib] 10 | proc-macro = true 11 | 12 | [dependencies] 13 | quote.workspace = true 14 | syn = { workspace = true, features = [ "extra-traits" ] } 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/vmcore/save_restore_derive/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | #![forbid(unsafe_code)] 6 | 7 | use quote::quote; 8 | use syn::DeriveInput; 9 | use syn::parse_macro_input; 10 | 11 | // Documented in the save_restore module. 12 | #[proc_macro_derive(SavedStateRoot)] 13 | pub fn derive_saved_state_root(input: proc_macro::TokenStream) -> proc_macro::TokenStream { 14 | let input = parse_macro_input!(input as DeriveInput); 15 | let ident = &input.ident; 16 | quote! { 17 | ::vmcore::declare_saved_state_root!(#ident); 18 | } 19 | .into() 20 | } 21 | -------------------------------------------------------------------------------- /vm/vmcore/vm_resource/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vm_resource" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | inspect.workspace = true 11 | mesh.workspace = true 12 | async-trait.workspace = true 13 | linkme.workspace = true 14 | thiserror.workspace = true 15 | 16 | [dev-dependencies] 17 | pal_async.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vm/vmcore/vm_topology/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vm/vmcore/vm_topology/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Types for describing VM topology (processor packages and layout, memory 5 | //! layout). 6 | 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod memory; 10 | pub mod processor; 11 | -------------------------------------------------------------------------------- /vm/vmgs/vmgs/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | // easier than repeating `cfg(any(..))` directives all over the place 8 | println!("cargo:rustc-check-cfg=cfg(with_encryption)"); 9 | if cfg!(feature = "encryption_ossl") || cfg!(feature = "encryption_win") { 10 | println!("cargo:rustc-cfg=with_encryption") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vm/vmgs/vmgs_broker/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | // easier than repeating `cfg(any(..))` directives all over the place 8 | println!("cargo:rustc-check-cfg=cfg(with_encryption)"); 9 | if cfg!(feature = "encryption_ossl") || cfg!(feature = "encryption_win") { 10 | println!("cargo:rustc-cfg=with_encryption") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vm/vmgs/vmgs_format/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmgs_format" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | open_enum.workspace = true 11 | inspect = { workspace = true, optional = true } 12 | 13 | bitfield-struct.workspace = true 14 | static_assertions.workspace = true 15 | zerocopy.workspace = true 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /vm/vmgs/vmgs_lib/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmgs_lib" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lib] 10 | crate-type = ["cdylib"] 11 | 12 | [dependencies] 13 | disk_backend.workspace = true 14 | disk_vhd1.workspace = true 15 | futures.workspace = true 16 | vmgs_format.workspace = true 17 | 18 | [target.'cfg(unix)'.dependencies] 19 | vmgs = { workspace = true, features = ["encryption_ossl"] } 20 | 21 | [target.'cfg(windows)'.dependencies] 22 | vmgs = { workspace = true, features = ["encryption_win"] } 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /vm/vmgs/vmgs_resources/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmgs_resources" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vm_resource.workspace = true 11 | vmgs_format.workspace = true 12 | 13 | mesh.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/vmgs/vmgstool/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | // easier than repeating `cfg(any(..))` directives all over the place 8 | println!("cargo:rustc-check-cfg=cfg(with_encryption)"); 9 | if cfg!(feature = "encryption_ossl") || cfg!(feature = "encryption_win") { 10 | println!("cargo:rustc-cfg=with_encryption") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vm/whp/WinHvPlatform.def: -------------------------------------------------------------------------------- 1 | LIBRARY WinHvPlatform 2 | 3 | EXPORTS 4 | WHvGetCapability 5 | WHvCreatePartition 6 | WHvDeletePartition 7 | WHvSetupPartition 8 | WHvGetPartitionProperty 9 | WHvSetPartitionProperty 10 | WHvRequestInterrupt 11 | WHvCreateVirtualProcessor 12 | WHvDeleteVirtualProcessor 13 | WHvCancelRunVirtualProcessor 14 | WHvGetVirtualProcessorRegisters 15 | WHvSetVirtualProcessorRegisters 16 | WHvRunVirtualProcessor 17 | WHvTranslateGva 18 | WHvMapGpaRange 19 | WHvUnmapGpaRange 20 | -------------------------------------------------------------------------------- /vm/whp/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | // WinHvPlatform isn't in the public SDK yet, so build a minimal import lib 8 | // for it. 9 | if std::env::var_os("TARGET").unwrap() == "aarch64-pc-windows-msvc" { 10 | win_import_lib::build_import_lib("WinHvPlatform").unwrap(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vm/x86/tdcall/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "tdcall" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | default = [] 11 | tracing = ["dep:tracing"] 12 | 13 | [dependencies] 14 | hvdef.workspace = true 15 | memory_range.workspace = true 16 | thiserror.workspace = true 17 | x86defs.workspace = true 18 | 19 | tracing = { workspace = true, optional = true } 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/x86/x86defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "x86defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | open_enum.workspace = true 11 | 12 | arbitrary = { workspace = true, optional = true } 13 | bitfield-struct.workspace = true 14 | zerocopy.workspace = true 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vm/x86/x86emu/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "x86emu" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | x86defs.workspace = true 11 | 12 | iced-x86 = { workspace = true, features = ["std", "decoder", "instr_info"] } 13 | thiserror.workspace = true 14 | tracing.workspace = true 15 | 16 | [dev-dependencies] 17 | futures.workspace = true 18 | zerocopy.workspace = true 19 | iced-x86 = { workspace = true, features = ["code_asm"] } 20 | 21 | [lints] 22 | workspace = true 23 | -------------------------------------------------------------------------------- /vm/x86/x86emu/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | #![forbid(unsafe_code)] 6 | 7 | mod cpu; 8 | mod emulator; 9 | mod registers; 10 | 11 | pub use cpu::Cpu; 12 | pub use emulator::AlignmentMode; 13 | pub use emulator::Emulator; 14 | pub use emulator::Error; 15 | pub use emulator::MAX_REP_LOOPS; 16 | pub use emulator::fast_path; 17 | pub use registers::Gp; 18 | pub use registers::GpSize; 19 | pub use registers::RegisterIndex; 20 | pub use registers::Segment; 21 | -------------------------------------------------------------------------------- /vm/x86/x86emu/tests/emulation_tests.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | // This file exists just so that our tests get compiled into one single binary. 7 | mod tests; 8 | -------------------------------------------------------------------------------- /vm/x86/x86emu/tests/tests/arith/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod adc; 5 | mod add; 6 | mod and; 7 | mod cmp; 8 | mod cmpxchg; 9 | mod incdec; 10 | mod neg; 11 | mod not; 12 | mod or; 13 | mod sbb; 14 | mod sub; 15 | mod test; 16 | mod xadd; 17 | mod xor; 18 | -------------------------------------------------------------------------------- /vm/x86/x86emu/tests/tests/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod arith; 5 | mod bt; 6 | mod cmpxchg816; 7 | mod common; 8 | mod cond; 9 | mod mov; 10 | mod muldiv; 11 | mod rep; 12 | mod segments; 13 | mod shiftrotate; 14 | -------------------------------------------------------------------------------- /vm/x86/x86emu/tests/tests/muldiv/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod div; 5 | mod imul23; 6 | mod mul_unary; 7 | -------------------------------------------------------------------------------- /vm/x86/x86emu/tests/tests/rep/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod cmps; 5 | mod ins; 6 | mod lods; 7 | mod movs; 8 | mod outs; 9 | mod scas; 10 | mod stos; 11 | -------------------------------------------------------------------------------- /vm/x86/x86emu/tests/tests/shiftrotate/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod rotate; 5 | mod shift; 6 | mod shiftd; 7 | -------------------------------------------------------------------------------- /vmm_core/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vmm_core/src/emuplat/ioapic.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | use std::sync::Arc; 5 | 6 | pub struct IoApicRouting(pub Arc); 7 | 8 | impl chipset::ioapic::IoApicRouting for IoApicRouting { 9 | fn assert(&self, index: u8) { 10 | self.0.assert_irq(index); 11 | } 12 | 13 | fn set_route(&self, index: u8, request: Option<(u64, u32)>) { 14 | self.0.set_irq_route( 15 | index, 16 | request.map(|(address, data)| virt::irqcon::MsiRequest { address, data }), 17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vmm_core/src/emuplat/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | pub mod gic; 5 | pub mod hcl_compat_uefi_nvram_storage; 6 | pub mod ioapic; 7 | -------------------------------------------------------------------------------- /vmm_core/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Core building blocks for managing vm and vm related state to build a vmm. 5 | //! Used by both hvlite and underhill today. 6 | 7 | #![expect(missing_docs)] 8 | #![forbid(unsafe_code)] 9 | 10 | pub mod acpi_builder; 11 | pub mod cpuid; 12 | pub mod device_builder; 13 | pub mod emuplat; 14 | pub mod input_distributor; 15 | pub mod partition_unit; 16 | pub mod platform_resolvers; 17 | pub mod synic; 18 | pub mod vmbus_unit; 19 | pub mod vmotherboard_adapter; 20 | pub mod vmtime_unit; 21 | -------------------------------------------------------------------------------- /vmm_core/virt/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vmm_core/virt/src/aarch64/vm.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | use super::Aarch64PartitionCapabilities; 5 | use crate::state::state_trait; 6 | use vm_topology::processor::aarch64::Aarch64VpInfo; 7 | 8 | state_trait!( 9 | "Access to per-VM state.", 10 | AccessVmState, 11 | Aarch64PartitionCapabilities, 12 | Aarch64VpInfo, 13 | VmSavedState, 14 | "virt.aarch64", 15 | ); 16 | -------------------------------------------------------------------------------- /vmm_core/virt_kvm/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vmm_core/virt_kvm/src/arch.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! This module provides routing for the architecture-specific code. 5 | 6 | cfg_if::cfg_if!( 7 | if #[cfg(guest_arch = "x86_64")] { 8 | mod x86_64; 9 | pub use x86_64::*; 10 | } else if #[cfg(guest_arch = "aarch64")] { 11 | mod aarch64; 12 | pub use aarch64::*; 13 | } else { 14 | compile_error!("target_arch is not supported"); 15 | } 16 | ); 17 | -------------------------------------------------------------------------------- /vmm_core/virt_mshv/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vmm_core/virt_support_aarch64emu/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "virt_support_aarch64emu" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | aarch64defs.workspace = true 11 | guestmem.workspace = true 12 | hvdef.workspace = true 13 | vm_topology.workspace = true 14 | virt.workspace = true 15 | aarch64emu.workspace = true 16 | 17 | thiserror.workspace = true 18 | tracelimit.workspace = true 19 | tracing.workspace = true 20 | zerocopy.workspace = true 21 | [dev-dependencies] 22 | 23 | [lints] 24 | workspace = true 25 | -------------------------------------------------------------------------------- /vmm_core/virt_support_aarch64emu/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Support for emulating aarch64 instructions. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod emulate; 10 | pub mod translate; 11 | -------------------------------------------------------------------------------- /vmm_core/virt_support_apic/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "virt_support_apic" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | hvdef.workspace = true 11 | vm_topology.workspace = true 12 | vmcore.workspace = true 13 | virt.workspace = true 14 | x86defs.workspace = true 15 | 16 | inspect.workspace = true 17 | inspect_counters.workspace = true 18 | tracelimit.workspace = true 19 | 20 | bitfield-struct.workspace = true 21 | parking_lot.workspace = true 22 | thiserror.workspace = true 23 | tracing.workspace = true 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /vmm_core/virt_support_gic/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "virt_support_gic" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | memory_range = { workspace = true, features = ["inspect"] } 11 | vm_topology.workspace = true 12 | 13 | aarch64defs.workspace = true 14 | inspect.workspace = true 15 | tracelimit.workspace = true 16 | 17 | parking_lot.workspace = true 18 | tracing.workspace = true 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /vmm_core/virt_support_x86emu/src/lib.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Support for emulating x86 instructions. 5 | 6 | #![expect(missing_docs)] 7 | #![forbid(unsafe_code)] 8 | 9 | pub mod emulate; 10 | pub mod translate; 11 | -------------------------------------------------------------------------------- /vmm_core/virt_support_x86emu/tests/tests/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | mod checkvtlaccess; 5 | mod common; 6 | mod emulate; 7 | mod translate; 8 | -------------------------------------------------------------------------------- /vmm_core/virt_support_x86emu/tests/virt_tests.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | // This file exists just so that our tests get compiled into one single binary. 7 | mod tests; 8 | -------------------------------------------------------------------------------- /vmm_core/virt_whp/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vmm_core/vm_loader/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vm_loader" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | hvdef.workspace = true 11 | loader.workspace = true 12 | virt.workspace = true 13 | memory_range.workspace = true 14 | vm_topology.workspace = true 15 | guestmem.workspace = true 16 | 17 | range_map_vec.workspace = true 18 | 19 | anyhow.workspace = true 20 | tracing.workspace = true 21 | 22 | [build-dependencies] 23 | build_rs_guest_arch.workspace = true 24 | 25 | [lints] 26 | workspace = true 27 | -------------------------------------------------------------------------------- /vmm_core/vm_loader/build.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![expect(missing_docs)] 5 | 6 | fn main() { 7 | build_rs_guest_arch::emit_guest_arch() 8 | } 9 | -------------------------------------------------------------------------------- /vmm_core/vmm_core_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmm_core_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | virt.workspace = true 11 | 12 | inspect.workspace = true 13 | mesh.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | -------------------------------------------------------------------------------- /vmm_core/vmotherboard/src/chipset/backing/arc_mutex/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! Infrastructure for wiring up `Arc + Mutex`-backed `ChipsetDevice` instances 5 | //! to the virtual motherboard. 6 | 7 | pub mod device; 8 | pub mod pci; 9 | pub mod services; 10 | pub mod state_unit; 11 | -------------------------------------------------------------------------------- /vmm_core/vmotherboard/src/chipset/backing/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | //! The various "backends" for components that get attached to the virtual 5 | //! motherboard. 6 | //! 7 | //! At this time, the only supported backing is `Arc>`, 8 | //! but future backings will include Mesh-based remote `ChipsetDevice` 9 | //! implementations, state-unit backed VMBus devices, etc... 10 | 11 | pub mod arc_mutex; 12 | -------------------------------------------------------------------------------- /vmm_tests/petri_artifact_resolver_openvmm_known_paths/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "petri_artifact_resolver_openvmm_known_paths" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | petri_artifacts_vmm_test.workspace = true 11 | vmm_test_images.workspace = true 12 | 13 | petri_artifacts_common.workspace = true 14 | petri_artifacts_core.workspace = true 15 | 16 | anyhow.workspace = true 17 | fs-err.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vmm_tests/petri_artifacts_vmm_test/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "petri_artifacts_vmm_test" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | petri_artifacts_common.workspace = true 11 | petri_artifacts_core.workspace = true 12 | 13 | [lints] 14 | workspace = true 15 | -------------------------------------------------------------------------------- /vmm_tests/vmm_test_images/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmm_test_images" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [features] 10 | clap = ["dep:clap"] 11 | serde = ["dep:serde"] 12 | 13 | [dependencies] 14 | petri_artifacts_vmm_test.workspace = true 15 | 16 | clap = { workspace = true, features = ["derive"], optional = true } 17 | serde = { workspace = true, features = ["derive"], optional = true } 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /vmm_tests/vmm_test_macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vmm_test_macros" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [lib] 10 | proc-macro = true 11 | 12 | [dependencies] 13 | petri_artifacts_common.workspace = true 14 | petri_artifacts_vmm_test.workspace = true 15 | 16 | proc-macro2.workspace = true 17 | quote.workspace = true 18 | syn = { workspace = true, features = [ "full" ] } 19 | 20 | [lints] 21 | workspace = true 22 | -------------------------------------------------------------------------------- /workers/debug_worker/src/gdb/arch/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | pub mod x86; 5 | -------------------------------------------------------------------------------- /workers/debug_worker_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "debug_worker_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | vmm_core_defs.workspace = true 11 | 12 | mesh.workspace = true 13 | mesh_worker.workspace = true 14 | vmsocket.workspace = true 15 | 16 | [lints] 17 | workspace = true 18 | -------------------------------------------------------------------------------- /workers/vnc_worker/vnc/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vnc" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | pal_async.workspace = true 11 | 12 | futures.workspace = true 13 | thiserror.workspace = true 14 | zerocopy.workspace = true 15 | socket2 = { workspace = true, features = [ "all" ] } 16 | 17 | [lints] 18 | workspace = true 19 | -------------------------------------------------------------------------------- /workers/vnc_worker_defs/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "vnc_worker_defs" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | framebuffer.workspace = true 11 | input_core.workspace = true 12 | 13 | mesh.workspace = true 14 | mesh_worker.workspace = true 15 | 16 | [target.'cfg(any(windows, target_os = "linux"))'.dependencies] 17 | vmsocket.workspace = true 18 | 19 | [lints] 20 | workspace = true 21 | -------------------------------------------------------------------------------- /xsync/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | -------------------------------------------------------------------------------- /xsync/xsync/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "xsync" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | anyhow.workspace = true 11 | cargo_toml.workspace = true 12 | cargo-lock.workspace = true 13 | clap = { workspace = true, features = ["derive", "env"] } 14 | dunce.workspace = true 15 | fs-err.workspace = true 16 | log.workspace = true 17 | pathdiff.workspace = true 18 | semver.workspace = true 19 | serde.workspace = true 20 | toml_edit = { workspace = true, features = ["serde"] } 21 | 22 | ci_logger.workspace = true 23 | 24 | [lints] 25 | workspace = true 26 | -------------------------------------------------------------------------------- /xtask/src/tasks/fuzz/templates/basic.template.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft Corporation. 2 | // Licensed under the MIT License. 3 | 4 | #![cfg_attr(all(target_os = "linux", target_env = "gnu"), no_main)] 5 | 6 | use arbitrary::Arbitrary; 7 | use xtask_fuzz::fuzz_eprintln; 8 | use xtask_fuzz::fuzz_target; 9 | 10 | #[derive(Debug, Arbitrary)] 11 | struct FuzzInput { 12 | inputs: Vec, 13 | } 14 | 15 | fn do_fuzz(input: FuzzInput) { 16 | fuzz_eprintln!("repro-ing test case..."); 17 | 18 | // < fuzz code here > 19 | let _ = input.inputs; 20 | } 21 | 22 | fuzz_target!(|input: FuzzInput| { 23 | xtask_fuzz::init_tracing_if_repro(); 24 | do_fuzz(input) 25 | }); 26 | -------------------------------------------------------------------------------- /xtask/xtask_fuzz/Cargo.toml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | [package] 5 | name = "xtask_fuzz" 6 | edition.workspace = true 7 | rust-version.workspace = true 8 | 9 | [dependencies] 10 | tracing-subscriber.workspace = true 11 | 12 | [target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies] 13 | libfuzzer-sys.workspace = true 14 | 15 | [lints] 16 | workspace = true 17 | --------------------------------------------------------------------------------