Thread (24 messages) flat view 24 messages, 4 authors, 2021-06-18

Re: [PATCH v4 3/6] ACPI: Add driver for the VIOT table

From: Jean-Philippe Brucker <hidden>
Date: 2021-06-18 07:45:46
Also in: linux-acpi, linux-iommu, virtualization

On Wed, Jun 16, 2021 at 03:26:08PM +0200, Eric Auger wrote:
quoted
+	default:
+		pr_warn("Unsupported node %x\n", hdr->type);
+		ret = 0;
+		goto err_free;
+	}
+
+	/*
+	 * To be compatible with future versions of the table which may include
+	 * other node types, keep parsing.
+	 */
nit: doesn't this comment rather apply to the default clause in the
switch.
Yes, the comment doesn't accurately explain the code below, I'll tweak it.

        /*
         * A future version of the table may use the node for other purposes.
         * Keep parsing.
         */
In case the PCI range node or the single MMIO endoint node does
not refer to any translation element, isn't it simply an error case?
It is permissible in my opinion. If a future version of the spec appends
new fields to the MMIO endpoint describing some PV property (I can't think
of a useful example), then the table can contain the vIOMMU topology as
usual plus one MMIO node that's only here to describe that property, and
doesn't have a translation element. If we encounter that I think we should
keep parsing.
quoted
+	if (!ep->viommu) {
+		pr_warn("No IOMMU node found\n");
+		ret = 0;
+		goto err_free;
+	}
Besides
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Thanks!
Jean

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help