diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-03-27 17:25:22 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-03-27 17:25:22 +0000 |
commit | 5a122dc71be117700e9e5ae3fb0a1b64f186ae53 (patch) | |
tree | f8dd2a18effbd2bd924c618fa9ba4827f3cab927 /xen/include/asm-x86/hvm/support.h | |
parent | f621da5bdf42549731820201dd4bd570fb37bdb2 (diff) | |
download | xen-5a122dc71be117700e9e5ae3fb0a1b64f186ae53.tar.gz xen-5a122dc71be117700e9e5ae3fb0a1b64f186ae53.tar.bz2 xen-5a122dc71be117700e9e5ae3fb0a1b64f186ae53.zip |
x86_emulate: Check I/O port accesses.
Implements both CPL/IOPL and TSS-bitmap checks.
Requires changes to read/write callback hooks to disable user-access
checks when walking pagetables on behalf of GDT/LDT/TSS accesses.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/include/asm-x86/hvm/support.h')
-rw-r--r-- | xen/include/asm-x86/hvm/support.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/xen/include/asm-x86/hvm/support.h b/xen/include/asm-x86/hvm/support.h index cbdea537fc..f5a174c14c 100644 --- a/xen/include/asm-x86/hvm/support.h +++ b/xen/include/asm-x86/hvm/support.h @@ -99,7 +99,11 @@ enum hvm_copy_result hvm_copy_from_guest_phys( void *buf, paddr_t paddr, int size); /* - * Copy to/from a guest virtual address. + * Copy to/from a guest virtual address. @pfec should include PFEC_user_mode + * if emulating a user-mode access (CPL=3). All other flags in @pfec are + * managed by the called function: it is therefore optional for the caller + * to set them. + * * Returns: * HVMCOPY_okay: Copy was entirely successful. * HVMCOPY_bad_gfn_to_mfn: Some guest physical address did not map to @@ -110,22 +114,22 @@ enum hvm_copy_result hvm_copy_from_guest_phys( * for injection into the current HVM VCPU. */ enum hvm_copy_result hvm_copy_to_guest_virt( - unsigned long vaddr, void *buf, int size); + unsigned long vaddr, void *buf, int size, uint32_t pfec); enum hvm_copy_result hvm_copy_from_guest_virt( - void *buf, unsigned long vaddr, int size); + void *buf, unsigned long vaddr, int size, uint32_t pfec); enum hvm_copy_result hvm_fetch_from_guest_virt( - void *buf, unsigned long vaddr, int size); + void *buf, unsigned long vaddr, int size, uint32_t pfec); /* * As above (copy to/from a guest virtual address), but no fault is generated * when HVMCOPY_bad_gva_to_gfn is returned. */ enum hvm_copy_result hvm_copy_to_guest_virt_nofault( - unsigned long vaddr, void *buf, int size); + unsigned long vaddr, void *buf, int size, uint32_t pfec); enum hvm_copy_result hvm_copy_from_guest_virt_nofault( - void *buf, unsigned long vaddr, int size); + void *buf, unsigned long vaddr, int size, uint32_t pfec); enum hvm_copy_result hvm_fetch_from_guest_virt_nofault( - void *buf, unsigned long vaddr, int size); + void *buf, unsigned long vaddr, int size, uint32_t pfec); void hvm_print_line(struct vcpu *v, const char c); void hlt_timer_fn(void *data); |