diff options
author | Andres Lagar-Cavilla <andres@lagarcavilla.org> | 2011-12-01 14:56:42 +0000 |
---|---|---|
committer | Andres Lagar-Cavilla <andres@lagarcavilla.org> | 2011-12-01 14:56:42 +0000 |
commit | 5e6ced1018bfc0811e15508d0c59f1cb6a86622a (patch) | |
tree | 64c8f83b2642d4d482355eaf6dd08de3f9ec42da /xen/arch/x86/domctl.c | |
parent | 6f76ec6118c6be95c5ad87c4c138e876cad2d90f (diff) | |
download | xen-5e6ced1018bfc0811e15508d0c59f1cb6a86622a.tar.gz xen-5e6ced1018bfc0811e15508d0c59f1cb6a86622a.tar.bz2 xen-5e6ced1018bfc0811e15508d0c59f1cb6a86622a.zip |
x86/mm: Rework stale p2m auditing
The p2m audit code doesn't even compile, let alone work. It also
partially supports ept. Make it:
- compile
- lay groundwork for eventual ept support
- move out of the way of all calls and turn it into a domctl. It's
obviously not being used by anybody presently.
- enable it via said domctl
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/arch/x86/domctl.c')
-rw-r--r-- | xen/arch/x86/domctl.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 5ed211fd89..af52d3c32b 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1449,6 +1449,27 @@ long arch_do_domctl( break; #endif /* __x86_64__ */ +#if P2M_AUDIT + case XEN_DOMCTL_audit_p2m: + { + struct domain *d; + + ret = rcu_lock_remote_target_domain_by_id(domctl->domain, &d); + if ( ret != 0 ) + break; + + audit_p2m(d, + &domctl->u.audit_p2m.orphans_debug, + &domctl->u.audit_p2m.orphans_invalid, + &domctl->u.audit_p2m.m2p_bad, + &domctl->u.audit_p2m.p2m_bad); + rcu_unlock_domain(d); + if ( copy_to_guest(u_domctl, domctl, 1) ) + ret = -EFAULT; + } + break; +#endif /* P2M_AUDIT */ + case XEN_DOMCTL_set_access_required: { struct domain *d; |