diff --git a/src/lib.rs b/src/lib.rs index 51e1a67c2..7428140ee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,9 +5,8 @@ // Author: Nicolai Stange #![no_std] -// FIXME: Re-enable these when MM code has implemented the needed traits -//#![deny(missing_copy_implementations)] -//#![deny(missing_debug_implementations)] +#![deny(missing_copy_implementations)] +#![deny(missing_debug_implementations)] #![cfg_attr(all(test, test_in_svsm), no_main)] #![cfg_attr(all(test, test_in_svsm), feature(custom_test_frameworks))] #![cfg_attr(all(test, test_in_svsm), test_runner(crate::testing::svsm_test_runner))] diff --git a/src/mm/vm/mapping/api.rs b/src/mm/vm/mapping/api.rs index 383d49fa9..7917d6250 100644 --- a/src/mm/vm/mapping/api.rs +++ b/src/mm/vm/mapping/api.rs @@ -21,6 +21,7 @@ use alloc::boxed::Box; use alloc::sync::Arc; /// Information required to resolve a page fault within a virtual mapping +#[derive(Debug, Copy, Clone)] pub struct VMPageFaultResolution { /// The physical address of a page that must be mapped to the page fault /// virtual address to resolve the page fault. diff --git a/src/mm/vm/mapping/file_mapping.rs b/src/mm/vm/mapping/file_mapping.rs index 9ce98f37c..d13447e8f 100644 --- a/src/mm/vm/mapping/file_mapping.rs +++ b/src/mm/vm/mapping/file_mapping.rs @@ -53,7 +53,7 @@ impl VirtualMapping for VMWriteFileMapping { } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Copy, Clone)] pub enum VMFileMappingPermission { /// Read-only access to the file Read, diff --git a/src/mm/vm/range.rs b/src/mm/vm/range.rs index 90788dea2..cf324ca6a 100644 --- a/src/mm/vm/range.rs +++ b/src/mm/vm/range.rs @@ -377,8 +377,8 @@ impl VMR { /// Notify the range that a page fault has occurred. This should be called from /// the page fault handler. The mappings withing this virtual memory region are /// examined and if they overlap with the page fault address then - /// [`VirtualMemoryRange::handle_page_fault()`] is called to handle the page - /// fault within that range. + /// [`VMR::handle_page_fault()`] is called to handle the page fault within that + /// range. /// /// # Arguments ///