[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] vm_event: Record FS_BASE/GS_BASE during events
While the public vm_event header specifies fs_base/gs_base as registers that should be recorded for each event, that hasn't actually been the case. In this patch we remedy the issue. Signed-off-by: Tamas K Lengyel <tlengyel@xxxxxxxxxxx> Cc: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> Cc: Keir Fraser <keir@xxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/hvm/event.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/event.c b/xen/arch/x86/hvm/event.c index a3d4892..c218f12 100644 --- a/xen/arch/x86/hvm/event.c +++ b/xen/arch/x86/hvm/event.c @@ -28,7 +28,8 @@ static void hvm_event_fill_regs(vm_event_request_t *req) { const struct cpu_user_regs *regs = guest_cpu_user_regs(); - const struct vcpu *curr = current; + struct vcpu *curr = current; + struct segment_register seg; req->data.regs.x86.rax = regs->eax; req->data.regs.x86.rcx = regs->ecx; @@ -55,6 +56,12 @@ static void hvm_event_fill_regs(vm_event_request_t *req) req->data.regs.x86.cr0 = curr->arch.hvm_vcpu.guest_cr[0]; req->data.regs.x86.cr3 = curr->arch.hvm_vcpu.guest_cr[3]; req->data.regs.x86.cr4 = curr->arch.hvm_vcpu.guest_cr[4]; + + hvm_get_segment_register(curr, x86_seg_fs, &seg); + req->data.regs.x86.fs_base = seg.base; + + hvm_get_segment_register(curr, x86_seg_gs, &seg); + req->data.regs.x86.gs_base = seg.base; } static int hvm_event_traps(uint8_t sync, vm_event_request_t *req) -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |