fn handle_page_fault(&self, gpaddr: GuestPhysAddr, pt: &Mutex<impl RvmPageTable>) -> bool {
        let mut pt = pt.lock();
        if let Ok(target) = pt.query(gpaddr) {
            if target != 0 {
                return false;
            }
        }
        let frame = alloc_frame().expect("failed to alloc frame");
        pt.map(gpaddr, frame, self.attr).unwrap();
        // TODO: flush TLB?
        true
    }
/// Do real mapping when an EPT violation occurs
Do real mapping when an EPT violation occurs
Do real mapping when an EPT violation occurs
fn handle_page_fault(&self, gpaddr: GuestPhysAddr, pt: &Mutex<impl RvmPageTable>) -> bool {
        let mut pt = pt.lock();
        if let Ok(target) = pt.query(gpaddr) {
            if target != 0 {
                return false;
            }
        }
        let frame = alloc_frame().expect("failed to alloc frame");
        pt.map(gpaddr, frame, self.attr).unwrap();
        // TODO: flush TLB?
        true
    }
fn handle_page_fault ( & self , gpaddr : GuestPhysAddr , pt : & Mutex < impl RvmPageTable > ) -> bool { let mut pt = pt . lock ( ) ; if let Ok ( target ) = pt . query ( gpaddr ) { if target != 0 { return false ; } } let frame = alloc_frame ( ) . expect ( " " ) ; pt . map ( gpaddr , frame , self . attr ) . unwrap ( ) ; // TODO: flush TLB? true }
Do real mapping when an EPT violation occurs
Do real mapping when an EPT violation occurs
&self
gpaddr
GuestPhysAddr
pt
&Mutex<impl RvmPageTable>