slirp: Avoid zombie processes after fork_exec
Slirp uses fork_exec for spawning service processes, and QEMU uses thisfor running smbd. As SIGCHLD is not handled, these processes becomezombies on termination. Fix this by installing a proper signal handler,...
Revert "Fix output of uninitialized strings"
This reverts commit 8cf07dcbe7691dbe4f47563058659dba6ef66b05.
This is a sorry saga.
This commit:
8e4416af45 net: Add parameter checks for VLAN clients
broken '-net socket' and this commit:
ffad4116b9 net: Fix -net socket parameter checks...
net: Real fix for check_params users
OK, last try: 8e4416af45 broke -net socket, ffad4116b9 tried to fix itbut broke error reporting of invalid parameters. So this patch widelyreverts ffad4116b9 again and intead fixes those callers of check_paramsthat originally suffered from overwritten buffers by using separate...
net: fix error reporting for some net parameter checks
A small bit of confusion between buffers is causing errors like:
qemu: invalid parameter '10' in 'script=/etc/qemu-ifup,fd=10'
instead of:
qemu: invalid parameter 'script' in 'script=/etc/qemu-ifup,fd=10'...
net: Improve parameter error reporting
As host network devices can also be instantiated via the monitor, errorsshould then be reported to the related monitor instead of stderr. Thisrequires larger refactoring, so this patch starts small with introducing...
slirp: Reorder initialization
This patch reorders the initialization of slirp itself as well as itsassociated features smb and redirection. So far the first reference toslirp triggered the initialization, independent of the actual -net useroption which may carry additional parameters. Now we save any request to...
net: factor tap_read_packet() out of tap_send()
Move portability clutter out into its own function.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
net: move the tap buffer into TAPState
KVM uses a 64k buffer for reading from tapfd (for GSO support)and allocates the buffer with TAPState rather than on the stack.
Not allocating it on the stack probably makes sense for qemuanyway, so merge it in advance of GSO support....
net: vlan clients with no fd_can_read() can always receive
If a vlan client has no fd_can_read(), that means it canalways receive packets. The current code assumes it can neverreceive packets.
net: only read from tapfd when we can send
Reduce the number of packets dropped under heavy networktraffic by only reading a packet from the tapfd when aclient can actually handle it.
net: add fd_readv() handler to qemu_new_vlan_client() args
This, apparently, is the style we prefer - all VLANClientStateshould be an argument to qemu_new_vlan_client().
net: re-name vc->fd_read() to vc->receive()
VLANClientState's fd_read() handler doesn't read from filedescriptors, it adds a buffer to the client's receive queue.
Re-name the handlers to make things a little less confusing.
net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors.
net: Don't deliver to disabled interfaces in qemu_sendv_packet
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Mark McLoughlin <markmc@redhat.com>
net: Fix and improved ordered packet delivery
Fix a race in qemu_send_packet when delivering deferred packets andadd proper deferring also to qemu_sendv_packet.
qdev: c99 initilaizers for bus_type_names
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xen nic: use XC_PAGE_SIZE instead of PAGE_SIZE.
xen nic: use qemu_malloc
kvm: Improve upgrade notes when facing unsupported kernels
Users complained that it is not obvious what to do when kvm refuses tobuild or run due to an unsupported host kernel, so let's improve thehints.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Fix generation of CONFIG_KVM
When configuring for several targets, some with KVM and some without, CONFIG_KVM was accidentally disabled for some of the targets.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Use hxtool for qemu-img command list
Use hxtool to generate the 'command syntax' section of qemu-img's helpmessage, and the corresponding section of the texinfo documentation.
This has the side-effect of adding 'check' to this list of commands inthe texinfo documentation....
doc: Update information on supported network adapters.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
xen: net backend doesn't need linux headers.
Drop them to make qemu build on OpenSolaris.
Cc: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Document changes in qemu-img interface
Update the documentation to reflect the introduction of format specific optionswith -o. Don't advertise -e or -6 any more, they exist only for compatibilityreasons and can be replaced by the corresponding -o options....
qemu-img: Print available options with -o ?
This patch adds a small help text to each of the options in the block driverswhich can be displayed by using qemu-img create -f fmt -o ?
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fix spelling in comment.
Use hxtool to generate monitor documentation and C structures
Use correct type for SPARC cpu_cc_op
Signed-off-by: Paul Brook <paul@codesourcery.com>
Fix typo
qdev: add monitor command to dump the tree.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Paul Brook <paul@codesourcery.com>
Record device property types
Record device property types, and provide a list of properties at deviceregistration time.
Add a "device" property type that holds a reference to annother device.
Fix elf loader range checking
The ELF loader tracks the range of addresses used by a binary.However this incorrectly assumes zero is not a valid address.
Remove ARM NVIC initialization hack
The ARMv7-M NVIC device pokes itself into the CPU state. Now we have aproper device model we can have the CPU/SoC code do this.
Add --enable-debug
New configure option for debug builds.
qdev: kill DeviceState->name
is redundant with DeviceState->type->name
fix gdbstub support for multiple threads in usermode, v3
When debugging multi-threaded programs, QEMU's gdb stub would report thecorrect number of threads (the qfThreadInfo and qsThreadInfo packets).However, the stub was unable to actually switch between threads (the T...
CRIS: Remove duplicated flag defines.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Fix loading of petalogix s3adsp1800 dtb.
Provide a petalogix-s3adsp1800.dtb blob.Correct loading of the petalogix dtb.
Stellaris qdev conversion
Implement multiple samplers on stellaris ADC
Use relative path for bios
Look for bios and other support files relative to qemu binary, rather thana hardcoded prefix.
Update maintainer list.
Add myself as maintainer for the microblaze cpu and boards.Update list of CRIS machines.
Install keymaps from new location
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
User networking: Show active connections
In case you're wondering what connections exactly you have openor maybe redir'ed in the past, you can't really find out from qemuright now.
This patch enables you to see all current connections the hostonly networking holds open, so you can kill them using the previous...
Add detection of pthread library name
Try to detect the name of the pthread library.Currently it looks for "-pthread" and "-pthreadGC2".
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kvm: Mark full address range dirty on live migration start
As Avi correctly noted, last_ram_offset does not mark the last physicalRAM address the guest may see (due to non-continuous memory regions).Ensure that we catch them all by marking the full possible address range...
Move keymaps into pc-bios
This isn't the most ideal layout, but it makes -L /path/to/git/pc-bios JustWork which is very convenient.
vvfat: one more missing BlockDriver C99 initializer conversion
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
User Networking: Enable removal of redirections
Using the new host_net_redir command you can easily create redirectionson the fly while your VM is running.
While that's great, it's missing the removal of redirections, in case youwant to have a port closed again at a later point in time....
Allow monitor interaction when using migrate -exec
All, I've recently been playing around with migration via exec. Unfortunately,when starting the incoming qemu process with "-incoming exec:cmd", it suffersthe same problem that -incoming tcp used to suffer; namely, that you can't...
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.
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
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
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: 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.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
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().