fn check_sext_sv39(addr: usize) -> bool {
    let addr_b38 = (addr >> 38) & 0b1 == 1;
    let sext = addr >> 39;
    if addr_b38 && sext == 0x1FFFFFF {
        return true;
    }
    if !addr_b38 && sext == 0 {
        return true;
    }
    false
}
// if sext is not valid, raise a page fault
if sext is not valid, raise a page fault
if sext is not valid raise a page fault
fn check_sext_sv39(addr: usize) -> bool {
    let addr_b38 = (addr >> 38) & 0b1 == 1;
    let sext = addr >> 39;
    if addr_b38 && sext == 0x1FFFFFF {
        return true;
    }
    if !addr_b38 && sext == 0 {
        return true;
    }
    false
}
fn check_sext_sv39 ( addr : usize ) -> bool { let addr_b38 = ( addr >> 38 ) & 0b1 == 1 ; let sext = addr >> 39 ; if addr_b38 && sext == 0x1FFFFFF { return true ; } if ! addr_b38 && sext == 0 { return true ; } false }
if sext is not valid, raise a page fault
if sext is not valid raise a page fault
addr
usize
addr
usize