We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2fa50b commit 5dc2313Copy full SHA for 5dc2313
src/hyperlight_host/src/hypervisor/windows_hypervisor_platform.rs
@@ -518,14 +518,19 @@ impl VMProcessor {
518
WHV_REGISTER_VALUE { Reg64: regs.dr7 },
519
];
520
521
- unsafe {
+ let ret_val = unsafe {
522
WHvSetVirtualProcessorRegisters(
523
self.get_partition_hdl(),
524
0,
525
names.as_ptr(),
526
LEN as u32,
527
values.as_ptr(),
528
- )?
+ )
529
+ };
530
+
531
+ if ret_val.is_err() {
532
+ println!("Failed to set debug registers: {:?}", ret_val);
533
+ return Err(new_error!("Call to WHvSetVirtualProcessorRegisters failed"));
534
}
535
536
Ok(())
0 commit comments