Remove aio_ctx from paio_* interface
The context parameter in paio_submit isn't used anyway, so there is no reasonwhy block drivers should need to remember it. This also avoids passing a LinuxAIO context to paio_submit (which doesn't do any harm as long as the parameter...
Add *CFLAGS to LINK in rules.mak
Sometimes when linking with gcc to get a predictable result you are suggested to also apply the compiler flags to the linker command.
For reference, please read:http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Link-Options.html...
usb-host: use qdev for -usbdevice + rework.
Changes:
usb: print attached status in info qtree
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
serial: Support additional serial speed values
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
serial: Add missing bit
Serial frames always start with a start bit.This bit was missing in frame size calculation.
usb-serial and braille: use qdev for -usbdevice
usb: make attach optional.
Add a auto_attach field to USBDevice, which is enabled by default.USB drivers can clear this field in case they do not want the devicebeing attached (i.e. plugged into a usb port) automatically aftersuccessfull init().
Use cases (see next patches):...
usb-storage: use qdev for -usbdevice
Hook up usb_msd_init.
Also rework handling of encrypted block devices,move the code out vl.c.
usb core: use qdev for -usbdevice
This patchs adds infrastructure to handle -usbdevice via qdev callbacks.USBDeviceInfo gets a name field (for the -usbdevice driver name) and acallback for -usbdevice parameter parsing.
The new usbdevice_create() function walks the qdev driver list and looks...
usb-hid: use qdev for -usbdevice
net: move UFO support detection to tap-linux.c
Only supported on Linux
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rom loader: use qemu_strdup.
rom loader: make vga+rom loading configurable.
The rom_add_vga() and rom_add_option() macros are transformed intofunctions. They look at the new rom_enable_driver_roms variableand only do something if it is set to non-zero, making vga+option romloading runtime option. pc_init() sets rom_enable_driver_roms to 1....
vga roms: move loading from pc.c to vga drivers.
use rom loader for pc bios.
The pc bios shows up in 'info roms' now.
Note that the BIOS is mapped to two places: The complete rom at the topof the memory, and the first 128k at 0xe0000. Only the first place islisted in 'info roms'.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
net: move AIX code into net/tap-aix.c
Okay, this makes the tap options available on AIX even though there'sno support, but if we want to do it right we should have not compilethe tap code at all on AIX using e.g. CONFIG_TAP.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
build: add CONFIG_LINUX
So I can add a tap-linux.c and use CONFIG_LINUX to pull it inin Makefile
net: move linux code into net/tap-linux.c
net: move tap_set_sndbuf() to tap-linux.c
TUNSETSNDBUF is only available on linux
net: move tap_probe_vnet_hdr() to tap-linux.c
Only Linux has support for IFF_VNET_HDR
net: move tap_set_offload() code into tap-linux.c
TUNSETOFFLOAD is only available on Linux
net: move tap-win32.c under net/
net: move more stuff into net/tap-win32.c, add net/tap.h
net: move tap-linux.h under net/
net: split all the tap code out into net/tap.c
net: split BSD tap_open() out into net/tap-bsd.c
net: move solaris code to net/tap-solaris.c
net: move net-queue.[ch] under net/
[v2: handle building in a separate dir]
net: move net-checksum.c under net/
Also add a new net/checksum.h header
Revert "char: emit the OPENED event only when a new char connection is opened"
This reverts commit 6cfa64de908d67fb6f6b6e3ae4888dd863f69e44.
This breaks the monitor prompt. Proper fix will come from Amit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-net: add tap_has_ufo flag to saved state
If we tell the guest we support UFO and then migrate to host whichdoesn't support it, we will find ourselves in grave difficulties.
Prevent this scenario by adding a flag to virtio-net's savevm formatwhich indicates whether the device requires host UFO support....
Fix signature of new_vlan_client
really fix net.h
Work around dhclient brokenness
With the latest GSO/csum offload patches, any guest using an unpatched versionof dhclient (any Ubuntu guest, for instance), will no longer be able to geta DHCP address.
dhclient is actually at fault here. It uses AF_PACKET to receive DHCP responses...
Enable UFO on virtio-net and tap devices
Enable UFO on the host tap device if supported and allow setting UFOon 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>
virtio-net: enable tap offload if guest supports it
We query the guest's feature set to see if it supports offload and,if so, we enable those features on the tap interface.
net: add tap_set_offload()
This API allows virtio-net to enable various offload features on atap interface - e.g. to tell the host kernel it can pass up partialchecksums to userspace.
net: add flags parameter to packet queue interface
This allows for the addition of a raw flag, and leaves the way openfor other flags too.
net: add an API for 'raw' packets
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.
net: add receive_raw parameter to qemu_new_vlan_client()
Trivial patch to allow supplying a receive_raw function.
A future cleanup should combine this function pointer parameters into atable.
net: use qemu_send_packet_raw() in qemu_announce_self()
Use qemu_send_packet_raw to send gratuitous arp. This will ensure thatvnet header is handled properly.
Also, avoid sending the gratuitous packet to the guest. There doesn'tappear to be any reason for doing that and the code will currently just...
net: implement tap support for receive_raw()
tap_receive_raw() always prepends a vnet header if IFF_VNET_HDR isenabled.
tap_receive() only prepends when the a header is required but the NICdoesn't supply one.
virtio-net: add vnet_hdr support
With '-netdev tap,id=foo -nic model=virtio,netdev=foo' virtio-net candetect that its peer (i.e. the tap backend) supports vnet headersand advertise to the guest that it can send packets with partialchecksums and/or TSO packets....
net: import linux tap ioctl definitions
Making features dependent on the availability of newer versions if_tun.his going to get seriously clumsy, so let's just import the definitionswe need. It's only a small handful.
If and when we're comfortable depending on 2.6.30 headers, we can remove...
net: make tap_receive() re-use tap_receive_iov() code
In future we will want to prepend a virtio_net header if the NIC didn'tsupply one but IFF_VNET_HDR is enabled on the interface. This is mosteasily achived by using writev() in all cases.
net: enable IFF_VNET_HDR on tap fds if available
For now, we just add an empty header before writing and strip the headerafter reading.
We really only want IFF_VNET_HDR when virtio_net is using it, but itwould significantly complicate matters to try and do that. There should...
net: refactor tap initialization
Re-factor things so that there is only one call site fornet_tap_fd_init().
Two concerns about the QemuOpts usage here - firstly, we set the scriptarguments to their default value and, secondly, we set the ifname valueto the name allocated by the kernel if none is supplied. Are we okay...
net: add a vnet_hdr=on|off parameter
This allows people to disable the IFF_VNET_HDR flag, e.g. for debuggingpurposes or if they know they may migrate the guest to a machine withoutIFF_VNET_HDR support.
It also allows making the lack of IFF_VNET_HDR support an error...
net: add a client type code
This is so as to allow APIs which operate on specific client typeswithout having to add a function table entry which is only implementedby a single client type.
net: add tap_has_vnet_hdr() and tap_using_vnet_hdr() APIs
These lamely named functions allow virtio-net to query whetherIFF_VNET_HDR is enabled on a tap interface and inform the tap codethat virtio-net will supply packets with a vnet header.
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 andcan be run then.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Split out bottom halves
Instead of putting more and more stuff into vl.c, let's have the genericfunctions that deal with asynchronous callbacks in their own file.
Introduce contexts for asynchronous callbacks
Add the possibility to use AIO and BHs without allowing foreign callbacks to berun. Basically, you put your own AIOs and BHs in a separate context. Fordetails see the comments in the source.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
block: Use new AsyncContext for bdrv_read/write emulation
bdrv_read/write emulation is used as the perfect example why we need somethinglike AsyncContexts. So maybe they better start using it.
posix-aio-compat: Honour AsyncContext
Don't call callbacks that don't belong to the active AsyncContext.
linux-aio: Honour AsyncContext
Also for Linux AIO, don't call callbacks that don't belong to the activeAsyncContext.
Revert "qcow2: Bring synchronous read/write back to life"
It was merely a workaround and the real fix is done now.This reverts commit ef845c3bf421290153154635dc18eaa677cecb43.
net: remove unused includes of if_tun.h and if_tap.h
Looks like these are just artifacts of vl.c being split up.
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>
monitor: Convert do_getfd() to QObject
monitor: Convert do_closefd() to QObject
posix-aio-compat: Split out posix_aio_process_queue
We need to process the request queue and run callbacks separately from readingout the queue in a later patch, so split it out.
vmware_vga: port to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Add VMSTATE_BUFFER_UNSAFE
Just sent <anything> as a buffer. We put the pointer and the sizecode does the rest.
lsi_scsi: port to vmstate
monitor: Convert do_memory_save() to QObject
monitor: Convert do_physical_memory_save() to QObject
monitor: Convert do_migrate() to QObject
Error is still directly printed, as we are only convertingregular output.
monitor: Convert do_migrate_set_speed() to QObject
monitor: Convert do_migrate_cancel() to QObject
monitor: Convert do_pci_device_hot_remove() to QObject
Errors are still directly printed, as we are only convertingregular output.
vmware_vga: Remove uselss casts from void *
vmware_vga: qemu_malloc() returns void *
vmware_vga: remove !EMBED_STDVGA code
It don't compile. And the trivial fixes (change vga.foo field to foo fielddon't work either. No output
vmware_vga: scratch is really an array of uint32_t
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
vga: port vga-isa-mm to vmstate
vga: port vga-isa to vmstate
vga: port vmware std vga to vmstate
vga: port vga-pci to vmstate
vga: remove unused vga_common_save/load
vmware_vga: Pass pci_vmsga_state_t arg no VGACommonState
e1000: unfold mac_reg_tosave array
e1000: unfold mac_regarraystosave array
e1000: port to vmstate
vga: create is_vbe_vmstate field
vga: port vga_common_save/load to vmstate
ne2000: port to vmstate
rtl8139: port to vmstate
eeprom93xx: port to vmstate
eepro100: port to vmstate
pcnet: port to vmstate
vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove it
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>
vmstate: Add version arg to VMSTATE_SINGLE_TEST()
This allows to define VMSTATE_SINGLE with VMSTATE_SINGLE_TESTSigned-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Add VMSTATE_BUFFER_UNUSED
It allows to have 'things' in savevm format not backed in the device stateSigned-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Add VMSTATE_MACADDR for the new type
vmstate: Introduce the concept of sub-arrays
VMSTATE_SUB_ARRAY(..., start, num, ...) saves the num elems starting atposition start of the arraySigned-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rtl8139: port TallyCounters to vmstate