[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] x86: move hvm_domain_use_pirq to hvm files



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
After applying all my patches for CONFIG_HVM series, I got this from a
shim build:

$ nm xen-shim-syms | grep -i hvm
ffff82d080260550 T hvm_domain_use_pirq
ffff82d080369520 D hvm_max_cpuid_policy
ffff82d08036b95c D hvm_max_msr_policy
ffff82d08036b950 D hvm_max_vcpu_msrs
ffff82d0802cc440 T HYPERCALL_hvm_op
ffff82d080363116 t opt_msr_sc_hvm
ffff82d080363114 t opt_rsb_hvm

It seems hvm_domain_use_pirq is the only one that worth touching.
---
 xen/arch/x86/hvm/irq.c        | 5 +++++
 xen/arch/x86/irq.c            | 5 -----
 xen/include/asm-x86/hvm/irq.h | 3 +++
 xen/include/asm-x86/irq.h     | 1 -
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c
index 37040d1d47..e03a87ad50 100644
--- a/xen/arch/x86/hvm/irq.c
+++ b/xen/arch/x86/hvm/irq.c
@@ -27,6 +27,11 @@
 #include <asm/hvm/support.h>
 #include <asm/msi.h>
 
+bool hvm_domain_use_pirq(const struct domain *d, const struct pirq *pirq)
+{
+    return is_hvm_domain(d) && pirq && pirq->arch.hvm.emuirq != IRQ_UNBOUND;
+}
+
 /* Must be called with hvm_domain->irq_lock hold */
 static void assert_gsi(struct domain *d, unsigned ioapic_gsi)
 {
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index ec93ab60e5..35e7de594f 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -2567,11 +2567,6 @@ void arch_evtchn_bind_pirq(struct domain *d, int pirq)
     spin_unlock_irqrestore(&desc->lock, flags);
 }
 
-bool hvm_domain_use_pirq(const struct domain *d, const struct pirq *pirq)
-{
-    return is_hvm_domain(d) && pirq && pirq->arch.hvm.emuirq != IRQ_UNBOUND;
-}
-
 static int allocate_pirq(struct domain *d, int index, int pirq, int irq,
                          int type, int *nr)
 {
diff --git a/xen/include/asm-x86/hvm/irq.h b/xen/include/asm-x86/hvm/irq.h
index 2e6fa70a47..a2c9938ccf 100644
--- a/xen/include/asm-x86/hvm/irq.h
+++ b/xen/include/asm-x86/hvm/irq.h
@@ -215,4 +215,7 @@ void hvm_maybe_deassert_evtchn_irq(void);
 void hvm_assert_evtchn_irq(struct vcpu *v);
 void hvm_set_callback_via(struct domain *d, uint64_t via);
 
+struct pirq;
+bool hvm_domain_use_pirq(const struct domain *, const struct pirq *);
+
 #endif /* __ASM_X86_HVM_IRQ_H__ */
diff --git a/xen/include/asm-x86/irq.h b/xen/include/asm-x86/irq.h
index 054c3ab6be..4b39997f09 100644
--- a/xen/include/asm-x86/irq.h
+++ b/xen/include/asm-x86/irq.h
@@ -145,7 +145,6 @@ int get_free_pirqs(struct domain *, unsigned int nr);
 void free_domain_pirqs(struct domain *d);
 int map_domain_emuirq_pirq(struct domain *d, int pirq, int irq);
 int unmap_domain_pirq_emuirq(struct domain *d, int pirq);
-bool hvm_domain_use_pirq(const struct domain *, const struct pirq *);
 
 /* Reset irq affinities to match the given CPU mask. */
 void fixup_irqs(const cpumask_t *mask, bool verbose);
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.