[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v12 3/3] iommu: add rmrr Xen command line option for extra rmrrs



> From: elena.ufimtseva@xxxxxxxxxx [mailto:elena.ufimtseva@xxxxxxxxxx]
> Sent: Wednesday, October 28, 2015 4:36 AM
> 
> From: Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>
> 
> On some platforms firmware fails to specify RMRR regions in ACPI tables and 
> thus
> those regions will not be mapped in dom0 or guests and may cause IO Page 
> Faults
> and prevent dom0 from booting in PVH mode.
> 
> New Xen command line option rmrr allows to specify such devices and
> memory regions. These regions are added to the list of RMRR defined in ACPI if
> the device is present in system. As a result, additional RMRRs will be mapped 
> 1:1
> in dom0 with correct permissions.
> 
> Mentioned above problems were discovered during PVH work with ThinkCentre M
> and Dell 5600T. No official documentation was found so far in regards to what
> devices and why cause this. Experiments show that ThinkCentre M USB devices
> with enabled debug port generate DMA read transactions to the regions of
> memory marked reserved in host e820 map.
> 
> For Dell 5600T the device and faulting addresses are not found yet.
> For detailed history of the discussion please check following threads:
> http://lists.Xen.org/archives/html/xen-devel/2015-02/msg01724.html
> http://lists.Xen.org/archives/html/xen-devel/2015-01/msg02513.html
> 
> Format for rmrr Xen command line option:
> rmrr=start<-end>=[s1]bdf1[,[s1]bdf2[,...]];start<-end>=[s2]bdf1[,[s2]bdf2[,...]]
> If grub2 used and multiple ranges are specified, ';' should be
> quoted/escaped, refer to grub2 manual for more information.
> 
> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>

Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>, w/ several minor comments

> +
> +        seg = 0;
> +        for ( dev = 0; dev < extra_rmrr_units[i].dev_count; dev++ )
> +        {
> +            acpi_rmrr->scope.devices[dev] = extra_rmrr_units[i].sbdf[dev];
> +            seg = seg | PCI_SEG(extra_rmrr_units[i].sbdf[dev]);

seg |= ...

> @@ -876,6 +1001,7 @@ int __init acpi_dmar_init(void)
>  {
>      acpi_physical_address dmar_addr;
>      acpi_native_uint dmar_len;
> +    int ret;
> 
>      if ( ACPI_SUCCESS(acpi_get_table_phys(ACPI_SIG_DMAR, 0,
>                                            &dmar_addr, &dmar_len)) )
> @@ -886,7 +1012,10 @@ int __init acpi_dmar_init(void)
>          dmar_table = __va(dmar_addr);
>      }
> 
> -    return parse_dmar_table(acpi_parse_dmar);
> +    ret = parse_dmar_table(acpi_parse_dmar);
> +    add_extra_rmrr();

looks not meaningful to continue handling extra rmrrs when
ACPI table is already broken?

> +
> +    return ret;
>  }
> 
>  void acpi_dmar_reinstate(void)
> @@ -945,3 +1074,66 @@ int
> intel_iommu_get_reserved_device_memory(iommu_grdm_t *func, void *ctxt)
> 
>      return 0;
>  }
> +
> +/*
> + * Parse rmrr Xen command line options and add parsed device and region into

devices and regions

Thanks
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.