summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* net: use qemu_send_packet_raw() in qemu_announce_self()Gleb Natapov2009-10-271-6/+1
| | | | | | | | | | | | | Use qemu_send_packet_raw to send gratuitous arp. This will ensure that vnet header is handled properly. Also, avoid sending the gratuitous packet to the guest. There doesn't appear to be any reason for doing that and the code will currently just crash if the NIC is not associated with a vlan. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add receive_raw parameter to qemu_new_vlan_client()Mark McLoughlin2009-10-279-13/+16
| | | | | | | | | | Trivial patch to allow supplying a receive_raw function. A future cleanup should combine this function pointer parameters into a table. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add an API for 'raw' packetsMark McLoughlin2009-10-273-8/+32
| | | | | | | | | | In the case where a NIC and backend agree on a packet header format, this API allows injecting packets which lack the agreed upon header. We need this for sending our gratuitous ARP. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add flags parameter to packet queue interfaceMark McLoughlin2009-10-273-10/+36
| | | | | | | | This allows for the addition of a raw flag, and leaves the way open for other flags too. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add tap_has_vnet_hdr() and tap_using_vnet_hdr() APIsMark McLoughlin2009-10-272-4/+38
| | | | | | | | | These lamely named functions allow virtio-net to query whether IFF_VNET_HDR is enabled on a tap interface and inform the tap code that virtio-net will supply packets with a vnet header. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add a client type codeMark McLoughlin2009-10-279-14/+40
| | | | | | | | | This is so as to allow APIs which operate on specific client types without having to add a function table entry which is only implemented by a single client type. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: add a vnet_hdr=on|off parameterMark McLoughlin2009-10-272-11/+35
| | | | | | | | | | | | | This allows people to disable the IFF_VNET_HDR flag, e.g. for debugging purposes or if they know they may migrate the guest to a machine without IFF_VNET_HDR support. It also allows making the lack of IFF_VNET_HDR support an error condition, e.g. in the case where a guest is being migrated from a host which does support it. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: refactor tap initializationMark McLoughlin2009-10-271-45/+52
| | | | | | | | | | | | | Re-factor things so that there is only one call site for net_tap_fd_init(). Two concerns about the QemuOpts usage here - firstly, we set the script arguments to their default value and, secondly, we set the ifname value to the name allocated by the kernel if none is supplied. Are we okay with such things ending up in writeconfig output? Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: enable IFF_VNET_HDR on tap fds if availableMark McLoughlin2009-10-272-13/+84
| | | | | | | | | | | | For now, we just add an empty header before writing and strip the header after reading. We really only want IFF_VNET_HDR when virtio_net is using it, but it would significantly complicate matters to try and do that. There should be little or no performance impact with always adding headers. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: make tap_receive() re-use tap_receive_iov() codeMark McLoughlin2009-10-271-8/+15
| | | | | | | | | In future we will want to prepend a virtio_net header if the NIC didn't supply one but IFF_VNET_HDR is enabled on the interface. This is most easily achived by using writev() in all cases. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: import linux tap ioctl definitionsMark McLoughlin2009-10-273-17/+31
| | | | | | | | | | | | Making features dependent on the availability of newer versions if_tun.h is going to get seriously clumsy, so let's just import the definitions we need. It's only a small handful. If and when we're comfortable depending on 2.6.30 headers, we can remove this again. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: remove unused includes of if_tun.h and if_tap.hMark McLoughlin2009-10-273-18/+0
| | | | | | | Looks like these are just artifacts of vl.c being split up. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Revert "qcow2: Bring synchronous read/write back to life"Kevin Wolf2009-10-273-55/+5
| | | | | | | | It was merely a workaround and the real fix is done now. This reverts commit ef845c3bf421290153154635dc18eaa677cecb43. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* linux-aio: Honour AsyncContextKevin Wolf2009-10-271-15/+72
| | | | | | | | Also for Linux AIO, don't call callbacks that don't belong to the active AsyncContext. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* posix-aio-compat: Honour AsyncContextKevin Wolf2009-10-271-0/+12
| | | | | | | Don't call callbacks that don't belong to the active AsyncContext. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block: Use new AsyncContext for bdrv_read/write emulationKevin Wolf2009-10-271-4/+18
| | | | | | | | 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>
* Introduce contexts for asynchronous callbacksKevin Wolf2009-10-273-7/+110
| | | | | | | | | 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>
* Split out bottom halvesKevin Wolf2009-10-274-105/+132
| | | | | | | | 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>
* Add qemu_aio_process_queue()Kevin Wolf2009-10-275-6/+50
| | | | | | | | | 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>
* posix-aio-compat: Split out posix_aio_process_queueKevin Wolf2009-10-271-16/+27
| | | | | | | | 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>
* monitor: Convert do_closefd() to QObjectLuiz Capitulino2009-10-272-2/+3
| | | | | | | 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>
* monitor: Convert do_getfd() to QObjectLuiz Capitulino2009-10-272-2/+3
| | | | | | | 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>
* monitor: Convert do_eject() to QObjectLuiz Capitulino2009-10-272-2/+3
| | | | | | | 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>
* monitor: Convert do_pci_device_hot_remove() to QObjectLuiz Capitulino2009-10-273-3/+6
| | | | | | | | 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>
* monitor: Convert do_migrate_cancel() to QObjectLuiz Capitulino2009-10-273-3/+4
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_migrate_set_speed() to QObjectLuiz Capitulino2009-10-273-3/+4
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* monitor: Convert do_migrate() to QObjectLuiz Capitulino2009-10-273-3/+4
| | | | | | | | 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>
* monitor: Convert do_physical_memory_save() to QObjectLuiz Capitulino2009-10-272-2/+4
| | | | | | | 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>
* monitor: Convert do_memory_save() to QObjectLuiz Capitulino2009-10-272-2/+3
| | | | | | | 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>
* lsi_scsi: port to vmstateJuan Quintela2009-10-271-159/+83
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add VMSTATE_BUFFER_UNSAFEJuan Quintela2009-10-271-0/+9
| | | | | | | | 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>
* vmware_vga: port to vmstateJuan Quintela2009-10-271-72/+43
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmware_vga: the support to change dinamically depth is not thereJuan Quintela2009-10-271-1/+1
| | | | | | | 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>
* vmware_vga: scratch is really an array of uint32_tJuan Quintela2009-10-271-2/+8
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmware_vga: remove !EMBED_STDVGA codeJuan Quintela2009-10-271-25/+0
| | | | | | | | 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>
* vmware_vga: qemu_malloc() returns void *Juan Quintela2009-10-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmware_vga: Remove uselss casts from void *Juan Quintela2009-10-271-16/+16
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmware_vga: Pass pci_vmsga_state_t arg no VGACommonStateJuan Quintela2009-10-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: remove unused vga_common_save/loadJuan Quintela2009-10-272-12/+0
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: port vga-pci to vmstateJuan Quintela2009-10-271-23/+11
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: port vmware std vga to vmstateJuan Quintela2009-10-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: port vga-isa to vmstateJuan Quintela2009-10-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: port vga-isa-mm to vmstateJuan Quintela2009-10-271-1/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: port vga_common_save/load to vmstateJuan Quintela2009-10-272-80/+55
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: create is_vbe_vmstate fieldJuan Quintela2009-10-272-7/+11
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* e1000: port to vmstateJuan Quintela2009-10-271-163/+81
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* e1000: unfold mac_regarraystosave arrayJuan Quintela2009-10-271-16/+14
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* e1000: unfold mac_reg_tosave arrayJuan Quintela2009-10-271-13/+74
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ne2000: port to vmstateJuan Quintela2009-10-273-88/+50
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pcnet: port to vmstateJuan Quintela2009-10-273-72/+40
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud