ac6e56e6d7
23900-xzalloc.patch 24144-cpufreq-turbo-crash.patch 24148-shadow-pgt-dying-op-performance.patch 24155-x86-ioapic-EOI-after-migration.patch 24156-x86-ioapic-shared-vectors.patch 24157-x86-xstate-init.patch 24168-x86-vioapic-clear-remote_irr.patch - submit fixes for bnc#649209 and bnc#711892 xl-create-pv-with-qcow2-img.patch update suspend_evtchn_lock.patch - Update trace.c, merge patches from upstream 23050-xentrace_dynamic_tracebuffer_allocation.patch 23091-xentrace_fix_t_info_pages_calculation..patch 23092-xentrace_print_calculated_numbers_in_calculate_tbuf_size.patch 23093-xentrace_remove_gdprintk_usage_since_they_are_not_in_guest_context.patch 23094-xentrace_update_comments.patch 23095-xentrace_use_consistent_printk_prefix.patch 23128-xentrace_correct_formula_to_calculate_t_info_pages.patch 23129-xentrace_remove_unneeded_debug_printk.patch 23173-xentrace_Move_register_cpu_notifier_call_into_boot-time_init..patch 23239-xentrace_correct_overflow_check_for_number_of_per-cpu_trace_pages.patch 23308-xentrace_Move_the_global_variable_t_info_first_offset_into_calculate_tbuf_size.patch 23309-xentrace_Mark_data_size___read_mostly_because_its_only_written_once.patch 23310-xentrace_Remove_unneeded_cast_when_assigning_pointer_value_to_dst.patch 23404-xentrace_reduce_trace_buffer_size_to_something_mfn_offset_can_reach.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=160
131 lines
4.7 KiB
Diff
131 lines
4.7 KiB
Diff
# HG changeset patch
|
|
# User Jan Beulich <jbeulich@suse.com>
|
|
# Date 1321604321 -3600
|
|
# Node ID 0d50e704834fb53c6c86b8b0badd19d88e73c4ed
|
|
# Parent dbdc840f8f62db58321b5009e5e0f7833066386f
|
|
x86/IO-APIC: refine EOI-ing of migrating level interrupts
|
|
|
|
Rather than going through all IO-APICs and calling io_apic_eoi_vector()
|
|
for the vector in question, just use eoi_IO_APIC_irq().
|
|
|
|
This in turn allows to eliminate quite a bit of other code.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
|
|
--- a/xen/arch/x86/io_apic.c
|
|
+++ b/xen/arch/x86/io_apic.c
|
|
@@ -69,10 +69,6 @@ int __read_mostly nr_ioapics;
|
|
|
|
#define ioapic_has_eoi_reg(apic) (mp_ioapics[(apic)].mpc_apicver >= 0x20)
|
|
|
|
-#define io_apic_eoi_vector(apic, vector) io_apic_eoi((apic), (vector), -1)
|
|
-#define io_apic_eoi_pin(apic, pin) io_apic_eoi((apic), -1, (pin))
|
|
-
|
|
-
|
|
/*
|
|
* This is performance-critical, we want to do it O(1)
|
|
*
|
|
@@ -208,21 +204,18 @@ static void ioapic_write_entry(int apic,
|
|
spin_unlock_irqrestore(&ioapic_lock, flags);
|
|
}
|
|
|
|
-/* EOI an IO-APIC entry. One of vector or pin may be -1, indicating that
|
|
- * it should be worked out using the other. This function expect that the
|
|
- * ioapic_lock is taken, and interrupts are disabled (or there is a good reason
|
|
- * not to), and that if both pin and vector are passed, that they refer to the
|
|
+/* EOI an IO-APIC entry. Vector may be zero, indicating that it should be
|
|
+ * worked out using the pin. This function expects that the ioapic_lock is
|
|
+ * being held, and interrupts are disabled (or there is a good reason not
|
|
+ * to), and that if both pin and vector are passed, that they refer to the
|
|
* same redirection entry in the IO-APIC. */
|
|
static void __io_apic_eoi(unsigned int apic, unsigned int vector, unsigned int pin)
|
|
{
|
|
- /* Ensure some useful information is passed in */
|
|
- BUG_ON( (vector == -1 && pin == -1) );
|
|
-
|
|
/* Prefer the use of the EOI register if available */
|
|
if ( ioapic_has_eoi_reg(apic) )
|
|
{
|
|
/* If vector is unknown, read it from the IO-APIC */
|
|
- if ( vector == -1 )
|
|
+ if ( !vector )
|
|
vector = __ioapic_read_entry(apic, pin, TRUE).vector;
|
|
|
|
*(IO_APIC_BASE(apic)+16) = vector;
|
|
@@ -234,42 +227,6 @@ static void __io_apic_eoi(unsigned int a
|
|
struct IO_APIC_route_entry entry;
|
|
bool_t need_to_unmask = 0;
|
|
|
|
- /* If pin is unknown, search for it */
|
|
- if ( pin == -1 )
|
|
- {
|
|
- unsigned int p;
|
|
- for ( p = 0; p < nr_ioapic_registers[apic]; ++p )
|
|
- {
|
|
- entry = __ioapic_read_entry(apic, p, TRUE);
|
|
- if ( entry.vector == vector )
|
|
- {
|
|
- pin = p;
|
|
- /* break; */
|
|
-
|
|
- /* Here should be a break out of the loop, but at the
|
|
- * Xen code doesn't actually prevent multiple IO-APIC
|
|
- * entries being assigned the same vector, so EOI all
|
|
- * pins which have the correct vector.
|
|
- *
|
|
- * Remove the following code when the above assertion
|
|
- * is fulfilled. */
|
|
- __io_apic_eoi(apic, vector, p);
|
|
- }
|
|
- }
|
|
-
|
|
- /* If search fails, nothing to do */
|
|
-
|
|
- /* if ( pin == -1 ) */
|
|
-
|
|
- /* Because the loop wasn't broken out of (see comment above),
|
|
- * all relevant pins have been EOI, so we can always return.
|
|
- *
|
|
- * Re-instate the if statement above when the Xen logic has been
|
|
- * fixed.*/
|
|
-
|
|
- return;
|
|
- }
|
|
-
|
|
entry = __ioapic_read_entry(apic, pin, TRUE);
|
|
|
|
if ( ! entry.mask )
|
|
@@ -296,17 +253,6 @@ static void __io_apic_eoi(unsigned int a
|
|
}
|
|
}
|
|
|
|
-/* EOI an IO-APIC entry. One of vector or pin may be -1, indicating that
|
|
- * it should be worked out using the other. This function disables interrupts
|
|
- * and takes the ioapic_lock */
|
|
-static void io_apic_eoi(unsigned int apic, unsigned int vector, unsigned int pin)
|
|
-{
|
|
- unsigned int flags;
|
|
- spin_lock_irqsave(&ioapic_lock, flags);
|
|
- __io_apic_eoi(apic, vector, pin);
|
|
- spin_unlock_irqrestore(&ioapic_lock, flags);
|
|
-}
|
|
-
|
|
/*
|
|
* Saves all the IO-APIC RTE's
|
|
*/
|
|
@@ -1830,11 +1776,7 @@ static void end_level_ioapic_irq (unsign
|
|
|
|
/* Manually EOI the old vector if we are moving to the new */
|
|
if ( vector && i != vector )
|
|
- {
|
|
- int ioapic;
|
|
- for (ioapic = 0; ioapic < nr_ioapics; ioapic++)
|
|
- io_apic_eoi_vector(ioapic, i);
|
|
- }
|
|
+ eoi_IO_APIC_irq(irq);
|
|
|
|
v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
|
|
|