Skip to contentSkip to conversation

iommu: fix order of arguments in iommu_map call at iommu_hwdom_init

PATCH In review Roger Pau Monne 4 participants 7 messages Jan 23, 2019 – Jan 24, 2019 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu: fix order of arguments in iommu_map call at iommu_hwdom_init

The order of the page_order and the flags parameters are inverted in the call to iommu_map made in iommu_hwdom_init.

Fixes e8afe1124cc1 ("iommu: elide flushing for higher order map/unmap operations")

---
Cc: Jan Beulich <[email protected]>
Cc: Paul Durrant <[email protected]>

---
 xen/drivers/passthrough/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/passthrough/iommu.c +1 -1
index 98e6fc35e2..acd17ac2dc 100644
@@ -226,7 +226,7 @@ void __hwdom_init iommu_hwdom_init(struct domain *d)
                   == PGT_writable_page) )
                 mapping |= IOMMUF_writable;
 
-            ret = iommu_map(d, _dfn(dfn), _mfn(mfn), mapping, 0,
+            ret = iommu_map(d, _dfn(dfn), _mfn(mfn), 0, mapping,
                             &flush_flags);
 
             if ( !rc )
Signature · 7 lines
2.20.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines

-----Original Message-----
From: Roger Pau Monne [mailto:[email protected]]
Sent: 23 January 2019 18:08
To: [email protected]
Cc: Roger Pau Monne <[email protected]>; Jan Beulich <[email protected]>; Paul Durrant <[email protected]>
Subject: [PATCH for-4.12] iommu: fix order of arguments in iommu_map call at iommu_hwdom_init

Quoted 6 lines

The order of the page_order and the flags parameters are inverted in the call to iommu_map made in iommu_hwdom_init.

Fixes e8afe1124cc1 ("iommu: elide flushing for higher order map/unmap

operations")

Good grief. I was clearly having a bad day.

Quoted 22 lines

---
Cc: Jan Beulich <[email protected]>
Cc: Paul Durrant <[email protected]>

---
 xen/drivers/passthrough/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/passthrough/iommu.c +1 -2
index 98e6fc35e2..acd17ac2dc 100644
@@ -226,7 +226,7 @@ void __hwdom_init iommu_hwdom_init(struct domain *d)
                   == PGT_writable_page) )
                 mapping |= IOMMUF_writable;
 
-            ret = iommu_map(d, _dfn(dfn), _mfn(mfn), mapping, 0,
+            ret = iommu_map(d, _dfn(dfn), _mfn(mfn), 0, mapping,
                             &flush_flags);
 
             if ( !rc )
--
Quoted 1 line

2.20.1

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Roger Pau Monne
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 23.01.19 at 19:08, <[email protected]> wrote:

The order of the page_order and the flags parameters are inverted in the call to iommu_map made in iommu_hwdom_init.

Fixes e8afe1124cc1 ("iommu: elide flushing for higher order map/unmap operations")

If you don't mind I'd convert to PAGE_ORDER_4K while committing.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 13 lines

-----Original Message-----
From: Jan Beulich [mailto:[email protected]]
Sent: 24 January 2019 09:41
To: Roger Pau Monne <[email protected]>
Cc: Paul Durrant <[email protected]>; xen-devel <xen- [email protected]>
Subject: Re: [PATCH for-4.12] iommu: fix order of arguments in iommu_map call at iommu_hwdom_init

Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 23.01.19 at 19:08, <[email protected]> wrote:

The order of the page_order and the flags parameters are inverted in the call to iommu_map made in iommu_hwdom_init.

Quoted 7 lines
Quoted 1 line
Fixes e8afe1124cc1 ("iommu: elide flushing for higher order map/unmap

operations")

Quoted 1 line

If you don't mind I'd convert to PAGE_ORDER_4K while committing.

No, I don't think that's correct is it? This code is common, not x86 specific and so 4K may not be the base order.

Paul

Quoted 2 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 16 lines
Quoted 16 lines
Quoted 1 line · On 24.01.19 at 10:43, <[email protected]> wrote:

-----Original Message-----
From: Jan Beulich [mailto:[email protected]]
Sent: 24 January 2019 09:41
To: Roger Pau Monne <[email protected]>
Cc: Paul Durrant <[email protected]>; xen-devel <xen- [email protected]>
Subject: Re: [PATCH for-4.12] iommu: fix order of arguments in iommu_map call at iommu_hwdom_init

Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 23.01.19 at 19:08, <[email protected]> wrote:

The order of the page_order and the flags parameters are inverted in the call to iommu_map made in iommu_hwdom_init.

Fixes e8afe1124cc1 ("iommu: elide flushing for higher order map/unmap

operations")

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

If you don't mind I'd convert to PAGE_ORDER_4K while committing.

No, I don't think that's correct is it? This code is common, not x86 specific and so 4K may not be the base order.

Oh, indeed, right you are.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
In reply to Roger Pau Monne
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 23.01.19 at 19:08, <[email protected]> wrote:

The order of the page_order and the flags parameters are inverted in the call to iommu_map made in iommu_hwdom_init.

Fixes e8afe1124cc1 ("iommu: elide flushing for higher order map/unmap operations")

I notice you didn't Cc Jürgen - now done.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw
Quoted 8 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 23.01.19 at 19:08, <[email protected]> wrote:

The order of the page_order and the flags parameters are inverted in the call to iommu_map made in iommu_hwdom_init.

Fixes e8afe1124cc1 ("iommu: elide flushing for higher order map/unmap operations")

I notice you didn't Cc Jürgen - now done.

Thanks.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel