• Home
  • Raw
  • Download

Lines Matching refs:sregs

1688 static void setup_32bit_idt(struct kvm_sregs* sregs, char* host_mem, uintptr_t guest_mem)
1690 sregs->idt.base = guest_mem + ADDR_VAR_IDT;
1691 sregs->idt.limit = 0x1ff;
1692 uint64* idt = (uint64*)(host_mem + sregs->idt.base);
1735 static void setup_64bit_idt(struct kvm_sregs* sregs, char* host_mem, uintptr_t guest_mem)
1737 sregs->idt.base = guest_mem + ADDR_VAR_IDT;
1738 sregs->idt.limit = 0x1ff;
1739 uint64* idt = (uint64*)(host_mem + sregs->idt.base);
1820 struct kvm_sregs sregs;
1821 if (ioctl(cpufd, KVM_GET_SREGS, &sregs))
1829 sregs.gdt.base = guest_mem + ADDR_GDT;
1830 sregs.gdt.limit = 256 * sizeof(uint64) - 1;
1831 uint64* gdt = (uint64*)(host_mem + sregs.gdt.base);
1844 sregs.ldt = seg_ldt;
1845 uint64* ldt = (uint64*)(host_mem + sregs.ldt.base);
2003 sregs.cs = seg_cs16;
2004 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds16;
2005 sregs.cr0 |= CR0_PE;
2007 sregs.cs.selector = 0;
2008 sregs.cs.base = 0;
2016 sregs.cs = seg_cs32;
2017 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds32;
2018 sregs.cr0 |= CR0_PE;
2019 sregs.efer |= EFER_SCE;
2022 setup_32bit_idt(&sregs, host_mem, guest_mem);
2028 sregs.cr3 = pd_addr;
2029 sregs.cr4 |= CR4_PSE;
2038 sregs.cs.selector = 0;
2039 sregs.cs.base = 0;
2043 sregs.cs = seg_cs16;
2044 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds16;
2049 sregs.cr0 |= CR0_PE;
2050 sregs.cs = seg_cs16;
2051 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds16;
2054 sregs.cr0 |= CR0_PE;
2055 sregs.efer |= EFER_SCE;
2058 setup_32bit_idt(&sregs, host_mem, guest_mem);
2061 sregs.cs = seg_cs32;
2062 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds32;
2069 sregs.cs = seg_cs32;
2070 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds32;
2075 sregs.cr3 = pd_addr;
2076 sregs.cr4 |= CR4_PSE;
2081 sregs.cs = seg_cs32_cpl3;
2082 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds32_cpl3;
2084 sregs.cs = seg_cs32;
2085 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds32;
2088 sregs.efer |= EFER_LME | EFER_SCE;
2089 sregs.cr0 |= CR0_PE;
2092 setup_64bit_idt(&sregs, host_mem, guest_mem);
2094 sregs.cs = seg_cs32;
2095 sregs.ds = sregs.es = sregs.fs = sregs.gs = sregs.ss = seg_ds32;
2106 sregs.cr3 = pml4_addr;
2107 sregs.cr4 |= CR4_PAE;
2110 sregs.cr0 |= CR0_NE;
2158 tss32.cr3 = sregs.cr3;
2168 tss32.cr3 = sregs.cr3;
2172 tss32.cr3 = sregs.cr3;
2230 sregs.cr0 ^= val & (CR0_MP | CR0_EM | CR0_ET | CR0_NE | CR0_WP | CR0_AM | CR0_NW | CR0_CD);
2233 sregs.cr4 ^= val & (CR4_VME | CR4_PVI | CR4_TSD | CR4_DE | CR4_MCE | CR4_PGE | CR4_PCE |
2238 sregs.efer ^= val & (EFER_SCE | EFER_NXE | EFER_SVME | EFER_LMSLE | EFER_FFXSR | EFER_TCE);
2307 if (ioctl(cpufd, KVM_SET_SREGS, &sregs))