Skip to content

Commit c9bf37f

Browse files
committed
Some typos and const cleanup
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent fb4990a commit c9bf37f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/hyperlight_host/src/hypervisor/gdb/arch.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub(crate) const SW_BP_SIZE: usize = 1;
3636
pub(crate) const SW_BP_OP: u8 = 0xCC;
3737
/// Software Breakpoint written to memory
3838
pub(crate) const SW_BP: [u8; SW_BP_SIZE] = [SW_BP_OP];
39-
// /// Maximum number of supported hardware breakpoints
39+
/// Maximum number of supported hardware breakpoints
4040
pub(crate) const MAX_NO_OF_HW_BP: usize = 4;
4141

4242
/// Check page 19-4 Vol. 3B of Intel 64 and IA-32
@@ -98,7 +98,6 @@ pub(crate) fn vcpu_stop_reason(
9898
dr6: {:?}
9999
entrypoint: {:?}
100100
exception: {:?}
101-
102101
",
103102
rip,
104103
dr6,

src/hyperlight_host/src/hypervisor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub mod handlers;
2323
pub(crate) mod hyperlight_vm;
2424
pub(crate) mod hypervisor_handler;
2525

26-
/// Registers including genertal purpose registers, special registesr, fpu registers
26+
/// Registers including general purpose registers, special registesr, fpu registers
2727
mod regs;
2828
/// Vm trait
2929
mod vm;

src/hyperlight_host/src/hypervisor/mshv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl Vm for MshvVm {
299299
intercept_type: hv_intercept_type_HV_INTERCEPT_TYPE_EXCEPTION,
300300
// Exception handler #DB (1)
301301
intercept_parameter: hv_intercept_parameters {
302-
exception_vector: 0x1,
302+
exception_vector: DB_EX_ID,
303303
},
304304
})
305305
.map_err(|e| new_error!("Cannot install debug exception intercept: {}", e))?;
@@ -311,7 +311,7 @@ impl Vm for MshvVm {
311311
intercept_type: hv_intercept_type_HV_INTERCEPT_TYPE_EXCEPTION,
312312
// Exception handler #BP (3)
313313
intercept_parameter: hv_intercept_parameters {
314-
exception_vector: 0x3,
314+
exception_vector: BP_EX_ID,
315315
},
316316
})
317317
.map_err(|e| new_error!("Cannot install breakpoint exception intercept: {}", e))?;

0 commit comments

Comments
 (0)