qdev: Tag isa-fdc, PIIX3 IDE and PIIX4 IDE as no-user
These devices are created automatically, and attempting to createanother one with -device fails with "qemu: hardware error:register_ioport_write: invalid opaque".
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
qcow2: Allow qcow2 disk images with size zero
Images with disk size 0 may be used forVM snapshots, but not to save normal block data.
It is possible to create such images usingqemu-img, but opening them later fails.
So even "qemu-img info image.qcow2" is not...
Added readonly flag to -drive command
This is a slightly revised patch for adding readonly flag to the -drive command.Even though this patch is "stand-alone", it assumes a previous related patch (in Anthony staging tree), that passesthe readonly attribute of the drive to the guest OS, applied first....
Pass the drive's readonly attribute to the guest OS
Implemented for virtio-blk and for scsi
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(x86/Sparc/PPC)-user: fix cpu_copy
b55a37c981914aa8ecd21b9a2a2fb37f39b917c5 moved the call to cpu_resetto user emulators. But cpu_copy also initializes a CPU structure, so add thecall also there.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
IDE: Fix reset handling
Problem: x86 systems could not survive a few system_resets.
Clear most of IDE state when reset. Implement the missing reset handlers.
user: move CPU reset call to main.c for x86/PPC/Sparc
PPC: rename cpu_ppc_reset to cpu_reset for consistency
Sparc64/x86: remove unneeded calls to device reset
PPC: remove unneeded calls to device reset
sparc32 (mostly): remove unneeded calls to device reset
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializingdevices. Since we are already registering them, calling qemu_system_reset()should suffice. Actually, it is what happens when we reboot the machine,...
vga: fix line comparison
Line counter doesn't wrap.
Signed-off-by: malc <av1474@comtv.ru>
vga: Respect Line Compare Register in text modes
Unbreaks setup screen of Act1/PL
Sparc: fix carry flag handling (Solaris bootblk fix)
The page 108 of the SPARC Version 8 Architecture Manual describesthat addcc and addxcc shall compute carry flag the same way.The page 110 claims the same about subcc and subxcc instructions.This patch fixes carry computation in corner cases and removes redundant code....
hw/sd: Support SDHC size cards
This patch adds SHDC support (-sd sd.img, where sd.img islarger than 1GB) to qemu.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Fix the build when srcdir objdir
You would only see this error on a fresh clone when srcdir objdir. configurewill fail because roms/pcbios doesn't exist.
git submodule integration doesn't cleanup very well when switching betweenbranches so you'll get an roms/pcbios directory from normal operations if you...
Unbreak Linux build
commit 71f4effce79ec0485586963ea764f2c212c72f26 Author: Alexander Graf <agraf@suse.de> Date: Fri Oct 30 22:27:00 2009 +0100
Unbreak tap compilation on OS X
Broke the build on Linux due to a bad #if guard
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update gpxe roms to have BANNER_TIMEOUT=0
Currently compiling the tap sources breaks on Mac OS X. This is because of:
1) tap-linux.h requiring Linux includes 2) typos 3) missing #includes
This patch adds what's necessary to compile tap happily on Mac OS X....
Revert "Fall back to network boot as the last possible boot option"
This reverts commit 94ca5a985919cca312c505bbb0c824d175cc6bb8.
Switch pc bios from pc-bios to seabios
SeaBIOS is a port of pc-bios to GCC. Besides using a more modern tool chain,SeaBIOS introduces a number of new features including PMM support, betterBEV and BCV support, and better PnP support.
Switch from etherboot to gPXE
etherboot is deprecated and not under active development anymore.
Remove e1000 rom loading hack
The gPXE rom supports BEV properly.
Fall back to network boot as the last possible boot option
This is similiar to the default with most bare metal systems.
virtio-net: fix macaddr config regression
This commit:
commit 97b15621 virtio: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
makes a guest using virtio-net see an empty macaddr because we never...
Update SeaBIOS to latest upstream
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...
qemu/virtio: make wmb compiler barrier + comments
wmb must be at least a compiler barrier, even without SMP.Further, we likely need some rmb()/mb() as well:I have not audited the code but lguest has mb(),add a comment for now.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
qemu/msix: fix table access issues
Fixes a couple of issues with msix table access:- With misbehaving guests, misaligned 4 byte access could overflow msix table and cause qemu to segfault. Since PCI spec requires host to only issue dword-aligned accesses, as a fix,...
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.
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.
vmstate: Add VMSTATE_BUFFER_UNSAFE
Just sent <anything> as a buffer. We put the pointer and the sizecode does the rest.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.