xen/5315a254-IOMMU-generalize-and-correct-softirq-processing.patch
Charles Arnold e46082b3ea - Upstream patches from Jan
530b27fd-x86-MCE-Fix-race-condition-in-mctelem_reserve.patch
  530b2880-Nested-VMX-update-nested-paging-mode-on-vmexit.patch
  530b28c5-x86-MSI-don-t-risk-division-by-zero.patch
  530c54c3-x86-mce-Reduce-boot-time-logspam.patch
  5310bac3-mm-ensure-useful-progress-in-decrease_reservation.patch
  5315a254-IOMMU-generalize-and-correct-softirq-processing.patch
  5315a3bb-x86-don-t-propagate-acpi_skip_timer_override-do-Dom0.patch
  5315a43a-x86-ACPI-also-print-address-space-for-PM1x-fields.patch
  531d8db1-x86-hvm-refine-the-judgment-on-IDENT_PT-for-EMT.patch
  531d8e09-x86-HVM-fix-memory-type-merging-in-epte_get_entry_emt.patch
  531d8e34-x86-HVM-consolidate-passthrough-handling-in-epte_get_entry_emt.patch
  531d8fd0-kexec-identify-which-cpu-the-kexec-image-is-being-executed-on.patch
  531dc0e2-xmalloc-handle-correctly-page-allocation-when-align-size.patch

- Add conversion tool for migrating xend/xm managed VMs to libvirt 
  xen2libvirt.py (Jim Fehlig)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=304
2014-03-13 23:46:35 +00:00

86 lines
2.9 KiB
Diff

References: bnc#858178
# Commit 9ef5aa944a6a0df7f5938983043c7e46f158bbc6
# Date 2014-03-04 10:52:20 +0100
# Author Jan Beulich <jbeulich@suse.com>
# Committer Jan Beulich <jbeulich@suse.com>
IOMMU: generalize and correct softirq processing during Dom0 device setup
c/s 21039:95f5a4ce8f24 ("VT-d: reduce default verbosity") having put a
call to process_pending_softirqs() in VT-d's domain_context_mapping()
was wrong in two ways: For one we shouldn't be doing this when setting
up a device during DomU assignment. And then - I didn't check whether
that was the case already back then - we shouldn't call that function
with the pcidevs_lock (or in fact any spin lock) held.
Move the "preemption" into generic code, at once dealing with further
actual (too much output elsewhere - particularly on systems with very
many host bridge like devices - having been observed to still cause the
watchdog to trigger when enabled) and potential (other IOMMU code may
also end up being too verbose) issues.
Do the "preemption" once per device actually being set up when in
verbose mode, and once per bus otherwise.
Note that dropping pcidevs_lock around the process_pending_softirqs()
invocation is specifically not a problem here: We're in an __init
function and aren't racing with potential additions/removals of PCI
devices. Not acquiring the lock in setup_dom0_pci_devices() otoh is not
an option, as there are too many places that assert the lock being
held.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -27,6 +27,7 @@
#include <xen/delay.h>
#include <xen/keyhandler.h>
#include <xen/radix-tree.h>
+#include <xen/softirq.h>
#include <xen/tasklet.h>
#include <xsm/xsm.h>
#include <asm/msi.h>
@@ -922,6 +923,20 @@ static int __init _setup_dom0_pci_device
printk(XENLOG_WARNING "Dom%d owning %04x:%02x:%02x.%u?\n",
pdev->domain->domain_id, pseg->nr, bus,
PCI_SLOT(devfn), PCI_FUNC(devfn));
+
+ if ( iommu_verbose )
+ {
+ spin_unlock(&pcidevs_lock);
+ process_pending_softirqs();
+ spin_lock(&pcidevs_lock);
+ }
+ }
+
+ if ( !iommu_verbose )
+ {
+ spin_unlock(&pcidevs_lock);
+ process_pending_softirqs();
+ spin_lock(&pcidevs_lock);
}
}
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -31,7 +31,6 @@
#include <xen/pci.h>
#include <xen/pci_regs.h>
#include <xen/keyhandler.h>
-#include <xen/softirq.h>
#include <asm/msi.h>
#include <asm/irq.h>
#include <asm/hvm/vmx/vmx.h>
@@ -1494,9 +1493,6 @@ static int domain_context_mapping(
break;
}
- if ( iommu_verbose )
- process_pending_softirqs();
-
return ret;
}