- bnc#803712 - after live migration rcu_sched_state detected stalls xen.migrate.tools-xend_move_assert_to_exception_block.patch xen.migrate.tools-libxc_print_stats_if_migration_is_aborted.patch xen.migrate.tools_set_number_of_dirty_pages_during_migration.patch xen.migrate.tools_notify_restore_to_hangup_during_migration_--abort_if_busy.patch - bnc#811764 - XEN (hypervisor or kernel) has a problem with EFI variable services x86-EFI-set-variable-permit-attrs.patch - Upstream patches from Jan 26060-ACPI-ERST-table-size-checks.patch 26692-x86-fully-protect-MSI-X-table-from-PV-guest-accesses.patch 26702-powernow-add-fixups-for-AMD-P-state-figures.patch 26704-x86-MCA-suppress-bank-clearing-for-certain-injected-events.patch (bnc#805579) 26731-AMD-IOMMU-Process-softirqs-while-building-dom0-iommu-mappings.patch 26733-VT-d-Enumerate-IOMMUs-when-listing-capabilities.patch 26734-ACPI-ERST-Name-table-in-otherwise-opaque-error-messages.patch 26736-ACPI-APEI-Unlock-apei_iomaps_lock-on-error-path.patch 26737-ACPI-APEI-Add-apei_exec_run_optional.patch 26742-IOMMU-properly-check-whether-interrupt-remapping-is-enabled.patch 26743-VT-d-deal-with-5500-5520-X58-errata.patch (bnc#801910) 26744-AMD-IOMMU-allow-disabling-only-interrupt-remapping.patch - PVonHVM: __devinit was removed in linux-3.8 OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=234
97 lines
3.0 KiB
Diff
97 lines
3.0 KiB
Diff
# Commit fae0372140befb88d890a30704a8ec058c902af8
|
|
# Date 2013-03-25 14:28:31 +0100
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
IOMMU: properly check whether interrupt remapping is enabled
|
|
|
|
... rather than the IOMMU as a whole.
|
|
|
|
That in turn required to make sure iommu_intremap gets properly
|
|
cleared when the respective initialization fails (or isn't being
|
|
done at all).
|
|
|
|
Along with making sure interrupt remapping doesn't get inconsistently
|
|
enabled on some IOMMUs and not on others in the VT-d code, this in turn
|
|
allowed quite a bit of cleanup on the VT-d side (removed from the
|
|
backport).
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: "Zhang, Xiantao" <xiantao.zhang@intel.com>
|
|
|
|
--- a/xen/arch/x86/msi.c
|
|
+++ b/xen/arch/x86/msi.c
|
|
@@ -204,7 +204,7 @@ static void read_msi_msg(struct msi_desc
|
|
BUG();
|
|
}
|
|
|
|
- if ( iommu_enabled )
|
|
+ if ( iommu_intremap )
|
|
iommu_read_msi_from_ire(entry, msg);
|
|
}
|
|
|
|
@@ -212,7 +212,7 @@ static void write_msi_msg(struct msi_des
|
|
{
|
|
entry->msg = *msg;
|
|
|
|
- if ( iommu_enabled )
|
|
+ if ( iommu_intremap )
|
|
{
|
|
ASSERT(msg != &entry->msg);
|
|
iommu_update_ire_from_msi(entry, msg);
|
|
@@ -482,7 +482,7 @@ int msi_free_irq(struct msi_desc *entry)
|
|
}
|
|
|
|
/* Free the unused IRTE if intr remap enabled */
|
|
- if ( iommu_enabled )
|
|
+ if ( iommu_intremap )
|
|
iommu_update_ire_from_msi(entry, NULL);
|
|
|
|
list_del(&entry->list);
|
|
--- a/xen/drivers/passthrough/iommu.c
|
|
+++ b/xen/drivers/passthrough/iommu.c
|
|
@@ -469,6 +469,8 @@ int __init iommu_setup(void)
|
|
rc = iommu_hardware_setup();
|
|
iommu_enabled = (rc == 0);
|
|
}
|
|
+ if ( !iommu_enabled )
|
|
+ iommu_intremap = 0;
|
|
|
|
if ( (force_iommu && !iommu_enabled) ||
|
|
(force_intremap && !iommu_intremap) )
|
|
@@ -485,9 +487,12 @@ int __init iommu_setup(void)
|
|
}
|
|
printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis");
|
|
if ( iommu_enabled )
|
|
+ {
|
|
printk(" - Dom0 mode: %s\n",
|
|
iommu_passthrough ? "Passthrough" :
|
|
iommu_dom0_strict ? "Strict" : "Relaxed");
|
|
+ printk("Interrupt remapping %sabled\n", iommu_intremap ? "en" : "dis");
|
|
+ }
|
|
|
|
return rc;
|
|
}
|
|
--- a/xen/drivers/passthrough/vtd/iommu.c
|
|
+++ b/xen/drivers/passthrough/vtd/iommu.c
|
|
@@ -2072,6 +2072,9 @@ static int init_vtd_hw(void)
|
|
break;
|
|
}
|
|
}
|
|
+ if ( !iommu_intremap )
|
|
+ for_each_drhd_unit ( drhd )
|
|
+ disable_intremap(drhd->iommu);
|
|
}
|
|
|
|
/*
|
|
--- a/xen/include/asm-x86/io_apic.h
|
|
+++ b/xen/include/asm-x86/io_apic.h
|
|
@@ -129,7 +129,7 @@ struct IO_APIC_route_entry {
|
|
extern struct mpc_config_ioapic mp_ioapics[MAX_IO_APICS];
|
|
|
|
/* Only need to remap ioapic RTE (reg: 10~3Fh) */
|
|
-#define ioapic_reg_remapped(reg) (iommu_enabled && ((reg) >= 0x10))
|
|
+#define ioapic_reg_remapped(reg) (iommu_intremap && ((reg) >= 0x10))
|
|
|
|
static inline unsigned int __io_apic_read(unsigned int apic, unsigned int reg)
|
|
{
|