[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 03/16] x86/monitor: mechanical renames
Arch-specific vm-event functions in x86/vm_event.h -e.g. vm_event_init_domain()- don't have an 'arch_' prefix. Apply the same rule for monitor functions - originally the only two monitor functions that had an 'arch_' prefix were arch_monitor_domctl_event() and arch_monitor_domctl_op(), but I gave them that prefix because -they had a counterpart function in common code-, that being monitor_domctl(). Let this also be the rule for future 'arch_' functions additions, and with this patch remove the 'arch_' prefix from the monitor functions that don't have a counterpart in common-code (all but those 2 aforementioned). Signed-off-by: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> --- xen/arch/x86/monitor.c | 4 ++-- xen/common/monitor.c | 4 ++-- xen/common/vm_event.c | 4 ++-- xen/include/asm-arm/monitor.h | 8 +++----- xen/include/asm-x86/monitor.h | 12 ++++++------ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c index 205df41..043815a 100644 --- a/xen/arch/x86/monitor.c +++ b/xen/arch/x86/monitor.c @@ -22,7 +22,7 @@ #include <asm/monitor.h> #include <public/vm_event.h> -int arch_monitor_init_domain(struct domain *d) +int monitor_init_domain(struct domain *d) { if ( !d->arch.monitor.msr_bitmap ) d->arch.monitor.msr_bitmap = xzalloc(struct monitor_msr_bitmap); @@ -33,7 +33,7 @@ int arch_monitor_init_domain(struct domain *d) return 0; } -void arch_monitor_cleanup_domain(struct domain *d) +void monitor_cleanup_domain(struct domain *d) { xfree(d->arch.monitor.msr_bitmap); diff --git a/xen/common/monitor.c b/xen/common/monitor.c index c73d1d5..5219238 100644 --- a/xen/common/monitor.c +++ b/xen/common/monitor.c @@ -50,12 +50,12 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop) if ( unlikely(mop->event > 31) ) return -EINVAL; /* Check if event type is available. */ - if ( unlikely(!(arch_monitor_get_capabilities(d) & (1U << mop->event))) ) + if ( unlikely(!(monitor_get_capabilities(d) & (1U << mop->event))) ) return -EOPNOTSUPP; break; case XEN_DOMCTL_MONITOR_OP_GET_CAPABILITIES: - mop->event = arch_monitor_get_capabilities(d); + mop->event = monitor_get_capabilities(d); return 0; default: diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c index 941345b..b4f9fd3 100644 --- a/xen/common/vm_event.c +++ b/xen/common/vm_event.c @@ -669,7 +669,7 @@ int vm_event_domctl(struct domain *d, xen_domctl_vm_event_op_t *vec, { case XEN_VM_EVENT_ENABLE: /* domain_pause() not required here, see XSA-99 */ - rc = arch_monitor_init_domain(d); + rc = monitor_init_domain(d); if ( rc ) break; rc = vm_event_enable(d, vec, ved, _VPF_mem_access, @@ -682,7 +682,7 @@ int vm_event_domctl(struct domain *d, xen_domctl_vm_event_op_t *vec, { domain_pause(d); rc = vm_event_disable(d, ved); - arch_monitor_cleanup_domain(d); + monitor_cleanup_domain(d); domain_unpause(d); } break; diff --git a/xen/include/asm-arm/monitor.h b/xen/include/asm-arm/monitor.h index 4af707a..c72ee42 100644 --- a/xen/include/asm-arm/monitor.h +++ b/xen/include/asm-arm/monitor.h @@ -46,20 +46,18 @@ int arch_monitor_domctl_event(struct domain *d, return -EOPNOTSUPP; } -static inline -int arch_monitor_init_domain(struct domain *d) +static inline int monitor_init_domain(struct domain *d) { /* No arch-specific domain initialization on ARM. */ return 0; } -static inline -void arch_monitor_cleanup_domain(struct domain *d) +static inline void monitor_cleanup_domain(struct domain *d) { /* No arch-specific domain cleanup on ARM. */ } -static inline uint32_t arch_monitor_get_capabilities(struct domain *d) +static inline uint32_t monitor_get_capabilities(struct domain *d) { uint32_t capabilities = 0; diff --git a/xen/include/asm-x86/monitor.h b/xen/include/asm-x86/monitor.h index 0501ca2..c5ae7ef 100644 --- a/xen/include/asm-x86/monitor.h +++ b/xen/include/asm-x86/monitor.h @@ -60,7 +60,10 @@ int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op *mop) return rc; } -static inline uint32_t arch_monitor_get_capabilities(struct domain *d) +int arch_monitor_domctl_event(struct domain *d, + struct xen_domctl_monitor_op *mop); + +static inline uint32_t monitor_get_capabilities(struct domain *d) { uint32_t capabilities = 0; @@ -84,12 +87,9 @@ static inline uint32_t arch_monitor_get_capabilities(struct domain *d) return capabilities; } -int arch_monitor_domctl_event(struct domain *d, - struct xen_domctl_monitor_op *mop); - -int arch_monitor_init_domain(struct domain *d); +int monitor_init_domain(struct domain *d); -void arch_monitor_cleanup_domain(struct domain *d); +void monitor_cleanup_domain(struct domain *d); bool_t monitored_msr(const struct domain *d, u32 msr); -- 2.5.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |