|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/3] Free allocated resource on error
Hi Artem, On 09/10/2019 15:20, Artem Mygaiev wrote: Also do not set mark device as SMMU protected when there are no more SMMU resources left This is a sanity check on the content of the node, not a lack of resource in this case.TBH, the current placement is probably not correct. But I am not convinced the new placement is better. Xen 4.12 and earlier will ignore any failure and continue, so we cannot use this device at all. Indeed, Xen will configure the SMMU to deny any transaction. If you fail to initialize the device, then it will be in an unusable state. In this case, we don't want a domain (including Dom0) to use it at all. This could be achieved by calling dt_device_set_protected. Xen 4.13 will stop booting if any of the SMMU fails to configure (this include Master Device cannot be assigned). So there are no difference there. My preference is to cater for all Xen versions so we can consider the patch for a backport and potentially revert of the Xen 4.13 behavior (i.e. crashing when one IOMMU is not correctly setup). So we would need to move the call at the beginning of the function.
This code is using Linux coding style, so it should be hard tab here. 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 |