Kevin Wolf
65d6b3d885
block: Use new AsyncContext for bdrv_read/write emulation
...
bdrv_read/write emulation is used as the perfect example why we need something
like AsyncContexts. So maybe they better start using it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:59 -05:00
Kevin Wolf
9a1e948129
Introduce contexts for asynchronous callbacks
...
Add the possibility to use AIO and BHs without allowing foreign callbacks to be
run. Basically, you put your own AIOs and BHs in a separate context. For
details see the comments in the source.
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:59 -05:00
Kevin Wolf
4f999d05f5
Split out bottom halves
...
Instead of putting more and more stuff into vl.c, let's have the generic
functions that deal with asynchronous callbacks in their own file.
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:59 -05:00
Kevin Wolf
8febfa2684
Add qemu_aio_process_queue()
...
We'll leave some AIO completions unhandled when we can't call the callback.
qemu_aio_process_queue() is used later to run any callbacks that are left and
can be run then.
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:59 -05:00
Kevin Wolf
59c7b155aa
posix-aio-compat: Split out posix_aio_process_queue
...
We need to process the request queue and run callbacks separately from reading
out the queue in a later patch, so split it out.
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:58 -05:00
Luiz Capitulino
18f3a5151c
monitor: Convert do_closefd() to QObject
...
Note that errors are not being converted yet.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:58 -05:00
Luiz Capitulino
f0d6000a9e
monitor: Convert do_getfd() to QObject
...
Note that errors are not being converted yet.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:58 -05:00
Luiz Capitulino
e1c923a62a
monitor: Convert do_eject() to QObject
...
Note that errors are not being converted yet.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:58 -05:00
Luiz Capitulino
6848d82716
monitor: Convert do_pci_device_hot_remove() to QObject
...
Errors are still directly printed, as we are only converting
regular output.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Luiz Capitulino
911d296346
monitor: Convert do_migrate_cancel() to QObject
...
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Luiz Capitulino
3a4921047d
monitor: Convert do_migrate_set_speed() to QObject
...
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Luiz Capitulino
5f79da0037
monitor: Convert do_migrate() to QObject
...
Error is still directly printed, as we are only converting
regular output.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Luiz Capitulino
18f5a8bfc7
monitor: Convert do_physical_memory_save() to QObject
...
Note that errors are not being converted yet.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Luiz Capitulino
57e09454a4
monitor: Convert do_memory_save() to QObject
...
Note that errors are not being converted yet.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Juan Quintela
4a1b0f1cc2
lsi_scsi: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Juan Quintela
1ae71a7793
vmstate: Add VMSTATE_BUFFER_UNSAFE
...
Just sent <anything> as a buffer. We put the pointer and the size
code does the rest.
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Juan Quintela
bacbe2842e
vmware_vga: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:57 -05:00
Juan Quintela
3b1297f50b
vmware_vga: the support to change dinamically depth is not there
...
For a start bypp is not changed after vmsvga_reset() and it depends on depth
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:56 -05:00
Juan Quintela
0c68132259
vmware_vga: scratch is really an array of uint32_t
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:56 -05:00
Juan Quintela
83ef8fe03b
vmware_vga: remove !EMBED_STDVGA code
...
It don't compile. And the trivial fixes (change vga.foo field to foo field
don't work either. No output
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:56 -05:00
Juan Quintela
fe740c4316
vmware_vga: qemu_malloc() returns void *
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:56 -05:00
Juan Quintela
467d44b2f4
vmware_vga: Remove uselss casts from void *
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:56 -05:00
Juan Quintela
c89507f76c
vmware_vga: Pass pci_vmsga_state_t arg no VGACommonState
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:55 -05:00
Juan Quintela
c32646631a
vga: remove unused vga_common_save/load
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:55 -05:00
Juan Quintela
a4f9631cee
vga: port vga-pci to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:55 -05:00
Juan Quintela
f74599c499
vga: port vmware std vga to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:55 -05:00
Juan Quintela
b857ca4553
vga: port vga-isa to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:55 -05:00
Juan Quintela
c63a5886f0
vga: port vga-isa-mm to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:55 -05:00
Juan Quintela
11b6b34508
vga: port vga_common_save/load to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:54 -05:00
Juan Quintela
2a3138ab15
vga: create is_vbe_vmstate field
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:54 -05:00
Juan Quintela
e482dc3eaa
e1000: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:54 -05:00
Juan Quintela
28366c3ac5
e1000: unfold mac_regarraystosave array
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:54 -05:00
Juan Quintela
2e88504938
e1000: unfold mac_reg_tosave array
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:54 -05:00
Juan Quintela
7c131dd59d
ne2000: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:53 -05:00
Juan Quintela
3d8650597d
pcnet: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:52 -05:00
Juan Quintela
151b29867d
eepro100: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:52 -05:00
Juan Quintela
c4a0f2d34c
eeprom93xx: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:52 -05:00
Juan Quintela
060110c3e6
rtl8139: port to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:52 -05:00
Juan Quintela
9d29cdeaac
rtl8139: port TallyCounters to vmstate
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:51 -05:00
Juan Quintela
9ba2f6601d
vmstate: Introduce the concept of sub-arrays
...
VMSTATE_SUB_ARRAY(..., start, num, ...) saves the num elems starting at
position start of the array
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:51 -05:00
Juan Quintela
9e77fcd027
vmstate: Add VMSTATE_MACADDR for the new type
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:51 -05:00
Juan Quintela
76507c7548
vmstate: Add VMSTATE_BUFFER_UNUSED
...
It allows to have 'things' in savevm format not backed in the device state
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:51 -05:00
Juan Quintela
d4829d4992
vmstate: Add version arg to VMSTATE_SINGLE_TEST()
...
This allows to define VMSTATE_SINGLE with VMSTATE_SINGLE_TEST
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:51 -05:00
Juan Quintela
bdb4941d07
vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes)
...
It don't check types.
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:51 -05:00
Juan Quintela
c7bde57205
vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove it
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:51 -05:00
Juan Quintela
b2e1509976
vmstate: factor VMSTATE_*BUFFER* definitions
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:50 -05:00
Juan Quintela
844b236a1f
vmstate: factor vmstate_offset_buffer
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:50 -05:00
Juan Quintela
646bef19a5
vmstate: factor vmstate_offset_array
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:50 -05:00
Juan Quintela
c29d8b1e9b
vmstate: factor vmstate_offset_pointer
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:50 -05:00
Juan Quintela
904ca304e5
vmstate: factor vmstate_offset_value
...
Signed-off-by: Juan Quintela <quintela@redhat.com >
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com >
2009-10-27 12:28:50 -05:00