Lines Matching refs:x86
13 use x86::{controlregs::Cr4, segmentation::SegmentSelector};
177 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in save_fsbase()
178 self.fsbase = x86::current::segmentation::rdfsbase() as usize; in save_fsbase()
180 self.fsbase = x86::msr::rdmsr(x86::msr::IA32_FS_BASE) as usize; in save_fsbase()
185 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in save_gsbase()
186 self.gsbase = x86::current::segmentation::rdgsbase() as usize; in save_gsbase()
188 self.gsbase = x86::msr::rdmsr(x86::msr::IA32_GS_BASE) as usize; in save_gsbase()
193 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in restore_fsbase()
194 x86::current::segmentation::wrfsbase(self.fsbase as u64); in restore_fsbase()
196 x86::msr::wrmsr(x86::msr::IA32_FS_BASE, self.fsbase as u64); in restore_fsbase()
201 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in restore_gsbase()
202 x86::current::segmentation::wrgsbase(self.gsbase as u64); in restore_gsbase()
204 x86::msr::wrmsr(x86::msr::IA32_GS_BASE, self.gsbase as u64); in restore_gsbase()
210 x86::msr::wrmsr( in store_kernel_gsbase()
211 x86::msr::IA32_KERNEL_GSBASE, in store_kernel_gsbase()
271 let ptr = VirtAddr::new(x86::current::registers::rsp() as usize); in arch_current_pcb()
404 x86::Ring::Ring0, in switch_process()
520 (x86::current::registers::rsp() as usize) < trap_frame_vaddr.data(), in arch_switch_to_user()
524 x86::current::registers::rsp() as usize, in arch_switch_to_user()