From 56207a0328feafb153cd389d2469b95ebbce8e3b Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 9 Apr 2020 13:10:32 +0100 Subject: [PATCH] pci: Print out details of the BAR moving upon error In particular include the old and new bases as well as the length. Signed-off-by: Rob Bradford --- pci/src/bus.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pci/src/bus.rs b/pci/src/bus.rs index 2909c4a45..524410c5f 100644 --- a/pci/src/bus.rs +++ b/pci/src/bus.rs @@ -239,7 +239,10 @@ impl PciConfigIo { device.deref_mut(), params.region_type, ) { - error!("Failed moving device BAR: {}", e); + error!( + "Failed moving device BAR: {}: 0x{:x}->0x{:x}(0x{:x})", + e, params.old_base, params.new_base, params.len + ); } } @@ -355,7 +358,10 @@ impl PciConfigMmio { device.deref_mut(), params.region_type, ) { - error!("Failed moving device BAR: {}", e); + error!( + "Failed moving device BAR: {}: 0x{:x}->0x{:x}(0x{:x})", + e, params.old_base, params.new_base, params.len + ); } }