Home
last modified time | relevance | path

Searched refs:sregs (Results 1 – 25 of 44) sorted by relevance

12

/external/linux-kselftest/tools/testing/selftests/kvm/x86_64/
Dset_sregs_test.c30 struct kvm_sregs sregs; in test_cr4_feature_bit() local
37 memcpy(&sregs, orig, sizeof(sregs)); in test_cr4_feature_bit()
38 sregs.cr4 |= feature_bit; in test_cr4_feature_bit()
40 rc = _vcpu_sregs_set(vm, VCPU_ID, &sregs); in test_cr4_feature_bit()
44 vcpu_sregs_get(vm, VCPU_ID, &sregs); in test_cr4_feature_bit()
45 TEST_ASSERT(!memcmp(&sregs, orig, sizeof(sregs)), "KVM modified sregs"); in test_cr4_feature_bit()
85 struct kvm_sregs sregs; in main() local
101 vcpu_sregs_get(vm, VCPU_ID, &sregs); in main()
103 sregs.cr4 |= calc_cr4_feature_bits(vm); in main()
104 cr4 = sregs.cr4; in main()
[all …]
Dvmx_invalid_nested_guest_state.c57 struct kvm_sregs sregs; in main() local
90 memset(&sregs, 0, sizeof(sregs)); in main()
91 vcpu_sregs_get(vm, VCPU_ID, &sregs); in main()
92 sregs.tr.unusable = 1; in main()
93 vcpu_sregs_set(vm, VCPU_ID, &sregs); in main()
Dsync_regs_test.c90 struct kvm_sregs sregs; in main() local
154 vcpu_sregs_get(vm, VCPU_ID, &sregs); in main()
155 compare_sregs(&sregs, &run->s.regs.sregs); in main()
162 run->s.regs.sregs.apic_base = 1 << 11; in main()
175 TEST_ASSERT(run->s.regs.sregs.apic_base == 1 << 11, in main()
177 run->s.regs.sregs.apic_base); in main()
182 vcpu_sregs_get(vm, VCPU_ID, &sregs); in main()
183 compare_sregs(&sregs, &run->s.regs.sregs); in main()
Dvmx_exception_with_invalid_guest_state.c64 static struct kvm_sregs sregs; in set_or_clear_invalid_guest_state() local
66 if (!sregs.cr0) in set_or_clear_invalid_guest_state()
67 vcpu_sregs_get(vm, VCPU_ID, &sregs); in set_or_clear_invalid_guest_state()
68 sregs.tr.unusable = !!set; in set_or_clear_invalid_guest_state()
69 vcpu_sregs_set(vm, VCPU_ID, &sregs); in set_or_clear_invalid_guest_state()
Dcr4_cpuid_sync_test.c68 struct kvm_sregs sregs; in main() local
98 vcpu_sregs_get(vm, VCPU_ID, &sregs); in main()
99 sregs.cr4 &= ~X86_CR4_OSXSAVE; in main()
100 vcpu_sregs_set(vm, VCPU_ID, &sregs); in main()
/external/crosvm/x86_64/src/
Dregs.rs260 pub fn configure_segments_and_sregs(mem: &GuestMemory, sregs: &mut Sregs) -> Result<()> { in configure_segments_and_sregs()
274 sregs.gdt.base = BOOT_GDT_OFFSET as u64; in configure_segments_and_sregs()
275 sregs.gdt.limit = mem::size_of_val(&gdt_table) as u16 - 1; in configure_segments_and_sregs()
278 sregs.idt.base = BOOT_IDT_OFFSET as u64; in configure_segments_and_sregs()
279 sregs.idt.limit = mem::size_of::<u64>() as u16 - 1; in configure_segments_and_sregs()
281 sregs.cs = code_seg; in configure_segments_and_sregs()
282 sregs.ds = data_seg; in configure_segments_and_sregs()
283 sregs.es = data_seg; in configure_segments_and_sregs()
284 sregs.fs = data_seg; in configure_segments_and_sregs()
285 sregs.gs = data_seg; in configure_segments_and_sregs()
[all …]
/external/strace/linux/x86_64/
Darch_kvm.c76 const struct kvm_sregs *const sregs) in arch_print_kvm_sregs() argument
78 PRINT_FIELD_KVM_SREGS_STRUCT("{", sregs, segment, cs); in arch_print_kvm_sregs()
84 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, segment, ds); in arch_print_kvm_sregs()
85 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, segment, es); in arch_print_kvm_sregs()
86 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, segment, fs); in arch_print_kvm_sregs()
87 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, segment, gs); in arch_print_kvm_sregs()
88 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, segment, ss); in arch_print_kvm_sregs()
89 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, segment, tr); in arch_print_kvm_sregs()
90 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, segment, ldt); in arch_print_kvm_sregs()
91 PRINT_FIELD_KVM_SREGS_STRUCT(", ", sregs, dtable, gdt); in arch_print_kvm_sregs()
[all …]
/external/strace/tests-mx32/
Dioctl_kvm_run_common.c99 print_kvm_sregs(const struct kvm_sregs *sregs) in print_kvm_sregs() argument
102 print_kvm_segment(&sregs->cs); in print_kvm_sregs()
105 print_kvm_segment(&sregs->ds); in print_kvm_sregs()
107 print_kvm_segment(&sregs->es); in print_kvm_sregs()
109 print_kvm_segment(&sregs->fs); in print_kvm_sregs()
111 print_kvm_segment(&sregs->gs); in print_kvm_sregs()
113 print_kvm_segment(&sregs->ss); in print_kvm_sregs()
115 print_kvm_segment(&sregs->tr); in print_kvm_sregs()
117 print_kvm_segment(&sregs->ldt); in print_kvm_sregs()
120 "apic_base=%#jx", (uintmax_t) sregs->gdt.base, sregs->gdt.limit, in print_kvm_sregs()
[all …]
/external/strace/tests-m32/
Dioctl_kvm_run_common.c99 print_kvm_sregs(const struct kvm_sregs *sregs) in print_kvm_sregs() argument
102 print_kvm_segment(&sregs->cs); in print_kvm_sregs()
105 print_kvm_segment(&sregs->ds); in print_kvm_sregs()
107 print_kvm_segment(&sregs->es); in print_kvm_sregs()
109 print_kvm_segment(&sregs->fs); in print_kvm_sregs()
111 print_kvm_segment(&sregs->gs); in print_kvm_sregs()
113 print_kvm_segment(&sregs->ss); in print_kvm_sregs()
115 print_kvm_segment(&sregs->tr); in print_kvm_sregs()
117 print_kvm_segment(&sregs->ldt); in print_kvm_sregs()
120 "apic_base=%#jx", (uintmax_t) sregs->gdt.base, sregs->gdt.limit, in print_kvm_sregs()
[all …]
/external/strace/tests/
Dioctl_kvm_run_common.c99 print_kvm_sregs(const struct kvm_sregs *sregs) in print_kvm_sregs() argument
102 print_kvm_segment(&sregs->cs); in print_kvm_sregs()
105 print_kvm_segment(&sregs->ds); in print_kvm_sregs()
107 print_kvm_segment(&sregs->es); in print_kvm_sregs()
109 print_kvm_segment(&sregs->fs); in print_kvm_sregs()
111 print_kvm_segment(&sregs->gs); in print_kvm_sregs()
113 print_kvm_segment(&sregs->ss); in print_kvm_sregs()
115 print_kvm_segment(&sregs->tr); in print_kvm_sregs()
117 print_kvm_segment(&sregs->ldt); in print_kvm_sregs()
120 "apic_base=%#jx", (uintmax_t) sregs->gdt.base, sregs->gdt.limit, in print_kvm_sregs()
[all …]
/external/linux-kselftest/tools/testing/selftests/kvm/lib/x86_64/
Dprocessor.c134 void sregs_dump(FILE *stream, struct kvm_sregs *sregs, in sregs_dump() argument
140 segment_dump(stream, &sregs->cs, indent + 2); in sregs_dump()
142 segment_dump(stream, &sregs->ds, indent + 2); in sregs_dump()
144 segment_dump(stream, &sregs->es, indent + 2); in sregs_dump()
146 segment_dump(stream, &sregs->fs, indent + 2); in sregs_dump()
148 segment_dump(stream, &sregs->gs, indent + 2); in sregs_dump()
150 segment_dump(stream, &sregs->ss, indent + 2); in sregs_dump()
152 segment_dump(stream, &sregs->tr, indent + 2); in sregs_dump()
154 segment_dump(stream, &sregs->ldt, indent + 2); in sregs_dump()
157 dtable_dump(stream, &sregs->gdt, indent + 2); in sregs_dump()
[all …]
/external/linux-kselftest/tools/testing/selftests/kvm/s390x/
Dresets.c91 struct kvm_sregs sregs; in assert_clear() local
98 vcpu_sregs_get(vm, VCPU_ID, &sregs); in assert_clear()
99 TEST_ASSERT(!memcmp(&sregs.acrs, regs_null, sizeof(sregs.acrs)), "acrs == 0"); in assert_clear()
132 struct kvm_sregs sregs; in assert_initial() local
136 vcpu_sregs_get(vm, VCPU_ID, &sregs); in assert_initial()
137 TEST_ASSERT(sregs.crs[0] == 0xE0UL, "cr0 == 0xE0 (KVM_GET_SREGS)"); in assert_initial()
138 TEST_ASSERT(sregs.crs[14] == 0xC2000000UL, in assert_initial()
140 TEST_ASSERT(!memcmp(&sregs.crs[1], regs_null, sizeof(sregs.crs[1]) * 12), in assert_initial()
142 TEST_ASSERT(sregs.crs[15] == 0, "cr15 == 0 (KVM_GET_SREGS)"); in assert_initial()
Dsync_regs_test.c82 struct kvm_sregs sregs; in main() local
147 vcpu_sregs_get(vm, VCPU_ID, &sregs); in main()
148 compare_sregs(&sregs, &run->s.regs); in main()
181 vcpu_sregs_get(vm, VCPU_ID, &sregs); in main()
182 compare_sregs(&sregs, &run->s.regs); in main()
/external/crosvm/tests/
Dplugin_irqfd.c90 struct kvm_sregs sregs; in vcpu_thread() local
91 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread()
92 sregs.cs.base = 0; in vcpu_thread()
93 sregs.cs.selector = 0x0; in vcpu_thread()
94 sregs.ss.base = 0; in vcpu_thread()
95 sregs.ss.selector = 0x0; in vcpu_thread()
96 sregs.es.base = KILL_ADDRESS; in vcpu_thread()
97 sregs.es.selector = 0x0; in vcpu_thread()
98 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread()
Dplugin_hint.c47 struct kvm_sregs sregs; in vcpu_thread() local
48 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread()
49 sregs.cs.base = 0; in vcpu_thread()
50 sregs.cs.selector = 0; in vcpu_thread()
51 sregs.es.base = KILL_ADDRESS; in vcpu_thread()
52 sregs.es.selector = 0; in vcpu_thread()
53 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread()
69 struct kvm_sregs sregs = {0}; in vcpu_thread() local
101 if (crosvm_vcpu_get_sregs(vcpu, &sregs)) { in vcpu_thread()
106 if (crosvm_vcpu_set_sregs(vcpu, &sregs)) { in vcpu_thread()
Dplugin_dirty_log.c47 struct kvm_sregs sregs; in vcpu_thread() local
48 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread()
49 sregs.cs.base = 0; in vcpu_thread()
50 sregs.cs.selector = 0; in vcpu_thread()
51 sregs.es.base = KILL_ADDRESS; in vcpu_thread()
52 sregs.es.selector = 0; in vcpu_thread()
53 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread()
Dplugin_ioevent.c46 struct kvm_sregs sregs; in vcpu_thread() local
47 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread()
48 sregs.cs.base = 0; in vcpu_thread()
49 sregs.cs.selector = 0; in vcpu_thread()
50 sregs.es.base = KILL_ADDRESS; in vcpu_thread()
51 sregs.es.selector = 0; in vcpu_thread()
52 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread()
Dplugin_adder.c46 struct kvm_sregs sregs; in vcpu_thread() local
47 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread()
48 sregs.cs.base = 0; in vcpu_thread()
49 sregs.cs.selector = 0; in vcpu_thread()
50 sregs.es.base = KILL_ADDRESS; in vcpu_thread()
51 sregs.es.selector = 0; in vcpu_thread()
52 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread()
Dplugin_enable_cap.c257 struct kvm_sregs sregs = {0}; in main() local
258 crosvm_vcpu_get_sregs(vcpu, &sregs); in main()
259 sregs.cs.base = 0; in main()
260 sregs.cs.selector = 0; in main()
261 sregs.es.base = 0; in main()
262 sregs.es.selector = 0; in main()
263 crosvm_vcpu_set_sregs(vcpu, &sregs); in main()
Dmini_plugin_template.c63 struct kvm_sregs sregs; in vcpu_thread() local
64 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread()
65 sregs.cs.base = 0; in vcpu_thread()
66 sregs.cs.selector = 0; in vcpu_thread()
68 handle_vpcu_init(vcpu, &regs, &sregs); in vcpu_thread()
70 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread()
Dplugin_vcpu_pause.c58 struct kvm_sregs sregs; in vcpu_thread_fn() local
59 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread_fn()
60 sregs.cs.base = 0; in vcpu_thread_fn()
61 sregs.cs.selector = 0; in vcpu_thread_fn()
62 sregs.es.base = KILL_ADDRESS; in vcpu_thread_fn()
63 sregs.es.selector = 0; in vcpu_thread_fn()
64 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread_fn()
Dplugin_async_write.c46 struct kvm_sregs sregs; in vcpu_thread() local
47 crosvm_vcpu_get_sregs(vcpu, &sregs); in vcpu_thread()
48 sregs.cs.base = 0; in vcpu_thread()
49 sregs.cs.selector = 0; in vcpu_thread()
50 sregs.es.base = KILL_ADDRESS; in vcpu_thread()
51 sregs.es.selector = 0; in vcpu_thread()
52 crosvm_vcpu_set_sregs(vcpu, &sregs); in vcpu_thread()
/external/crosvm/hypervisor/src/haxm/
Dvcpu.rs425 fn set_sregs(&self, sregs: &Sregs) -> Result<()> { in set_sregs()
427 state.set_sregs(sregs); in set_sregs()
771 fn set_sregs(&mut self, sregs: &Sregs) { in set_sregs()
772 self.state._cs = segment_desc_t::from(&sregs.cs); in set_sregs()
773 self.state._ds = segment_desc_t::from(&sregs.ds); in set_sregs()
774 self.state._es = segment_desc_t::from(&sregs.es); in set_sregs()
775 self.state._fs = segment_desc_t::from(&sregs.fs); in set_sregs()
776 self.state._gs = segment_desc_t::from(&sregs.gs); in set_sregs()
777 self.state._ss = segment_desc_t::from(&sregs.ss); in set_sregs()
778 self.state._tr = segment_desc_t::from(&sregs.tr); in set_sregs()
[all …]
/external/crosvm/hypervisor/src/whpx/
Dtypes.rs212 fn from(sregs: &Sregs) -> Self { in from()
216 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.cs), in from()
219 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.ds), in from()
222 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.es), in from()
225 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.fs), in from()
228 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.gs), in from()
231 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.ss), in from()
234 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.tr), in from()
237 Segment: WHV_X64_SEGMENT_REGISTER::from(&sregs.ldt), in from()
240 Table: WHV_X64_TABLE_REGISTER::from(&sregs.gdt), in from()
[all …]
Dvcpu.rs1005 fn set_sregs(&self, sregs: &Sregs) -> Result<()> { in set_sregs()
1006 let whpx_sregs = WhpxSregs::from(sregs); in set_sregs()
1431 fn sregs() { in sregs() function
1441 let mut sregs = vcpu.get_sregs().unwrap(); in sregs() localVariable
1442 sregs.cs.base += 7; in sregs()
1443 vcpu.set_sregs(&sregs).unwrap(); in sregs()
1445 assert_eq!(sregs.cs.base, sregs2.cs.base); in sregs()
1559 let mut sregs = vcpu.get_sregs().expect("failed to get sregs"); in set_efer() localVariable
1561 assert_eq!(sregs.efer, 0); in set_efer()
1564 sregs.cr0 |= X86_CR0_PE; // enable protected mode in set_efer()
[all …]

12