xen/VT-d: Remove the use of __LINE__ from IOMMU_WAIT_OP()
PATCH 1/1 xen/VT-d: Remove the use of __LINE__ from IOMMU_WAIT_OP()
The use of __LINE__ in printk()'s is problematic for livepatching, as it tends to cause unnecessary binary differences.
Take this opportunity to provide some rather more useful information than just file/line/func in the form of the full register/stack trace leading to the problem (which I've needed in the past for debugging).
---
CC: Jan Beulich <[email protected]>
CC: Kevin Tian <[email protected]>
--- xen/drivers/passthrough/vtd/dmar.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
xen/drivers/passthrough/vtd/dmar.h +4 -2
@@ -117,8 +117,10 @@ do { \break ; \if (NOW () > start_time +DMAR_OPERATION_TIMEOUT ) { \if ( !kexecing ) \ -panic ("%s:%d:%s: DMAR hardware is malfunctional" ,\ - __FILE__, __LINE__, __func__); \ + { \ +dump_execution_state (); \ +panic ("DMAR hardware malfunction" ); \ + } \else \break ; \ } \
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.01.18 at 15:11, <[email protected]> wrote:
The use of
__LINE__in printk()'s is problematic for livepatching, as it tends to cause unnecessary binary differences.Take this opportunity to provide some rather more useful information than just file/line/func in the form of the full register/stack trace leading to the problem (which I've needed in the past for debugging).
Signed-off-by Andrew Cooper <[email protected]>
Quoted 4 lines
xen/drivers/passthrough/vtd/dmar.h +0
-0@@ -117,8 +117,10 @@ do { \break ; \
xen/drivers/passthrough/vtd/dmar.h do { \ · line 125
Quoted 10 lines
xen/drivers/passthrough/vtd/dmar.h +4
-2if (NOW () > start_time +DMAR_OPERATION_TIMEOUT ) { \if ( !kexecing ) \ -panic ("%s:%d:%s: DMAR hardware is malfunctional" ,\ - __FILE__, __LINE__, __func__); \ + { \ +dump_execution_state (); \ +panic ("DMAR hardware malfunction" ); \ + } \else \break ; \
Perhaps a good opportunity to take out the pointless "else" as well?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 24.01.18 at 15:11, <[email protected]> wrote:
The use of
__LINE__in printk()'s is problematic for livepatching, as it tends to cause unnecessary binary differences.Take this opportunity to provide some rather more useful information than just file/line/func in the form of the full register/stack trace leading to the problem (which I've needed in the past for debugging).
Signed-off-by Andrew Cooper <[email protected]>Reviewed-by Jan Beulich <[email protected]>
Quoted 15 lines
Quoted 4 lines
xen/drivers/passthrough/vtd/dmar.h +0
-0@@ -117,8 +117,10 @@ do { \break ; \xen/drivers/passthrough/vtd/dmar.h do { \ · line 125
Quoted 10 lines
xen/drivers/passthrough/vtd/dmar.h +4
-2if (NOW () > start_time +DMAR_OPERATION_TIMEOUT ) { \if ( !kexecing ) \ -panic ("%s:%d:%s: DMAR hardware is malfunctional" ,\ - __FILE__, __LINE__, __func__); \ + { \ +dump_execution_state (); \ +panic ("DMAR hardware malfunction" ); \ + } \else \break ; \Perhaps a good opportunity to take out the pointless "else" as well?
Can do (although I'm not going to repost for just that).
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 6 lines
From: Andrew Cooper [mailto:[email protected]]
Sent: Wednesday, January 24, 2018 10:12 PMThe use of
__LINE__in printk()'s is problematic for livepatching, as it tends to cause unnecessary binary differences.
Quoted 6 lines
Take this opportunity to provide some rather more useful information than just
file/line/func in the form of the full register/stack trace leading to the problem (which I've needed in the past for debugging).Signed-off-by Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel