diff --git a/Cargo.toml b/Cargo.toml index ef81e59..22edc44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "axvcpu" authors = ["aarkegz "] -version = "0.2.0" +version = "0.2.1" edition = "2024" categories = ["virtualization", "no-std"] description = "Virtual CPU abstraction for ArceOS hypervisor" @@ -13,5 +13,5 @@ license = "Apache-2.0" axerrno = "0.1.0" memory_addr = "0.4" percpu = "0.2.0" -axaddrspace = "0.1" +axaddrspace = "0.1.4" axvisor_api = "0.1" diff --git a/src/percpu.rs b/src/percpu.rs index b0e9ffb..cddb5f1 100644 --- a/src/percpu.rs +++ b/src/percpu.rs @@ -30,6 +30,10 @@ pub trait AxArchPerCpu: Sized { fn hardware_enable(&mut self) -> AxResult; /// Disable hardware virtualization on the current CPU. fn hardware_disable(&mut self) -> AxResult; + /// Return max guest page table levels used by the architecture. + fn max_guest_page_table_levels(&self) -> usize { + 4 + } } /// Host per-CPU states to run the guest.