[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.5 v7 04/21] xen: Relocate set_access_required domctl into common
Signed-off-by: Tamas K Lengyel <tklengyel@xxxxxxxxxxxxx> --- xen/arch/x86/domctl.c | 14 -------------- xen/common/domctl.c | 15 +++++++++++++++ xen/include/asm-arm/p2m.h | 3 +++ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 166cfb3..ec77555 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1155,20 +1155,6 @@ long arch_do_domctl( break; #endif /* P2M_AUDIT */ - case XEN_DOMCTL_set_access_required: - { - struct p2m_domain* p2m; - - ret = -EPERM; - if ( current->domain == d ) - break; - - ret = 0; - p2m = p2m_get_hostp2m(d); - p2m->access_required = domctl->u.access_required.access_required; - } - break; - case XEN_DOMCTL_set_broken_page_p2m: { p2m_type_t pt; diff --git a/xen/common/domctl.c b/xen/common/domctl.c index c00a899..fd8dd44 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -28,6 +28,7 @@ #include <asm/current.h> #include <asm/irq.h> #include <asm/page.h> +#include <asm/p2m.h> #include <public/domctl.h> #include <xsm/xsm.h> @@ -1123,6 +1124,20 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) } break; + case XEN_DOMCTL_set_access_required: + { + struct p2m_domain* p2m; + + ret = -EPERM; + if ( current->domain == d ) + break; + + ret = 0; + p2m = p2m_get_hostp2m(d); + p2m->access_required = op->u.access_required.access_required; + } + break; + case XEN_DOMCTL_set_virq_handler: { uint32_t virq = op->u.set_virq_handler.virq; diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 97cbae4..bec0c9b 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -198,6 +198,9 @@ int arch_grant_map_page_identity(struct domain *d, unsigned long frame, bool_t writeable); int arch_grant_unmap_page_identity(struct domain *d, unsigned long frame); +/* get host p2m table */ +#define p2m_get_hostp2m(d) (&((d)->arch.p2m)) + #endif /* _XEN_P2M_H */ /* -- 2.1.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |