[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm: Let the IOMMU be accessible by Dom0 if forcibly disabled in Xen
Hi, On 08/08/2019 14:36, Oleksandr wrote: HiOn Thu, Aug 08, 2019 at 01:53:23PM +0300, Oleksandr Tyshchenko wrote:From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> Don't skip IOMMU nodes when creating DT for Dom0 if IOMMU has been forcibly disabled in bootargs (e.g. "iommu=0") in order to let the IOMMU be accessible by DOM0.I don't think your code is doing what you expect... If iommu=0, then Xen will not lookup for IOMMUs (iommu_hardware_setup() will not be called). So none of the device will have DEVICE_IOMMU set and hence they are already given to dom0.But I think it is wrong to give the IOMMUs to Dom0 when iommu=0. This is not the goal of this option. If you want to passthrough the IOMMU to Dom0, then you should use the parameter iommu_hwdom_passthrough.However, I agree with Roger that giving the IOMMU to dom0 is a pretty bad idea. So this should be fixed.I fully agree with the arguments provided that it is a bad idea. So, please consider that patch as not relevant.But, I am not sure I follow the last sentence:>>> If iommu=0, then Xen will not lookup for IOMMUs (iommu_hardware_setup() will not be called). So none of the device will have DEVICE_IOMMU set and hence they are already given to dom0.I can see that devices have DEVICE_IOMMU set. Although, the IOMMU driver is not in use, it is present and compatible matches. So, even if iommu=0, the IOMMU devices are not given to Dom0, because of skipped. Or I missed something?I can't see how iommu_hardware_setup() can be called on staging when iommu=0 as this is protected by a if ( iommu_enable ).Can you please give a stack trace how this is called and the version you use? WARN() should do it for you.iommu_hardware_setup() is not called. But, devices have DEVICE_IOMMU set, even if "iommu=0". I am based on "7d1460c xen/arm: optee: fix compilation with GCC 4.8" + Stefano's reserved-memory series + my IPMMU series. Hmmm, what you mean by set is "device_get_class() return DEVICE_IOMMU". This is were I got confused and I mixed up with dt_device_set_{protected, used_by}() function. device_get_class() will just lookup for a match and return the class associated. So you are right and the node will be skipped in that case. Nothing to modify in the current code. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |