From df402bb9f0dcf49f03098ac3bca64b01dd4decce Mon Sep 17 00:00:00 2001 From: Joe Epstein Date: Fri, 7 Jan 2011 11:54:48 +0000 Subject: mem_access: added INT3/CRx capture * Allows a memory event listener to register for events on changes to CR0, CR3, and CR4, as well as INT3 instructions, as a part of the mem_access mechanism. These events can be either synchronous or asynchronous. * For INT3, the logic works independent of a debugger, and so both can be supported. * The presence and type of listener are stored and accessed through HVM params. * Changed the event mask handling to ensure that the right events are captured based on the listeners. * Added the ability to inject HW/SW traps into a VCPU when it next resumes (rather than try to modify the existing IRQ injection code paths). Only one trap to inject can be outstanding at a time. Signed-off-by: Joe Epstein Acked-by: Keir Fraser Acked-by: Tim Deegan --- xen/include/asm-x86/hvm/vcpu.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'xen/include/asm-x86/hvm/vcpu.h') diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h index 682027fffa..f5a04a80bf 100644 --- a/xen/include/asm-x86/hvm/vcpu.h +++ b/xen/include/asm-x86/hvm/vcpu.h @@ -114,6 +114,11 @@ struct hvm_vcpu { /* We may write up to m128 as a number of device-model transactions. */ paddr_t mmio_large_write_pa; unsigned int mmio_large_write_bytes; + + /* Pending hw/sw interrupt */ + int inject_trap; /* -1 for nothing to inject */ + int inject_error_code; + unsigned long inject_cr2; }; #endif /* __ASM_X86_HVM_VCPU_H__ */ -- cgit v1.2.3