Fix qapi code generation wrt parallel build
Make's multiple output syntax
x.c x.h: x.template gen < x.template
actually invokes the command once for x.c and once for x.h (with differing $@in each invocation). During a parallel build, the two commands may be invoked...
scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations.
Currently, we just print the numerical value of 9p operation identifier incase of RERROR which is less meaningful for readability. Mapping 9poperation ids to symbolic names provides a better tracelog:...
vl.c: In qemu -h output, only print options for the arch we are running as
Only print options in the help output that are accepted by our arch.This is less confusing for users and also for other programs thatconsume the help output.
The options affected are:...
qapi: allow a 'gen' key to suppress code generation
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix spelling in comments, documentation and messages
accidently->accidentallyannother->anotherchoosen->chosenconsideres->considersdecriptor->descriptordevelopement->developmentparamter->parameterpreceed->precedepreceeding->precedingpriviledge->privilege...
fix spelling in scripts sub directory
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qapi: fix guardname generation
Fix a bug in handling dotted paths, and exclude directory prefixesfrom generated guardnames to avoid odd/pseudo-random guardnames ingenerated headers.
checkpatch.pl: fix CAST detection
We should only claim that something is a cast if we did not encouter atoken before, that did set av_pending.
This fixes the operator * in the line below to be detected as binary (vsunary).
kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL);...
checkpatch: remove rule on non-indented labels
There are 508 non-indented (non-default) labels, and 511 that areindented. So the rule is debatable at least. Actually, in thecommon case of labels at the outermost scope, there is really justone place where to put the label, so the rule is just wrong IMHO....
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Conflicts: ui/spice-core.c
Merge remote-tracking branch 'qemu-kvm-tmp/uq/master' into staging
hw/9pfs: Make VirtFS tracing work correctly
this patch fix multiple issues with VirtFS tracing.a) Add tracepoint to the correct code path. We handle error in complete_pdub) Fix indentation in python scriptc) Fix variable naming issue in python script...
qapi-commands.py: Don't call the output marshal on error
Today we generate something like this:
int qmp_marshal_input_query_foo(...)
...
retval = qmp_query_foo(errp); qmp_marshal_output_query_foo(retval, ret, errp);
......
kvm: Add tool for querying VMX capabilities
Taken from original qemu-kvm/kvm/scripts/vmxcap.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Avi Kivity <avi@redhat.com>
kvm: Add top-like kvm statistics script
Taken from original qemu-kvm/kvm/kvm_stat.
scripts: Simpletrace log analysis script for pretty-printing 9p log.
This python script allows to pretty print 9p simpletrace logs and can befurther enhanced to filter 9p logs based on command line arguments.
Sample output: TGETATTR (tag = 1 , fid = 0 , request_mask = 0x7ff )...
qapi: Automatically generate a _MAX value for enums
It's the last value in the enum and is very useful for the Cimplementation.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: add code generation support for middle mode
To get the ball rolling merging QAPI, this patch introduces a "middle mode" tothe code generator. In middle mode, the code generator generates marshallingfunctions that are compatible with the current QMP server. We absolutely need...
qapi: fixup command generation for functions that return list types
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: generate qapi_free_* functions for *List types
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: modify visitor code generation for list iteration
Modify logic such that we never assign values to the list head argumentto progress through the list on subsequent iterations, instead rely onlyon having our return value passed back in as an argument on the next...
qapi: Don't use c_var() on enum strings
Otherwise if we have something like 'foo-bar' in the schema,it will be generated as 'foo_bar' in the string lookup table.
c_var() is good for C variables, but not for enum strings.
trace: allow PRI*64 at beginning and ending of format string
The tracetool parser only picks up PRI*64 and other format string macroswhen enclosed between double quoted strings. Lift this restriction byextracting everything after the closing ')' as the format string:...
trace: generalize the "property" concept in the trace-events file
This adds/modifies the following functions:
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
trace: always use the "nop" backend on events with the "disable" keyword
Any event with the keyword/property "disable" generates an empty trace eventusing the "nop" backend, regardless of the current backend.
trace: [simple] disable all trace points by default
Note that this refers to the backend-specific state (whether the output must begenerated), not the event "disabled" property (which always uses the "nop" backend).
trace: [stderr] add support for dynamically enabling/disabling events
Uses the generic interface provided in "trace/control.h" in order to providea programmatic interface as well as command line and monitor controls.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>...
simpletrace: fix process() argument count
The simpletrace.process() function invokes analyzer methods with thewrong number of arguments if a timestamp should be included. This patchfixes the issue so that trace analysis scripts can make use oftimestamps....
trace: move backend-specific code into the trace/ directory
checkpatch: fix braces {} handling
checkpatch.pl doesn't report warning for if/else statements with missing'else' braces:
if (something) { foo;} else bar;
The patch has been tested using the last 100 commits.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>...
qapi: fix build issue due to missing newline in generated header
Fixes a build issue on RHEL5, and potentially other distros, where gccwill generate an error due to us not writing a trailing "\n" whengenerating *qmp-commands.h
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
qapi: add ordereddict.py helper library
We need this to parse dictionaries with schema ordering intact so that Cprototypes can be generated deterministically.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@gmail.com>
qapi: add qapi.py helper libraries
qapi: add qapi-types.py code generator
This is the code generator for qapi types. It will generation thefollowing files:
$(prefix)qapi-types.h - C types corresponding to types defined in the schema you pass in $(prefix)qapi-types.c - Cleanup functions for the above C types...
qapi: add qapi-visit.py code generator
This is the code generator for qapi visiter functions used tomarshal/unmarshal/dealloc qapi types. It generates the following 2files:
$(prefix)qapi-visit.c: visiter function for a particular c type, used to automagically convert qobjects into the...
qapi: add qapi-commands.py code generator
This is the code generator for qapi command marshaling/dispatch.Currently only generators for synchronous qapi/qmp functions aresupported. This script generates the following files:
$(prefix)qmp-marshal.c: command marshal/dispatch functions for each...
checkpatch: Fix bracing false positives on #if
789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else,fix also #if.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
checkpatch: don't error out on },{ lines
When having code like this:
static PCIDeviceInfo piix_ide_info[] = { { .qdev.name = "piix3-ide", .qdev.size = sizeof(PCIIDEState), .qdev.no_user = 1, .no_hotplug = 1,...
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Add kernel header update script
This helper pulls the required kernel headers for KVM and vhost into aspecified directory. The update is triggered via
scripts/update-linux-headers.sh LINUX_PATH
and will place the output under linux-headers/linux and linux-headers/asm-*....
get_maintainer: update to match qemu tree
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
get_maintainer.pl: copy utility from Linux
Our MAINTAINERS file format matches Linux soget the utility to parse it from there.Updated as of linux 3.0-rc3
s390x: s390x-linux-user support
This patch adds support for running s390x binaries in the linux-user emulationcode.
Signed-off-by: Ulrich Hecht <uli@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
tracetool: allow ) in trace output string
Be greedy in matching the trailing "\)*" pattern. Otherwise, all thetext in the trace string up to the last closed parenthesis is taken aspart of the prototype.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
trace: [ust] fix generation of 'trace.c' on events without args
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
PXE: Refresh all PXE ROMs from the ipxe submodule
Add script to make this easy to repeat later.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
simpletrace: Thread-safe tracing
Trace events outside the global mutex cannot be used with the simpletrace backend since it is not thread-safe. There is no check to preventthem being enabled so people sometimes learn this the hard way.
This patch restructures the simple trace backend with a ring buffer...
tracetool: Add optional argument to specify dtrace probe names
Optional feature allowing a user to generate the probe list to matchthe name of the binary, in case they wish to install qemu under adifferent name than qemu-{system,user},<arch>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
simpletrace: Make simpletrace.py a Python module
The simpletrace.py script pretty-prints a binary trace file. Most ofthe code can be reused by trace file analysis scripts, so turn it into amodule.
Here is an example script that uses the new simpletrace module:...
checkpatch.pl: don't complain about old lines with tabs
Don't complain when the patch includes lines with tabsonly in the hunk's untouched context.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
New trace-event backend: stderr
This backend sends trace events to standard error output during the emulation.
Also add a "--list-backends" option to tracetool, so configure script candisplay the list of available backends.
gdbstub-xml: avoid a warning from sparse
Include a header to get the declaration for xml_builtin. Thisavoids a warning from sparse: CC m68k-softmmu/gdbstub-xml.ogdbstub-xml.c:244:12: warning: symbol 'xml_builtin' was not declared. Should it be static?...
checkpatch: Fix bracing false positives on #else
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
checkpatch: adjust to QEMUisms
Change checkpatch.pl for QEMU use: - Root directory detection - Forbid tabs - Indent at 4 spaces - Allow typedefs - Enforce brace use even for single statement blocks - Don't suggest nonexistent cleanup tools
Mention the script in CODING_STYLE....
Add checkpatch.pl from Linux kernel
Unchanged import fromhttp://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-0.31
Add scripts directory
Move build and user scripts into scripts directory.