fully split aio_pool from BlockDriver
Now that we have a separate aio pool structure we can remove thoseaio pool details from BlockDriver.
Every driver supporting AIO now needs to declare a static AIOPoolwith the aiocb size and the cancellation method. This cleans up the...
qcow: add qcow_aio_setup helper
[this one is required for [PATCH] fully split aio_pool from BlockDriver, sorry for not sending it out earlier]
Add a qcow_aio_setup helper to qcow to shared common code betweenthe aio_readv and aio_writev methods. Based on the function with...
raw-posix: fix hdev_create
We do need hdev_create unconditionally on all platforms so that qemu-imgcreate support for host device works on all platforms.
Also relax the check to allow character devices in addition to blockdevices. On many Unix platforms block devices have buffered block...
fix raw_pread_aligned return value
raw_pread_aligned currently returns the raw return value fromlseek/read, which is always -1 in case of an error. But thecallers higher up the stack expect it to return the negatederrno just like raw_pwrite_aligned....
VNC: Fix memory allocation (wrong structure size).
Pointer vs addresses a VncDisplay structure,so it is sufficient to allocate sizeof(VncDisplay)or sizeof(*vs) bytes instead of the much largersizeof(VncState).
Maybe the misleading name should be fixed, too:...
Drop bdrv_create2
This patch converts the remaining users of bdrv_create2 to bdrv_create andremoves the now unused function.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qcow2: Update multiple refcounts at once
Don't write each single changed refcount block entry to the disk after it iswritten, but update all entries of the block and write all of them at once.
qcow2: Refactor update_refcount
This is a preparation patch with no functional changes. It moves the allocationof new refcounts block to a new function and makes update_cluster_refcount (forone cluster) call update_refcount (for multiple clusters) instead the other way...
qcow/qcow2: Drop synchronous qcow_write()
There is only one (internal) user left and it can be switched to the normalemulation provided in block.c
e1000: Ignore reset command
When a reset is requested, the current e1000 emulation never clears thereset bit which may cause a driver to hang. This patch masks the resetbit out when setting the control registert, so the reset is immediatelycompleted....
Fix output of uninitialized strings
Commit ffad4116b96e29e0fbe892806f97c0a6c903d30d removed the "scratch buffer" from check_params, but didn't care for the error messages which actuallyincluded this string to tell the user which option was wrong. Now this string...
microblaze: Conditionalize FDT features.
If libfdt is not available, disable the fdt manipulation features.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
doc: Briefly mention CRIS and MicroBlaze.
microblaze: Make writes to MMU_ZPR flush the TLB.
microblaze: Correct typo.
microblaze: Add GDB stub support.
microblaze: Hook into the build-system.
microblaze: Add petalogix s3a1800dsp MMU linux ref-design.
This setup was designed by petalogix and is supported by upstream linux.The design targets a xilinx spartan-3a-1800 dsp board with MMU.
xilinx: Add ethlite emulation.
xilinx: Add uartlite emulation.
xilinx: Add OPB timer.
microblaze: Add CPU interrupt wrapper logic.
xilinx: Add interrupt controller.
microblaze: Add MMU emulation.
microblaze: linux-user support.
microblaze: Add disassembler.
microblaze: Add syscall, signal and termbits defs for linux-user.
microblaze: Add translation routines.
Remove temporary config-host.h
Signed-off-by: Paul Brook <paul@codesourcery.com>
Remove qdev irq sink handling
We have both IRQ sinks and GPIO inputs. These are in principle exactlythe same thing, so remove the former.
Add dummy command to submakefiles
Add a dummy command to the all: rule in sub-makefiles.This avoids "Nothing to be done for `all'." messages from make.
Remove unused variable
ETRAX: Removed unused struct entry and fixed Windows build.
"struct timeval last" caused a compilation error with mingw32(missing header for struct timeval).
It is unused, so it was possible to remove it.
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>...
Add common BusState
Implement and use a common device bus state. The main side-effect isthat creating a bus and attaching it to a parent device are no longerseparate operations. For legacy code we allow a NULL parent, but thatshould go away eventually....
Fix lance segfaults
Avoid errors when curl-config does not exist
x86: Add support for resume flag
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
bios: Use the correct mask to size the PCI option ROM BAR
Bit 0 is the enable bit, which we not only don't want to set, butit will stick and make us think it's an I/O port resource.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: Fix dump time stamps
serial: fix lost character after sysrq
After creating an automated regression test to test the sysrqresponses while running a linux image in qemu, I found that thesimulated uart was eating the character right after the sysrq about75% of the time.
The problem is that the qemu sets the LSR_DR (data ready) bit on a...
USB serial device support
Add in a workaround to allow the usb serial devices to work with theusb pass through mechanism. The ioctl() to request an alternateinterface will always return < 0 for a usb-serial device based on thekernel driver. This means there is no alternate interface end point....
Add HTTP protocol using curl v6
Currently Qemu can read from posix I/O and NBD. This patch adds athird protocol to the game: HTTP.
In certain situations it can be useful to access HTTP data directly,for example if you want to try out an http provided OS image, but...
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
kvm: Rework VCPU reset
Use standard callback with highest order to synchronize VCPU on resetafter all device callbacks were execute. This allows to remove thespecial kvm hook in qemu_system_reset.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm: x86: Save/restore KVM-specific CPU states
Save and restore all so far neglected KVM-specific CPU states. Handlingthe TSC stabilizes migration in KVM mode. The interrupt_bitmap andmp_state are currently unused, but will become relevant for in-kernel...
slirp: Reassign same address to same DHCP client
In case a client restarts a DHCP recovery without releasing its oldaddress, reassign the same address to prevent consuming free addressesand moving away from the standard client address.
usb-serial: implement break event.
Implement the serial break via usb serial.
The second data byte in ftdi status packet contains the break status.The values were already defined in usb-serial.c so it was a matter ofmaking use of the event_trigger to form a urb to send over to the host...
kvm: Introduce kvm_set_migration_log
Introduce a global dirty logging flag that enforces logging for allslots. This can be used by the live migration code to enable/disableglobal logging withouth destroying the per-slot setting.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
kvm: Fix dirty log temporary buffer size
The buffer passed to KVM_GET_DIRTY_LOG requires one bit per page. Fixthe size calculation in kvm_physical_sync_dirty_bitmap accordingly,avoiding allocation of extremly oversized buffers.
kvm: Rework dirty bitmap synchronization
Extend kvm_physical_sync_dirty_bitmap() so that is can sync acrossmultiple slots. Useful for updating the whole dirty log duringmigration. Moreover, properly pass down errors the whole call chain.
kvm: Add missing bits to support live migration
This patch adds the missing hooks to allow live migration in KVM mode.It adds proper synchronization before/after saving/restoring the VCPUstates (note: PPC is untested), hooks intocpu_physical_memory_set_dirty_tracking() to enable dirty memory logging...
kvm: Fix framebuffer dirty log sync
kvm_physical_sync_dirty_bitmap() takes the end address as secondargument, not the region size. Moverover, the kvm API should not be useddirectly here, but cpu_physical_sync_dirty_bitmap().
Convert qemu-img convert to new bdrv_create
This is part two of the qemu-img conversion. This really works the same as theprevious conversion of qemu-img create: It introduces a new -o option for thegeneric approach and adds the old-style options to this option set....
qcow2: Allow different cluster sizes
Add an option to specify the cluster size of a newly created qcow2 image.Default is 4k which is the same value that was hard-coded before.
kvm: Conditionally apply workaround for KVM slot handling bug
Only apply the workaround for broken slot joining in KVM when thecapability was not found that signals the corresponding fix existence.
allow changing the speed of a running migration
This patch allow us to call migrate_set_speed on runningmigrations. This should allow mgmt tools to increase the allocatedbandwidth of a running migration if there is no progress, and theyreally want the migration to succeed....
Create qemu-option.h
This patch creates a new header file and the corresponding implementation filefor parsing of parameter strings for options (like used in -drive). Part ofthis is code moved from vl.c (so qemu-img can use it later).
The idea is to have a data structure describing all accepted parameters. When...
Convert all block drivers to new bdrv_create
Now we can make use of the newly introduced option structures. Instead ofhaving bdrv_create carry more and more parameters (which are format specific inmost cases), just pass a option structure as defined by the driver itself....
Convert qemu-img create to new bdrv_create
This patch changes qemu-img to actually use the new bdrv_create interface. Ittranslates the old-style qemu-img options which have been bdrv_create2parameters or flags so far to option structures. As the generic approach, it...
introduce set_rate_limit function for QEMUFile
This patch converts the current callers of qemu_fopen_ops().
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix segv when passing an unknown protocol
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Minimal ethernet frame length is 64 bytes.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Don't send all gratuitous packets at once.
Use timer to separate them in time.
augment info migrate with page status
This should be enough for management tools to realizewhether or not there is progress in migration. We can...
Partially revert e20a8dff4c0da3827764924139d3bb73962f5d5a
From Paul Brook:
"the fdc is tied to the ISA DMA engine. We don't currently have a target independent method of handling inter-device data transfer."
Revert "Fix arm-softmmu breakage"
This reverts commit ec6bd8dea77478f32981a5df49f66ca2430ad19d.
This broke any target that uses virtio. Virtio devices live in libhw andwithout whole-archive, the constructors will never be called for virtio.
Refactor how display drivers are selected
My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). Thisis because it's necessary to tell when the no special display parameters havebeen passed and default to SDL or VNC appropriately.
This refactors the display selection logic to be less complicated which has...
Introduce is_default field for QEMUMachine
f80f9ec changed the order that machines are registered which had the effect ofchanging the default machine. This changeset introduces a new is_default fieldso that machine types can declare that they are the default for an architecture....
Fix arm-softmmu breakage
Don't use whole-archive for hwlib or libqemu objects
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile most Xen files only once
Compile fdc, escc and SCSI controllers only once
Let the venomous poison spread to more identifiers
Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.
Eliminate --disable-gfx-check and make VNC default when SDL not available
--disable-gfx-check predates VNC server support. It made sense back thenbecause the only thing you could do without SDL was use -nographic mode orsimilar tricks. Since this is a very advanced mode of operation, gfx-check...
Do not attempt to allocate sn_tab when there are no snapshots
This was caught by a7d27b536ffc0773028a90f14580552c0c3ddb2a whichaborted on this attempt, thanks to Alex Ivanov for report.
Signed-off-by: malc <av1474@comtv.ru>
Cast pointer arguments of get/setsockopt, send to void * to keep GCCfrom producing a warning about pointer type mismatches with Winsock
kvm: add error message for when SMP is requested
Right now, if you try e.g. '-smp 2' you just get 'failed toinitialize KVM'.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Remove initrd warning message
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
keep initrd in below 4g area.
initrd must be kept on the memory area below 4g. By not doing this,we're seeing guests break while using -initrd and values of -memsuperior to 4096.
Signed-off-by: Glauber Costa <glommer@redhat.com>
Fix NULL alarm_timer pointer at exit
This fixes a SIGSEGV error on qemu exit.
Here is the valgrind output related to this error
initialize struct sigevent before timer_create
When qemu is run under valgrind, valgrind shows the following outputon exit:
remove gcc 3.x requirement from documentation
This text is no longer accurate. After the patch is applied, thegenerated version at http://www.nongnu.org/qemu/qemu-doc.html should beregenerated.
This patch is also a candidate for the stable branch. (The URL above is...
kvm: work around supported cpuid ioctl() brokenness
KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIGwhen it runs out of entries. Detect this by always trying againwith a bigger table if the ioctl() fills the table.
migrate.c: migrate_fd_put_buffer: Do not busyloop: stop writing if EWOULDBLOCK
The migration code is non-blocking, designed for live migration.
Practically migrate_fd_put_buffer busy-loops trying to write, ason many machines EWOULDBLOCK==EAGAIN (look in include/asm-generic/errno.h)....
Remove dead code
Format per CODING_STYLE
Abort on attempts to allocate zero bytes
http://marc.info/?t=124267873300015&r=1&w=2
Unbreak out-of-tree builds
Hardware convenience library
The only target dependency for most hardware is sizeof(target_phys_addr_t).Build these files into a convenience library, and use that instead ofbuilding for every target.
Remove and poison various target specific macros to avoid bogus target...
Disable >4G ram support on 32-bit targets
If the target only has a 32-bit physical address space thenthe code to map >4G ram breaks horribly, and causes compiler warnings.
Only define __llseek if it is going to be used
Avoid implicit truncation compiler warnings
Remove obsolete BIOS_SIZE from sysemu.h
BIOS_SIZE is no longer needed by vl.c, so there's no point having it insysemu.h.
cris: First shot at qdev for CRIS interrupts.
etrax: Don't keep the passed irq pointer.
Copy passed irq object at channel connect.
etrax: Remove unused eth irq line.
The ethernet blocks irq line to report errors is unimplemented in QEMU.Remove it for now.
Syborg virtio bindings.
Implement Syborg device bindings for virtio-net.
Separate virtio PCI code
Split the PCI host bindings from the VRing transport implementation.
Only shutdown video subsytem in sdl_cleanup
Depending on the order in which atexit handlers are called SDL mighttry to join on an audio thread without said thread ever being notifiedthat it must stop, hence QEMU will forever block in pthread_join call....
Consistently use uint64_t for int properties
I apparently failed to do this properly on the first attempt.