Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:Update
xen.12874
5d4178fc-AMD-IOMMU-split-amd_iommu_init_one.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 5d4178fc-AMD-IOMMU-split-amd_iommu_init_one.patch of Package xen.12874
References: bsc#1135799 # Commit 21600515305dbecd2ae70d7b2ce936a9c200475f # Date 2019-07-31 13:18:20 +0200 # Author Jan Beulich <jbeulich@suse.com> # Committer Jan Beulich <jbeulich@suse.com> AMD/IOMMU: split amd_iommu_init_one() Mapping the MMIO space and obtaining feature information needs to happen slightly earlier, such that for x2APIC support we can set XTEn prior to calling amd_iommu_update_ivrs_mapping_acpi() and amd_iommu_setup_ioapic_remapping(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Brian Woods <brian.woods@amd.com> --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -972,14 +972,6 @@ static int __init amd_iommu_init_one(str { pci_hide_device(iommu->seg, PCI_BUS(iommu->bdf), PCI_DEVFN2(iommu->bdf)); - if ( map_iommu_mmio_region(iommu) != 0 ) - goto error_out; - - get_iommu_features(iommu); - - if ( iommu->features.raw ) - iommuv2_enabled = 1; - if ( allocate_cmd_buffer(iommu) == NULL ) goto error_out; @@ -1204,6 +1196,23 @@ static bool_t __init amd_sp5100_erratum2 return 0; } +static int __init amd_iommu_prepare_one(struct amd_iommu *iommu) +{ + int rc = alloc_ivrs_mappings(iommu->seg); + + if ( !rc ) + rc = map_iommu_mmio_region(iommu); + if ( rc ) + return rc; + + get_iommu_features(iommu); + + if ( iommu->features.raw ) + iommuv2_enabled = true; + + return 0; +} + int __init amd_iommu_init(void) { struct amd_iommu *iommu; @@ -1234,7 +1243,7 @@ int __init amd_iommu_init(void) radix_tree_init(&ivrs_maps); for_each_amd_iommu ( iommu ) { - rc = alloc_ivrs_mappings(iommu->seg); + rc = amd_iommu_prepare_one(iommu); if ( rc ) goto error_out; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor