diff options
-rw-r--r-- | tools/lib/traceevent/plugin_kvm.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c index 88fe83dff7cd..18536f756577 100644 --- a/tools/lib/traceevent/plugin_kvm.c +++ b/tools/lib/traceevent/plugin_kvm.c | |||
@@ -124,7 +124,10 @@ static const char *disassemble(unsigned char *insn, int len, uint64_t rip, | |||
124 | _ER(WBINVD, 54) \ | 124 | _ER(WBINVD, 54) \ |
125 | _ER(XSETBV, 55) \ | 125 | _ER(XSETBV, 55) \ |
126 | _ER(APIC_WRITE, 56) \ | 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 | #define SVM_EXIT_REASONS \ | 132 | #define SVM_EXIT_REASONS \ |
130 | _ER(EXIT_READ_CR0, 0x000) \ | 133 | _ER(EXIT_READ_CR0, 0x000) \ |
@@ -352,15 +355,18 @@ static int kvm_nested_vmexit_handler(struct trace_seq *s, struct pevent_record * | |||
352 | union kvm_mmu_page_role { | 355 | union kvm_mmu_page_role { |
353 | unsigned word; | 356 | unsigned word; |
354 | struct { | 357 | struct { |
355 | unsigned glevels:4; | ||
356 | unsigned level:4; | 358 | unsigned level:4; |
359 | unsigned cr4_pae:1; | ||
357 | unsigned quadrant:2; | 360 | unsigned quadrant:2; |
358 | unsigned pad_for_nice_hex_output:6; | ||
359 | unsigned direct:1; | 361 | unsigned direct:1; |
360 | unsigned access:3; | 362 | unsigned access:3; |
361 | unsigned invalid:1; | 363 | unsigned invalid:1; |
362 | unsigned cr4_pge:1; | ||
363 | unsigned nxe:1; | 364 | unsigned nxe:1; |
365 | unsigned cr0_wp:1; | ||
366 | unsigned smep_and_not_wp:1; | ||
367 | unsigned smap_and_not_wp:1; | ||
368 | unsigned pad_for_nice_hex_output:8; | ||
369 | unsigned smm:8; | ||
364 | }; | 370 | }; |
365 | }; | 371 | }; |
366 | 372 | ||
@@ -385,15 +391,18 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct pevent_record *record, | |||
385 | if (pevent_is_file_bigendian(event->pevent) == | 391 | if (pevent_is_file_bigendian(event->pevent) == |
386 | pevent_is_host_bigendian(event->pevent)) { | 392 | pevent_is_host_bigendian(event->pevent)) { |
387 | 393 | ||
388 | trace_seq_printf(s, "%u/%u q%u%s %s%s %spge %snxe", | 394 | trace_seq_printf(s, "%u q%u%s %s%s %spae %snxe %swp%s%s%s", |
389 | role.level, | 395 | role.level, |
390 | role.glevels, | ||
391 | role.quadrant, | 396 | role.quadrant, |
392 | role.direct ? " direct" : "", | 397 | role.direct ? " direct" : "", |
393 | access_str[role.access], | 398 | access_str[role.access], |
394 | role.invalid ? " invalid" : "", | 399 | role.invalid ? " invalid" : "", |
395 | role.cr4_pge ? "" : "!", | 400 | role.cr4_pae ? "" : "!", |
396 | role.nxe ? "" : "!"); | 401 | role.nxe ? "" : "!", |
402 | role.cr0_wp ? "" : "!", | ||
403 | role.smep_and_not_wp ? " smep" : "", | ||
404 | role.smap_and_not_wp ? " smap" : "", | ||
405 | role.smm ? " smm" : ""); | ||
397 | } else | 406 | } else |
398 | trace_seq_printf(s, "WORD: %08x", role.word); | 407 | trace_seq_printf(s, "WORD: %08x", role.word); |
399 | 408 | ||