|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 18/28] x86/hvm: add facility to print hardware-assisted vLAPIC info
From: Denis Mukhin <dmukhin@xxxxxxxx>
Introduce new method 'dump_posted_intr' in 'hvm_function_table' to enable
hardware-assisted vLAPIC printouts (e.g. performance counters).
Update 'interrupt bindings' keyhandler with a call to the newly introduced
hvm_dump_posted_intr().
Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>
---
xen/arch/x86/include/asm/hvm/hvm.h | 12 ++++++++++++
xen/arch/x86/irq.c | 24 ++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/xen/arch/x86/include/asm/hvm/hvm.h
b/xen/arch/x86/include/asm/hvm/hvm.h
index 9bf2064925fa..1f0f7749b579 100644
--- a/xen/arch/x86/include/asm/hvm/hvm.h
+++ b/xen/arch/x86/include/asm/hvm/hvm.h
@@ -217,6 +217,7 @@ struct hvm_function_table {
void (*update_eoi_exit_bitmap)(struct vcpu *v, uint8_t vector, bool set);
void (*process_isr)(int isr, struct vcpu *v);
void (*deliver_posted_intr)(struct vcpu *v, u8 vector);
+ void (*dump_posted_intr)(const struct vcpu *v);
void (*sync_pir_to_irr)(struct vcpu *v);
bool (*test_pir)(const struct vcpu *v, uint8_t vector);
void (*handle_eoi)(uint8_t vector, int isr);
@@ -851,6 +852,12 @@ static inline void hvm_sync_pir_to_irr(struct vcpu *v)
alternative_vcall(hvm_funcs.sync_pir_to_irr, v);
}
+static inline void hvm_dump_posted_intr(const struct vcpu *v)
+{
+ if ( hvm_funcs.dump_posted_intr )
+ alternative_vcall(hvm_funcs.dump_posted_intr, v);
+}
+
#else /* CONFIG_HVM */
#define hvm_enabled false
@@ -958,6 +965,11 @@ static inline void hvm_set_reg(struct vcpu *v, unsigned
int reg, uint64_t val)
ASSERT_UNREACHABLE();
}
+static inline void hvm_dump_posted_intr(const struct vcpu *v)
+{
+ ASSERT_UNREACHABLE();
+}
+
#define is_viridian_domain(d) ((void)(d), false)
#define is_viridian_vcpu(v) ((void)(v), false)
#define has_viridian_time_ref_count(d) ((void)(d), false)
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 32a75f77a46d..de79e36fdfe7 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -2527,6 +2527,28 @@ void free_domain_pirqs(struct domain *d)
pcidevs_unlock();
}
+static void dump_posted_intr_info(void)
+{
+ struct domain *d;
+ struct vcpu *v;
+
+ rcu_read_lock(&domlist_read_lock);
+
+ printk("****** Posted Interrupts Statistics ******\n");
+
+ for_each_domain ( d )
+ {
+ printk("\n>>> Domain %d <<<\n", d->domain_id);
+
+ for_each_vcpu ( d, v )
+ hvm_dump_posted_intr(v);
+ }
+
+ printk("******************************************\n");
+
+ rcu_read_unlock(&domlist_read_lock);
+}
+
static void cf_check dump_irqs(unsigned char key)
{
int i, irq, pirq;
@@ -2605,6 +2627,8 @@ static void cf_check dump_irqs(unsigned char key)
printk(" %#02x -> %ps()\n", i, direct_apic_vector[i]);
dump_ioapic_irq_info();
+
+ dump_posted_intr_info();
}
static int __init cf_check setup_dump_irqs(void)
--
2.55.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |