@@ -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 ( ) ) ,
0 commit comments