summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* net: move more stuff into net/tap-win32.c, add net/tap.hMark McLoughlin2009-10-301-0/+1
| | | | | Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* net: move net-checksum.c under net/Mark McLoughlin2009-10-303-0/+3
| | | | | | | Also add a new net/checksum.h header Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-net: add tap_has_ufo flag to saved stateMark McLoughlin2009-10-271-2/+21
| | | | | | | | | | | | | | | | If we tell the guest we support UFO and then migrate to host which doesn't support it, we will find ourselves in grave difficulties. Prevent this scenario by adding a flag to virtio-net's savevm format which indicates whether the device requires host UFO support. [v2: - add has_ufo uint8_t field for ease of vmstate conversion - use qemu_error() ] Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Enable UFO on virtio-net and tap devicesSridhar Samudrala2009-10-271-2/+9
| | | | | | | | | Enable UFO on the host tap device if supported and allow setting UFO on virtio-net in the guest. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Work around dhclient brokennessAnthony Liguori2009-10-271-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | With the latest GSO/csum offload patches, any guest using an unpatched version of dhclient (any Ubuntu guest, for instance), will no longer be able to get a DHCP address. dhclient is actually at fault here. It uses AF_PACKET to receive DHCP responses but does not check auxdata to see if the packet has a valid csum. This causes it to throw out the DHCP responses it gets from the virtio interface as there is not a valid checksum. Fedora has carried a patch to fix their dhclient (it's needed for Xen too) but this patch has not made it into a release of dhclient. AFAIK, the patch is in the dhclient CVS but I cannot confirm since their CVS is not public. This patch, suggested by Rusty, looks for UDP packets (of a normal MTU) and explicitly adds a checksum to them if they are missing one. This allows unpatched dhclients to continue to work without needing to update the guest kernels. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-net: enable tap offload if guest supports itMark McLoughlin2009-10-271-0/+18
| | | | | | | | We query the guest's feature set to see if it supports offload and, if so, we enable those features on the tap interface. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-net: add vnet_hdr supportMark McLoughlin2009-10-271-7/+44
| | | | | | | | | | | | | | | | | | | | With '-netdev tap,id=foo -nic model=virtio,netdev=foo' virtio-net can detect that its peer (i.e. the tap backend) supports vnet headers and advertise to the guest that it can send packets with partial checksums and/or TSO packets. One complication is that if we're migrating and the source host supports IFF_VNET_HDR but the destination host doesn't, we can't then stop the guest from using those features. In this scenario, we just fail the migration. [v2: - add has_vnet_hdr uint32_t field for ease of vmstate conversion - use qemu_error() ] 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-276-6/+6
| | | | | | | | | | 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 a client type codeMark McLoughlin2009-10-276-6/+12
| | | | | | | | | 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>
* monitor: Convert do_pci_device_hot_remove() to QObjectLuiz Capitulino2009-10-271-1/+2
| | | | | | | | 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>
* 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>
* eepro100: port to vmstateJuan Quintela2009-10-271-134/+60
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* eeprom93xx: port to vmstateJuan Quintela2009-10-271-53/+49
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rtl8139: port to vmstateJuan Quintela2009-10-271-216/+85
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rtl8139: port TallyCounters to vmstateJuan Quintela2009-10-271-26/+24
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Introduce the concept of sub-arraysJuan Quintela2009-10-271-0/+19
| | | | | | | 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>
* vmstate: Add VMSTATE_MACADDR for the new typeJuan Quintela2009-10-271-0/+12
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Add VMSTATE_BUFFER_UNUSEDJuan Quintela2009-10-271-0/+18
| | | | | | 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>
* vmstate: Add version arg to VMSTATE_SINGLE_TEST()Juan Quintela2009-10-271-11/+6
| | | | | | 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>
* vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes)Juan Quintela2009-10-271-1/+12
| | | | | | It don't check types. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove itJuan Quintela2009-10-272-7/+1
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: factor VMSTATE_*BUFFER* definitionsJuan Quintela2009-10-271-33/+14
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: factor vmstate_offset_bufferJuan Quintela2009-10-271-6/+7
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: factor vmstate_offset_arrayJuan Quintela2009-10-271-10/+9
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: factor vmstate_offset_pointerJuan Quintela2009-10-271-2/+5
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: factor vmstate_offset_valueJuan Quintela2009-10-271-18/+13
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: fix indentationJuan Quintela2009-10-271-6/+6
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: Rename VMS_VARRAY to VMS_VARRAY_INT32Juan Quintela2009-10-272-5/+5
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vmstate: add VMSTATE_UINT16_EQUAL[_V]Juan Quintela2009-10-271-0/+7
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* serial: use post_load version_id field and remove pre_load functionJuan Quintela2009-10-271-8/+3
| | | | | Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud