Skip to contentSkip to conversation

x86/traps: Drop redundant printk() in fatal_trap()

PATCH In review Andrew Cooper 2 participants 2 messages Nov 29, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/traps: Drop redundant printk() in fatal_trap()

show_page_walk() already prints the linear address of the walk, and show_execution_state() has printed a raw %cr2 value. This avoids having two adjacent log lines with identical information.

(XEN) Faulting linear address: 00000000025ff028
(XEN) Pagetable walk from 00000000025ff028:
...

---
CC: Jan Beulich <[email protected]>

---
 xen/arch/x86/traps.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
xen/arch/x86/traps.c +1 -5
index 86506f3..c9a849c 100644
@@ -650,11 +650,7 @@ void fatal_trap(const struct cpu_user_regs *regs, bool show_remote)
         show_execution_state(regs);
 
         if ( trapnr == TRAP_page_fault )
-        {
-            unsigned long cr2 = read_cr2();
-            printk("Faulting linear address: %p\n", _p(cr2));
-            show_page_walk(cr2);
-        }
+            show_page_walk(read_cr2());
 
         if ( show_remote )
         {
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 29.11.17 at 11:45, <[email protected]> wrote:

show_page_walk() already prints the linear address of the walk, and show_execution_state() has printed a raw %cr2 value. This avoids having two adjacent log lines with identical information.

(XEN) Faulting linear address: 00000000025ff028
(XEN) Pagetable walk from 00000000025ff028:
...

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