Lines Matching full:h
11 #include "qemu/osdep.h"
12 #include "system/dump.h"
13 #include "qapi/error.h"
14 #include "qemu/error-report.h"
15 #include "exec/cpu-defs.h"
16 #include "hw/core/cpu.h"
17 #include "qemu/win_dump_defs.h"
18 #include "win_dump.h"
19 #include "cpu.h"
33 #define _WIN_DUMP_FIELD(f) (x64 ? h->x64.f : h->x32.f)
36 #define _WIN_DUMP_FIELD_PTR(f) (x64 ? (void *)&h->x64.f : (void *)&h->x32.f)
39 #define _WIN_DUMP_FIELD_SIZE(f) (x64 ? sizeof(h->x64.f) : sizeof(h->x32.f))
83 static void write_runs(DumpState *s, WinDumpHeader *h, bool x64, Error **errp) in write_runs() argument
114 static void patch_mm_pfn_database(WinDumpHeader *h, bool x64, Error **errp) in patch_mm_pfn_database() argument
125 static void patch_bugcheck_data(WinDumpHeader *h, bool x64, Error **errp) in patch_bugcheck_data() argument
155 static void patch_header(WinDumpHeader *h, bool x64) in patch_header() argument
160 h->x64.RequiredDumpSpace = sizeof(WinDumpHeader64) + in patch_header()
161 (h->x64.PhysicalMemoryBlock.NumberOfPages << TARGET_PAGE_BITS); in patch_header()
162 h->x64.PhysicalMemoryBlock.unused = 0; in patch_header()
163 h->x64.unused1 = 0; in patch_header()
165 h->x32.RequiredDumpSpace = sizeof(WinDumpHeader32) + in patch_header()
166 (h->x32.PhysicalMemoryBlock.NumberOfPages << TARGET_PAGE_BITS); in patch_header()
169 patch_mm_pfn_database(h, x64, &local_err); in patch_header()
174 patch_bugcheck_data(h, x64, &local_err); in patch_header()
180 static bool check_header(WinDumpHeader *h, bool *x64, Error **errp) in check_header() argument
184 if (memcmp(h->Signature, Signature, sizeof(h->Signature))) { in check_header()
186 " got '%.4s'", Signature, h->Signature); in check_header()
190 if (!memcmp(h->ValidDump, "DUMP", sizeof(h->ValidDump))) { in check_header()
192 } else if (!memcmp(h->ValidDump, "DU64", sizeof(h->ValidDump))) { in check_header()
196 " got '%.4s'", h->ValidDump); in check_header()
203 static void check_kdbg(WinDumpHeader *h, bool x64, Error **errp) in check_kdbg() argument
238 h->x64.KdDebuggerDataBlock = KdDebuggerDataBlock; in check_kdbg()
240 h->x32.KdDebuggerDataBlock = KdDebuggerDataBlock; in check_kdbg()
249 static void patch_and_save_context(WinDumpHeader *h, bool x64, in patch_and_save_context() argument
395 static void restore_context(WinDumpHeader *h, bool x64, in restore_context() argument
410 WinDumpHeader *h = (void *)(s->guest_note + VMCOREINFO_ELF_NOTE_HDR_SIZE); in create_win_dump() local
424 if (!check_header(h, &x64, &local_err)) { in create_win_dump()
438 check_kdbg(h, x64, &local_err); in create_win_dump()
444 patch_header(h, x64); in create_win_dump()
453 patch_and_save_context(h, x64, saved_ctx, &local_err); in create_win_dump()
461 s->written_size = qemu_write_full(s->fd, h, hdr_size); in create_win_dump()
467 write_runs(s, h, x64, &local_err); in create_win_dump()
474 restore_context(h, x64, saved_ctx); in create_win_dump()