mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: x86: provide a generic SegmentRegister structure
And drop SegmentRegisterOps since it is no longer required. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -148,13 +148,13 @@ pub fn configure_segments_and_sregs(
|
||||
sregs.idt.base = BOOT_IDT_START.raw_value();
|
||||
sregs.idt.limit = mem::size_of::<u64>() as u16 - 1;
|
||||
|
||||
sregs.cs = code_seg;
|
||||
sregs.ds = data_seg;
|
||||
sregs.es = data_seg;
|
||||
sregs.fs = data_seg;
|
||||
sregs.gs = data_seg;
|
||||
sregs.ss = data_seg;
|
||||
sregs.tr = tss_seg;
|
||||
sregs.cs = code_seg.into();
|
||||
sregs.ds = data_seg.into();
|
||||
sregs.es = data_seg.into();
|
||||
sregs.fs = data_seg.into();
|
||||
sregs.gs = data_seg.into();
|
||||
sregs.ss = data_seg.into();
|
||||
sregs.tr = tss_seg.into();
|
||||
|
||||
sregs.cr0 = CR0_PE;
|
||||
sregs.cr4 = 0;
|
||||
|
||||
Reference in New Issue
Block a user