24 Commits

Author SHA1 Message Date
c417e20ce0 Add flag that toggles tracing 2025-09-10 15:27:00 +02:00
7883ec274c Log when trace file gets truncated 2025-08-19 13:45:42 +02:00
fd01132cad Don't run libxdc 2025-08-19 13:41:52 +02:00
Sergej Schumilo
1def26f83e fix non-ipt mode 2024-01-20 21:26:18 +01:00
Sergej Schumilo
d5f0efe9de check libxdc_init return value 2023-10-30 01:29:49 +01:00
Steffen Schulz
b1fd5f1039 check ToPA allocation success
Check size returned for ToA allocation instead of blind mmap + assert.
Requires KVM-Nyx change to return error on allocation fail.
2022-12-22 04:47:28 +01:00
Steffen Schulz
5701e26966 remove duplicate warn/error strings 2022-12-22 02:41:00 +01:00
Steffen Schulz
b40f7c60e9 more missing newlines, fix use of warn/error
- replace several hardcoded fprintf()
- use of warn vs error or nyx_abort()
- several more missing newlines
- fixed up messages
2022-12-15 11:23:53 +01:00
Sergej Schumilo
8a88edc2a1 auto-apply clang-format
- including vl.c & kvm-all.c
2022-10-16 23:51:13 +02:00
Sergej Schumilo
e4269fc973 manual code cleanups (reviewed)
Tried to minimize actual code modifcations but we got
- several comments/printf messages edited to meet line limits
- occasionally switch some lines to put declarations or printfs in blocks
- couple more places marked TODO or FIXME to avoid non-trivial changes
- fixed PAGE_SIZE define in helpers.h to avoid redeclaration warning
- remove several chunks of dead or commented code

Co-authored-by: Steffen Schulz <steffen.schulz@intel.com>
2022-10-16 23:51:13 +02:00
Steffen Schulz
e83025a145 replace custom printf with nyx_<level>() wrappers
This introduces generic printf wrappers to replace the various
instances of debug_printf, fprintf, QEMU_PR_PRINTF etc.

Several more hardcoded printf() are still present and should probably be
replaced with nyx_debug_p().
2022-09-22 05:07:37 +02:00
Steffen Schulz
96aac23864 move alt_bitmap implementation to redqueen_trace.c
alt_bitmap is only relevant in redqueen_trace mode, when libxdc does not
produce a bitmap on its own..
2022-02-11 10:45:30 -08:00
Steffen Schulz
84f1a1b67b move dump_pt logic to trace_dump.c, enable via aux_buffer 2022-02-11 10:45:30 -08:00
Steffen Schulz
7b9bd18dc3 refactor 'redqueen trace' to separate redqueen_trace.c 2022-02-11 10:45:30 -08:00
Steffen Schulz
24e6f39e1c fix pt_dump feature (append on VMexit, truncate on new execution) 2022-02-11 10:45:30 -08:00
Steffen Schulz
56bc5571be dump_pt: create-open & truncate output file on each execution
Previous implementation only opened the file once.
2022-02-11 10:45:30 -08:00
Steffen Schulz
b899572377 page_cache: auto-create workdir files or resume based on existing files
- relieve frontend from having to create these files
- perhaps add some checks for resuming from existing page_cache files
2022-02-11 10:45:30 -08:00
Steffen Schulz
6b008a1be4 error checking on payload remap + other 2022-02-11 10:45:30 -08:00
Steffen Schulz
f32d1cb3b7 add alt_bitmap for use in trace mode, truncate trace file on new exec
libxdc does not create a bitmap in trace mode
This patch lets qemu create the bitmap instead

Note that the bitmap not compatible with libxdc bitmap since the trace
callback behavior is different.
2022-02-11 10:45:30 -08:00
Sergej Schumilo
42d434e28f add several improvements:
- Intel PT page dump feature works now
- size of input and bitmap buffers are configurable
- new aux buffer layout
- various bug fixes
2022-01-18 10:10:04 +01:00
Sergej Schumilo
dd9f586327 disable unused hypercalls 2022-01-11 04:16:34 +01:00
Sergej Schumilo
61fd863ba1 update QEMU-Nyx to support latest and greatest version of libxdc 2022-01-11 02:08:05 +01:00
Sergej Schumilo
6c69db68af new compile script (LTO & statically-linked libraries) 2021-12-30 03:31:10 +01:00
Sergej Schumilo
cd702b528c Initial Release of Nyx
Co-authored-by: Cornelius Aschermann <cornelius@hexgolems.com>
2021-11-14 22:20:53 +01:00