aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/mm.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2012-06-22 13:43:00 +0200
committerJan Beulich <jbeulich@suse.com>2012-06-22 13:43:00 +0200
commit56b3130c1a4ffc3c1a045559240261b892b9b880 (patch)
treecfa39d69fc251380e7358e1230c3a1c3c654cf0a /xen/include/asm-x86/mm.h
parent7f15d8540d2ea880170194700a8fb4600da8643b (diff)
downloadxen-56b3130c1a4ffc3c1a045559240261b892b9b880.tar.gz
xen-56b3130c1a4ffc3c1a045559240261b892b9b880.tar.bz2
xen-56b3130c1a4ffc3c1a045559240261b892b9b880.zip
AMD IOMMU: add mechanism to protect their PCI devices' config spaces
Recent Dom0 kernels want to disable PCI MSI on all devices, yet doing so on AMD IOMMUs (which get represented by a PCI device) disables part of the functionality set up by the hypervisor. Add a mechanism to mark certain PCI devices as having write protected config spaces (both through port based [method 1] accesses and, for x86-64, mmconfig), and use that for AMD's IOMMUs. Note that due to ptwr_do_page_fault() being run first, there'll be a MEM_LOG() issued for each such mmconfig based write attempt. If that's undesirable, the order of the calls in fixup_page_fault() would need to be swapped. Signed-off-by: Jan Beulich <jbeulich@suse.com> Tested-by: Wei Wang <wei.wang2@amd.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/mm.h')
-rw-r--r--xen/include/asm-x86/mm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
index 59f27fe1ea..4cba2765fb 100644
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -555,6 +555,8 @@ void memguard_unguard_stack(void *p);
int ptwr_do_page_fault(struct vcpu *, unsigned long,
struct cpu_user_regs *);
+int mmio_ro_do_page_fault(struct vcpu *, unsigned long,
+ struct cpu_user_regs *);
int audit_adjust_pgtables(struct domain *d, int dir, int noisy);