From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>, Jan Beulich <jbeulich@suse.com>
Subject: [PATCH 3/3] x86: switch to plain bool in passthrough code
Date: Mon, 21 Aug 2017 15:09:13 +0100 [thread overview]
Message-ID: <20170821140913.11465-4-wei.liu2@citrix.com> (raw)
In-Reply-To: <20170821140913.11465-1-wei.liu2@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
xen/drivers/passthrough/io.c | 16 ++++++++--------
xen/include/asm-x86/hvm/irq.h | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c
index e30fd568f3..19a21bf85a 100644
--- a/xen/drivers/passthrough/io.c
+++ b/xen/drivers/passthrough/io.c
@@ -81,17 +81,17 @@ static void raise_softirq_for(struct hvm_pirq_dpci *pirq_dpci)
* If it is false, it is the callers responsibility to make sure
* that the softirq (with the event_lock dropped) has ran.
*/
-bool_t pt_pirq_softirq_active(struct hvm_pirq_dpci *pirq_dpci)
+bool pt_pirq_softirq_active(struct hvm_pirq_dpci *pirq_dpci)
{
if ( pirq_dpci->state & ((1 << STATE_RUN) | (1 << STATE_SCHED)) )
- return 1;
+ return true;
/*
* If in the future we would call 'raise_softirq_for' right away
* after 'pt_pirq_softirq_active' we MUST reset the list (otherwise it
* might have stale data).
*/
- return 0;
+ return false;
}
/*
@@ -136,7 +136,7 @@ static void pt_pirq_softirq_reset(struct hvm_pirq_dpci *pirq_dpci)
pirq_dpci->masked = 0;
}
-bool_t pt_irq_need_timer(uint32_t flags)
+bool pt_irq_need_timer(uint32_t flags)
{
return !(flags & (HVM_IRQ_DPCI_GUEST_MSI | HVM_IRQ_DPCI_TRANSLATE));
}
@@ -232,7 +232,7 @@ void free_hvm_irq_dpci(struct hvm_irq_dpci *dpci)
*/
static struct vcpu *vector_hashing_dest(const struct domain *d,
uint32_t dest_id,
- bool_t dest_mode,
+ bool dest_mode,
uint8_t gvec)
{
@@ -739,14 +739,14 @@ void pt_pirq_init(struct domain *d, struct hvm_pirq_dpci *dpci)
dpci->gmsi.dest_vcpu_id = -1;
}
-bool_t pt_pirq_cleanup_check(struct hvm_pirq_dpci *dpci)
+bool pt_pirq_cleanup_check(struct hvm_pirq_dpci *dpci)
{
if ( !dpci->flags && !pt_pirq_softirq_active(dpci) )
{
dpci->dom = NULL;
- return 1;
+ return true;
}
- return 0;
+ return false;
}
int pt_pirq_iterate(struct domain *d,
diff --git a/xen/include/asm-x86/hvm/irq.h b/xen/include/asm-x86/hvm/irq.h
index 84cb8f8765..2a9305b158 100644
--- a/xen/include/asm-x86/hvm/irq.h
+++ b/xen/include/asm-x86/hvm/irq.h
@@ -176,7 +176,7 @@ struct hvm_irq_dpci {
struct hvm_pirq_dpci {
uint32_t flags;
unsigned int state;
- bool_t masked;
+ bool masked;
uint16_t pending;
struct list_head digl_list;
struct domain *dom;
@@ -186,13 +186,13 @@ struct hvm_pirq_dpci {
};
void pt_pirq_init(struct domain *, struct hvm_pirq_dpci *);
-bool_t pt_pirq_cleanup_check(struct hvm_pirq_dpci *);
+bool pt_pirq_cleanup_check(struct hvm_pirq_dpci *);
int pt_pirq_iterate(struct domain *d,
int (*cb)(struct domain *,
struct hvm_pirq_dpci *, void *arg),
void *arg);
-bool_t pt_pirq_softirq_active(struct hvm_pirq_dpci *);
+bool pt_pirq_softirq_active(struct hvm_pirq_dpci *);
/* Modify state of a PCI INTx wire. */
void hvm_pci_intx_assert(struct domain *d, unsigned int device,
unsigned int intx);
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-08-21 14:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 14:09 [PATCH 0/3] xen: move common hvm code to x86 Wei Liu
2017-08-21 14:09 ` [PATCH 1/3] xen: move hvm save code under common " Wei Liu
2017-08-22 12:53 ` Jan Beulich
2017-08-21 14:09 ` [PATCH 2/3] xen: merge common hvm/irq.h into x86 hvm/irq.h Wei Liu
2017-08-21 14:14 ` Wei Liu
2017-08-22 12:55 ` Jan Beulich
2017-08-21 14:09 ` Wei Liu [this message]
2017-08-22 12:55 ` [PATCH 3/3] x86: switch to plain bool in passthrough code Jan Beulich
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=20170821140913.11465-4-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.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).