summaryrefslogtreecommitdiffstats
path: root/Makefile.objs
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: Keep trace-events-subdirs orderedPhilippe Mathieu-Daudé2020-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding the same directory multiple times to trace-events-subdirs might trigger build failures, in particular when using the LTTng Userspace Tracer library as backend. For example when using two times the hw/core/ directory: $ ./configure --enable-trace-backends=ust && make [...] CC trace-ust-all.o In file included from trace-ust-all.h:13, from trace-ust-all.c:13: trace-ust-all.h:35151:1: error: redefinition of ‘__tracepoint_cb_qemu___loader_write_rom’ 35151 | TRACEPOINT_EVENT( | ^~~~~~~~~~~~~~~~ trace-ust-all.h:31791:1: note: previous definition of ‘__tracepoint_cb_qemu___loader_write_rom’ was here 31791 | TRACEPOINT_EVENT( | ^~~~~~~~~~~~~~~~ To ease review and reduce likelihood of merge failures (see [*]), keep trace-events-subdirs ordered when possible, following eb7ccb3c0. [*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg671007.html Duplicate trace-events-subdirs entries generates duplicated symbols when using the LTTng Userspace Tracer library. Reviewed-by: Damien Hedde <damien.hedde@greensocs.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200116114339.30670-1-philmd@redhat.com Message-Id: <20200116114339.30670-1-philmd@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell2020-01-271-21/+10Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Register qdev properties as class properties (Marc-André) * Cleanups (Philippe) * virtio-scsi fix (Pan Nengyuan) * Tweak Skylake-v3 model id (Kashyap) * x86 UCODE_REV support and nested live migration fix (myself) * Advisory mode for pvpanic (Zhenwei) # gpg: Signature made Fri 24 Jan 2020 20:16:23 GMT # gpg: using RSA key BFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (58 commits) build-sys: clean up flags included in the linker command line target/i386: Add the 'model-id' for Skylake -v3 CPU models qdev: use object_property_help() qapi/qmp: add ObjectPropertyInfo.default-value qom: introduce object_property_help() qom: simplify qmp_device_list_properties() vl: print default value in object help qdev: register properties as class properties qdev: move instance properties to class properties qdev: rename DeviceClass.props qdev: set properties with device_class_set_props() object: return self in object_ref() object: release all props object: add object_class_property_add_link() object: express const link with link property object: add direct link flag object: rename link "child" to "target" object: check strong flag with & object: do not free class properties object: add object_property_set_default ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * Makefile: Remove unhelpful commentPhilippe Mathieu-Daudé2020-01-241-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | It is pointless to keep qapi/ object separate from the other common-objects. Drop the comment. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200118140619.26333-5-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * Makefile: Restrict system emulation and tools objectsPhilippe Mathieu-Daudé2020-01-241-12/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Restrict all the system emulation and tools objects with a Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check. Using the same description over and over is not very helpful. Use it once, just before the if() block. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200118140619.26333-4-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * Makefile: Clarify all the codebase requires qom/ objectsPhilippe Mathieu-Daudé2020-01-241-5/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | QEMU user-mode also requires the qom/ objects, it is not only used by "system emulation and qemu-img". As we will use a big if() block, move it upper in the "Common libraries for tools and emulators" section. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200118140619.26333-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | virtiofsd: Add Makefile wiring for virtiofsd contribDr. David Alan Gilbert2020-01-231-0/+1
|/ | | | | | | | | | | | | | | | Wire up the building of the virtiofsd in tools. virtiofsd relies on Linux-specific system calls and seccomp. Anyone wishing to port it to other host operating systems should do so carefully and without reducing security. Only allow building on Linux hosts. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
* Add dbus-vmstate objectMarc-André Lureau2020-01-061-0/+1
| | | | | | | | | When instantiated, this object will connect to the given D-Bus bus "addr". During migration, it will take/restore the data from org.qemu.VMState1 instances. See documentation for details. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* stubs: replace stubs with lnot if applicablePaolo Bonzini2019-12-171-1/+1
| | | | | | | | The stubs mechanism relies on static libraries and compilation order, which is a bit brittle and should be avoided unless necessary. Replace it with Boolean operations on CONFIG_* symbols. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* crypto: move common bits for all emulators to libqemuutilPaolo Bonzini2019-12-171-2/+1Star
| | | | | | | | qcrypto_random_*, AES and qcrypto_init do not need to be linked as a whole and are the only parts that are used by user-mode emulation. Place them in libqemuutil, so that whatever needs them will pick them up automatically. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* accel: compile accel/accel.c just oncePaolo Bonzini2019-12-171-0/+1
| | | | | | | Now that accel/accel.c does not use CONFIG_TCG or CONFIG_KVM anymore, it need not be compiled once for every softmmu target. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Remove the core bluetooth codeThomas Huth2019-12-171-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's been deprecated since QEMU v3.1. We've explicitly asked in the deprecation message that people should speak up on qemu-devel in case they are still actively using the bluetooth part of QEMU, but nobody ever replied that they are really still using it. I've tried it on my own to use this bluetooth subsystem for one of my guests, but I was also not able to get it running anymore: When I was trying to pass-through a real bluetooth device, either the guest did not see the device at all, or the guest crashed. Even worse for the emulated device: When running qemu-system-x86_64 -bt device:keyboard QEMU crashes once you hit a key. So it seems like the bluetooth stack is not only neglected, it is completely bitrotten, as far as I can tell. The only attention that this code got during the past years were some CVEs that have been spotted there. So this code is a burden for the developers, without any real benefit anymore. Time to remove it. Note: hw/bt/Kconfig only gets cleared but not removed here yet. Otherwise there is a problem with the *-softmmu/config-devices.mak.d dependency files - they still contain a reference to this file which gets evaluated first on some build hosts, before the file gets properly recreated. To avoid breaking these builders, we still need the file around for some time. It will get removed in a couple of weeks instead. Message-Id: <20191120091014.16883-4-thuth@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectoryPhilippe Mathieu-Daudé2019-10-241-0/+1
| | | | | | | | | | | The PL031 is a Real Time Clock, not a timer. Move it under the hw/rtc/ subdirectory. Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20191003230404.19384-3-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* loader: Trace loaded imagesAlexey Kardashevskiy2019-09-181-0/+1
| | | | | | | | | | This adds a trace point which prints every loaded image. This includes bios/firmware/kernel/initradmdisk/pcirom. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190613050937.124903-1-aik@ozlabs.ru> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* dump: Move HMP command handlers to dump/Markus Armbruster2019-07-021-0/+1
| | | | | | | | | | | | | | Move the HMP handlers related to qapi/dump.json to dump/dump-hmp-cmds.c, where they are covered by MAINTAINERS section "Dump", just like qapi/dump.json. Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190619201050.19040-18-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> [Commit message typo fixed]
* Makefile: Don't add monitor/ twice to common-obj-yMarkus Armbruster2019-07-021-1/+0Star
| | | | | | | | | | | Both commit f1b3ccfaa68 "monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c" and commit 7e3c0deab1b "monitor: Split out monitor/qmp.c" added monitor/ to common-obj-y ifeq ($(CONFIG_SOFTMMU),y). Revert the second addition. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190619201050.19040-3-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
* hw/mips/gt64xxx_pci: Convert debug printf()s to trace eventsPhilippe Mathieu-Daudé2019-06-261-0/+1
| | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <20190624222844.26584-7-f4bug@amsat.org>
* monitor: Split out monitor/qmp.cKevin Wolf2019-06-171-0/+1
| | | | | | | | | | | | | | | | | | Move QMP infrastructure from monitor/misc.c to monitor/qmp.c. This is code that can be shared for all targets, so compile it only once. The amount of function and particularly extern variables in monitor_int.h is probably a bit larger than it needs to be, but this way no non-trivial code modifications are needed. The interfaces between QMP and the monitor core can be cleaned up later. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190613153405.24769-11-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [monitor_is_qmp() tidied up to make checkpatch.pl happy, superfluous #include dropped] Signed-off-by: Markus Armbruster <armbru@redhat.com>
* monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.cKevin Wolf2019-06-171-1/+1
| | | | | | | | | | | | | Now that we have a monitor/ subdirectory, let's move hmp.c and qmp.c from the root directory there. As they contain implementations of monitor commands, rename them to {hmp,qmp}-cmds.c, so that {hmp,qmp}.c are free for the HMP and QMP infrastructure. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190613153405.24769-9-kwolf@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
* Move monitor.c to monitor/misc.cKevin Wolf2019-06-171-0/+1
| | | | | | | | | | | | Create a new monitor/ subdirectory and move monitor.c there. As the plan is to move the monitor core into separate files, use the chance to rename it to misc.c. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190613153405.24769-8-kwolf@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
* Merge remote-tracking branch 'remotes/kraxel/tags/vga-20190529-pull-request' ↵Peter Maydell2019-05-301-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging vga: add vhost-user-gpu. # gpg: Signature made Wed 29 May 2019 05:40:02 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20190529-pull-request: hw/display: add vhost-user-vga & gpu-pci virtio-gpu: split virtio-gpu-pci & virtio-vga virtio-gpu: split virtio-gpu, introduce virtio-gpu-base spice-app: fix running when !CONFIG_OPENGL contrib: add vhost-user-gpu util: compile drm.o on posix virtio-gpu: add a pixman helper header virtio-gpu: add bswap helpers header vhost-user: add vhost_user_gpu_set_socket() virtio-gpu: add sanity check Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * contrib: add vhost-user-gpuMarc-André Lureau2019-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a vhost-user gpu backend, based on virtio-gpu/3d device. It is associated with a vhost-user-gpu device. Various TODO and nice to have items: - multi-head support - crash & resume handling - accelerated rendering/display that avoids the waiting round trips - edid support Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20190524130946.31736-6-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | SiFive RISC-V GPIO DeviceFabien Chouteau2019-05-241-0/+1
|/ | | | | | | | | | | | QEMU model of the GPIO device on the SiFive E300 series SOCs. The pins are not used by a board definition yet, however this implementation can already be used to trigger GPIO interrupts from the software by configuring a pin as both output and input. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Reviewed-by: Palmer Dabbelt <palmer@sifive.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
* Merge remote-tracking branch 'remotes/rth/tags/pull-rng-20190522' into stagingPeter Maydell2019-05-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce qemu_guest_getrandom. Use qemu_guest_getrandom in aspeed, nrf51, bcm2835, exynos4210 rng devices. Use qemu_guest_getrandom in target/ppc darn instruction. Support ARMv8.5-RNG extension. Support x86 RDRAND extension. Acked-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Laurent Vivier <laurent@vivier.eu> # gpg: Signature made Wed 22 May 2019 19:36:43 BST # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-rng-20190522: (25 commits) target/i386: Implement CPUID_EXT_RDRAND target/ppc: Use qemu_guest_getrandom for DARN target/ppc: Use gen_io_start/end around DARN target/arm: Implement ARMv8.5-RNG target/arm: Put all PAC keys into a structure hw/misc/exynos4210_rng: Use qemu_guest_getrandom hw/misc/bcm2835_rng: Use qemu_guest_getrandom_nofail hw/misc/nrf51_rng: Use qemu_guest_getrandom_nofail aspeed/scu: Use qemu_guest_getrandom_nofail linux-user: Remove srand call linux-user/aarch64: Use qemu_guest_getrandom for PAUTH keys linux-user: Use qemu_guest_getrandom_nofail for AT_RANDOM linux-user: Call qcrypto_init if not using -seed linux-user: Initialize pseudo-random seeds for all guest cpus cpus: Initialize pseudo-random seeds for all guest cpus util: Add qemu_guest_getrandom and associated routines ui/vnc: Use gcrypto_random_bytes for start_auth_vnc ui/vnc: Split out authentication_failed crypto: Change the qcrypto_random_bytes buffer type to void* crypto: Use getrandom for qcrypto_random_bytes ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * build: Link user-only with crypto random number objectsRichard Henderson2019-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For user-only, we require only the random number bits of the crypto subsystem. Rename crypto-aes-obj-y to crypto-user-obj-y, and add the random number objects, plus init.o to handle any extra stuff the crypto library requires. Move the crypto libraries from libs_softmmu and libs_tools to LIBS, so that they are universally used. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* | contrib: add vhost-user-inputMarc-André Lureau2019-05-221-0/+1
|/ | | | | | | | | | | | | | | | | | Add a vhost-user input backend example, based on virtio-input-host device. It takes an evdev path as argument, and can be associated with a vhost-user-input device via a UNIX socket: $ vhost-user-input -p /dev/input/eventX -s /tmp/vui.sock $ qemu ... -chardev socket,id=vuic,path=/tmp/vui.sock -device vhost-user-input-pci,chardev=vuic This example is intentionally not included in $TOOLS, and not installed by default. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20190514104126.6294-4-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* build: don't build hardware objects with linux-userLaurent Vivier2019-05-171-5/+9
| | | | | | | | | | | | | | | | Some objects are only needed for system emulation and tools. We can ignore them for the user mode case Update tests to run accordingly: conditionally build some tests on CONFIG_BLOCK. Some tests use components that are only built when softmmu or block tools are enabled, not for linux-user. So, if these components are not available, disable the tests. Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20190401141222.30034-6-lvivier@redhat.com> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
* build: chardev is only needed for softmmu targetsLaurent Vivier2019-05-171-1/+1
| | | | | | | | Move the dependency from SUBDIR_RULES to SOFTMMU_SUBDIR_RULES Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Laurent Vivier <lvivier@redhat.com> Message-Id: <20190401141222.30034-5-lvivier@redhat.com>
* trace: only include trace-event-subdirs when they are neededLaurent Vivier2019-05-171-5/+7
| | | | | | | | | Some directories are built only for softmmu targets, and the related trace-event-subdirs must do the same Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20190401141222.30034-2-lvivier@redhat.com>
* RISC-V: Convert trap debugging to trace eventsMichael Clark2019-03-191-0/+1
| | | | | | | | Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Alistair Francis <Alistair.Francis@wdc.com> Signed-off-by: Michael Clark <mjc@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
* target/hppa: add TLB trace eventsSven Schnelle2019-03-121-0/+1
| | | | | | | | | | To ease TLB debugging add a few trace events, which are disabled by default so that there's no performance impact. Signed-off-by: Sven Schnelle <svens@stackframe.org> Message-Id: <20190311191602.25796-5-svens@stackframe.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
* build: remove unnecessary assignments from Makefile.targetPaolo Bonzini2019-03-111-1/+1
| | | | | | | | It is only necessary to clear block-obj-y because Makefile.objs uses "+=" instead of "="; fix that and remove the assignment. The other variables need not be cleared at all. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: get rid of target-obj-yPaolo Bonzini2019-03-111-1/+0Star
| | | | | | | It is possible to specify the trace/ directory already in objs-y; there is no need to have a separate unnest-vars invocation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build-sys: link with slirp as an external projectMarc-André Lureau2019-03-071-1/+0Star
| | | | | | | | | | | Use the "system" libslirp if its present or requested. Else build with a static libslirp.a if slirp/ is checked out ("internal") or a submodule ("git"). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-7-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* authz: add QAuthZ object as an authorization base classDaniel P. Berrange2019-02-261-0/+6
| | | | | | | | | | | | | | | | | | | | | The current qemu_acl module provides a simple access control list facility inside QEMU, which is used via a set of monitor commands acl_show, acl_policy, acl_add, acl_remove & acl_reset. Note there is no ability to create ACLs - the network services (eg VNC server) were expected to create ACLs that they want to check. There is also no way to define ACLs on the command line, nor potentially integrate with external authorization systems like polkit, pam, ldap lookup, etc. The QAuthZ object defines a minimal abstract QOM class that can be subclassed for creating different authorization providers. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* util: add helper APIs for dealing with inotify in portable mannerDaniel P. Berrangé2019-02-261-1/+1
| | | | | | | | | | | The inotify userspace API for reading events is quite horrible, so it is useful to wrap it in a more friendly API to avoid duplicating code across many users in QEMU. Wrapping it also allows introduction of a platform portability layer, so that we can add impls for non-Linux based equivalents in future. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* build: Deal with all of QAPI's .o in qapi/Makefile.objsMarkus Armbruster2019-02-181-15/+1Star
| | | | | | | | | | | | | | Adding QAPI's .o to util-obj-y, common-obj-y and obj-y is spread over three places: Makefile.objs takes care of target-independent generated code, Makefile.target of target-dependent generated code, and qapi/Makefile.objs of (target-independent) hand-written code. Do everything in qapi/Makefile.objs. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190214152251.2073-8-armbru@redhat.com>
* build-sys: move qmp-introspect per targetMarc-André Lureau2019-02-181-2/+0Star
| | | | | | | | | | | | | | | | | The following patches are going to introduce per-target #ifdef in the schemas. The introspection data is statically generated once, and must thus be built per-target to reflect target-specific configuration. Drop "do_test_visitor_in_qmp_introspect(&qmp_schema_qlit)" since the schema is no longer in a common object. It is covered by the per-target query-qmp-schema test instead. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190214152251.2073-7-armbru@redhat.com>
* qapi: Generate QAPIEvent stuff into separate filesMarkus Armbruster2019-02-181-0/+1
| | | | | | | | | | | | Having to include qapi-events.h just for QAPIEvent is suboptimal, but quite tolerable now. It'll become problematic when we have events conditional on the target, because then qapi-events.h won't be usable from target-independent code anymore. Avoid that by generating it into separate files. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190214152251.2073-6-armbru@redhat.com>
* slirp: replace trace functions with DEBUG callsMarc-André Lureau2019-02-071-1/+0Star
| | | | | | | | Remove a dependency on QEMU. Use the existing logging facilities. Set SLIRP_DEBUG=tftp to get tftp log. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* build-sys: use a separate slirp-obj-y && slirp.moMarc-André Lureau2019-01-141-2/+1Star
| | | | | | | | | | | | | This will allow to have cflags for the whole slirp.mo -objs. It makes it possible to build tests that links only with slirp-obj-y (and not the whole common-obj). It is also a step towards building slirp as a shared library, although this requires a bit more thoughts to build with net/slirp.o (CONFIG_SLIRP would need to be 'm') and other build issues. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* slirp: add tftp tracingGerd Hoffmann2019-01-141-0/+1
| | | | | | | | | | Useful when debugging pxeboot, to see what the guest tries to do. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheralSteffen Görtz2019-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | This adds a model of the nRF51 GPIO peripheral. Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf The nRF51 series microcontrollers support up to 32 GPIO pins in various configurations. The pins can be used as input pins with pull-ups or pull-down. Furthermore, three different output driver modes per level are available (disconnected, standard, high-current). The GPIO-Peripheral has a mechanism for detecting level changes which is not featured in this model. Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20190103091119.9367-6-stefanha@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* qapi: Define new QMP message for pvrdmaYuval Shaia2018-12-221-1/+2
| | | | | | | | | | | | | | pvrdma requires that the same GID attached to it will be attached to the backend device in the host. A new QMP messages is defined so pvrdma device can broadcast any change made to its GID table. This event is captured by libvirt which in turn will update the GID table in the backend device. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexerYuval Shaia2018-12-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RDMA MAD kernel module (ibcm) disallow more than one MAD-agent for a given MAD class. This does not go hand-by-hand with qemu pvrdma device's requirements where each VM is MAD agent. Fix it by adding implementation of RDMA MAD multiplexer service which on one hand register as a sole MAD agent with the kernel module and on the other hand gives service to more than one VM. Design Overview: Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> ---------------- A server process is registered to UMAD framework (for this to work the rdma_cm kernel module needs to be unloaded) and creates a unix socket to listen to incoming request from clients. A client process (such as QEMU) connects to this unix socket and registers with its own GID. TX: ---- When client needs to send rdma_cm MAD message it construct it the same way as without this multiplexer, i.e. creates a umad packet but this time it writes its content to the socket instead of calling umad_send(). The server, upon receiving such a message fetch local_comm_id from it so a context for this session can be maintain and relay the message to UMAD layer by calling umad_send(). RX: ---- The server creates a worker thread to process incoming rdma_cm MAD messages. When an incoming message arrived (umad_recv()) the server, depending on the message type (attr_id) looks for target client by either searching in gid->fd table or in local_comm_id->fd table. With the extracted fd the server relays to incoming message to the client. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
* qapi: Reduce Makefile boilerplateEric Blake2018-12-111-68/+7Star
| | | | | | | | | | | | | | | | | | | | | | Adding a new qapi module had some rather tedious repetition to wire it into Makefile, Makefile.objs, and .gitignore (for example, see commit bf42508f and its followup b61acdec). For make, add some indirection by taking advantage of GNU Make string processing to expand a list of module names into all the required artifacts, so that future additions of a new module need only touch the list of module names. And for gitignore, use globs to cover all generated file names. The list has to live in Makefile.objs, due to the way that our unnest-vars macro slirps in that file without remembering any definition of $(QAPI_MODULES) from Makefile. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Tested-by: Yuval Shaia <yuval.shaia@oracle.com> Message-Id: <20181116200016.2080785-1-eblake@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* contrib: add elf2dmp toolViktor Prutyanov2018-10-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | elf2dmp is a converter from ELF dump (produced by 'dump-guest-memory') to Windows MEMORY.DMP format (also know as 'Complete Memory Dump') which can be opened in WinDbg. This tool can help if VMCoreInfo device/driver is absent in Windows VM and 'dump-guest-memory -w' is not available but dump can be created in ELF format. The tool works as follows: 1. Determine the system paging root looking at GS_BASE or KERNEL_GS_BASE to locate the PRCB structure and finds the kernel CR3 nearby if QEMU CPU state CR3 is not suitable. 2. Find an address within the kernel image by dereferencing the first IDT entry and scans virtual memory upwards until the start of the kernel. 3. Download a PDB matching the kernel from the Microsoft symbol store, and figure out the layout of certain relevant structures necessary for the dump. 4. Populate the corresponding structures in the memory image and create the appropriate dump header. Signed-off-by: Viktor Prutyanov <viktor.prutyanov@virtuozzo.com> Message-Id: <1535546488-30208-3-git-send-email-viktor.prutyanov@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw/watchdog/cmsdk_apb_watchdog: Implement CMSDK APB watchdog modulePeter Maydell2018-08-201-0/+1
| | | | | | | The Arm Cortex-M System Design Kit includes a simple watchdog module based on a 32-bit down-counter. Implement this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* hw/i2c: Add trace eventsPhilippe Mathieu-Daudé2018-06-081-0/+1
| | | | | | | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180606191801.6331-1-f4bug@amsat.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* trace: Sort trace-events-subdirsPhilippe Mathieu-Daudé2018-05-301-41/+41
| | | | | | | | Having these entries sorted helps to add new ones. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180528054055.21153-1-f4bug@amsat.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* job: Add lifecycle QMP commandsKevin Wolf2018-05-231-0/+1
| | | | | | | This adds QMP commands that control the transition between states of the job lifecycle. Signed-off-by: Kevin Wolf <kwolf@redhat.com>