Skip to content

Commit b7dc9b0

Browse files
committed
bump rvm version.
1 parent 05303b9 commit b7dc9b0

File tree

5 files changed

+28
-29
lines changed

5 files changed

+28
-29
lines changed

kernel/Cargo.lock

+7-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kernel/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ virtio-drivers = { git = "https://github.com/rcore-riscv-hypervisor-dev/virtio-d
7777
volatile = "0.2"
7878
woke = "0.0.2"
7979
xmas-elf = "0.7"
80-
rvm = { git = "https://github.com/rcore-riscv-hypervisor-dev/RVM", rev = "5cde71c", optional = true }
80+
rvm = { git = "https://github.com/rcore-riscv-hypervisor-dev/RVM", rev = "5ccac8b", optional = true }
8181

8282
[target.'cfg(target_arch = "x86_64")'.dependencies]
8383
apic = { git = "https://github.com/rcore-os/apic-rs", rev = "fb86bd7" }

kernel/src/rvm/inode.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ const RVM_VCPU_READ_STATE: u32 = RVM_IO + 0x13;
2626
const RVM_VCPU_WRITE_STATE: u32 = RVM_IO + 0x14;
2727
const RVM_VCPU_INTERRUPT: u32 = RVM_IO + 0x15;
2828

29-
const RVM_RISCV_SET_SSIP: u32 = 0;
30-
const RVM_RISCV_CLEAR_SSIP: u32 = 1;
31-
const RVM_RISCV_SET_SEIP: u32 = 2;
32-
const RVM_RISCV_CLEAR_SEIP: u32 = 3;
29+
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]
30+
mod riscv_intr_constants {
31+
pub const RVM_RISCV_SET_SSIP: u32 = 0;
32+
pub const RVM_RISCV_CLEAR_SSIP: u32 = 1;
33+
pub const RVM_RISCV_SET_SEIP: u32 = 2;
34+
pub const RVM_RISCV_CLEAR_SEIP: u32 = 3;
35+
}
36+
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]
37+
use riscv_intr_constants::*;
3338

3439
pub struct RvmINode {
3540
guests: RwLock<BTreeMap<usize, Guest>>,

kernel/src/rvm/mod.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ mod rvm_extern_fn {
5555
}
5656

5757
#[cfg(target_arch = "x86_64")]
58-
#[rvm::extern_fn(x86_all_traps_handler_addr)]
59-
unsafe fn rvm_x86_all_traps_handler_addr() -> usize {
60-
extern "C" {
61-
fn __alltraps();
62-
}
63-
__alltraps as usize
58+
#[rvm::extern_fn(is_host_timer_interrupt)]
59+
fn rvm_x86_is_host_timer_interrupt(_vec: u8) -> bool {
60+
// TODO: fill in the blanks.
61+
false
62+
}
63+
#[cfg(target_arch = "x86_64")]
64+
#[rvm::extern_fn(is_host_serial_interrupt)]
65+
fn rvm_x86_is_host_serial_interrupt(_vec: u8) -> bool {
66+
// TODO: fill in the blanks.
67+
false
6468
}
6569

6670
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]

user

Submodule user updated 1 file

0 commit comments

Comments
 (0)