[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/2] xen/swiotlb: If user supplied e820_hole=1 in the guest config, enable SWIOTLB.
We can detect that the user is using e820_hole=1 by parsing the E820. If it shows regions other than E820_RAM or E820_RESV then the user is bent on providing us with a PCI device and forgot to do 'iommu=soft'. So lets enable it for him/her. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- arch/x86/xen/pci-swiotlb-xen.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/x86/xen/pci-swiotlb-xen.c b/arch/x86/xen/pci-swiotlb-xen.c index 56f373e..9b1aebb 100644 --- a/arch/x86/xen/pci-swiotlb-xen.c +++ b/arch/x86/xen/pci-swiotlb-xen.c @@ -74,6 +74,11 @@ int __init pci_xen_swiotlb_detect(void) if (xen_pv_domain()) swiotlb = 0; + /* If it hasn't been activated yet, and it has E820 that looks like + * the user supplied e820_hole=1, then turn it on. */ + if (xen_pv_domain() && !xen_initial_domain() && + !xen_swiotlb && e820_has_acpi()) + xen_swiotlb = 1; return xen_swiotlb; } -- 1.7.7.6 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |