summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* block: Generalize change_cb() to BlockDevOpsMarkus Armbruster2011-09-066-31/+44
| | | | | | | So we can more easily add device model callbacks. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Attach non-qdev devices as wellMarkus Armbruster2011-09-0612-22/+39
| | | | | | | | | | | | | For now, this just protects against programming errors like having the same drive back multiple non-qdev devices, or untimely bdrv_delete(). Later commits will add other interesting uses. While there, rename BlockDriverState member peer to dev, bdrv_attach() to bdrv_attach_dev(), bdrv_detach() to bdrv_detach_dev(), and bdrv_get_attached() to bdrv_get_attached_dev(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* async: Allow nested qemu_bh_poll callsKevin Wolf2011-09-061-8/+16
| | | | | | | | | | | | | | qemu may segfault when a BH handler first deletes a BH and then (possibly indirectly) calls a nested qemu_bh_poll(). This is because the inner instance frees the BH and deletes it from the list that the outer one processes. This patch deletes BHs only in the outermost qemu_bh_poll instance. Commit 7887f620 already tried to achieve the same, but it assumed that the BH handler would only delete its own BH. With a nested qemu_bh_poll(), this isn't guaranteed, so that commit wasn't enough. Hope this one fixes it for real. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Fix error cases to run depedent requestsKevin Wolf2011-09-061-3/+4
| | | | | | | Requests depending on a failed request would end up waiting forever. This fixes the error path to continue dependent requests even when the request has failed. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Properly initialise QcowL2MetaKevin Wolf2011-09-061-2/+3
| | | | | | | Dependency list pointers filled with random garbage from the stack aren't a good idea. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* linux aio: some commentsFrediano Ziglio2011-09-062-0/+5
| | | | | | | | Add some notes about Linux AIO explaining why we don't use AIO in some situations. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* apb_pci: convert PCI space to memory APIBlue Swirl2011-09-041-5/+8
| | | | | | | | | Add a new memory space for PCI instead of using system memory. This also fixes a bug where VGA region vga.chain4 is accidentally mapped to 0xa0000 instead of 0x1ff000a0000. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* fw_cfg: fix crash if FW_CFG_WRITE_CHANNEL is used incorrectlyBlue Swirl2011-09-041-1/+2
| | | | | | | Avoid a crash if the guest combines FW_CFG_WRITE_CHANNEL with a wrong value. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* softfloat: Use uint32 consistentlyAndreas Färber2011-09-032-12/+12
| | | | | | | | Prepares for uint32 replacement. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* softfloat: Use uint16 consistentlyAndreas Färber2011-09-032-6/+6
| | | | | | | | Prepares for uint16 replacement. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Allow overriding the location of Samba's smbd.Brad2011-09-034-9/+13
| | | | | | | | | | | | | Allow overriding the location of Samba's smbd. Pretty much every OS I look at has some means of changing this path (patching) so lets just make it easier for OS developers creating packages and/or end users to override the location. Signed-off-by: Brad Smith <brad@comstyle.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Use new macro QEMU_PACKED for packed structuresStefan Weil2011-09-0336-259/+259
| | | | | | | | | | | | | | | | | | | | | Most changes were made using these commands: git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/' Whitespace in linux-user/syscall_defs.h was fixed manually to avoid warnings from scripts/checkpatch.pl. Manual changes were also applied to hw/pc.c. I did not fix indentation with tabs in block/vvfat.c. The patch will show 4 errors with scripts/checkpatch.pl. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Add new macro QEMU_PACKED for packed C structuresStefan Weil2011-09-031-0/+6
| | | | | | | | | | | | | A packed struct needs different gcc attributes for compilations with MinGW compilers because glib-2.0 adds compiler flag -mms-bitfields which modifies the packing algorithm. Attribute gcc_struct reverses the negative effects of -mms-bitfields. QEMU_PACKED sets this attribute and must be used for any packed struct which is affected by -mms-bitfields. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* rename qemu_malloc and related to glib names for coherenceFrediano Ziglio2011-09-022-7/+7
| | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix install(1) usage to be compatible with OpenBSD's install(1).Brad2011-09-021-3/+3
| | | | | | | | | | | | Fix install(1) usage to be compatible with OpenBSD's install(1). When creating a directory via the -d flag the -p flag cannot be used at the same time. Also in the context of installing QEMU it doesn't make sense to use the -p flag anyway so use the [default] -c flag instead. Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Rename qemu -> qemu-system-i386Anthony Liguori2011-09-022-7/+2Star
| | | | | | | This has been discussed before in the past. The special casing really makes no sense anymore. This seems like a good change to make for 1.0. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* main: force enabling of I/O threadAnthony Liguori2011-09-026-232/+1Star
| | | | | | | | | | | | | | | | Enabling the I/O thread by default seems like an important part of declaring 1.0. Besides allowing true SMP support with KVM, the I/O thread means that the TCG VCPU doesn't have to multiplex itself with the I/O dispatch routines which currently requires a (racey) signal based alarm system. I know there have been concerns about performance. I think so far the ones that have come up (virtio-net) are most likely due to secondary reasons like decreased batching. I think we ought to force enabling I/O thread early in 1.0 development and commit to resolving any lingering issues. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* trace: fix out-of-tree buildsAnthony Liguori2011-09-021-1/+1
| | | | | Reported-by: Lluis Vilanova <vilanova@ac.upc.edu> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'stefanha/tracing' into stagingAnthony Liguori2011-09-0221-490/+719
|\
| * simpletrace: fix process() argument countStefan Hajnoczi2011-09-011-2/+2
| | | | | | | | | | | | | | | | | | The simpletrace.process() function invokes analyzer methods with the wrong number of arguments if a timestamp should be included. This patch fixes the issue so that trace analysis scripts can make use of timestamps. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * trace: enable all eventsLluís2011-09-011-324/+324
| | | | | | | | | | | | | | Given that all events with programmatically-controlled state are disabled by default, we can delete the "disable" property from all events. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: [stderr] add support for dynamically enabling/disabling eventsLluís2011-09-017-11/+81
| | | | | | | | | | | | | | | | Uses the generic interface provided in "trace/control.h" in order to provide a programmatic interface as well as command line and monitor controls. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: [simple] disable all trace points by defaultLluís2011-09-013-13/+10Star
| | | | | | | | | | | | | | | | Note that this refers to the backend-specific state (whether the output must be generated), not the event "disabled" property (which always uses the "nop" backend). Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: always use the "nop" backend on events with the "disable" keywordLluís2011-09-012-23/+17Star
| | | | | | | | | | | | | | Any event with the keyword/property "disable" generates an empty trace event using the "nop" backend, regardless of the current backend. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: add "-trace events" argument to control initial stateLluís2011-09-019-13/+92
| | | | | | | | | | | | | | | | | | | | | | The "-trace events" argument can be used to provide a file with a list of trace event names that will be enabled prior to starting execution, thus providing early tracing. This saves the user from manually toggling event states through the monitor interface or whichever backend-specific interface. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: always compile support for controlling and querying trace event statesLluís2011-09-013-24/+40
| | | | | | | | | | | | | | | | The current interface is generic for this small set of operations, and thus other backends can easily modify the "trace/control.c" file to add their own implementation. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: separate trace event control and query routines from the simple backendLluís2011-09-016-17/+40
| | | | | | | | | | | | | | | | Generalize the 'st_print_trace_events' and 'st_change_trace_event_state' into backend-specific 'trace_print_events' and 'trace_event_set_state' (respectively) in the "trace/control.h" file. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: generalize the "property" concept in the trace-events fileLluís2011-09-012-42/+35Star
| | | | | | | | | | | | | | | | | | | | This adds/modifies the following functions: * get_name: Get _only_ the event name * has_property: Return whether an event has a property (keyword before the event name) Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: avoid conditional code compilation during option parsingLluís2011-09-019-26/+72
| | | | | | | | | | | | | | | | A default implementation for backend-specific routines is provided in "trace/default.c", which backends can override by setting "trace_default=no" in "configure". Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: move backend-specific code into the trace/ directoryLluís2011-09-016-7/+10
| | | | | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: [make] replace 'ifeq' with values in CONFIG_TRACE_*Lluís2011-09-011-7/+5Star
| | | | | | | | Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*Lluís2011-09-019-21/+31
| | | | | | | | | | | | | | | | | | | | | | Provides a more hierarchical view of the variable domain. Also adds the CONFIG_TRACE_* variables for all backends. [Stefan added missing 'test' in stap if statement] Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * build: [simple] Include qemu-timer-common.o in trace-obj-yLluís2011-09-011-1/+1
| | | | | | | | | | | | | | Helper programs like qemu-ga use tracing primitives, but qemu-timer-common.o (also used by simpletrace.o) is not necessarily included in the linkage line. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
| * build: Fix linkage of QEMU_PROGLluís2011-09-011-1/+1
| | | | | | | | | | | | | | Using '$^' to establish the files to link with will remove any repeated entries in the list of dependencies. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2011-09-014-4/+4
|\ \
| * | Fix spelling in comments and debug messages (recieve -> receive)Stefan Weil2011-08-293-3/+3
| | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | hw/pci-stub: fix comment typoAlon Levy2011-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | [Stefan fixed "doesn't" -> "don't"] Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into stagingAnthony Liguori2011-09-011-1/+1
|\ \ \
| * | | memory: Fix memory_region_get_ram_ptr for ROM devicesJan Kiszka2011-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mask out the sub-page bits that are used by ROM device for storing the io-index and the IO_MEM_ROMD flag. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* | | | build: sort objects to remove duplicates for linkStefan Hajnoczi2011-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid duplicate object files during the link. There are legitimate cases where a link command-line would include duplicate object files because two independent subsystems both depend on common infrastructure. Use GNU make's $(sort) function to remove duplicate object files from the link command-line. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | main: switch qemu_set_fd_handler to g_io_add_watchAnthony Liguori2011-09-011-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes qemu_set_fd_handler to be implemented in terms of g_io_add_watch(). The semantics are a bit different so some glue is required. qemu_set_fd_handler2 is much harder to convert because of its use of polling. The glib main loop has the major of advantage of having a proven thread safe architecture. By using the glib main loop instead of our own, it will allow us to eventually introduce multiple I/O threads. I'm pretty sure that this will work on Win32, but I would appreciate some help testing. I think the semantics of g_io_channel_unix_new() are really just tied to the notion of a "unix fd" and not necessarily unix itself. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | Add glib support to main loopAnthony Liguori2011-09-011-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows GSources to be used to register callback events in QEMU. This is useful as it allows us to take greater advantage of glib and also because it allows us to write code that is more easily testable outside of QEMU since we can make use of glib's main loop in unit tests. All new code should use glib's callback mechanisms for registering fd events which are very well documented at: http://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html And: http://developer.gnome.org/gio/stable/ Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | | | tcg/ppc/tcg-target.c: Avoid 'set but not used' gcc warningsPeter Maydell2011-09-011-10/+10
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Move the declaration and initialisation of some variables in tcg_out_qemu_ld and tcg_out_qemu_st inside CONFIG_SOFTMMU, to avoid the "variable set but not used" warning of gcc 4.6. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: malc <av1474@comtv.ru>
* | | tusb6010: Convert to qdevPeter Maydell2011-08-313-80/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the tusb6010 to qdev. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | | Merge branch 'omap-for-upstream' of ↵Edgar E. Iglesias2011-08-298-203/+733
|\ \ \ | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm into pm
| * | | omap_gpmc: Implement prefetch enginePeter Maydell2011-08-281-10/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements the prefetch engine feature of the GPMC which can be used for NAND devices. This includes both interrupt driven and DMA-filling modes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | omap: Wire up the DMA request line to the GPMCPeter Maydell2011-08-283-3/+8
| | | | | | | | | | | | | | | | Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | omap_gpmc: Pull prefetch engine data into sub-structPeter Maydell2011-08-281-24/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the gpmc state structure so items relating to the prefetch engine are in their own sub-struct and have more useful names. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | omap_gpmc: Accept a zero mask field on omap3630Juha Riihimäki2011-08-281-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OMAP3630 adds an extra bit of address masking, so a mask of 0xb1111 is valid. Unfortunately the GPMC_REVISION is the same as on the OMAP3430 which only has three bits of address masking, so we have to derive this feature directly from the OMAP revision rather than from the GPMC revision. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> [Riku Voipio: Fixes and restructuring patchset] Signed-off-by: Riku Voipio <riku.voipio@iki.fi> [Peter Maydell: More fixes and cleanups for upstream submission] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | hw/omap.h: Add OMAP 3630 to omap_mpu_model enumerationPeter Maydell2011-08-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the OMAP 3630 to the omap_mpu_model enumeration, and add the corresponding cpu_is_omap3630() function. (OMAP3 isn't supported yet but this is useful in upgrading common components to be "OMAP3 ready". We already have this for OMAP3430.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>