mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
Compare commits
6 Commits
3214dc6431
...
2d15a2cd45
Author | SHA1 | Date | |
---|---|---|---|
|
2d15a2cd45 | ||
|
fbe3e4d642 | ||
|
28d4957ba5 | ||
|
f39d5eeaf0 | ||
|
639db35635 | ||
|
6482f7e8c3 |
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -1338,7 +1338,7 @@ checksum = "9bec4598fddb13cc7b528819e697852653252b760f1228b7642679bf2ff2cd07"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "mshv-bindings"
|
name = "mshv-bindings"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://github.com/rust-vmm/mshv?branch=main#9d0c11fe9fedfbcf56a5d62fbf4bad80cdf91340"
|
source = "git+https://github.com/rust-vmm/mshv?branch=main#9f1e0cd775b30f36044bd045b27863b953c5988a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"serde",
|
"serde",
|
||||||
@ -1350,7 +1350,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "mshv-ioctls"
|
name = "mshv-ioctls"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
source = "git+https://github.com/rust-vmm/mshv?branch=main#9d0c11fe9fedfbcf56a5d62fbf4bad80cdf91340"
|
source = "git+https://github.com/rust-vmm/mshv?branch=main#9f1e0cd775b30f36044bd045b27863b953c5988a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"mshv-bindings",
|
"mshv-bindings",
|
||||||
@ -3064,9 +3064,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zbus_names"
|
name = "zbus_names"
|
||||||
version = "2.6.0"
|
version = "2.6.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9"
|
checksum = "437d738d3750bed6ca9b8d423ccc7a8eb284f6b1d6d4e225a0e4e6258d864c8d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
|
4
fuzz/Cargo.lock
generated
4
fuzz/Cargo.lock
generated
@ -79,9 +79,9 @@ checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arc-swap"
|
name = "arc-swap"
|
||||||
version = "1.6.0"
|
version = "1.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6"
|
checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arch"
|
name = "arch"
|
||||||
|
@ -54,8 +54,6 @@ use crate::arch::x86::{CpuIdEntry, FpuState, MsrEntry};
|
|||||||
|
|
||||||
const DIRTY_BITMAP_CLEAR_DIRTY: u64 = 0x4;
|
const DIRTY_BITMAP_CLEAR_DIRTY: u64 = 0x4;
|
||||||
const DIRTY_BITMAP_SET_DIRTY: u64 = 0x8;
|
const DIRTY_BITMAP_SET_DIRTY: u64 = 0x8;
|
||||||
#[cfg(feature = "sev_snp")]
|
|
||||||
const HV_PAGE_SIZE: u64 = 4096;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Export generically-named wrappers of mshv-bindings for Unix-based platforms
|
/// Export generically-named wrappers of mshv-bindings for Unix-based platforms
|
||||||
@ -653,9 +651,9 @@ impl cpu::Vcpu for MshvVcpu {
|
|||||||
"Releasing pages: gfn_start: {:x?}, gfn_count: {:?}",
|
"Releasing pages: gfn_start: {:x?}, gfn_count: {:?}",
|
||||||
gfn_start, gfn_count
|
gfn_start, gfn_count
|
||||||
);
|
);
|
||||||
let gpa_start = gfn_start * HV_PAGE_SIZE;
|
let gpa_start = gfn_start * HV_PAGE_SIZE as u64;
|
||||||
for i in 0..gfn_count {
|
for i in 0..gfn_count {
|
||||||
gpas.push(gpa_start + i * HV_PAGE_SIZE);
|
gpas.push(gpa_start + i * HV_PAGE_SIZE as u64);
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut gpa_list =
|
let mut gpa_list =
|
||||||
|
@ -671,7 +671,11 @@ impl MemoryManager {
|
|||||||
for zone_config in zones_config {
|
for zone_config in zones_config {
|
||||||
if guest_ram_mapping.zone_id == zone_config.id {
|
if guest_ram_mapping.zone_id == zone_config.id {
|
||||||
let region = MemoryManager::create_ram_region(
|
let region = MemoryManager::create_ram_region(
|
||||||
&zone_config.file,
|
if guest_ram_mapping.virtio_mem {
|
||||||
|
&None
|
||||||
|
} else {
|
||||||
|
&zone_config.file
|
||||||
|
},
|
||||||
guest_ram_mapping.file_offset,
|
guest_ram_mapping.file_offset,
|
||||||
GuestAddress(guest_ram_mapping.gpa),
|
GuestAddress(guest_ram_mapping.gpa),
|
||||||
guest_ram_mapping.size as usize,
|
guest_ram_mapping.size as usize,
|
||||||
|
@ -165,8 +165,8 @@ mod mshv {
|
|||||||
pub const MSHV_GET_VP_REGISTERS: u64 = 0xc010_b805;
|
pub const MSHV_GET_VP_REGISTERS: u64 = 0xc010_b805;
|
||||||
pub const MSHV_SET_VP_REGISTERS: u64 = 0x4010_b806;
|
pub const MSHV_SET_VP_REGISTERS: u64 = 0x4010_b806;
|
||||||
pub const MSHV_RUN_VP: u64 = 0x8100_b807;
|
pub const MSHV_RUN_VP: u64 = 0x8100_b807;
|
||||||
pub const MSHV_GET_VP_STATE: u64 = 0xc028_b80a;
|
pub const MSHV_GET_VP_STATE: u64 = 0xc010_b80a;
|
||||||
pub const MSHV_SET_VP_STATE: u64 = 0xc028_b80b;
|
pub const MSHV_SET_VP_STATE: u64 = 0xc010_b80b;
|
||||||
pub const MSHV_SET_PARTITION_PROPERTY: u64 = 0x4010_b80c;
|
pub const MSHV_SET_PARTITION_PROPERTY: u64 = 0x4010_b80c;
|
||||||
pub const MSHV_GET_GPA_ACCESS_STATES: u64 = 0xc01c_b812;
|
pub const MSHV_GET_GPA_ACCESS_STATES: u64 = 0xc01c_b812;
|
||||||
pub const MSHV_VP_TRANSLATE_GVA: u64 = 0xc020_b80e;
|
pub const MSHV_VP_TRANSLATE_GVA: u64 = 0xc020_b80e;
|
||||||
@ -183,6 +183,7 @@ mod mshv {
|
|||||||
pub const MSHV_SEV_SNP_AP_CREATE: u64 = 0x4010_b834;
|
pub const MSHV_SEV_SNP_AP_CREATE: u64 = 0x4010_b834;
|
||||||
pub const MSHV_ISSUE_PSP_GUEST_REQUEST: u64 = 0x4010_b831;
|
pub const MSHV_ISSUE_PSP_GUEST_REQUEST: u64 = 0x4010_b831;
|
||||||
pub const MSHV_ASSERT_INTERRUPT: u64 = 0x4018_b809;
|
pub const MSHV_ASSERT_INTERRUPT: u64 = 0x4018_b809;
|
||||||
|
pub const MSHV_ROOT_HVCALL: u64 = 0xc020_b835;
|
||||||
}
|
}
|
||||||
#[cfg(feature = "mshv")]
|
#[cfg(feature = "mshv")]
|
||||||
use mshv::*;
|
use mshv::*;
|
||||||
@ -244,6 +245,7 @@ fn create_vmm_ioctl_seccomp_rule_common_mshv() -> Result<Vec<SeccompRule>, Backe
|
|||||||
Eq,
|
Eq,
|
||||||
MSHV_ISSUE_PSP_GUEST_REQUEST
|
MSHV_ISSUE_PSP_GUEST_REQUEST
|
||||||
)?],
|
)?],
|
||||||
|
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_ROOT_HVCALL)?],
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -725,6 +727,7 @@ fn create_vcpu_ioctl_seccomp_rule_mshv() -> Result<Vec<SeccompRule>, BackendErro
|
|||||||
Eq,
|
Eq,
|
||||||
MSHV_ISSUE_PSP_GUEST_REQUEST
|
MSHV_ISSUE_PSP_GUEST_REQUEST
|
||||||
)?],
|
)?],
|
||||||
|
and![Cond::new(1, ArgLen::Dword, Eq, MSHV_ROOT_HVCALL)?],
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user