From patchwork Wed Jun 28 14:18:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9814391 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 18520603F2 for ; Wed, 28 Jun 2017 14:20:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A309284C7 for ; Wed, 28 Jun 2017 14:20:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F327828575; Wed, 28 Jun 2017 14:20:42 +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 A00A1284C7 for ; Wed, 28 Jun 2017 14:20:42 +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 1dQDnd-000233-IG; Wed, 28 Jun 2017 14:18:33 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQDnc-00020f-07 for xen-devel@lists.xenproject.org; Wed, 28 Jun 2017 14:18:32 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id E2/EA-01859-7BAB3595; Wed, 28 Jun 2017 14:18:31 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeJIrShJLcpLzFFi42JxWrohUnfbruB Ig7bDahbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8a3nZ/ZC1aIV/zdeIatgbFRqIuRk0NCwF9i 5qZzTCA2m4CyxM/OXjYQW0RAT6LpwHNGEJtZIE/i7OpFrF2MHBzCAoYSt85LgIRZBFQlds19y gxi8wpYSLztamGEGCkvsavtIiuIzSlgKbH/40YWEFsIqKbp7kEoW0GiY/oxJoheQYmTM5+wQK ySkDj44gXzBEbeWUhSs5CkFjAyrWLUKE4tKkst0jW01EsqykzPKMlNzMzRNTQw1stNLS5OTE/ NSUwq1kvOz93ECAydegYGxh2Mv4/7HWKU5GBSEuXd+yUoUogvKT+lMiOxOCO+qDQntfgQowwH h5IEb9jO4EghwaLU9NSKtMwcYBDDpCU4eJREeHdtBUrzFhck5hZnpkOkTjEqSonzTgXpEwBJZ JTmwbXBIucSo6yUMC8jAwODEE9BalFuZgmq/CtGcQ5GJWHeOTuApvBk5pXATX8FtJgJaDHLvA CQxSWJCCmpBsbc/jxZWe14uey9OxiV/7Z9ur6s74JX92xLrY3n70Rrq73r73c4XzJx5WHL++e fTCq+0qxe4H6b6dyZzOmn9i+73x2xSbtjameB2ver3xW2Zk7eXjvr0XHuQvGEwoytC84xVK7Y UaU+4TXrukqRdXvO3cu1zbBzvbvvcOvK67zH5iev1L+59s00JZbijERDLeai4kQAAjIq2ZcCA AA= X-Env-Sender: prvs=3451ee960=wei.liu2@citrix.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1498659508!107105409!1 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.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10866 invoked from network); 28 Jun 2017 14:18:30 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-10.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 28 Jun 2017 14:18:30 -0000 X-IronPort-AV: E=Sophos;i="5.40,275,1496102400"; d="scan'208";a="429670419" From: Wei Liu To: Xen-devel Date: Wed, 28 Jun 2017 15:18:22 +0100 Message-ID: <20170628141827.19046-4-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170628141827.19046-1-wei.liu2@citrix.com> References: <20170628141827.19046-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: Andrew Cooper , Wei Liu , Jan Beulich Subject: [Xen-devel] [PATCH 3/8] x86/domain.c: 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 Reviewed-by: Andrew Cooper --- xen/arch/x86/domain.c | 16 ++++++++-------- xen/include/asm-x86/domain.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index f7873da323..4e176e4d56 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -872,7 +872,7 @@ int arch_set_info_guest( else { unsigned long pfn = pagetable_get_pfn(v->arch.guest_table); - bool_t fail; + bool fail; if ( !compat ) { @@ -950,7 +950,7 @@ int arch_set_info_guest( test_bit(VMASST_TYPE_m2p_strict, &c.nat->vm_assist) && atomic_read(&d->arch.pv_domain.nr_l4_pages) ) { - bool_t done = 0; + bool done = false; spin_lock_recursive(&d->page_alloc_lock); @@ -1472,15 +1472,15 @@ void paravirt_ctxt_switch_to(struct vcpu *v) } /* Update per-VCPU guest runstate shared memory area (if registered). */ -bool_t update_runstate_area(struct vcpu *v) +bool update_runstate_area(struct vcpu *v) { - bool_t rc; + bool rc; struct guest_memory_policy policy = { .smap_policy = SMAP_CHECK_ENABLED, .nested_guest_mode = false }; void __user *guest_handle = NULL; if ( guest_handle_is_null(runstate_guest(v)) ) - return 1; + return true; update_guest_memory_policy(v, &policy); @@ -1502,7 +1502,7 @@ bool_t update_runstate_area(struct vcpu *v) XLAT_vcpu_runstate_info(&info, &v->runstate); __copy_to_guest(v->runstate_guest.compat, &info, 1); - rc = 1; + rc = true; } else rc = __copy_to_guest(runstate_guest(v), &v->runstate, 1) != @@ -1528,7 +1528,7 @@ static void _update_runstate_area(struct vcpu *v) v->arch.pv_vcpu.need_update_runstate_area = 1; } -static inline bool_t need_full_gdt(const struct domain *d) +static inline bool need_full_gdt(const struct domain *d) { return is_pv_domain(d) && !is_idle_domain(d); } @@ -1993,7 +1993,7 @@ void vcpu_kick(struct vcpu *v) * NB2. We save the running flag across the unblock to avoid a needless * IPI for domains that we IPI'd to unblock. */ - bool_t running = v->is_running; + bool running = v->is_running; vcpu_unblock(v); if ( running && (in_irq() || (v != current)) ) cpu_raise_softirq(v->processor, VCPU_KICK_SOFTIRQ); diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h index 27d80eeff4..398193eefb 100644 --- a/xen/include/asm-x86/domain.h +++ b/xen/include/asm-x86/domain.h @@ -592,7 +592,7 @@ void update_guest_memory_policy(struct vcpu *v, #define hvm_vmx hvm_vcpu.u.vmx #define hvm_svm hvm_vcpu.u.svm -bool_t update_runstate_area(struct vcpu *); +bool update_runstate_area(struct vcpu *); bool_t update_secondary_system_time(struct vcpu *, struct vcpu_time_info *);