Skip to content

Commit 0f532c3

Browse files
Josen-BZR233
andauthored
feat: add gpt level api and publish version 0.2.1 (#45)
* feat: add gpt level api * fix: update axaddrspace dependency version to 0.1.4 * release: publish crate version 0.2.1 * fix: update axaddrspace dependency specification --------- Co-authored-by: 周睿 <zrufo747@outlook.com>
1 parent a9c425d commit 0f532c3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "axvcpu"
33
authors = ["aarkegz <aarkegz@gmail.com>"]
4-
version = "0.2.0"
4+
version = "0.2.1"
55
edition = "2024"
66
categories = ["virtualization", "no-std"]
77
description = "Virtual CPU abstraction for ArceOS hypervisor"
@@ -13,5 +13,5 @@ license = "Apache-2.0"
1313
axerrno = "0.1.0"
1414
memory_addr = "0.4"
1515
percpu = "0.2.0"
16-
axaddrspace = "0.1"
16+
axaddrspace = "0.1.4"
1717
axvisor_api = "0.1"

src/percpu.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ pub trait AxArchPerCpu: Sized {
3030
fn hardware_enable(&mut self) -> AxResult;
3131
/// Disable hardware virtualization on the current CPU.
3232
fn hardware_disable(&mut self) -> AxResult;
33+
/// Return max guest page table levels used by the architecture.
34+
fn max_guest_page_table_levels(&self) -> usize {
35+
4
36+
}
3337
}
3438

3539
/// Host per-CPU states to run the guest.

0 commit comments

Comments
 (0)