Commit graph

32 commits

Author SHA1 Message Date
Sina Karvandi
6324c1d718
Merge pull request #650 from nikzad66/feature-cpuid-command
Feature cpuid command
2026-07-21 14:28:37 +02:00
sina
d37352fd7e fix the error for referencing guest registers twice in both kd and vmx codes 2026-07-19 19:39:33 +02:00
Nikzad
0564b729c9 kernel: implement CPUID command handling in kernel mode- Add DebuggerCommandCpuid() for CPUID execution
- Implement IOCTL_DEBUGGER_CPUID handler
- Fill CPUID response with register values and leaf data
- Add max sub-leaf detection for some special leaves like 0x4, 0xB and...
- Add SGX support detection via leaf 7
2026-07-19 18:12:45 +03:30
munraimix
7436b35fd0 Fix DRIVER_IRQL_NOT_LESS_OR_EQUAL when reading registers on a manually-halted core
In Debugger Mode, breaking the debuggee and then reading registers (e.g. the
'r' command) could bugcheck the debuggee with DRIVER_IRQL_NOT_LESS_OR_EQUAL
(0xD1) at IRQL 0xff.

Root cause: DebuggerCommandReadRegisters() copies GUEST_REGS from
DbgState->Regs, but the per-core DbgState->Regs is only populated on the
event-triggered halt paths. A core halted via a manual break
(DEBUGGER_VMCALL_VM_EXIT_HALT_SYSTEM) or via the NMI broadcast (KdHandleNmi)
never had DbgState->Regs set, so it was NULL and the GUEST_REGS memcpy
dereferenced address 0.

Fix:
- Add VmFuncGetGuestRegs(CoreId) returning g_GuestState[CoreId].Regs (the
  guest GP registers saved on the last vm-exit).
- Populate DbgState->Regs from it on the two manual-halt entry points
  (DEBUGGER_VMCALL_VM_EXIT_HALT_SYSTEM and KdHandleNmi) so register reads on a
  manually-halted core return the correct values.
- Add a defensive NULL check in DebuggerCommandReadRegisters().
2026-07-19 16:53:34 +10:00
sina
cd52174d82 fix and remove unused VMM callbacks 2026-06-09 15:04:20 +02:00
sina
bb3b09beb9 replace VMM callbacks 2026-06-09 01:37:48 +02:00
sina
ef2a482c45 refactor doxygen, variables, function names 6 2026-05-31 18:59:52 +02:00
sina
de0c56b466 create platform independent intrinsics functions 2026-05-05 21:25:20 +02:00
sina
09416e7fe1 add lbrdump command and sdk function 2026-05-04 00:29:54 +02:00
sina
84f0fa0ed4 check for the VMX state independently from function arguments 2026-04-26 12:37:08 +02:00
sina
c6b6a8a3a0 add processor trace command 2026-04-25 22:46:55 +02:00
sina
3cbf328fee Restructure of the hypertrace project 2026-04-25 18:02:48 +02:00
sina
1dd73675e9 apply the LBR and HyperTrace initialization and operations 2026-04-06 01:05:59 +02:00
sina
0d940ee543
sending results of format to the user debugger 2025-09-01 18:27:01 +02:00
unknown
a869065718 add support to the registers command to the user debugger 2025-08-31 01:53:29 +02:00
unknown
99b807dd6e add codes to support the p command in the user debugger 2025-08-30 00:14:48 +02:00
sina
3961196112
add support for SMI related functionalities 2025-08-02 23:18:18 +02:00
sina
7ae6ad8e37
added kernel side support for putting breakpoint in the user debugger 2025-07-09 22:38:36 +02:00
sina
e5326f895d
move breakpoint initialization to debugger from kd 2025-06-28 10:06:30 +02:00
sina
be6b055b83
Set variable length (stack frames) for showing the callstack 2025-04-21 19:54:24 +02:00
Sina Karvandi
ee17e49bfc
Merge branch 'dev' into add-pcie-support 2025-02-13 17:13:19 +01:00
Björn Ruytenberg
0931ecb47d pcicam: Add initial support for dumping PCI config space (CAM) 2025-01-14 14:55:01 +01:00
SinaKarvandi
23702ca4f1 add query IDT command 2024-12-30 04:37:15 +01:00
Björn Ruytenberg
14a679a8dc
Merge branch 'dev' into add-pcie-support 2024-11-12 19:18:52 +01:00
Björn Ruytenberg
f0123c8790 pcitree: Initial work to add pcitree command 2024-11-12 19:14:48 +01:00
SinaKarvandi
851375ec15 add local apic command 2024-11-08 21:00:21 +01:00
SinaKarvandi
f09fc83643 store APIC fields in user-mode constructed structures 2024-11-08 18:46:52 +01:00
SinaKarvandi
ac87707a0b add support to read Local APIC in xAPIC and x2APIC modes 2024-11-08 15:14:12 +01:00
SinaKarvandi
139be97b81 fix memory writing sdk error 2024-07-10 21:00:23 +09:00
SinaKarvandi
df50e0d866 export script definition to SDK 2024-07-07 22:07:45 +09:00
SinaKarvandi
7c3b7a68f9 add register writing function 2024-07-07 21:44:07 +09:00
SinaKarvandi
48c362255e build based on new libhyperdbg 2024-06-24 18:05:54 +09:00