Repository navigation
chore: Remove hvp/kvm features #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,9 @@ edition = "2024" | |
|
|
||
| [dependencies] | ||
| acpi_tables = { workspace = true } | ||
| applevisor = { workspace = true, optional = true } | ||
| applevisor-sys = { workspace = true, optional = true } | ||
| async-trait = { workspace = true } | ||
| bitflags = { workspace = true } | ||
| gdbstub_arch = { workspace = true } | ||
| kvm-bindings = { workspace = true, optional = true } | ||
| kvm-ioctls = { workspace = true, optional = true } | ||
| serde = { workspace = true } | ||
| serde_json = { workspace = true } | ||
| static_assertions = { workspace = true } | ||
|
|
@@ -25,16 +21,18 @@ vm-utils = { workspace = true } | |
| [target.'cfg(target_arch = "aarch64")'.dependencies] | ||
| anyhow = { workspace = true } | ||
| futures = { workspace = true } | ||
| vm-aarch64 = { workspace = true } | ||
| strum = { workspace = true, optional = true } | ||
| strum_macros = { workspace = true } | ||
| vm-aarch64 = { workspace = true } | ||
|
|
||
| [target.'cfg(target_arch = "x86_64")'.dependencies] | ||
| vm-firmware = { workspace = true } | ||
|
|
||
| [target.'cfg(target_os = "linux")'.dependencies] | ||
| kvm-bindings = { workspace = true } | ||
| kvm-ioctls = { workspace = true } | ||
| vmm-sys-util = { workspace = true } | ||
|
|
||
| [features] | ||
| kvm = ["kvm-bindings", "kvm-ioctls"] | ||
| hvp = ["applevisor", "applevisor-sys", "strum"] | ||
| [target.'cfg(target_os = "macos")'.dependencies] | ||
| applevisor = { workspace = true } | ||
| applevisor-sys = { workspace = true } | ||
| strum = { workspace = true } | ||
|
Comment on lines
24
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '== Cargo.toml ==\n'
sed -n '1,220p' crates/vm-core/Cargo.toml
printf '\n== virtualization.rs outline ==\n'
ast-grep outline crates/vm-core/src/virtualization.rs --view expanded || true
printf '\n== main.rs outline ==\n'
ast-grep outline crates/vm-cli/src/main.rs --view expanded || true
printf '\n== Search for applevisor / hvp / aarch64 gates ==\n'
rg -n --hidden --glob '!target' --glob '!**/node_modules/**' \
'applevisor|applevisor-sys|hv_vm_config_set_el2_enabled|target_arch\s*=\s*"aarch64"|cfg_select!|feature\s*=\s*"hvp"|hvp' \
crates/vm-core crates/vm-cliRepository: junyu0312/rust-vm Length of output: 14450 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '== crates/vm-core/src/virtualization.rs (relevant slice) ==\n'
sed -n '1,260p' crates/vm-core/src/virtualization.rs
printf '\n== crates/vm-core/src/virtualization/hvp.rs (relevant slice) ==\n'
sed -n '1,260p' crates/vm-core/src/virtualization/hvp.rs
printf '\n== crates/vm-cli/src/main.rs (relevant slice) ==\n'
sed -n '1,260p' crates/vm-cli/src/main.rsRepository: junyu0312/rust-vm Length of output: 3528 🌐 Web query:
💡 Result: The applevisor Rust crate provides safe bindings specifically for the Apple Silicon (aarch64) Hypervisor.framework [1][2]. According to its documentation and metadata, the crate is designed for and explicitly focuses on support for aarch64 (Apple Silicon) architectures [1][2]. It does not support x86_64 architectures because it acts as a wrapper for the Apple Silicon-specific Hypervisor.framework APIs [1][3]. Key points regarding its architecture support: - Primary Architecture: aarch64 (Apple Silicon) [1][2]. - Platform Limitation: The crate is intended for macOS on Apple Silicon [1][2]. - API Focus: It provides bindings to the Hypervisor.framework as it exists on Apple Silicon [1][3]. Consequently, it is incompatible with x86_64 macOS environments [1][2]. Developers using this crate must ensure their project is targeting the appropriate Apple Silicon hardware and that their binary has been granted the necessary com.apple.security.hypervisor entitlement to interact with the framework [3]. Citations:
Gate the macOS virtualization deps by 🤖 Prompt for AI Agents |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: junyu0312/rust-vm
Length of output: 50374
🏁 Script executed:
Repository: junyu0312/rust-vm
Length of output: 3356
🏁 Script executed:
Repository: junyu0312/rust-vm
Length of output: 50374
🏁 Script executed:
Repository: junyu0312/rust-vm
Length of output: 228
🌐 Web query:
Hypervisor.framework Intel Macs supported Apple Silicon only macOS Hypervisor.framework availability💡 Result:
The Hypervisor.framework is available and supported on both Intel-based Macs and Apple Silicon Macs [1][2][3]. It is not restricted to Apple Silicon [1][3]. On Intel-based Mac computers, the framework requires a processor that supports the Intel VT-x feature set, including Extended Page Tables (EPT) and Unrestricted Mode [1][4][5]. These requirements generally align with Intel processors from the Westmere generation (released in 2010) or newer [4][6]. Developers can verify if a specific Intel-based Mac supports the framework by checking if the command
sysctl kern.hv_supportreturns 1 [4][5][7]. On Apple Silicon Macs, the Hypervisor.framework is fully supported to build virtualization solutions [8][9]. Furthermore, starting with macOS 15.0, Apple added support for nested virtualization on Apple Silicon through the framework, enabling a hypervisor to run inside another virtual machine [10]. For high-level tasks, Apple also provides the Virtualization.framework, which is available on both Intel and Apple Silicon architectures and provides a higher-level API for running virtual machines [3].Citations:
🏁 Script executed:
Repository: junyu0312/rust-vm
Length of output: 16904
Gate the macOS hypervisor path on
target_arch = "aarch64".AppleHypervisorpulls incrate::arch::aarch64::*, sox86_64-apple-darwinwill hit this branch and fail to compile.🤖 Prompt for AI Agents