mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
drm/i915/gvt: move intel iommu detection to intel_gvt_init()
Prepare to remove detect_host() hook. Move intel iommu detection early in intel_gvt_init(). Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
This commit is contained in:
parent
26f837e8e1
commit
d2896e34eb
2 changed files with 7 additions and 6 deletions
|
@ -77,6 +77,13 @@ int intel_gvt_init_host(void)
|
|||
if (xen_domain() && !xen_initial_domain())
|
||||
return -ENODEV;
|
||||
|
||||
#ifdef CONFIG_INTEL_IOMMU
|
||||
if (intel_iommu_gfx_mapped) {
|
||||
gvt_err("Hardware IOMMU compatibility not yet supported, try to boot with intel_iommu=igfx_off\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Try to load MPT modules for hypervisors */
|
||||
if (xen_initial_domain()) {
|
||||
/* In Xen dom0 */
|
||||
|
|
|
@ -1276,12 +1276,6 @@ static bool kvmgt_check_guest(void)
|
|||
*/
|
||||
static int kvmgt_detect_host(void)
|
||||
{
|
||||
#ifdef CONFIG_INTEL_IOMMU
|
||||
if (intel_iommu_gfx_mapped) {
|
||||
gvt_err("Hardware IOMMU compatibility not yet supported, try to boot with intel_iommu=igfx_off\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
return kvmgt_check_guest() ? -ENODEV : 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue