summaryrefslogtreecommitdiffstats
path: root/hw/hw.h
Commit message (Collapse)AuthorAgeFilesLines
* misc: move include files to include/qemu/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* migration: move include files to include/migration/Paolo Bonzini2012-12-191-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: move include files to include/exec/Paolo Bonzini2012-12-191-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block: move include files to include/block/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* aio: introduce AioContext, move bottom halves therePaolo Bonzini2012-10-301-0/+1
| | | | | | | | | | | | Start introducing AioContext, which will let us remove globals from aio.c/async.c, and introduce multiple I/O threads. The bottom half functions now take an additional AioContext argument. A bottom half is created with a specific AioContext that remains the same throughout the lifetime. qemu_bh_new is just a wrapper that uses a global context. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* hw/hw.h: Add include of qemu-log.hPeter Maydell2012-10-201-0/+1
| | | | | | | | | Add an include of qemu-log.h to hw.h, so that device model code has access to these logging functions without the need to directly include qemu-log.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Make target_phys_addr_t 64 bits unconditionallyAvi Kivity2012-10-041-1/+1
| | | | | | | | | | The hassle and compile time overhead of maintaining both 32-bit and 64-bit capable source isn't worth the tiny performance advantage which is seen on a minority of configurations. Switch to compiling libhw only once, with target_phys_addr_t unconditionally typedefed to uint64_t. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: extract declarations out of hw/hw.hPaolo Bonzini2012-01-131-891/+2
| | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate, memory: decouple vmstate from memory APIAvi Kivity2012-01-041-0/+5
| | | | | | | | | | | | | | Currently creating a memory region automatically registers it for live migration. This differs from other state (which is enumerated in a VMStateDescription structure) and ties the live migration code into the memory core. Decouple the two by introducing a separate API, vmstate_register_ram(), for registering a RAM block for migration. Currently the same implementation is reused, but later it can be moved into a separate list, and registrations can be moved to VMStateDescription blocks. Signed-off-by: Avi Kivity <avi@redhat.com>
* QEMUFileCloseFunc: add return value documentation (v2)Eduardo Habkost2011-12-121-1/+7
| | | | | | | | | | | | | | | qemu_fclose() and QEMUFile->close will return -errno on error, and any positive value on success. We need the positive non-zero success values because migration-exec.c:exec_close() relies on non-zero return values to get the process exit code. Changes v1 -> v2: - Cosmetic spelling change on comment text Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* migration: rename qemu_file_has_error to qemu_file_get_errorJuan Quintela2011-10-201-1/+1
| | | | | | | Now the function returned errno, so it is better the new name. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
* migration: change has_error to contain errno valuesJuan Quintela2011-10-201-1/+1
| | | | | | We normally already have an errno value. When not, abuse EIO. Signed-off-by: Juan Quintela <quintela@redhat.com>
* hid: introduce hid vmstate macrosMichael Walle2011-08-101-0/+20
| | | | | | | Add VMSTATE macros to describe a HIDState. Based on usb-hid.c descriptions. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vmstate: add no_migrate flag to VMStateDescriptionGerd Hoffmann2011-07-201-0/+1
| | | | | | | | This allows to easily tag devices as non-migratable, so any attempt to migrate a virtual machine with the device in question active will make migration fail. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xen: Add the Xen platform pci deviceSteven Smith2011-06-191-0/+3
| | | | | | | | | | Introduce a new emulated PCI device, specific to fully virtualized Xen guests. The device is necessary for PV on HVM drivers to work. Signed-off-by: Steven Smith <ssmith@xensource.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* vmstate: port pmtimerJuan Quintela2011-04-221-6/+11
| | | | | | | | It was a half conversion. Finish it. enabled can only get values of 0, 1 or 2, was declared as an int but sent as an unint8_t, change its type. Signed-off-by: Juan Quintela <quintela@redhat.com>
* vmstate: move timers to use test instead of versionJuan Quintela2011-03-101-3/+12
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: be able to store/save a pci device from a pointerJuan Quintela2011-03-101-0/+8
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add a way to send a partial arrayJuan Quintela2011-03-101-0/+9
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_STRUCT_VARRAY_UINT32Juan Quintela2011-03-101-0/+10
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_INT64_ARRAYJuan Quintela2011-03-101-0/+6
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_STRUCT_VARRAY_INT32Juan Quintela2011-03-101-0/+10
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add UINT32 VARRAYSJuan Quintela2011-03-101-0/+11
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Fix varrays with uint8 indexesJuan Quintela2011-03-101-2/+3
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_UINT32_EQUALJuan Quintela2011-03-101-0/+4
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: move VMSTATE_PCIE_AER_ERRS to hw/hw.hDmitry Eremin-Solenikov2011-03-031-0/+20
| | | | | | | | | | VMSTATE_PCIE_AER_ERRS is indeed useful for other emulation drivers. Move it to hw/hw.h under the name of VMSTATE_STRUCT_VARRAY_POINTER_UINT16. Also add VMSTATE_STRUCT_VARRAY_POINTER_INT32 which is more or less the same as _UINT16 macro, except the fact it uses int32_t internally. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* vmstate: add VMSTATE_STRUCT_ARRAY_TESTDmitry Eremin-Solenikov2011-03-031-8/+13
| | | | | | | | This is a _TEST variant of VMSTATE_STRUCT_ARRAY, necessary e.g. for future patch changing pxa2xx_timer to use vmstate. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* usb core: add migration supportGerd Hoffmann2011-01-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | Yes, seriously. There is no migration support at all for usb devices. They loose state, especially the device address, and stop responding because of that. Oops. Luckily there is so much broken usb hardware out there that the guest usually just kicks the device hard (via port reset and reinitialization), then continues without a hitch. So we got away with that in a surprising high number of cases. The arrival of remote wakeup (which enables autosuspend support) changes that picture though. The usb devices also forget that it they are supposed to wakeup, so they don't do that. The host also doesn't notice the device stopped working in case it suspended the device and thus expects it waking up instead of polling it. Result is that your mouse is dead. Lets start fixing that. Add a vmstate struct for USBDevice. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Delete useless 'extern' qualifiers for functionsBlue Swirl2011-01-231-11/+10
| | | | | | | 'extern' qualifier is useless for function declarations. Delete them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* spice: add qxl deviceGerd Hoffmann2010-12-091-0/+14
| | | | | | | | | | | | | | | | | | | | qxl is a paravirtual graphics card. The qxl device is the bridge between the guest and the spice server (aka libspice-server). The spice server will send the rendering commands to the spice client, which will actually render them. The spice server is also able to render locally, which is done in case the guest wants read something from video memory. Local rendering is also used to support display over vnc and sdl. qxl is activated using "-vga qxl". qxl supports multihead, additional cards can be added via '-device qxl". [ v2: add copyright to files ] [ v2: use qemu-common.h for standard includes ] [ v2: create separate qxl-vga device for primary ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* migration: allow rate > 4gMichael S. Tsirkin2010-12-021-4/+4
| | | | | | | | I'd like to disable bandwidth limit or make it very high, Use int64_t all over to make values >= 4g work. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Jason Wang <jasowang@redhat.com>
* add VMSTATE_BOOLGerd Hoffmann2010-11-011-0/+14
| | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* Support marking a device as non-migratableCam Macdonell2010-08-101-0/+2
| | | | | | | A non-migratable device should be removed before migration and re-added after. Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add subsections codeJuan Quintela2010-07-261-0/+6
| | | | | | | | | | | | This commit adds subsections for each device section. Subsections is the way to handle information that don't need to be sent to de destination of a migration because its values are not needed. It is the way to handle optional information. Notice that only the source can decide if the information is optional or not. The destination needs to understand all subsections that it receives to have a sucessful load. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* savevm: Add DeviceState paramAlex Williamson2010-07-061-7/+11
| | | | | | | | | | When available, we'd like to be able to access the DeviceState when registering a savevm. For buses with a get_dev_path() function, this will allow us to create more unique savevm id strings. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Move stdbool.hPaul Brook2010-06-131-1/+0
| | | | | | | Move inclusion of stdbool.h to common header files, instead of including in an ad-hoc manner. Signed-off-by: Paul Brook <paul@codesourcery.com>
* vmstate: Add VMSTATE_STRUCT_VARRAY_UINT8Jan Kiszka2010-06-131-0/+10
| | | | | | | Required for hpet. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmstate: Add support for alias IDJan Kiszka2010-05-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Some legacy users (mostly PC devices) of vmstate_register manage instance IDs on their own, and that unfortunately in a way that is incompatible with automatically generated ones. This so far prevents switching those users to vmstates that are registered by qdev. To establish a migration path, this patch introduces the concept of alias IDs. They can be passed to an extended vmstate registration service, and qdev provides a set service to be used during device init. find_se will consider the alias in addition to the default ID. We can then start generating the default ID automatically and writing it on vmsave, thus converting that format without breaking support for upward migration. The user is required specify the highest vmstate version for which the alias is required. Once this version falls behind the minimum required for a specific vmstate, an assertion triggers to motivate cleaning up the obsolete alias. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* vmstate: Drop unused post_save handlerJan Kiszka2010-05-151-1/+0
| | | | | | | No device makes use of it anymore. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* move targphys.h and hw/poison.h inclusion to cpu-common.hPaolo Bonzini2010-04-091-2/+0
| | | | | | | | With more files from outside the hw/ directory being placed into libhw, avoid the need to include hw/hw.h for the sake of targ_phys_addr_t. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* live migration: Propagate output monitor to callback handlerJan Kiszka2009-12-031-1/+2
| | | | | | | | | In order to allow proper progress reporting to the monitor that initiated the migration, forward the monitor reference through the migration layer down to SaveLiveStateHandler. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add support for multiplying size for a constantJuan Quintela2009-12-031-0/+13
| | | | | | | | When the size that we want to transmit is in another field, but in an unit different that bytes Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: remove usused VMSTATE_STRUCT_ARRAY_SIZE_UINT8Juan Quintela2009-12-031-10/+0
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Introduce UINT16_TEST supportJuan Quintela2009-12-031-0/+3
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Introduce VMSTATE_STRUCT_POINTER_TESTJuan Quintela2009-12-031-6/+10
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Introduce VMSTATE_STRUCT_TESTJuan Quintela2009-12-031-7/+11
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add support for VBUFFERSJuan Quintela2009-12-031-0/+20
| | | | | | | | | | Support for buffer that are pointed by a pointer (i.e. not embedded) where the size that we want to use is a field in the state. We also need a new place to store where to start in the middle of the buffer, as now it is a pointer, not the offset of the 1st field. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Fix info field of VMSTATE_MACADDRJan Kiszka2009-12-031-1/+1
| | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Block live migrationlirans@il.ibm.com2009-11-171-2/+7
| | | | | | | | | | | | | | | | | | | This patch introduces block migration called during live migration. Block are being copied to the destination in an async way. First the code will transfer the whole disk and then transfer all dirty blocks accumulted during the migration. Still need to improve transition from the iterative phase of migration to the end phase. For now transition will take place when all blocks transfered once, all the dirty blocks will be transfered during the end phase (guest is suspended). Changes from v4: - Global variabels moved to a global state structure allocated dynamically. - Minor coding style issues. - Poll block.c for tracking of dirty blocks instead of manage it here. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: pcie host and mmcfg support.Isaku Yamahata2009-11-091-0/+11
| | | | | | | | This patch adds common routines for pcie host bridge and pcie mmcfg. This will be used by q35 based chipset emulation. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud