Skip to content

Commit dd6db09

Browse files
committed
Removed thp and ksm options, since they are not usable with vmm-mem anymore
1 parent c406d2e commit dd6db09

2 files changed

Lines changed: 0 additions & 44 deletions

File tree

src/bin/uhyve.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -189,23 +189,6 @@ pub struct MemoryArgs {
189189
#[clap(long, action = clap::ArgAction::SetTrue)]
190190
no_aslr: Option<bool>,
191191

192-
/// Transparent Hugepages
193-
///
194-
/// Advise the kernel to enable Transparent Hugepages [THP] on the virtual RAM.
195-
///
196-
/// [THP]: https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html
197-
#[clap(long, action = clap::ArgAction::SetTrue)]
198-
#[cfg(target_os = "linux")]
199-
thp: Option<bool>,
200-
201-
/// Kernel Samepage Merging
202-
///
203-
/// Advise the kernel to enable Kernel Samepage Merging [KSM] on the virtual RAM.
204-
///
205-
/// [KSM]: https://www.kernel.org/doc/html/latest/admin-guide/mm/ksm.html
206-
#[clap(long, action = clap::ArgAction::SetTrue)]
207-
#[cfg(target_os = "linux")]
208-
ksm: Option<bool>,
209192
}
210193

211194
/// Arguments for the CPU resources allocated to the guest.
@@ -425,10 +408,6 @@ impl From<Args> for Params {
425408
MemoryArgs {
426409
memory_size,
427410
no_aslr,
428-
#[cfg(target_os = "linux")]
429-
thp,
430-
#[cfg(target_os = "linux")]
431-
ksm,
432411
},
433412
cpu:
434413
CpuArgs {
@@ -447,10 +426,6 @@ impl From<Args> for Params {
447426
} = args;
448427
Self {
449428
memory_size: memory_size.unwrap_or_default(),
450-
#[cfg(target_os = "linux")]
451-
thp: thp.unwrap_or_default(),
452-
#[cfg(target_os = "linux")]
453-
ksm: ksm.unwrap_or_default(),
454429
aslr: !no_aslr.unwrap_or_default(),
455430
cpu_count: cpu_count.unwrap_or_default(),
456431
#[cfg(target_os = "linux")]
@@ -674,10 +649,6 @@ mod tests {
674649
memory: MemoryArgs {
675650
memory_size: None,
676651
no_aslr: None,
677-
#[cfg(target_os = "linux")]
678-
thp: None,
679-
#[cfg(target_os = "linux")]
680-
ksm: None,
681652
},
682653
cpu: CpuArgs {
683654
cpu_count: None,
@@ -739,10 +710,6 @@ mod tests {
739710
memory: MemoryArgs {
740711
memory_size: Some(GuestMemorySize::from_str("16MiB").unwrap()),
741712
no_aslr: Some(true),
742-
#[cfg(target_os = "linux")]
743-
thp: Some(true),
744-
#[cfg(target_os = "linux")]
745-
ksm: Some(true),
746713
},
747714
cpu: CpuArgs {
748715
cpu_count: Some(CpuCount::from_str("4").unwrap()),

src/params.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@ pub struct Params {
1919
/// Guest RAM size
2020
pub memory_size: GuestMemorySize,
2121

22-
/// Advise Transparent Hugepages
23-
#[cfg(target_os = "linux")]
24-
pub thp: bool,
25-
26-
/// Advise Kernel Samepage Merging
27-
#[cfg(target_os = "linux")]
28-
pub ksm: bool,
2922

3023
/// Number of guest CPUs
3124
pub cpu_count: CpuCount,
@@ -80,10 +73,6 @@ impl Default for Params {
8073
Self {
8174
memory_size: Default::default(),
8275
#[cfg(target_os = "linux")]
83-
thp: false,
84-
#[cfg(target_os = "linux")]
85-
ksm: false,
86-
#[cfg(target_os = "linux")]
8776
pit: false,
8877
cpu_count: Default::default(),
8978
#[cfg(target_os = "linux")]

0 commit comments

Comments
 (0)