[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/13] dump: add kernel_gs_base to QEMU CPU state
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 01/13] dump: add kernel_gs_base to QEMU CPU state |
Date: |
Tue, 17 Jul 2018 17:06:43 +0200 |
From: Viktor Prutyanov <address@hidden>
This patch adds field with content of KERNEL_GS_BASE MSR to QEMU note in
ELF dump.
On Windows, if all vCPUs are running usermode tasks at the time the dump is
created, this can be helpful in the discovery of guest system structures
during conversion ELF dump to MEMORY.DMP dump.
Signed-off-by: Viktor Prutyanov <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/arch_dump.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/target/i386/arch_dump.c b/target/i386/arch_dump.c
index 35b55fc..004141f 100644
--- a/target/i386/arch_dump.c
+++ b/target/i386/arch_dump.c
@@ -258,6 +258,12 @@ struct QEMUCPUState {
QEMUCPUSegment cs, ds, es, fs, gs, ss;
QEMUCPUSegment ldt, tr, gdt, idt;
uint64_t cr[5];
+ /*
+ * Fields below are optional and are being added at the end without
+ * changing the version. External tools may identify their presence
+ * by checking 'size' field.
+ */
+ uint64_t kernel_gs_base;
};
typedef struct QEMUCPUState QEMUCPUState;
@@ -315,6 +321,10 @@ static void qemu_get_cpustate(QEMUCPUState *s, CPUX86State
*env)
s->cr[2] = env->cr[2];
s->cr[3] = env->cr[3];
s->cr[4] = env->cr[4];
+
+#ifdef TARGET_X86_64
+ s->kernel_gs_base = env->kernelgsbase;
+#endif
}
static inline int cpu_write_qemu_note(WriteCoreDumpFunction f,
--
1.8.3.1
- [Qemu-devel] [PULL 00/13] Misc fixes for QEMU 3.0.0-rc1, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 01/13] dump: add kernel_gs_base to QEMU CPU state,
Paolo Bonzini <=
- [Qemu-devel] [PULL 03/13] hyperv: rename vcpu_id to vp_index, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 02/13] accel: Fix typo and grammar in comment, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 06/13] PC Chipset: Improve serial divisor calculation, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 05/13] vhost-user-test: added proper TestServer *dest initialization in test_migrate(), Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 04/13] hyperv: ensure VP index equal to QEMU cpu_index, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 07/13] hw/char/serial: retry write if EAGAIN, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 09/13] virtio-scsi: fix hotplug ->reset() vs event race, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 12/13] opts: remove redundant check for NULL parameter, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 08/13] qdev: add HotplugHandler->post_plug() callback, Paolo Bonzini, 2018/07/17
- [Qemu-devel] [PULL 10/13] i386: fix regression parsing multiboot initrd modules, Paolo Bonzini, 2018/07/17