From 2375832c7e51b67f076e6b07854c4a541cb4bdc3 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Wed, 24 Jan 2018 14:11:16 +0000 Subject: [PATCH] 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). Also, drop the unnecessary else clause while editing here here. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Acked-by: Kevin Tian --- xen/drivers/passthrough/vtd/dmar.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/drivers/passthrough/vtd/dmar.h b/xen/drivers/passthrough/vtd/dmar.h index 729b603525..8f1b18ebb2 100644 --- a/xen/drivers/passthrough/vtd/dmar.h +++ b/xen/drivers/passthrough/vtd/dmar.h @@ -117,10 +117,11 @@ do { \ break; \ if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT ) { \ if ( !kexecing ) \ - panic("%s:%d:%s: DMAR hardware is malfunctional",\ - __FILE__, __LINE__, __func__); \ - else \ - break; \ + { \ + dump_execution_state(); \ + panic("DMAR hardware malfunction"); \ + } \ + break; \ } \ cpu_relax(); \ } \ -- 2.30.2