Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools lib traceevent: update KVM plugin

The format of the role word has changed through the years and the plugin
was never updated; some VMX exit reasons were missing too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: http://lkml.kernel.org/r/1443695293-31127-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Paolo Bonzini and committed by
Arnaldo Carvalho de Melo
2f465dee e1d040cf

+17 -8
+17 -8
tools/lib/traceevent/plugin_kvm.c
··· 124 124 _ER(WBINVD, 54) \ 125 125 _ER(XSETBV, 55) \ 126 126 _ER(APIC_WRITE, 56) \ 127 - _ER(INVPCID, 58) 127 + _ER(INVPCID, 58) \ 128 + _ER(PML_FULL, 62) \ 129 + _ER(XSAVES, 63) \ 130 + _ER(XRSTORS, 64) 128 131 129 132 #define SVM_EXIT_REASONS \ 130 133 _ER(EXIT_READ_CR0, 0x000) \ ··· 355 352 union kvm_mmu_page_role { 356 353 unsigned word; 357 354 struct { 358 - unsigned glevels:4; 359 355 unsigned level:4; 356 + unsigned cr4_pae:1; 360 357 unsigned quadrant:2; 361 - unsigned pad_for_nice_hex_output:6; 362 358 unsigned direct:1; 363 359 unsigned access:3; 364 360 unsigned invalid:1; 365 - unsigned cr4_pge:1; 366 361 unsigned nxe:1; 362 + unsigned cr0_wp:1; 363 + unsigned smep_and_not_wp:1; 364 + unsigned smap_and_not_wp:1; 365 + unsigned pad_for_nice_hex_output:8; 366 + unsigned smm:8; 367 367 }; 368 368 }; 369 369 ··· 391 385 if (pevent_is_file_bigendian(event->pevent) == 392 386 pevent_is_host_bigendian(event->pevent)) { 393 387 394 - trace_seq_printf(s, "%u/%u q%u%s %s%s %spge %snxe", 388 + trace_seq_printf(s, "%u q%u%s %s%s %spae %snxe %swp%s%s%s", 395 389 role.level, 396 - role.glevels, 397 390 role.quadrant, 398 391 role.direct ? " direct" : "", 399 392 access_str[role.access], 400 393 role.invalid ? " invalid" : "", 401 - role.cr4_pge ? "" : "!", 402 - role.nxe ? "" : "!"); 394 + role.cr4_pae ? "" : "!", 395 + role.nxe ? "" : "!", 396 + role.cr0_wp ? "" : "!", 397 + role.smep_and_not_wp ? " smep" : "", 398 + role.smap_and_not_wp ? " smap" : "", 399 + role.smm ? " smm" : ""); 403 400 } else 404 401 trace_seq_printf(s, "WORD: %08x", role.word); 405 402