mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: mshv: fix advance_rip_update_rax() helper
The dirty bit for the GP registers must be set for the hypervisor to update them. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
This commit is contained in:
committed by
Muminul Islam Russell
parent
fc01e4cbec
commit
59e11f1b0b
@@ -1711,10 +1711,11 @@ impl MshvVcpu {
|
||||
if let Some(reg_page) = self.fd.get_vp_reg_page() {
|
||||
let vp_reg_page = reg_page.0;
|
||||
set_gp_regs_field_ptr!(vp_reg_page, rax, ret_rax);
|
||||
// SAFETY: access union fields
|
||||
// SAFETY: access raw pointer to reg page, access union fields
|
||||
unsafe {
|
||||
(*vp_reg_page).__bindgen_anon_1.__bindgen_anon_1.rip = info.header.rip + insn_len;
|
||||
(*vp_reg_page).dirty |= 1 << HV_X64_REGISTER_CLASS_IP;
|
||||
(*vp_reg_page).dirty |= 1 << HV_X64_REGISTER_CLASS_GENERAL;
|
||||
}
|
||||
} else {
|
||||
let arr_reg_name_value = [
|
||||
|
||||
Reference in New Issue
Block a user