summaryrefslogtreecommitdiffstats
path: root/Makefile.objs
Commit message (Collapse)AuthorAgeFilesLines
* contrib: add ivshmem client and serverDavid Marchand2015-10-241-0/+5
| | | | | | | | | | | | | When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Signed-off-by: David Marchand <david.marchand@6wind.com> [fix a valgrind warning, option and server_close() segvs, extra server headers includes, getopt() return type, out-of-tree build, use qemu event_notifier instead of eventfd, fix x86/osx warnings - Marc-André] Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* coroutine: move into libqemuutil.a libraryDaniel P. Berrange2015-10-201-4/+0
| | | | | | | | | | | | | | | | | The coroutine files are currently referenced by the block-obj-y variable. The coroutine functionality though is already used by more than just the block code. eg migration code uses coroutine yield. In the future the I/O channel code will also use the coroutine yield functionality. Since the coroutine code is nicely self-contained it can be easily built as part of the libqemuutil.a library, making it widely available. The headers are also moved into include/qemu, instead of the include/block directory, since they are now part of the util codebase, and the impl was never in the block/ directory either. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* libcacard: use the standalone projectMarc-André Lureau2015-09-231-14/+0
| | | | | | | | | | | | libcacard is now a standalone project hosted with the Spice project (see the 2.5.0 release announcement), remove it from qemu tree. Use the library if found during configure or if --enable-smartcard. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Tested-by: Paolo Bonzini <pbonzini@redhat.com>
* qapi: New QMP command query-qmp-schema for QMP introspectionMarkus Armbruster2015-09-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qapi/introspect.json defines the introspection schema. It's designed for QMP introspection, but should do for similar uses, such as QGA. The introspection schema does not reflect all the rules and restrictions that apply to QAPI schemata. A valid QAPI schema has an introspection value conforming to the introspection schema, but the converse is not true. Introspection lowers away a number of schema details, and makes implicit things explicit: * The built-in types are declared with their JSON type. All integer types are mapped to 'int', because how many bits we use internally is an implementation detail. It could be pressed into external interface service as very approximate range information, but that's a bad idea. If we need range information, we better do it properly. * Implicit type definitions are made explicit, and given auto-generated names: - Array types, named by appending "List" to the name of their element type, like in generated C. - The enumeration types implicitly defined by simple union types, named by appending "Kind" to the name of their simple union type, like in generated C. - Types that don't occur in generated C. Their names start with ':' so they don't clash with the user's names. * All type references are by name. * The struct and union types are generalized into an object type. * Base types are flattened. * Commands take a single argument and return a single result. Dictionary argument or list result is an implicit type definition. The empty object type is used when a command takes no arguments or produces no results. The argument is always of object type, but the introspection schema doesn't reflect that. The 'gen': false directive is omitted as implementation detail. The 'success-response' directive is omitted as well for now, even though it's not an implementation detail, because it's not used by QMP. * Events carry a single data value. Implicit type definition and empty object type use, just like for commands. The value is of object type, but the introspection schema doesn't reflect that. * Types not used by commands or events are omitted. Indirect use counts as use. * Optional members have a default, which can only be null right now Instead of a mandatory "optional" flag, we have an optional default. No default means mandatory, default null means optional without default value. Non-null is available for optional with default (possible future extension). * Clients should *not* look up types by name, because type names are not ABI. Look up the command or event you're interested in, then follow the references. TODO Should we hide the type names to eliminate the temptation? New generator scripts/qapi-introspect.py computes an introspection value for its input, and generates a C variable holding it. It can generate awfully long lines. Marked TODO. A new test-qmp-input-visitor test case feeds its result for both tests/qapi-schema/qapi-schema-test.json and qapi-schema.json to a QmpInputVisitor to verify it actually conforms to the schema. New QMP command query-qmp-schema takes its return value from that variable. Its reply is some 85KiBytes for me right now. If this turns out to be too much, we have a couple of options: * We can use shorter names in the JSON. Not the QMP style. * Optionally return the sub-schema for commands and events given as arguments. Right now qmp_query_schema() sends the string literal computed by qmp-introspect.py. To compute sub-schema at run time, we'd have to duplicate parts of qapi-introspect.py in C. Unattractive. * Let clients cache the output of query-qmp-schema. It changes only on QEMU upgrades, i.e. rarely. Provide a command query-qmp-schema-hash. Clients can have a cache indexed by hash, and re-query the schema only when they don't have it cached. Even simpler: put the hash in the QMP greeting. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* qom: allow QOM to be linked into tools binariesDaniel P. Berrange2015-09-151-0/+5
| | | | | | | | | | | | The qom objects are currently added to common-obj-y which is only linked into the system emulators. The later crypto patches will depend on QOM infrastructure and will also be used from tools binaries. Thus the QOM objects are moved into a new qom-obj-y variable which can be referenced when linking tools, system emulators and tests. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* crypto: move crypto objects out of libqemuutil.laDaniel P. Berrange2015-09-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Future patches will be adding more crypto related APIs which rely on QOM infrastructure. This creates a problem, because QOM relies on library constructors to register objects. When you have a file in a static .a library though which is only referenced by a constructor the linker is dumb and will drop that file when linking to the final executable :-( The only workaround for this is to link the .a library to the executable using the -Wl,--whole-archive flag, but this creates its own set of problems because QEMU is relying on lazy linking for libqemuutil.a. Using --whole-archive majorly increases the size of final executables as they now contain a bunch of object code they don't actually use. The least bad option is to thus not include the crypto objects in libqemuutil.la, and instead define a crypto-obj-y variable that is referenced directly by all the executables that need this code (tools + softmmu, but not qemu-ga). We avoid pulling entire of crypto-obj-y into the userspace emulators as that would force them to link to gnutls too, which is not required. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* crypto: introduce new module for computing hash digestsDaniel P. Berrange2015-07-071-0/+1
| | | | | | | | | | | | | | | | | Introduce a new crypto/ directory that will (eventually) contain all the cryptographic related code. This initially defines a wrapper for initializing gnutls and for computing hashes with gnutls. The former ensures that gnutls is guaranteed to be initialized exactly once in QEMU regardless of CLI args. The block quorum code currently fails to initialize gnutls so it only works by luck, if VNC server TLS is not requested. The hash APIs avoids the need to litter the rest of the code with preprocessor checks and simplifies callers by allocating the correct amount of memory for the requested hash. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1435770638-25715-2-git-send-email-berrange@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* device-tree: Make a common-objPeter Crosthwaite2015-06-031-0/+2
| | | | | | | | | | | There is no reason for device tree API to be built per-target. common-obj it. There is an extraneous inclusion of config.h that needs to be removed. Cc: Alexander Graf <agraf@suse.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* QJSON: Add JSON writerAlexander Graf2015-02-051-0/+1
| | | | | | | | | | | | | | | | To support programmatic JSON assembly while keeping the code that generates it readable, this patch introduces a simple JSON writer. It emits JSON serially into a buffer in memory. The nice thing about this writer is its simplicity and low memory overhead. Unlike the QMP JSON writer, this one does not need to spawn QObjects for every element it wants to represent. This is a prerequisite for the migration stream format description generator. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Start migrating migration code into a migration directoryDr. David Alan Gilbert2014-12-161-8/+2
| | | | | | | | | | | | | | | | | | | | | | The migration code now occupies a fair chunk of the top level .c files, it seems time to give it it's own directory. I've not touched: arch_init.c - that's mostly RAM migration but has a few random other bits savevm.c - because it's built target specific This is purely a code move; no code has changed. - it fails checkpatch because of old violations, it feels safer to keep this as purely a move and fix those at some mythical future date. The xbzrle and vmstate tests are now only run for softmmu builds since they require files in the migrate/ directory which is only built for softmmu. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
* qemu-file: Move stdio implementation to qemu-file-stdio.cEduardo Habkost2014-10-141-1/+1
| | | | | | | | | | | | | | | | | Separate the QEMUFile interface from the stdio-specific implementation, to reduce dependencies from code using QEMUFile. The code that is being moved is similar to the one that was on savevm.c before it was moved in commit 093c455a8c6d8f715eabd8c8d346f08f17d686ec, except for some changes done by Markus, Juan, and myself. So, I am using the copyright and license header from savevm.c, but CCing Juan and Markus so they can review the copyright/license header. Cc: Markus Armbruster <armbru@redhat.com> Cc: Juan Quintela <quintela@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-file: Move unix and socket implementations to qemu-file-unix.cEduardo Habkost2014-10-141-1/+1
| | | | | | | | | | | | | | Separate the QEMUFile interface from the implementation, to reduce dependencies from code using QEMUFile. All the code that is being moved to the new file is exactly the same code that was on savevm.c (moved by commit 093c455a8c6d8f715eabd8c8d346f08f17d686ec), so I am using the copyright and license header from savevm.c for the new file. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* accel: Move accel code to accel.cEduardo Habkost2014-10-041-0/+1
| | | | | | Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' ↵Peter Maydell2014-08-151-1/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Tracing pull request * remotes/stefanha/tags/tracing-pull-request: virtio-rng: add some trace events trace: add some tcg tracing support trace: teach lttng backend to use format strings trace: [tcg] Include TCG-tracing header on all targets trace: [tcg] Include event definitions in "trace.h" trace: [tcg] Generate TCG tracing routines trace: [tcg] Include TCG-tracing helpers trace: [tcg] Define TCG tracing helper routine wrappers trace: [tcg] Define TCG tracing helper routines trace: [tcg] Declare TCG tracing helper routines trace: [tcg] Add 'tcg' event property trace: [tcg] Argument type transformation machinery trace: [tcg] Argument type transformation rules trace: [tcg] Add documentation trace: install simpletrace SystemTap tapset simpletrace: add simpletrace.py --no-header option trace: add tracetool simpletrace_stap format trace: extract stap_escape() function for reuse Conflicts: Makefile.objs
| * trace: [tcg] Define TCG tracing helper routinesLluís Vilanova2014-08-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Generates file "trace/generated-helpers.c" with TCG helper definitions to trace events in guest code at execution time. The helpers ('helper_trace_${event}_exec_proxy') cast the TCG-compatible native argument types to their original types (as defined in "trace-events") and call the tracing routine ('trace_${event}_exec'). Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | build-sys: Move qapi-{types, visit, event}.o into util-obj-yFam Zheng2014-08-091-8/+2
|/ | | | | | | | These three objects are repeated in multiple times in Makefiles. Let's just add them to libqemuutil.a, and don't list explicitly elsewhere. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* qapi script: add event supportWenchao Xia2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | qapi-event.py will parse the schema and generate qapi-event.c, then the API in qapi-event.c can be used to handle events in qemu code. All API have prefix "qapi_event". The script mainly includes two parts: generate API for each event define, generate an enum type for all defined events. Since in some cases the real emit behavior may change, for example, qemu-img would not send a event, a callback layer is used to control the behavior. As a result, the stubs at compile time can be saved, the binding of block layer code and monitor code will become looser. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* libcacard: remove libcacard-specific CFLAGS and LIBS from global varsMichael Tokarev2014-05-091-0/+2
| | | | | | | | | | | | | | | | | | | Currently all what's needed for single file libcacard/vcard_emul_nss.c (libnss cflags) and hw/usb/ccid-card-emulated.c (libcacard includes) together with the libs is added to global QEMU_CFLAGS and libs_softmmu. Use the cflags only where really used (for two mentioned files), and libs only where needed. While at it, rename variables to better reflect reality: libcacard_* is really nss_*. This needs a bit more tweaking: $(NSS_LIBS) should not contain $glib_libs (ditto for _cflags). But in order to fix it, some more preparations should be made first. So add a FIXME comment. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: convert some obj-specific CFLAGS to use new foo.o-cflags syntaxMichael Tokarev2014-05-081-0/+2
| | | | | | | | | | | Current Makefile system allows using foo.o-cflags variables to store object-specific CFLAGS. Convert some usages of old syntax (using QEMU_CFLAGS += construct) to the new syntax. Do not touch multifile modules for now, as build system isn't ready for this. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* iothread: add I/O thread objectStefan Hajnoczi2014-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | This is a stand-in for Michael Roth's QContext. I expect this to be replaced once QContext is completed. The IOThread object is an AioContext event loop thread. This patch adds the concept of multiple event loop threads, allowing users to define them. When SMP guests run on SMP hosts it makes sense to instantiate multiple IOThreads. This spreads event loop processing across multiple cores. Note that additional patches are required to actually bind a device to an IOThread. [Andreas Färber <afaerber@suse.de> pointed out that the embedded parent object instance should be called "parent_obj" and have a newline afterwards. This patch has been changed to reflect this. -- Stefan] Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* hw/9pfs: Include virtio-9p-device.o in buildAneesh Kumar K.V2014-03-041-5/+0
| | | | | | | | | After commit ba1183da9a10b94611cad88c44a5c6df005f9b55 we are including hw/Makefile.objs directly from Makefile.target. Make sure hw/Makefile.objs rules doesn't depend on variable defined in Makefile.objs Tested-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* Makefile: introduce common-obj-m and block-obj-m for DSOFam Zheng2014-02-201-0/+2
| | | | | | | | $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* rules.mak: fix $(obj) to a real relative pathFam Zheng2014-02-201-16/+1
| | | | | | | | | | | | | | | | | | | | Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling because we basically build all .o from top Makefile, before entering Makefile.target, but it will affact arriving per-object libs support. The starting point of $(obj) is passed in as argument of unnest-vars, as well as nested variables, so that different Makefiles can pass in a right value. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* readline: move readline to a generic locationStefan Hajnoczi2014-01-221-1/+0
| | | | | | | | | | | Now that the monitor and readline are decoupled, readline.h no longer belongs in include/monitor/. Put the header into include/qemu/. Move the source file into util/ so it can be linked as part of libqemuutil.a. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qemu-file: Move QEMUFile code to qemu-file.cEduardo Habkost2014-01-131-0/+1
| | | | | | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* vmstate: Move VMState code to vmstate.cEduardo Habkost2014-01-131-0/+1
| | | | | | | | | This will allow unit tests to be written for VMState code without pulling dependencies from the savevm code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* qemu-ga: Add Windows VSS provider and requester as DLLTomoki Sekiyama2013-09-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds VSS provider and requester as a qga-vss.dll, which is loaded by Windows VSS service as well as by qemu-ga. "provider.cpp" implements a basic stub of a software VSS provider. Currently, this module only relays a frozen event from VSS service to the agent, and thaw event from the agent to VSS service, to block VSS process to keep the system frozen while snapshots are taken at the host. To register the provider to the guest system as COM+ application, the type library (.tlb) for qga-vss.dll is required. To build it from COM IDL (.idl), VisualC++, MIDL and stdole2.tlb in Windows SDK are required. This patch also adds pre-compiled .tlb file in the repository in order to enable cross-compile qemu-ga.exe for Windows with VSS support. "requester.cpp" provides the VSS requester to kick the VSS snapshot process. Qemu-ga.exe works without the DLL, although fsfreeze features are disabled. These functions are only supported in Windows 2003 or later. In older systems, fsfreeze features are disabled. In several versions of Windows which don't support attribute VSS_VOLSNAP_ATTR_NO_AUTORECOVERY, DoSnapshotSet fails with error VSS_E_OBJECT_NOT_FOUND. In this patch, we just ignore this error. To solve this fundamentally, we need a framework to handle mount writable snapshot on guests, which is required by VSS auto-recovery feature (cleanup phase after a snapshot is taken). Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
* w32: Add missing version.o to all executables (fix regression)Stefan Weil2013-08-121-0/+5
| | | | | | | | | | | | | | QEMU executables for w32, w64 had included meta information built from version.rc. These rules were changed several times some months ago. The latest version added version.o to the tools, but not to the system emulations. This patch adds the meta information to all system emulations again. Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1375985887-3984-1-git-send-email-sw@weilnetz.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rdma: core logicMichael R. Hines2013-07-231-0/+1
| | | | | | | | | | | | | | | | | | | | | Code that does need to be visible is kept well contained inside this file and this is the only new additional file to the entire patch. This file includes the entire protocol and interfaces required to perform RDMA migration. Also, the configure and Makefile modifications to link this file are included. Full documentation is in docs/rdma.txt Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Chegu Vinod <chegu_vinod@hp.com> Tested-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* Make qemu-io commands available in HMPKevin Wolf2013-06-061-0/+1
| | | | | | | | | It was decided to not make this command available in QMP in order to make clear that this is not supposed to be a stable API and should be used only for testing and debugging purposes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* target-i386: Add "feature-words" property to X86CPUEduardo Habkost2013-05-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This property will be useful for libvirt, as libvirt already has logic based on low-level feature bits (not feature names), so it will be really easy to convert the current libvirt logic to something using the "feature-words" property. The property will have two main use cases: - Checking host capabilities, by checking the features of the "host" CPU model - Checking which features are enabled on each CPU model Example output: $ ./QMP/qmp --path=/tmp/m \ qom-get --path=/machine/icc-bridge/icc/child[0] \ --property=feature-words item[0].cpuid-register: EDX item[0].cpuid-input-eax: 2147483658 item[0].features: 0 item[1].cpuid-register: EAX item[1].cpuid-input-eax: 1073741825 item[1].features: 0 item[2].cpuid-register: EDX item[2].cpuid-input-eax: 3221225473 item[2].features: 0 item[3].cpuid-register: ECX item[3].cpuid-input-eax: 2147483649 item[3].features: 101 item[4].cpuid-register: EDX item[4].cpuid-input-eax: 2147483649 item[4].features: 563346425 item[5].cpuid-register: EBX item[5].cpuid-input-eax: 7 item[5].features: 0 item[5].cpuid-input-ecx: 0 item[6].cpuid-register: ECX item[6].cpuid-input-eax: 1 item[6].features: 2155880449 item[7].cpuid-register: EDX item[7].cpuid-input-eax: 1 item[7].features: 126614521 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
* libcacard: move atr setting from macro to functionAlon Levy2013-04-241-0/+1
| | | | | | | Only because qemu's checkpatch complains about it. Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
* tpm: reorganize headers and split hardware partPaolo Bonzini2013-04-151-1/+1
| | | | | | | | | | | | | The TPM subsystem does not have a full front-end/back-end separation. The sole available backend, tpm_passthrough, depends on the data structures of the sole available frontend, tpm_tis. However, we can at least try to split the user interface (tpm.c) from the implementation (hw/tpm). The patches makes tpm.c not include tpm_int.h, which is shared between tpm_tis.c and tpm_passthrough.c; instead it moves more stuff to tpm_backend.h. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* configure: Don't fall back to gthread coroutine backendPeter Maydell2013-04-081-10/+1
| | | | | | | | | | | | | | | | | | The gthread coroutine backend is broken and does not produce a working QEMU; it is only useful for some very limited debugging situations. Clean up the backend selection logic in configure so that it now runs "if on windows use windows; else prefer ucontext; else sigaltstack". To do this we refactor the configure code to separate out "test whether we have a working ucontext", "pick a default if user didn't specify" and "validate that user didn't specify something invalid", rather than having all three of these run together. We also simplify the Makefile logic so it just links in the backend the configure script selects. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1365419487-19867-3-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Support for TPM command line optionsStefan Berger2013-03-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=<path to TPM device>,id=<id> -device tpm-tis,tpmdev=<id>,id=<other id> and ./qemu-... -tpmdev help where the latter works similar to -soundhw help and shows a list of available TPM backends (for example 'passthrough'). Using the type parameter, the backend is chosen, i.e., 'passthrough' for the passthrough driver. The interpretation of the other parameters along with determining whether enough parameters were provided is pushed into the backend driver, which needs to implement the interface function 'create' and return a TPMDriverOpts structure if the VM can be started or 'NULL' if not enough or bad parameters were provided. Monitor support for 'info tpm' has been added. It for example prints the following: (qemu) info tpm TPM devices: tpm0: model=tpm-tis \ tpm0: type=passthrough,path=/dev/tpm0,cancel-path=/sys/devices/pnp0/00:09/cancel Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com> Message-id: 1361987275-26289-2-git-send-email-stefanb@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* hw: move device-hotplug.o to toplevel, compile it oncePaolo Bonzini2013-03-011-1/+1
| | | | | | | | The situation with device-hotplug.c is similar to qdev-monitor.c. Add a stub for pci_drive_hot_add, so that it can be compiled once, and move it out of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw: move qdev-monitor.o to toplevel directoryPaolo Bonzini2013-03-011-0/+1
| | | | | | | | | | qdev-monitor.c is the only "core qdev" file that is not used in user-mode emulation, and it does not define anything that is used by hardware models. Remove it from the hw/ directory and remove hw/qdev-monitor.h from hw/qdev.h too; this requires some files to have some new explicitly includes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qtest: Add MMIO supportAndreas Färber2013-02-181-1/+0
| | | | | | | | | | | | | Introduce [qtest_]{read,write}[bwlq]() libqtest functions and corresponding QTest protocol commands to replace local versions in libi2c-omap.c. Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b(). Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1361051043-27944-4-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move XBZRLE encoding code to a separate file to allow testingOrit Wasserman2013-02-011-1/+1
| | | | | | | | Signed-off-by: Orit Wasserman <owasserm@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* build: remove extra-obj-yPaolo Bonzini2013-01-261-4/+1
| | | | | | | | | | extra-obj-y is somewhat complicated to understand. Replace it with a special CONFIG_ALL symbol that is defined only at toplevel. This limits the case of directories defining more than one *-obj-y target. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* build: remove universal-obj-yPaolo Bonzini2013-01-261-7/+7
| | | | | | | | | | All of universal-obj-y, user-obj-y (right now unused) and common-obj-y can be unified into common-obj-y if we take care of defining CONFIG_SOFTMMU and CONFIG_USER_ONLY in the toplevel makefile. This is similar to how we define symbols for hardware components. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* build: use -$(CONFIG_SECCOMP) instead of ifeqPaolo Bonzini2013-01-261-5/+1
| | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* build: move around libcacard-y definitionPaolo Bonzini2013-01-261-9/+9
| | | | | | It is also needed if !CONFIG_SOFTMMU, unlike everything that surrounds it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* build: fold trace-obj-y into libqemuutil.aPaolo Bonzini2013-01-121-9/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: remove coroutine-obj-yPaolo Bonzini2013-01-121-18/+13
| | | | | | Just fold it into block-obj-y. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: move version-obj-y to the generic LINK rulePaolo Bonzini2013-01-121-2/+1
| | | | | | There is no reason for it to be in block-obj-y, in particular. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: move base QAPI files to libqemuutil.aPaolo Bonzini2013-01-121-7/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: move QAPI definitions for QEMU out of qapi-obj-yPaolo Bonzini2013-01-121-2/+4
| | | | | | | | | | | | | | There is no reason why for example qemu-ga should include all the definitions for the QEMU monitor. However, there are a few that are needed (qapi_free_SocketAddress, qapi_free_InetSocketAddress, ErrorClass_lookup). These should be moved to a separate "core" .json schema that goes into libqemuutil.a. For now, make this clearer by moving the qapi-*.o definitions out of libqemuutil.a. Once the above refactoring is done, qga-obj-y should not include anymore qapi-types.o and qapi-visit.o. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: consolidate multiple variables into universal-obj-yPaolo Bonzini2013-01-121-37/+9
| | | | | | | | | | | The directory descent mechanism, and a less-flat tree both helped in making some *-obj-y definitions very short. Many of these often end up in universal-obj-y, and used to be separate only because of libuser (which is now part of history...). Consolidate these variables in a single one. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: move qobject files to qobject/ and libqemuutil.aPaolo Bonzini2013-01-121-14/+3
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud