qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

Pull request

# gpg: Signature made Wed 24 Jun 2020 11:25:27 BST
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
trace/simple: Fix unauthorized enable
scripts/tracetool: Update maintainer email address

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

+33 -25
+1 -1
scripts/tracetool.py
··· 10 10 __license__ = "GPL version 2 or (at your option) any later version" 11 11 12 12 __maintainer__ = "Stefan Hajnoczi" 13 - __email__ = "stefanha@linux.vnet.ibm.com" 13 + __email__ = "stefanha@redhat.com" 14 14 15 15 16 16 import sys
+1 -1
scripts/tracetool/__init__.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 import re
+1 -1
scripts/tracetool/backend/__init__.py
··· 50 50 __license__ = "GPL version 2 or (at your option) any later version" 51 51 52 52 __maintainer__ = "Stefan Hajnoczi" 53 - __email__ = "stefanha@linux.vnet.ibm.com" 53 + __email__ = "stefanha@redhat.com" 54 54 55 55 56 56 import os
+1 -1
scripts/tracetool/backend/dtrace.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/backend/log.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/backend/simple.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/backend/ust.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/format/__init__.py
··· 32 32 __license__ = "GPL version 2 or (at your option) any later version" 33 33 34 34 __maintainer__ = "Stefan Hajnoczi" 35 - __email__ = "stefanha@linux.vnet.ibm.com" 35 + __email__ = "stefanha@redhat.com" 36 36 37 37 38 38 import os
+1 -1
scripts/tracetool/format/c.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/format/d.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/format/h.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/format/stap.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/format/tcg_h.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out, Arguments
+1 -1
scripts/tracetool/format/tcg_helper_c.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import Arguments, out
+1 -1
scripts/tracetool/format/tcg_helper_h.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/format/tcg_helper_wrapper_h.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 from tracetool import out
+1 -1
scripts/tracetool/transform.py
··· 9 9 __license__ = "GPL version 2 or (at your option) any later version" 10 10 11 11 __maintainer__ = "Stefan Hajnoczi" 12 - __email__ = "stefanha@linux.vnet.ibm.com" 12 + __email__ = "stefanha@redhat.com" 13 13 14 14 15 15 def _transform_type(type_, trans):
+1 -1
scripts/tracetool/vcpu.py
··· 10 10 __license__ = "GPL version 2 or (at your option) any later version" 11 11 12 12 __maintainer__ = "Stefan Hajnoczi" 13 - __email__ = "stefanha@linux.vnet.ibm.com" 13 + __email__ = "stefanha@redhat.com" 14 14 15 15 16 16 from tracetool import Arguments, try_import
+14 -6
trace/simple.c
··· 302 302 return 0; 303 303 } 304 304 305 - void st_set_trace_file_enabled(bool enable) 305 + /** 306 + * Enable / disable tracing, return whether it was enabled. 307 + * 308 + * @enable: enable if %true, else disable. 309 + */ 310 + bool st_set_trace_file_enabled(bool enable) 306 311 { 312 + bool was_enabled = trace_fp; 313 + 307 314 if (enable == !!trace_fp) { 308 - return; /* no change */ 315 + return was_enabled; /* no change */ 309 316 } 310 317 311 318 /* Halt trace writeout */ ··· 323 330 324 331 trace_fp = fopen(trace_file_name, "wb"); 325 332 if (!trace_fp) { 326 - return; 333 + return was_enabled; 327 334 } 328 335 329 336 if (fwrite(&header, sizeof header, 1, trace_fp) != 1 || 330 337 st_write_event_mapping() < 0) { 331 338 fclose(trace_fp); 332 339 trace_fp = NULL; 333 - return; 340 + return was_enabled; 334 341 } 335 342 336 343 /* Resume trace writeout */ ··· 340 347 fclose(trace_fp); 341 348 trace_fp = NULL; 342 349 } 350 + return was_enabled; 343 351 } 344 352 345 353 /** ··· 350 358 */ 351 359 void st_set_trace_file(const char *file) 352 360 { 353 - st_set_trace_file_enabled(false); 361 + bool saved_enable = st_set_trace_file_enabled(false); 354 362 355 363 g_free(trace_file_name); 356 364 ··· 361 369 trace_file_name = g_strdup_printf("%s", file); 362 370 } 363 371 364 - st_set_trace_file_enabled(true); 372 + st_set_trace_file_enabled(saved_enable); 365 373 } 366 374 367 375 void st_print_trace_file_status(void)
+1 -1
trace/simple.h
··· 12 12 #define TRACE_SIMPLE_H 13 13 14 14 void st_print_trace_file_status(void); 15 - void st_set_trace_file_enabled(bool enable); 15 + bool st_set_trace_file_enabled(bool enable); 16 16 void st_set_trace_file(const char *file); 17 17 bool st_init(void); 18 18 void st_flush_trace_buffer(void);