summary refs log tree commit diff stats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cleanup-trace-events.pl2
-rwxr-xr-xscripts/kvm/vmxcap10
-rw-r--r--scripts/tracetool/__init__.py23
-rw-r--r--scripts/tracetool/format/ust_events_h.py2
4 files changed, 20 insertions, 17 deletions
diff --git a/scripts/cleanup-trace-events.pl b/scripts/cleanup-trace-events.pl
index cffbf165dc..7e808efb6a 100755
--- a/scripts/cleanup-trace-events.pl
+++ b/scripts/cleanup-trace-events.pl
@@ -25,7 +25,7 @@ sub out {
 
 while (<>) {
     if (/^(disable )?([a-z_0-9]+)\(/) {
-        open GREP, '-|', 'git', 'grep', '-l', "trace_$2"
+        open GREP, '-|', 'git', 'grep', '-lw', "trace_$2"
             or die "run git grep: $!";
         my $fname;
         while ($fname = <GREP>) {
diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap
index c90eda497a..8f0371f498 100755
--- a/scripts/kvm/vmxcap
+++ b/scripts/kvm/vmxcap
@@ -99,7 +99,7 @@ controls = [
     Misc(
         name = 'Basic VMX Information',
         bits = {
-            (0, 31): 'Revision',
+            (0, 30): 'Revision',
             (32,44): 'VMCS size',
             48: 'VMCS restricted to 32 bit addresses',
             49: 'Dual-monitor support',
@@ -169,7 +169,9 @@ controls = [
             12: 'Enable INVPCID',
             13: 'Enable VM functions',
             14: 'VMCS shadowing',
-            18: 'EPT-violation #VE'
+            16: 'RDSEED exiting',
+            18: 'EPT-violation #VE',
+            20: 'Enable XSAVES/XRSTORS',
             },
         cap_msr = MSR_IA32_VMX_PROCBASED_CTLS2,
         ),
@@ -195,7 +197,7 @@ controls = [
         name = 'VM-Entry controls',
         bits = {
             2: 'Load debug controls',
-            9: 'IA-64 mode guest',
+            9: 'IA-32e mode guest',
             10: 'Entry to SMM',
             11: 'Deactivate dual-monitor treatment',
             13: 'Load IA32_PERF_GLOBAL_CTRL',
@@ -216,7 +218,7 @@ controls = [
             8: 'Wait-for-SIPI activity state',
             15: 'IA32_SMBASE support',
             (16,24): 'Number of CR3-target values',
-            (25,27): 'MSR-load/store count recommenation',
+            (25,27): 'MSR-load/store count recommendation',
             28: 'IA32_SMM_MONITOR_CTL[2] can be set to 1',
             29: 'VMWRITE to VM-exit information fields',
             (32,63): 'MSEG revision identifier',
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 36c789de8f..3d5743f93e 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -136,21 +136,19 @@ class Event(object):
         Properties of the event.
     args : Arguments
         The event arguments.
-    arg_fmts : str
-        The format strings for each argument.
+
     """
 
-    _CRE = re.compile("((?P<props>.*)\s+)?"
-                      "(?P<name>[^(\s]+)"
+    _CRE = re.compile("((?P<props>[\w\s]+)\s+)?"
+                      "(?P<name>\w+)"
                       "\((?P<args>[^)]*)\)"
                       "\s*"
                       "(?:(?:(?P<fmt_trans>\".+),)?\s*(?P<fmt>\".+))?"
                       "\s*")
-    _FMT = re.compile("(%\w+|%.*PRI\S+)")
 
     _VALID_PROPS = set(["disable", "tcg", "tcg-trans", "tcg-exec"])
 
-    def __init__(self, name, props, fmt, args, arg_fmts, orig=None):
+    def __init__(self, name, props, fmt, args, orig=None):
         """
         Parameters
         ----------
@@ -162,8 +160,6 @@ class Event(object):
             Event printing format (or formats).
         args : Arguments
             Event arguments.
-        arg_fmts : list of str
-            Format strings for each argument.
         orig : Event or None
             Original Event before transformation.
 
@@ -172,7 +168,6 @@ class Event(object):
         self.properties = props
         self.fmt = fmt
         self.args = args
-        self.arg_fmts = arg_fmts
 
         if orig is None:
             self.original = weakref.ref(self)
@@ -210,7 +205,6 @@ class Event(object):
         if len(fmt_trans) > 0:
             fmt = [fmt_trans, fmt]
         args = Arguments.build(groups["args"])
-        arg_fmts = Event._FMT.findall(fmt)
 
         if "tcg-trans" in props:
             raise ValueError("Invalid property 'tcg-trans'")
@@ -221,7 +215,7 @@ class Event(object):
         if "tcg" in props and isinstance(fmt, str):
             raise ValueError("Events with 'tcg' property must have two formats")
 
-        return Event(name, props, fmt, args, arg_fmts)
+        return Event(name, props, fmt, args)
 
     def __repr__(self):
         """Evaluable string representation for this object."""
@@ -234,6 +228,13 @@ class Event(object):
                                           self.args,
                                           fmt)
 
+    _FMT = re.compile("(%[\d\.]*\w+|%.*PRI\S+)")
+
+    def formats(self):
+        """List of argument print formats."""
+        assert not isinstance(self.fmt, list)
+        return self._FMT.findall(self.fmt)
+
     QEMU_TRACE               = "trace_%(name)s"
     QEMU_TRACE_TCG           = QEMU_TRACE + "_tcg"
 
diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/format/ust_events_h.py
index d18989942a..3e8a7cdf19 100644
--- a/scripts/tracetool/format/ust_events_h.py
+++ b/scripts/tracetool/format/ust_events_h.py
@@ -65,7 +65,7 @@ def generate(events, backend):
 
             types = e.args.types()
             names = e.args.names()
-            fmts = e.arg_fmts
+            fmts = e.formats()
             for t,n,f in zip(types, names, fmts):
                 if ('char *' in t) or ('char*' in t):
                     out('       ctf_string(' + n + ', ' + n + ')')