CLAC/STAC emulation. linux boot!

This commit is contained in:
Masato Imai
2025-06-24 17:27:13 +00:00
parent 8ec24d7fd3
commit 6943d87c42

View File

@ -1152,9 +1152,17 @@ impl VCpu {
match instruction_bytes[1] { match instruction_bytes[1] {
0x01 => match instruction_bytes[2] { 0x01 => match instruction_bytes[2] {
0xCA => { 0xCA => {
unsafe {
let rflags = vmread(vmcs::guest::RFLAGS).unwrap();
vmwrite(vmcs::guest::RFLAGS, rflags & !(1 << 18)).unwrap();
}
self.step_next_inst().unwrap(); self.step_next_inst().unwrap();
} }
0xCB => { 0xCB => {
unsafe {
let rflags = vmread(vmcs::guest::RFLAGS).unwrap();
vmwrite(vmcs::guest::RFLAGS, rflags | (1 << 18)).unwrap();
}
self.step_next_inst().unwrap(); self.step_next_inst().unwrap();
} }
_ => { _ => {