iommu/vt-d: Don't set then immediately clear in prq_event_thread()
Subsystems (2)
Lu Baolu
maintainerPATCH 1/1 iommu/vt-d: Don't set then immediately clear in prq_event_thread()
The private data field of a page group response descriptor is set then immediately cleared in prq_event_thread(). Fix this by moving clearing code up.
--- drivers/iommu/intel/svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/intel/svm.c +2 -2
@@ -1021,12 +1021,12 @@ static irqreturn_t prq_event_thread(int irq, void *d)QI_PGRP_RESP_TYPE ; resp.qw1 =QI_PGRP_IDX (req->prg_index) |QI_PGRP_LPIG (req->lpig); + resp.qw2 =0 ; + resp.qw3 =0 ;if (req->priv_data_present)memcpy (&resp.qw2, req->priv_data,sizeof (req->priv_data)); - resp.qw2 =0 ; - resp.qw3 =0 ;qi_submit_sync (iommu, &resp,1 ,0 ); } prq_advance:
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Joerg Roedel
maintainerHi Baolu,
Quoted 8 lines · Lu Baolu
The private data field of a page group response descriptor is set then immediately cleared in
prq_event_thread(). Fix this by moving clearing code up.Fixes 5b438f4ba315d ("iommu/vt-d: Support page request in scalable mode")Cc Jacob Pan <[email protected]>Reviewed-by Liu Yi L <[email protected]>Signed-off-by Lu Baolu <[email protected]>
Does this fix an actual bug? If so, please state it in the commit message and also fix the subject line to state what is set/cleared.
Thanks,
Joerg
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Lu Baolu
maintainerHi Joerg,
Quoted 7 lines · Joerg Roedel
Hi Baolu,
Quoted 4 lines · Lu Baolu
The private data field of a page group response descriptor is set then immediately cleared in
prq_event_thread(). Fix this by moving clearing code up.
Quoted 6 lines
Quoted 4 lines
Fixes 5b438f4ba315d ("iommu/vt-d: Support page request in scalable mode")Cc Jacob Pan <[email protected]>Reviewed-by Liu Yi L <[email protected]>Signed-off-by Lu Baolu <[email protected]>Does this fix an actual bug? If so, please state it in the commit
It will cause real problem according to the VT-d spec. I haven't got a chance run this on a real hardware yet. I'll add a commit message to explain why this will cause problem.
Quoted 2 lines
message and also fix the subject line to state what is set/cleared.
Sure!
Quoted 4 lines
Thanks,
Joerg
Best regards,
baolu
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu