xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Corneliu ZUZU <czuzu@bitdefender.com>
To: xen-devel@lists.xen.org
Cc: Tamas K Lengyel <tamas@tklengyel.com>,
	Razvan Cojocaru <rcojocaru@bitdefender.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH 03/16] x86/monitor: mechanical renames
Date: Sat,  9 Jul 2016 07:13:44 +0300	[thread overview]
Message-ID: <1468037624-6574-1-git-send-email-czuzu@bitdefender.com> (raw)
In-Reply-To: <1468037509-6428-1-git-send-email-czuzu@bitdefender.com>

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@bitdefender.com>
---
 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@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-07-09  4:13 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-09  4:11 [PATCH 00/16] x86/vm-event: numerous adjustments & fixes Corneliu ZUZU
2016-07-09  4:12 ` [PATCH 01/16] x86/vmx_update_guest_cr: minor optimization Corneliu ZUZU
2016-07-11  6:24   ` Corneliu ZUZU
2016-07-09  4:12 ` [PATCH 02/16] x86: fix: make atomic_read() param const Corneliu ZUZU
2016-07-11 15:18   ` Andrew Cooper
2016-07-12  5:11     ` Corneliu ZUZU
2016-07-12  9:42       ` Andrew Cooper
2016-07-12 10:11         ` Corneliu ZUZU
2016-07-12 10:22           ` Andrew Cooper
2016-07-12 10:35             ` Corneliu ZUZU
2016-07-12 10:38             ` Corneliu ZUZU
2016-07-12 12:49               ` Andrew Cooper
2016-07-12 13:45                 ` Corneliu ZUZU
2016-07-09  4:13 ` Corneliu ZUZU [this message]
2016-07-09 18:10   ` [PATCH 03/16] x86/monitor: mechanical renames Tamas K Lengyel
2016-07-09 18:46     ` Corneliu ZUZU
2016-07-11 16:43       ` Tamas K Lengyel
2016-07-12  6:10         ` Corneliu ZUZU
2016-07-15  7:18           ` Corneliu ZUZU
2016-07-18 18:07             ` Andrew Cooper
2016-07-19  9:36               ` Corneliu ZUZU
2016-07-09  4:14 ` [PATCH 04/16] x86/monitor: relocate vm_event_register_write_resume() function to monitor code Corneliu ZUZU
2016-07-09 18:14   ` Tamas K Lengyel
2016-07-09 18:47     ` Corneliu ZUZU
2016-07-09  4:15 ` [PATCH 05/16] x86/monitor: relocate code more appropriately Corneliu ZUZU
2016-07-11  6:19   ` Corneliu ZUZU
2016-07-12  7:45     ` Tian, Kevin
2016-07-12  8:07       ` Corneliu ZUZU
2016-07-15 11:41         ` Corneliu ZUZU
2016-07-09  4:15 ` [PATCH 06/16] x86/monitor: fix: set msr_bitmap to NULL after xfree Corneliu ZUZU
2016-07-09  4:16 ` [PATCH 07/16] x86/vm-event: fix: call cleanup when init fails, to free partial allocs Corneliu ZUZU
2016-07-09  4:17 ` [PATCH 08/16] x86/vm-event: call monitor init & cleanup funcs from respective vm_event funcs Corneliu ZUZU
2016-07-09  4:18 ` [PATCH 09/16] arm/monitor: move d->monitor cleanup to monitor_cleanup_domain() Corneliu ZUZU
2016-07-09  4:19 ` [PATCH 10/16] x86/vm-event: centralize vcpu-destroy cleanup in vm-events code Corneliu ZUZU
2016-07-09  4:20 ` [PATCH 11/16] x86/monitor: fix: treat -monitor- properly, as a subsys of the vm-event subsys Corneliu ZUZU
2016-07-09 17:34   ` Tamas K Lengyel
2016-07-09 17:46     ` Corneliu ZUZU
2016-07-11 16:38       ` Tamas K Lengyel
2016-07-11 20:20         ` Corneliu ZUZU
2016-07-11 21:27           ` Tamas K Lengyel
2016-07-11 21:47             ` Corneliu ZUZU
2016-07-09  4:20 ` [PATCH 12/16] x86/vm-event: fix: move cleanup of mem_access_emulate_each_rep to monitor stub Corneliu ZUZU
2016-07-09  4:21 ` [PATCH 13/16] x86/monitor: introduce writes_pending field in monitor_write_data Corneliu ZUZU
2016-07-09  4:22 ` [PATCH 14/16] x86/monitor: clarify separation between monitor subsys and vm-event as a whole Corneliu ZUZU
2016-07-09 18:26   ` Tamas K Lengyel
2016-07-09 18:57     ` Corneliu ZUZU
2016-07-13  4:26       ` Corneliu ZUZU
2016-07-13 18:56         ` Tamas K Lengyel
2016-07-09  4:23 ` [PATCH 15/16] x86/monitor: fix: don't compromise a monitor_write_data with pending CR writes Corneliu ZUZU
2016-07-09  4:23 ` [PATCH 16/16] x86/monitor: fix: xc_monitor _write_ctrlreg w/o previous _enable must fail Corneliu ZUZU
2016-07-09  4:34   ` Corneliu ZUZU
2016-07-11  2:54 ` [PATCH 00/16] x86/vm-event: numerous adjustments & fixes Tian, Kevin
2016-07-11  5:32   ` Corneliu ZUZU
2016-07-12  7:42     ` Tian, Kevin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468037624-6574-1-git-send-email-czuzu@bitdefender.com \
    --to=czuzu@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).