aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-22libqtest: Fix socket_accept() to pass address_lenAndreas Färber1-0/+1
accept() expects address_len to point to the length of the sockaddr on input. Initialize it accordingly. Resolves an assertion due to EFAULT on illumos. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22Makefile.user: Define CONFIG_USER_ONLY for libuser/Andreas Färber1-0/+1
In *-*-user/ build dirs CONFIG_USER_ONLY is defined via config-target.h. In libuser/ it is not defined. Add it via QEMU_CFLAGS. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22Makefile: Remove macro qapi-dirStefan Weil1-11/+10
As qapi-dir was now a constant, it can be replaced by its value. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22Makefile: Remove BUILD_DIR from qapi-dirStefan Weil1-1/+1
qapi-dir does not need an absolute path. All other build directories are relative. When BUILD_DIR is removed, the build output looks better (no long lines with absolute paths when everything else uses short lines): GEN qapi-generated/qga-qapi-types.c CC qapi-generated/qga-qapi-types.o GEN qapi-generated/qga-qapi-visit.c CC qapi-generated/qga-qapi-visit.o GEN qapi-generated/qga-qmp-marshal.c CC qapi-generated/qga-qmp-marshal.o Using a relative path also avoids potential problems when BUILD_DIR includes blanks. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-22Install 'bepo' keymap already included in Qemu sourceFrédéric Boiteux1-1/+2
The 'bepo' layout (a french dvorak-like keyboard layout) was added about one year ago, (see commit 2a3c633c1eb8692716220195b6d3fe78b7e411d0), but I missed to declare to install it. Signed-off-by: Frédéric Boiteux <fboiteux@free.fr> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-21libcacard: build fixesBlue Swirl2-6/+7
Link trace objects to fix these errors: LINK vscclient oslib-posix.o: In function `trace_qemu_vfree': /src/qemu/obj-amd64/./trace.h:39: undefined reference to `trace1' oslib-posix.o: In function `trace_qemu_memalign': /src/qemu/obj-amd64/./trace.h:31: undefined reference to `trace3' oslib-posix.o: In function `trace_qemu_vmalloc': /src/qemu/obj-amd64/./trace.h:35: undefined reference to `trace2' Add LDFLAGS to vscclient link command. Clean up also in subdirectories of libcacard. Use quiet-command for sed invocation. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Alon Levy <alevy@redhat.com>
2012-06-21qtest: add a fuzz test to fdc-testBlue Swirl1-0/+17
Add a simple register fuzzing test to floppy controller tests. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21fdc: use LOG_UNIMP loggingBlue Swirl1-13/+17
Convert uses of FLOPPY_ERROR to either FLOPPY_DPRINTF (for implemented cases) or to use LOG_UNIMP (unimplemented). Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21qemu-log: use LOG_UNIMP for some target CPU casesBlue Swirl5-38/+58
Use LOG_UNIMP for some target CPU cases. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Alexander Graf <agraf@suse.de>
2012-06-21qemu-log: add log category for unimplemented functionalityBlue Swirl2-0/+3
Add new log category (LOG_UNIMP) for unimplemented functionality. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21qemu-log: cleanupBlue Swirl8-113/+168
Don't use global variables directly but via accessor functions. Rename globals. Convert macros to functions, add GCC format attributes. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21qemu-log: move logging to qemu-log.cBlue Swirl5-151/+170
Move logging functions from exec.c to qemu-log.c, compile it only once. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-21xilinx_timer: Fixed deadlock issuePeter A. G. Crosthwaite1-1/+1
The timer was deadlocking when the interval was set too low. It would cause a flood of timer events and the CPU would halt indefinately. This is a known issue and theres a generic workaround in place in ptimer on ptimer_set_limit(), however the Xilinx timer uses ptimer_set_count() instead of set_limit. Changed the call to set_count() to an equivalent call of set_limit() instead, which brings the workaround into play. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-06-21xilinx_timer: Removed include of qemu-timerPeter A. G. Crosthwaite1-1/+0
The Xilinx timer does not interact with the qemu_timer API, so dont include it. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-06-19Allow machines to configure the QEMU_VERSION that's exposed via hardwareCrístian Viana19-25/+62
QEMU exposes its version to the guest's hardware and in some cases that is wrong (e.g. Windows prints messages about driver updates when you switch the QEMU version). There is a new field now on the struct QEmuMachine, hw_version, which may contain the version that the specific machine should report. If that field is set, then that machine will report that version to the guest. Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-19Add PIIX4 properties to control PM system states.Gleb Natapov8-11/+32
This patch adds two things. First it allows QEMU to distinguish between regular powerdown and S4 powerdown. Later separate QMP notification will be added for S4 powerdown. Second it allows S3/S4 states to be disabled from QEMU command line. Some guests known to be broken with regards to power management, but allow to use it anyway. Using new properties management will be able to disable S3/S4 for such guests. Supported system state are passed to a firmware using new fw_cfg file. The file contains 6 byte array. Each byte represents one system state. If byte at offset X has its MSB set it means that system state X is supported and to enter it guest should use the value from lowest 3 bits. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-19make: automatically include dependencies in recursive subdir rules (v2)Anthony Liguori7-6/+8
I think I understand enough of what's going on in these rules to ensure this is right. But I could certainly use a second or third opinion... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-19configure: fix -enable-debug with newer toolchainsAvi Kivity1-2/+1
Fedora 17's toolchain wants optimization enabled for _FORTIFY_SOURCE; so disable _FORTIFY_SOURCE when debugging. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-06-18Merge remote-tracking branch 'afaerber-or/qom-next-2' into stagingAnthony Liguori41-503/+869
* afaerber-or/qom-next-2: (22 commits) qom: Push error reporting to object_property_find() qdev: Remove qdev_prop_exists() qbus: Initialize in standard way qbus: Make child devices links qdev: Connect busses with their parent devices qdev: Convert busses to QEMU Object Model qdev: Move SysBus initialization to sysbus.c qdev: Use wrapper for qdev_get_path qdev: Remove qdev_prop_set_defaults qdev: Clean up global properties qdev: Move bus properties to abstract superclasses qdev: Move bus properties to a separate global qdev: Push "type" property up to Object arm_l2x0: Rename "type" property to "cache-type" m48t59: Rename "type" property to "model" qom: Assert that public types have a non-NULL parent field qom: Drop type_register_static_alias() macro qom: Make Object a type qom: Add class_base_init qom: Add object_child_foreach() ...
2012-06-18Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori12-9/+204
* qmp/queue/qmp: build: install qmp-commands.txt Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events Add event notification for guest balloon changes Fix some more license versions (GPL2+ instead of GPL2) monitor: Fix memory leak with readline completion qmp: do not include monitor.h from qapi-types-core.h qmp: include monitor.h when needed kvm: add missing include files
2012-06-18Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori45-243/+2531
* kwolf/for-anthony: (39 commits) qemu-iotests: add 036 autoclear feature bit test qemu-iotests: add qcow2.py set-feature-bit command fdc-test: introduced qtest read_without_media fdc: fix implied seek while there is no media in drive qcow2: fix autoclear image header update xen: Don't peek behind the BlockDriverState abstraction xen: Don't change -drive if=xen device name during machine init block: Replace bdrv_get_format() by bdrv_get_format_name() qemu-img: document qed format on qemu-img man page qemu-iotests: COW with many AIO requests on the same cluster qemu-iotests: Some backing file COW tests qcow2: Fix avail_sectors in cluster allocation code qcow2: Simplify calculation for COW area at the end qcow2: always operate caches in writeback mode ide: support enable/disable write cache block: always open drivers in writeback mode block: add bdrv_set_enable_write_cache block: copy enable_write_cache in bdrv_append savevm: flush after saving vm state block: flush in writethrough mode after writes ...
2012-06-18Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori17-66/+61
* mst/tags/for_anthony: pci_bridge_dev: fix error path in pci_bridge_dev_initfn() qdev: release parent properties on dc->init failure msi: Use msi/msix_present more consistently msi: Invoke msi/msix_write_config from PCI core msi: Guard msi/msix_write_config with msi_present msi: Invoke msi/msix_reset from PCI core msi: Guard msi_reset with msi_present ahci: Clean up reset functions intel-hda: Fix reset of MSI function ahci: Fix reset of MSI function rtl8139: honor RxOverflow flag in can_receive method shpc: unparent device before free
2012-06-18Merge remote-tracking branch 'sweil/for-anthony' into stagingAnthony Liguori10-16/+23
* sweil/for-anthony: Fix some more license versions (GPL2+ instead of GPL2) dump: Fix license version (GPL2+ instead of GPL2) configure: Fix build for some versions of glibc (9pfs) monitor: Fix memory leak with readline completion
2012-06-18qom: Push error reporting to object_property_find()Paolo Bonzini4-17/+13
Avoids duplicated error_set(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Also drop error_set() in object_property_del().] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Remove qdev_prop_exists()Paolo Bonzini6-9/+12
Can be replaced everywhere with object_property_find(). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qbus: Initialize in standard wayAnthony Liguori1-32/+48
Move code to an initfn and finalizer. Replace do_qbus_create_inplace() with qbus_realize(). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qbus: Make child devices linksAnthony Liguori15-83/+159
Make qbus children show up as link<> properties. There is no stable addressing for qbus children so we use an unstable naming convention. This is okay in QOM though because the composition name is expected to be what's stable. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Connect busses with their parent devicesAnthony Liguori2-0/+7
This makes SysBus part of the root hierarchy and all busses children of their respective parent DeviceState. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Convert busses to QEMU Object ModelAnthony Liguori27-142/+299
This is far less interesting than it sounds. We simply add an Object to each BusState and then register the types appropriately. Most of the interesting refactoring will follow in the next patches. Since we're changing fundamental type names (BusInfo -> BusClass), it all needs to convert at once. Fortunately, not a lot of code is affected. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Made all new bus TypeInfos static const.] [AF: Made qbus_free() call object_delete(), required {qom,glib}_allocated] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Move SysBus initialization to sysbus.cPaolo Bonzini2-24/+23
TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing references to main_system_bus and system_bus_info there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Use wrapper for qdev_get_pathAnthony Liguori7-17/+33
This makes it easier to remove it from BusInfo. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Drop now unnecessary NULL initialization in scsibus_get_dev_path()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Remove qdev_prop_set_defaultsPaolo Bonzini3-26/+23
Instead, qdev_property_add_static can set the default. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Clean up global propertiesPaolo Bonzini2-2/+1
Now that global properties do not depend on buses anymore, set them directly in the device instance_init function. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Move bus properties to abstract superclassesPaolo Bonzini14-84/+74
In qdev, each bus in practice identified an abstract superclass, but this was mostly hidden. In QOM, instead, these abstract classes are explicit so we can move bus properties there. All bus property walks are removed, and all device property walks are changed to look along the class hierarchy instead. We would have duplicates if class A defines some properties and its subclass B does not define any, because class_b->props will be left equal to class_a->props. The solution here is to reintroduce the class_base_init TypeInfo callback, that was present in one of the early QOM versions but removed (on my request...) before committing. This breaks global bus properties, an obscure feature when used with the command-line which is actually useful and used when used by backwards-compatible machine types. So this patch also adjusts the global bus properties in hw/pc_piix.c to refer to the abstract class. Globals and other properties must be modified in the same patch to avoid complications related to initialization ordering. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Move bus properties to a separate globalPaolo Bonzini9-47/+66
Simple code movement in order to simplify future refactoring. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qdev: Push "type" property up to ObjectPaolo Bonzini2-6/+11
Now that Object is a type, add an instance_init function and push the "type" property from qdev to there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18arm_l2x0: Rename "type" property to "cache-type"Andreas Färber1-1/+1
Resolves a name conflict with the qdev "type" property that is about to be moved to Object. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Mark Langsdorf <mark.langsdorf@calxeda.com>
2012-06-18m48t59: Rename "type" property to "model"Paolo Bonzini1-18/+22
This resolves a name conflict with the qdev "type" property that is about to move into Object. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Add braces missing in original code.] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Assert that public types have a non-NULL parent fieldPaolo Bonzini1-4/+10
This protects against unwanted effects of changing TYPE_OBJECT from NULL to a string. Suggested-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Drop type_register_static_alias() macroPaolo Bonzini1-2/+0
It's unused. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Make Object a typePaolo Bonzini2-30/+31
Right now the base Object class has a special NULL type. Change this so that we will be able to add class_init and class_base_init callbacks. To do this, remove some special casing of ObjectClass that is not really necessary. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Add class_base_initPaolo Bonzini2-2/+17
The class_base_init TypeInfo callback was present in one of the early QOM versions but removed (on my request...) before committing. We will need it soon, add it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Add object_child_foreach()Paolo Bonzini2-0/+31
A utility function that will be used to implement hierarchical realization. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> [AF: Drop unrelated whitespace change, add Returns: in documentation] [AF: Use new object_property_is_child() helper.] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-18qom: Introduce object_property_is_{child,link}()Andreas Färber1-5/+15
Avoids hardcoding partial string comparisons. Signed-off-by: Alexander Barabash <alexander_barabash@mentor.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2012-06-18qom: Add object_class_get_parent()Paolo Bonzini2-0/+21
This simple bit of functionality was missing and we'll need it soon, so add it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> [AF: Document possible NULL return value] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-15audio/winwave: Fix typomalc1-1/+1
Signed-off-by: malc <av1474@comtv.ru>
2012-06-15build: install qmp-commands.txtBruce Rogers1-0/+1
File is targeted for install, but is never installed. Signed-off-by: Bruce Rogers <brogers@suse.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-06-15Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG eventsDaniel P. Berrange2-6/+157
Allow certain event types to be rate limited to avoid flooding monitor clients. The monitor_protocol_event() method is changed such that instead of immediately emitting the event to Monitor instances, it will call a new monitor_protocol_event_queue() method. This will check to see if the rate limit for the event has been exceeded, and if so schedule a timer to wakeup at the end of the rate limit period. If further events arrive before the timer fires, the previously queued event will be discarded in favour of the new event. The event will eventually be emitted when the timer fires. This logic is applied to RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events, since the data associated with these events is stateless * monitor.c: Add support for rate limiting * monitor.h: Define monitor_global_init for one-time setup tasks * vl.c: Invoke monitor_global_init * trace-events: Add hooks for monitor event tracing Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-06-15Add event notification for guest balloon changesDaniel P. Berrange6-0/+41
After setting a balloon target value, applications have to continually poll 'query-balloon' to determine whether the guest has reacted to this request. The virtio-balloon backend knows exactly when the guest has reacted though, and thus it is possible to emit a JSON event to tell the mgmt application whenever the guest balloon changes. This introduces a new 'qemu_balloon_changed()' API which is to be called by balloon driver backends, whenever they have a change in balloon value. This takes the 'actual' balloon value, as would be found in the BalloonInfo struct. The qemu_balloon_change API emits a JSON monitor event which looks like: {"timestamp": {"seconds": 1337162462, "microseconds": 814521}, "event": "BALLOON_CHANGE", "data": {"actual": 944766976}} * balloon.c, balloon.h: Introduce qemu_balloon_changed() for emitting balloon change events on the monitor * hw/virtio-balloon.c: Invoke qemu_balloon_changed() whenever the guest changes the balloon actual value * monitor.c, monitor.h: Define QEVENT_BALLOON_CHANGE Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-06-15Fix some more license versions (GPL2+ instead of GPL2)Stefan Weil5-10/+10
Cc: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>