hypervisor: Fix few register names on MSHV

Recently generated mshv-bindings has most of the registers
renamed. This patch renames some of the MSHV registers.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2023-04-07 16:19:00 -07:00 committed by Bo Chen
parent 42a4e593ce
commit 3096f1d42f

View File

@ -454,10 +454,10 @@ impl cpu::Vcpu for MshvVcpu {
/* Advance RIP and update RAX */
let arr_reg_name_value = [
(
hv_x64_register_name_HV_X64_REGISTER_RIP,
hv_register_name_HV_X64_REGISTER_RIP,
info.header.rip + insn_len,
),
(hv_x64_register_name_HV_X64_REGISTER_RAX, ret_rax),
(hv_register_name_HV_X64_REGISTER_RAX, ret_rax),
];
set_registers_64!(self.fd, arr_reg_name_value)
.map_err(|e| cpu::HypervisorCpuError::SetRegister(e.into()))?;
@ -503,10 +503,10 @@ impl cpu::Vcpu for MshvVcpu {
/* Advance RIP and update RAX */
let arr_reg_name_value = [
(
hv_x64_register_name_HV_X64_REGISTER_RIP,
hv_register_name_HV_X64_REGISTER_RIP,
info.header.rip + insn_len,
),
(hv_x64_register_name_HV_X64_REGISTER_RAX, ret_rax),
(hv_register_name_HV_X64_REGISTER_RAX, ret_rax),
];
set_registers_64!(self.fd, arr_reg_name_value)
.map_err(|e| cpu::HypervisorCpuError::SetRegister(e.into()))?;