diff options
author | Joe Epstein <jepstein98@gmail.com> | 2011-01-07 11:54:48 +0000 |
---|---|---|
committer | Joe Epstein <jepstein98@gmail.com> | 2011-01-07 11:54:48 +0000 |
commit | df402bb9f0dcf49f03098ac3bca64b01dd4decce (patch) | |
tree | 396a4308d1c4664834a505a296e22376177eff10 /xen/include/asm-x86/hvm | |
parent | 81f8af44baecf94a72d08cde1619f5af63c1b3a7 (diff) | |
download | xen-df402bb9f0dcf49f03098ac3bca64b01dd4decce.tar.gz xen-df402bb9f0dcf49f03098ac3bca64b01dd4decce.tar.bz2 xen-df402bb9f0dcf49f03098ac3bca64b01dd4decce.zip |
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 <jepstein98@gmail.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/include/asm-x86/hvm')
-rw-r--r-- | xen/include/asm-x86/hvm/hvm.h | 8 | ||||
-rw-r--r-- | xen/include/asm-x86/hvm/vcpu.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 53e4f97932..dc8e238a95 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -372,4 +372,12 @@ bool_t hvm_hap_nested_page_fault(unsigned long gpa, int hvm_x2apic_msr_read(struct vcpu *v, unsigned int msr, uint64_t *msr_content); int hvm_x2apic_msr_write(struct vcpu *v, unsigned int msr, uint64_t msr_content); +/* Called for current VCPU on crX changes by guest */ +void hvm_memory_event_cr0(unsigned long value, unsigned long old); +void hvm_memory_event_cr3(unsigned long value, unsigned long old); +void hvm_memory_event_cr4(unsigned long value, unsigned long old); + +/* Called for current VCPU on int3: returns -1 if no listener */ +int hvm_memory_event_int3(unsigned long gla); + #endif /* __ASM_X86_HVM_HVM_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__ */ |