|
1 | | -/* $Id: NEMAllNativeTemplate-win.cpp.h 111296 2025-10-09 09:36:25Z ramshankar.venkataraman@oracle.com $ */ |
| 1 | +/* $Id: NEMAllNativeTemplate-win.cpp.h 111694 2025-11-13 13:00:17Z alexander.eichner@oracle.com $ */ |
2 | 2 | /** @file |
3 | 3 | * NEM - Native execution manager, Windows code template ring-0/3. |
4 | 4 | */ |
@@ -493,6 +493,18 @@ NEM_TMPL_STATIC int nemHCWinCopyStateToHyperV(PVMCC pVM, PVMCPUCC pVCpu) |
493 | 493 | AssertLogRelMsgFailed(("WHvSetVirtualProcessorRegisters(%p, %u,,%u,) -> %Rhrc (Last=%#x/%u)\n", |
494 | 494 | pVM->nem.s.hPartition, pVCpu->idCpu, iReg, |
495 | 495 | hrc, RTNtLastStatusValue(), RTNtLastErrorValue())); |
| 496 | + /* Try to figure out the register causing the error. */ |
| 497 | + for (uint32_t i = 0; i < iReg; i++) |
| 498 | + { |
| 499 | + hrc = WHvSetVirtualProcessorRegisters(pVM->nem.s.hPartition, pVCpu->idCpu, &aenmNames[i], 1, &aValues[i]); |
| 500 | + if (FAILED(hrc)) |
| 501 | + { |
| 502 | + AssertLogRelMsgFailed(("WHvSetVirtualProcessorRegisters(%p, %u, %#RX64, 1, %#RX64) -> %Rhrc (Last=%#x/%u)\n", |
| 503 | + pVM->nem.s.hPartition, pVCpu->idCpu, aenmNames[i], aValues[i].Reg64, |
| 504 | + hrc, RTNtLastStatusValue(), RTNtLastErrorValue())); |
| 505 | + break; |
| 506 | + } |
| 507 | + } |
496 | 508 | return VERR_INTERNAL_ERROR; |
497 | 509 | } |
498 | 510 |
|
|
0 commit comments