From patchwork Fri Jun 30 17:01:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9820115 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E6DB7603F2 for ; Fri, 30 Jun 2017 17:03:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D29E8286B4 for ; Fri, 30 Jun 2017 17:03:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C72E0286BC; Fri, 30 Jun 2017 17:03:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 667C2286B4 for ; Fri, 30 Jun 2017 17:03:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQzIT-0002un-Ro; Fri, 30 Jun 2017 17:01:33 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQzIS-0002sc-EE for xen-devel@lists.xenproject.org; Fri, 30 Jun 2017 17:01:32 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id D1/9F-03582-BE386595; Fri, 30 Jun 2017 17:01:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsXitHRDpO7r5rB Ig/WbxC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oxLL3ayFCzRqlj2YRl7A+NOqS5GTg4JAX+J W3cbmEBsNgFliZ+dvWwgtoiAnkTTgeeMIDazQJ7E2dWLWLsYOTiEBQwlfv62AgmzCKhKtE04D VbCK2Au8W7iPHaIkfISu9ousoLYnAIWEpc2TGMBsYWAahZf3cMEYStIdEw/xgTRKyhxcuYTFo hVEhIHX7xgnsDIOwtJahaS1AJGplWMGsWpRWWpRbqGRnpJRZnpGSW5iZk5uoYGZnq5qcXFiem pOYlJxXrJ+bmbGIGhwwAEOxgvbww4xCjJwaQkyrvyWmikEF9SfkplRmJxRnxRaU5q8SFGGQ4O JQnejKawSCHBotT01Iq0zBxgEMOkJTh4lER4/WqB0rzFBYm5xZnpEKlTjLocryb8/8YkxJKXn 5cqJc67FGSGAEhRRmke3AhYRF1ilJUS5mUEOkqIpyC1KDezBFX+FaM4B6OSMK83yBSezLwSuE 2vgI5gAjpCeEYIyBEliQgpqQbG018VNvtFHeDN0k4WubB6mf2ZxbrJ3ldWpy8Uat6vOOmCFcN xmzXhE4xmzNnv4pq8stcnvtfUSTf8S4vn7AV7uZYx+0ZU8G0WF7hZ7/XN4MOzRzZH185ewHld 02q6y4XH0dnrBM27l2T9/94SkXSyfO2fHKanv96rTRB9wpW8/6i3Yt00o96HSizFGYmGWsxFx YkAH8h9BaMCAAA= X-Env-Sender: prvs=347159f46=wei.liu2@citrix.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1498842088!63149081!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 29640 invoked from network); 30 Jun 2017 17:01:31 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 30 Jun 2017 17:01:31 -0000 X-IronPort-AV: E=Sophos;i="5.40,287,1496102400"; d="scan'208";a="430033367" From: Wei Liu To: Xen-devel Date: Fri, 30 Jun 2017 18:01:13 +0100 Message-ID: <20170630170126.4148-6-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170630170126.4148-1-wei.liu2@citrix.com> References: <20170630170126.4148-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Wei Liu , Jan Beulich Subject: [Xen-devel] [PATCH 05/18] x86/domctl: use plain bool X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Wei Liu --- xen/arch/x86/domctl.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index f40e989fd8..7fa58b49af 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -318,7 +318,7 @@ long arch_do_domctl( struct vcpu *curr = current; struct domain *currd = curr->domain; long ret = 0; - bool_t copyback = 0; + bool copyback = false; unsigned long i; switch ( domctl->cmd ) @@ -330,7 +330,7 @@ long arch_do_domctl( if ( ret == -ERESTART ) return hypercall_create_continuation(__HYPERVISOR_arch_1, "h", u_domctl); - copyback = 1; + copyback = true; break; case XEN_DOMCTL_ioport_permission: @@ -405,7 +405,7 @@ long arch_do_domctl( spin_unlock(&d->page_alloc_lock); domctl->u.getmemlist.num_pfns = i; - copyback = 1; + copyback = true; break; } @@ -576,7 +576,7 @@ long arch_do_domctl( ret = -EFAULT; gethvmcontext_out: - copyback = 1; + copyback = true; xfree(c.data); break; } @@ -611,7 +611,7 @@ long arch_do_domctl( case XEN_DOMCTL_get_address_size: domctl->u.address_size.size = is_pv_32bit_domain(d) ? 32 : BITS_PER_LONG; - copyback = 1; + copyback = true; break; case XEN_DOMCTL_set_machine_address_size: @@ -623,7 +623,7 @@ long arch_do_domctl( case XEN_DOMCTL_get_machine_address_size: domctl->u.address_size.size = d->arch.physaddr_bitsize; - copyback = 1; + copyback = true; break; case XEN_DOMCTL_sendtrigger: @@ -874,7 +874,7 @@ long arch_do_domctl( ret = 0; vcpu_unpause(v); - copyback = 1; + copyback = true; } else { @@ -959,7 +959,7 @@ long arch_do_domctl( &domctl->u.tsc_info.gtsc_khz, &domctl->u.tsc_info.incarnation); domain_unpause(d); - copyback = 1; + copyback = true; } break; @@ -1003,7 +1003,7 @@ long arch_do_domctl( domctl->u.gdbsx_guest_memio.remain = domctl->u.gdbsx_guest_memio.len; ret = gdbsx_guest_mem_io(domctl->domain, &domctl->u.gdbsx_guest_memio); if ( !ret ) - copyback = 1; + copyback = true; break; case XEN_DOMCTL_gdbsx_pausevcpu: @@ -1060,7 +1060,7 @@ long arch_do_domctl( } } } - copyback = 1; + copyback = true; break; } @@ -1220,7 +1220,7 @@ long arch_do_domctl( vcpuextstate_out: if ( domctl->cmd == XEN_DOMCTL_getvcpuextstate ) - copyback = 1; + copyback = true; break; } @@ -1238,7 +1238,7 @@ long arch_do_domctl( &domctl->u.audit_p2m.orphans, &domctl->u.audit_p2m.m2p_bad, &domctl->u.audit_p2m.p2m_bad); - copyback = 1; + copyback = true; } break; #endif /* P2M_AUDIT */ @@ -1282,7 +1282,7 @@ long arch_do_domctl( if ( domctl->cmd == XEN_DOMCTL_get_vcpu_msrs ) { - ret = 0; copyback = 1; + ret = 0; copyback = true; /* NULL guest handle is a request for max size. */ if ( guest_handle_is_null(vmsrs->msrs) ) @@ -1379,7 +1379,7 @@ long arch_do_domctl( else { vmsrs->msr_count = i; - copyback = 1; + copyback = true; } } break; @@ -1407,7 +1407,7 @@ long arch_do_domctl( case XEN_DOMCTL_PSR_CMT_OP_QUERY_RMID: domctl->u.psr_cmt_op.data = d->arch.psr_rmid; - copyback = 1; + copyback = true; break; default: @@ -1441,21 +1441,21 @@ long arch_do_domctl( ret = psr_get_l3_cbm(d, domctl->u.psr_cat_op.target, &domctl->u.psr_cat_op.data, PSR_CBM_TYPE_L3); - copyback = 1; + copyback = true; break; case XEN_DOMCTL_PSR_CAT_OP_GET_L3_CODE: ret = psr_get_l3_cbm(d, domctl->u.psr_cat_op.target, &domctl->u.psr_cat_op.data, PSR_CBM_TYPE_L3_CODE); - copyback = 1; + copyback = true; break; case XEN_DOMCTL_PSR_CAT_OP_GET_L3_DATA: ret = psr_get_l3_cbm(d, domctl->u.psr_cat_op.target, &domctl->u.psr_cat_op.data, PSR_CBM_TYPE_L3_DATA); - copyback = 1; + copyback = true; break; default: @@ -1490,7 +1490,7 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) { unsigned int i; const struct domain *d = v->domain; - bool_t compat = is_pv_32bit_domain(d); + bool compat = is_pv_32bit_domain(d); #define c(fld) (!compat ? (c.nat->fld) : (c.cmp->fld)) if ( !is_pv_domain(d) )