vmstate: port vmmouse device
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: port pckbd device
vmstate: add uint64 array support
vmstate: port ioapic device
hpet: it is imposible that qemu_timer field is NULL at this point
vmstate: port dma device
vmstate: port fw_cfg device
vmstate: port i8259 device
vmstate: add support for uint8_t equal
vmstate: port fdc device
We can't move fifo back to an embeded array because it needs to be aligned
vmstate: add support for arrays of uint16_t
Make get_ticks_per_sec() a static inline
ticks_per_sec is a constant. There's no need to store it as a variable as itnever changes since our time is based on units.
Convert get_ticks_per_sec() to a static inline and move the constant intoqemu-timer.h. Remove all references to QEMU_TIMER_BASE so that we consistently...
vmstate: add sensible arguments to vmstate_unregister()
vmsd alone is not enugh, because we can have several structs saved with the same description (vmsd).
vmstate: rename run_after_load() -> post_load()
This naming was used in kvm tree, and is easier to remember
vmstate: Add pre_load() hook
vmstate: Add pre/post_save() hooks
vmstate: port cpu_comon
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
timers: Createt TimersState and put all timers state there
timers: move them to VMState
timers: remove useless check
loadvm_state is called from: vl.c during startup, vmstart() is called after finishing loading. The other caller do_loadvm() does the call after a vm_stop(). At both places where we can be saving state we are stoped a few lines before...
ram: remove support for loading v1
ram: Remove SaveVM Version 2 support
It don't work. It fails in this check
if (qemu_get_be32(f) != last_ram_offset)
With 512MB of ram, values were for me:
v = 20c00000 last_ram_offset = 20840000
Last time that some code changed that was this one....
Remove SaveVM v2 support
In previosu series I remove v2 support for RAM (that was the version that wassupported when SaveVM v3 appeared). Now we can't load RAM for any image saved in SaveVM v2, we can as well remove SaveVM v2 entirely.
Note: That SaveVM RAM was at v2 when General SaveVM support went from v2 to v3 makes talking about versions confusing at least...
convert windows console chardev to QemuOpts.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
convert tty + parport chardevs to QemuOpts.
new cmd line syntax: -chardev tty,id=name,path=/dev/tty* -chardev parport,id=name,path=/dev/parport*
convert vc chardev to QemuOpts.
new cmd line syntax: -chardev vc,id=name -chardev vc,id=name,width=pixels,height=pixels -chardev vc,id=name,cols=chars,rows=chars
convert mux chardev to QemuOpts.
new cmd line syntax: you can add mux=1 to any chardev to enable muxing,then attach it multiple times, like this:
-chardev pty,name=mux,mux=on
convert udp chardev to QemuOpts.
While being at it: create a new inet_dgram_opts() function for udp setup,so udp can handle IPv6 now.
new cmd line syntax: -chardev udp,id=name,host=remotehost,port=remoteport,\ localaddr=bindaddr,localport=bindport...
Allow -serial chardev:<name>
Lets put -chardev into use now. With this patch applied chardev:name isaccepted as chardev specification everywhere, i.e. now you can:
-chardev stdio,id=ttyS0 -serial chardev:ttyS0
which does the same as '-serial stdio"....
qdev: add parser for chardev properties
monitor: fix muxing
make the mux driver send mux_in and mux_out events when switchingfocus while hooking up more handlers.
stop using CharDriverState->focus in monitor.c, track state usingthe mux events instead. This also removes the implicit assumtion...
move mux focus field from CharDriverState to MuxDriver
Now that monitor stopped using focus we can make it internalto the mux driver.
sockets: add unix_connect_opts
Add unix_connect_opts(). Does the same as unix_connect(), but usesQemuOpts. unix_connect() is a compatibility wrapper forunix_connect_opts() now and should go away some day.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
sockets: add unix_listen_opts
Add unix_listen_opts(). Does the same as unix_listen(), but usesQemuOpts. unix_listen() is a compatibility wrapper forunix_listen_opts() now and should go away some day.
sockets: add unix_*_opts for windows.
Add unix_*_opts function dummys for windows.
sockets: add inet_connect_opts
Add inet_connect_opts(). Does the same as inet_connect(), but usesQemuOpts. inet_connect() is a compatibility wrapper forinet_connect_opts() now and should go away some day.
sockets: add inet_listen_opts
Add inet_listen_opts(). Does the same as inet_listen(), but usesQemuOpts. inet_listen() is a compatibility wrapper forinet_listen_opts() now and should go away some day.
convert unix+tcp chardevs to QemuOpts.
new cmd line syntax: unix socket: -chardev socket,id=name,path=/path/to/socket tcp socket: -chardev socket,id=name,host=hostaddr|ipaddr,port=portnr
server and nowait options work as usual. Alternatively you can use...
convert pty chardev to QemuOpts.
convert stdio chardev to QemuOpts.
convert msmouse chardev to QemuOpts.
convert braille chardev to QemuOpts.
VirtIO: Fix QEMU crash during Windows PNP tests
Hello,
In some cases bus driver can deassert "bus master" bit in PCI commandregister. The driver will no longer be able to update related registers inthe device. Eventually it will cause QEMU to exit in "virtqueue_num_heads"...
qdev: Fix i6300 upcast
Use DO_UPCAST() instead of container_of() to go from PCIDevice toI6300State. This ensures that PCIDevice is the first member of structI6300State.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QemuOpts: split option parser into two functions.
looking for id= and creating a new QemuOpts instance is splitted fromthe actual option parser code now, so the parser can be called fromother contexts too.
qemu-option.h include protectors
qemu-option.h has no protection against including it twice.This patch adds the usual "#ifndef header" bits.
switch chardev to QemuOpts: infrastructure, null device
start switching chardevs to QemuOpts. This patch adds theinfrastructure and converts the null device.
The patch brings two new functions:
qemu_chr_open_opts() same as qemu_chr_open(), but uses QemuOpts instead of a...
convert file+pipe chardevs to QemuOpts.
new cmd line syntax: -chardev file,id=name,path=/path/to/file -chardev pipe,id=name,path=/path/to/pipe
qemu: make virtio-blk PCI compliant by default
commit bf011293faaa7f87e4de83185931e7411b794128 made virtio-blk-pci notPCI-compliant, since it makes region 0 (which is an i/o region)size > 256, and, since PCI 2.1, i/o regions are limited to 256 bytes size....
qemu: init all queues to NO_VECTOR value
initialize vectors for all vqs to VIRTIO_NO_VECTOR rather than 0 whichis a valid vector. This fixes migration which happened before driverwas loaded.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Reported-by: Amit Shah <amit.shah@redhat.com>...
block: add enable_write_cache flag
Add a enable_write_cache flag in the block driver state, and use it todecide if we claim to have a volatile write cache that needs controlledflushing from the guest. The flag is off if cache=writethrough isdefined because O_DSYNC guarantees that every write goes to stable...
block: use fdatasync instead of fsync if possible
If we are flushing the caches for our image files we only care about thedata (including the metadata required for accessing it) but not thingslike timestamp updates. So try to use fdatasync instead of fsync to...
block: add aio_flush operation
Instead stalling the VCPU while serving a cache flush try to do itasynchronously. Use our good old helper thread pool to issue anasynchronous fdatasync for raw-posix. Note that while Linux AIOimplements a fdatasync operation it is not useful for us because...
ide: use bdrv_aio_flush
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-blk: add volatile writecache feature
Add a new VIRTIO_BLK_F_WCACHE feature to virtio-blk to indicate that we havea volatile write cache that needs controlled flushing. Implement aVIRTIO_BLK_T_FLUSH operation to flush it.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
usb-linux.c: fix buffer overflow
In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer andlength to the kernel. However, the length was provided by the callerof dev->handle_packet, and is not checked, so the kernel might providetoo much data and overflow our buffer....
Fix conditional compilation (MIPS host)
Compilation for MIPS host (not part of official QEMU)checks __mips_isa_rev which is not always defined.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "don't call cpu_sychronize_state from reset handlers"
This reverts commit 733318ea9c6d846a6a047b87619e7d9d6e9707d1.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add bdrv_aio_multiwrite
One performance problem of qcow2 during the initial image growth aresequential writes that are not cluster aligned. In this case, when a firstrequests requires to allocate a new cluster but writes only to the firstcouple of sectors in that cluster, the rest of the cluster is zeroed - just...
virtio-blk: Use bdrv_aio_multiwrite
It is quite common for virtio-blk to submit more than one write request in arow to the qemu block layer. Use bdrv_aio_multiwrite to allow block drivers tooptimize its handling of the requests.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
microblaze: Trap if QEMU finds an unknown insns.
If PVR settings enable illegal insn trap, trap when QEMU finds aninsn it knows nothing about.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Correct prio between MMU and unaligned exceptions.
The microblaze gives MMU faults priority. For stores we stillhave a flaw that the value leaks to memory in the case of anunaligned exception.
microblaze: HW Exception fixes.
Update OpenBIOS images to r577
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
X86_64: Use proper jumps/calls when displacement exceeds +-2G
Signed-off-by: malc <av1474@comtv.ru>
Remove bit-rotten threshold handling
Thanks to Toshiya Takeda for bringing up an unrelated issue which ledto this.
F_DUPFD_CLOEXEC is not universally available
The same issue (and the same patch to the byte) was experienced/proposedby Vince Weaver.
Add information w.r.t default GUS IRQ assigment
Fix formatting
Fix formatting, get rid of conf and fix description
Fix formatting and and description field
qdev/isa: convert ne2000
Also split the isa bits into a separate source file, so we don't drag ina dependency for isa-bus.o for machines which want ne2k_pci only.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qdev/isa: finish pckbd conversion
drop old init path and switch remaining users toisa_create_simple().
qdev/isa: convert real time clock
qdev/isa: convert soundblaster
qdev/isa: convert cs4231a sound card
qdev/isa: convert gravis ultrasound
qdev: simplify isa irq assignments
isa-bus owns the isa irqs now, so it can hand them out directly.There is no need for the separate isa_connect_irqs step, drop it.
Also hard-code isa interrupts which can't be configured anyway.
qdev: tag isabus-bridge as no-user
isabus-bridge isn't supposed to be added via -device ...
qdev: add isa_create() function
Like isa_create_simple, but doesn't call qdev_init, so one can setproperties after creating and before initializing the device.
isapc: pick a more sane default cpu for such old hardware.
qdev: add property type for 32bit signed integers.
qdev: drop iobase properties from isa bus
Lot of ISA devices work at fixed addresses, so having iobaseas bus property doesn't make much sense. Devices which canhave different iobases will get a device property.
Also simply hard-code stuff which can't be configured anyway....
isapc: Fix irq routing
Only send irqs to ioapic in case we have one.Fixes qemu segfault.
Allow to unscale the output window with a Ctrl-Alt-u hotkey
Fix VMSTATE_PCI_DEVICE version
PCI device entries have to have a default version, not 2, because they areused in the midle of other structures that can have any version number.
We can't use proper versioning here until we have SubSections support.Why we didn't noticed before? Because in a PC, the only device ported with...
configure: fix Linux AIO detection
We should set $linux_aio to 'no' if detection failed, otherwiseits contents will be empty, which is a bug as we test for 'yes'or 'no'.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back to non-accelerated mode
qemu-kvm: fix segfault when running kvm without /dev/kvm, falling backto non-accelerated mode
We're seeing segfaults on systems without access to /dev/kvm. It...
RTC polling mode broken
The RTC emulation does not set the IRQ flags independent of the IRQ enable bits.
The original MC146818A datasheet from 1984 notes: "flag bits in Register C [...] are set independent of the state of the corresponding enable bits in Register B"...
don't call cpu_sychronize_state from reset handlers
Doing this will make the vcpu ioctl be issued from the I/O thread, insteadof cpu thread. The correct behaviour is to call it from within the cpu thread,as soon as we are ready to go.
Signed-off-by: Glauber Costa <glommer@redhat.com>...
otionrom: Use local CFLAGS no global one
It is needed by %.o : %.c rule.
optionrom: make clean should remove raw and .d
fix VNC SASL detection
This test was missing the change to != no.
qcow2: Fix metadata preallocation
The wrong version of the preallocation patch has been applied, so this is theremaining diff.
We can't use truncate to grow the image file to the right size because we don'tknow if metadata has been written after the last data cluster. In this case...
qcow2: Order concurrent AIO requests on the same unallocated cluster
When two AIO requests write to the same cluster, and this cluster isunallocated, currently both requests allocate a new cluster and the second onemerges the first one when it is completed. This means an cluster allocation, a...
Fix compilation warnings when DEBUG_BUFFERED_FILE is defined
gcc 4.3.2 throws warnings when DEBUG_BUFFERED_FILE is defined, becausewe are using the wrong format specifiers to print size_t/ssize_t values.
Remove CFLAGS parameter in cc-option
With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS
mv from strdup to qemu_strdup in qemu-option.c
one place is using strdup() instead of qemu_strdup
Fix it
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix for commit 3f9cb1c14dc368f41447db5f78d6248c4f100ad4
Here's a patch to fix the issue introduced by me, as Reimar Döffinger pointed out,
Reimar Döffinger wrote:
On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote: Bug fix for segfault when run as i82551 HW:...
On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote:
Bug fix for segfault when run as i82551 HW:...