[xen master] monitor: switch to plain bool

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] monitor: switch to plain bool

patchbot
commit 556f99de901f5461fb1b8723413e77e3c98b0410
Author:     Wei Liu <[hidden email]>
AuthorDate: Fri Sep 8 14:44:33 2017 +0100
Commit:     Wei Liu <[hidden email]>
CommitDate: Fri Sep 8 15:18:06 2017 +0100

    monitor: switch to plain bool
   
    Signed-off-by: Wei Liu <[hidden email]>
    Otherwise, Reviewed-by: Andrew Cooper <[hidden email]>
    Acked-by: Razvan Cojocaru <[hidden email]>
---
 xen/arch/arm/monitor.c            |  4 ++--
 xen/arch/x86/hvm/monitor.c        | 10 +++++-----
 xen/common/monitor.c              |  8 ++++----
 xen/include/asm-x86/hvm/monitor.h |  6 +++---
 xen/include/xen/monitor.h         |  2 +-
 5 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/xen/arch/arm/monitor.c b/xen/arch/arm/monitor.c
index 59ce8f6..8c4a396 100644
--- a/xen/arch/arm/monitor.c
+++ b/xen/arch/arm/monitor.c
@@ -28,13 +28,13 @@ int arch_monitor_domctl_event(struct domain *d,
                               struct xen_domctl_monitor_op *mop)
 {
     struct arch_domain *ad = &d->arch;
-    bool_t requested_status = (XEN_DOMCTL_MONITOR_OP_ENABLE == mop->op);
+    bool requested_status = (XEN_DOMCTL_MONITOR_OP_ENABLE == mop->op);
 
     switch ( mop->event )
     {
     case XEN_DOMCTL_MONITOR_EVENT_PRIVILEGED_CALL:
     {
-        bool_t old_status = ad->monitor.privileged_call_enabled;
+        bool old_status = ad->monitor.privileged_call_enabled;
 
         if ( unlikely(old_status == requested_status) )
             return -EEXIST;
diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c
index a7ccfc4..2787dfa 100644
--- a/xen/arch/x86/hvm/monitor.c
+++ b/xen/arch/x86/hvm/monitor.c
@@ -30,7 +30,7 @@
 #include <asm/vm_event.h>
 #include <public/vm_event.h>
 
-bool_t hvm_monitor_cr(unsigned int index, unsigned long value, unsigned long old)
+bool hvm_monitor_cr(unsigned int index, unsigned long value, unsigned long old)
 {
     struct vcpu *curr = current;
     struct arch_domain *ad = &curr->domain->arch;
@@ -41,7 +41,7 @@ bool_t hvm_monitor_cr(unsigned int index, unsigned long value, unsigned long old
           value != old) &&
          (!((value ^ old) & ad->monitor.write_ctrlreg_mask[index])) )
     {
-        bool_t sync = !!(ad->monitor.write_ctrlreg_sync & ctrlreg_bitmask);
+        bool sync = ad->monitor.write_ctrlreg_sync & ctrlreg_bitmask;
 
         vm_event_request_t req = {
             .reason = VM_EVENT_REASON_WRITE_CTRLREG,
@@ -116,7 +116,7 @@ int hvm_monitor_debug(unsigned long rip, enum hvm_monitor_debug_type type,
     struct vcpu *curr = current;
     struct arch_domain *ad = &curr->domain->arch;
     vm_event_request_t req = {};
-    bool_t sync;
+    bool sync;
 
     switch ( type )
     {
@@ -127,7 +127,7 @@ int hvm_monitor_debug(unsigned long rip, enum hvm_monitor_debug_type type,
         req.u.software_breakpoint.gfn = gfn_of_rip(rip);
         req.u.software_breakpoint.type = trap_type;
         req.u.software_breakpoint.insn_length = insn_length;
-        sync = 1;
+        sync = true;
         break;
 
     case HVM_MONITOR_SINGLESTEP_BREAKPOINT:
@@ -135,7 +135,7 @@ int hvm_monitor_debug(unsigned long rip, enum hvm_monitor_debug_type type,
             return 0;
         req.reason = VM_EVENT_REASON_SINGLESTEP;
         req.u.singlestep.gfn = gfn_of_rip(rip);
-        sync = 1;
+        sync = true;
         break;
 
     case HVM_MONITOR_DEBUG_EXCEPTION:
diff --git a/xen/common/monitor.c b/xen/common/monitor.c
index 32d062c..c606683 100644
--- a/xen/common/monitor.c
+++ b/xen/common/monitor.c
@@ -31,7 +31,7 @@
 int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
 {
     int rc;
-    bool_t requested_status = 0;
+    bool requested_status = false;
 
     if ( unlikely(current->domain == d) ) /* no domain_pause() */
         return -EPERM;
@@ -43,7 +43,7 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
     switch ( mop->op )
     {
     case XEN_DOMCTL_MONITOR_OP_ENABLE:
-        requested_status = 1;
+        requested_status = true;
         /* fallthrough */
     case XEN_DOMCTL_MONITOR_OP_DISABLE:
         /* sanity check: avoid left-shift undefined behavior */
@@ -67,7 +67,7 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
     {
     case XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST:
     {
-        bool_t old_status = d->monitor.guest_request_enabled;
+        bool old_status = d->monitor.guest_request_enabled;
 
         if ( unlikely(old_status == requested_status) )
             return -EEXIST;
@@ -88,7 +88,7 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
     return 0;
 }
 
-int monitor_traps(struct vcpu *v, bool_t sync, vm_event_request_t *req)
+int monitor_traps(struct vcpu *v, bool sync, vm_event_request_t *req)
 {
     int rc;
     struct domain *d = v->domain;
diff --git a/xen/include/asm-x86/hvm/monitor.h b/xen/include/asm-x86/hvm/monitor.h
index d9efb35..cfd6661 100644
--- a/xen/include/asm-x86/hvm/monitor.h
+++ b/xen/include/asm-x86/hvm/monitor.h
@@ -31,10 +31,10 @@ enum hvm_monitor_debug_type
 /*
  * Called for current VCPU on crX/MSR changes by guest.
  * The event might not fire if the client has subscribed to it in onchangeonly
- * mode, hence the bool_t return type for control register write events.
+ * mode, hence the bool return type for control register write events.
  */
-bool_t hvm_monitor_cr(unsigned int index, unsigned long value,
-                      unsigned long old);
+bool hvm_monitor_cr(unsigned int index, unsigned long value,
+                    unsigned long old);
 #define hvm_monitor_crX(cr, new, old) \
                         hvm_monitor_cr(VM_EVENT_X86_##cr, new, old)
 void hvm_monitor_msr(unsigned int msr, uint64_t value);
diff --git a/xen/include/xen/monitor.h b/xen/include/xen/monitor.h
index 2171d04..6b17a93 100644
--- a/xen/include/xen/monitor.h
+++ b/xen/include/xen/monitor.h
@@ -30,6 +30,6 @@ struct xen_domctl_monitor_op;
 int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *op);
 void monitor_guest_request(void);
 
-int monitor_traps(struct vcpu *v, bool_t sync, vm_event_request_t *req);
+int monitor_traps(struct vcpu *v, bool sync, vm_event_request_t *req);
 
 #endif /* __XEN_MONITOR_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog