summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fully split aio_pool from BlockDriverChristoph Hellwig2009-05-279-149/+121
| | | | | | | | | | | | | | Now that we have a separate aio pool structure we can remove those aio pool details from BlockDriver. Every driver supporting AIO now needs to declare a static AIOPool with the aiocb size and the cancellation method. This cleans up the current code considerably and will make it cleaner and more obvious to support two different aio implementations behind a single BlockDriver. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qcow: add qcow_aio_setup helperChristoph Hellwig2009-05-271-23/+29
| | | | | | | | | | | | [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 between the aio_readv and aio_writev methods. Based on the function with the same name in qcow2. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* raw-posix: fix hdev_createChristoph Hellwig2009-05-271-10/+1
| | | | | | | | | | | | | | | | We do need hdev_create unconditionally on all platforms so that qemu-img create support for host device works on all platforms. Also relax the check to allow character devices in addition to block devices. On many Unix platforms block devices have buffered block nodes and unbuffered character device nodes, and on FreeBSD the block nodes don't even exist anymore. Also on Linux we do support the /dev/sgN scsi passthrough devices through the host device driver, and probably the old-style /dev/raw/rawN raw devices although I haven't tested that. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fix raw_pread_aligned return valueChristoph Hellwig2009-05-271-1/+1
| | | | | | | | | | raw_pread_aligned currently returns the raw return value from lseek/read, which is always -1 in case of an error. But the callers higher up the stack expect it to return the negated errno just like raw_pwrite_aligned. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* VNC: Fix memory allocation (wrong structure size).Stefan Weil2009-05-271-2/+1
| | | | | | | | | | | | | | | Pointer vs addresses a VncDisplay structure, so it is sufficient to allocate sizeof(VncDisplay) or sizeof(*vs) bytes instead of the much larger sizeof(VncState). Maybe the misleading name should be fixed, too: the code contains many places where vs is used, sometimes it is a VncState *, sometimes it is a VncDisplay *. vd would be a better name. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Drop bdrv_create2Kevin Wolf2009-05-272-42/+24
| | | | | | | | This patch converts the remaining users of bdrv_create2 to bdrv_create and removes 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 onceKevin Wolf2009-05-271-4/+36
| | | | | | | | Don't write each single changed refcount block entry to the disk after it is written, but update all entries of the block and write all of them at once. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qcow2: Refactor update_refcountKevin Wolf2009-05-271-30/+56
| | | | | | | | | | This is a preparation patch with no functional changes. It moves the allocation of new refcounts block to a new function and makes update_cluster_refcount (for one cluster) call update_refcount (for multiple clusters) instead the other way round. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qcow/qcow2: Drop synchronous qcow_write()Kevin Wolf2009-05-272-77/+2
| | | | | | | | There is only one (internal) user left and it can be switched to the normal emulation provided in block.c Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* e1000: Ignore reset commandKevin Wolf2009-05-271-2/+9
| | | | | | | | | | When a reset is requested, the current e1000 emulation never clears the reset bit which may cause a driver to hang. This patch masks the reset bit out when setting the control registert, so the reset is immediately completed. Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix output of uninitialized stringsKevin Wolf2009-05-272-22/+11
| | | | | | | | | | | | | | | Commit ffad4116b96e29e0fbe892806f97c0a6c903d30d removed the "scratch buffer" from check_params, but didn't care for the error messages which actually included this string to tell the user which option was wrong. Now this string is uninitialized, so this patch removes it from the message. This means that the user is only told the whole parameter string and has to pick the wrong option by himself as the callers of check_params can't know this value any more. An alternative approach would be to revert that commit and do whatever is needed to fix the original problem without changing check_params. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* microblaze: Conditionalize FDT features.Edgar E. Iglesias2009-05-271-2/+17
| | | | | | 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.Edgar E. Iglesias2009-05-271-1/+3
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Make writes to MMU_ZPR flush the TLB.Edgar E. Iglesias2009-05-271-0/+7
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Correct typo.Edgar E. Iglesias2009-05-271-1/+1
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Hook into the build-system.Edgar E. Iglesias2009-05-262-1/+41
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add GDB stub support.Edgar E. Iglesias2009-05-261-0/+32
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add petalogix s3a1800dsp MMU linux ref-design.Edgar E. Iglesias2009-05-263-0/+245
| | | | | | | This setup was designed by petalogix and is supported by upstream linux. The design targets a xilinx spartan-3a-1800 dsp board with MMU. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* xilinx: Add ethlite emulation.Edgar E. Iglesias2009-05-261-0/+235
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* xilinx: Add uartlite emulation.Edgar E. Iglesias2009-05-261-0/+218
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* xilinx: Add OPB timer.Edgar E. Iglesias2009-05-261-0/+224
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* xilinx: Add interrupt controller.Edgar E. Iglesias2009-05-261-0/+167
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add CPU interrupt wrapper logic.Edgar E. Iglesias2009-05-261-0/+50
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add MMU emulation.Edgar E. Iglesias2009-05-262-0/+338
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add disassembler.Edgar E. Iglesias2009-05-263-0/+851
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: linux-user support.Edgar E. Iglesias2009-05-267-5/+474
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add syscall, signal and termbits defs for linux-user.Edgar E. Iglesias2009-05-264-0/+656
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add translation routines.Edgar E. Iglesias2009-05-267-0/+2305
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Remove temporary config-host.hPaul Brook2009-05-261-1/+8
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Remove qdev irq sink handlingPaul Brook2009-05-2618-43/+27
| | | | | | | We have both IRQ sinks and GPIO inputs. These are in principle exactly the same thing, so remove the former. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Add dummy command to submakefilesPaul Brook2009-05-252-0/+4
| | | | | | | Add a dummy command to the all: rule in sub-makefiles. This avoids "Nothing to be done for `all'." messages from make. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Remove unused variablePaul Brook2009-05-241-1/+0
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* ETRAX: Removed unused struct entry and fixed Windows build.Stefan Weil2009-05-231-1/+0
| | | | | | | | | | "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> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
* Add common BusStatePaul Brook2009-05-2330-135/+229
| | | | | | | | | | | Implement and use a common device bus state. The main side-effect is that creating a bus and attaching it to a parent device are no longer separate operations. For legacy code we allow a NULL parent, but that should go away eventually. Also tweak creation code to veriry theat a device in on the right bus. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Fix lance segfaultsPaul Brook2009-05-221-3/+6
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* Avoid errors when curl-config does not existPaul Brook2009-05-221-1/+1
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* bios: Use the correct mask to size the PCI option ROM BARAnthony Liguori2009-05-223-0/+34
| | | | | | | | Bit 0 is the enable bit, which we not only don't want to set, but it 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>
* x86: Add support for resume flagJan Kiszka2009-05-224-4/+17
| | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* net: Fix dump time stampsJan Kiszka2009-05-221-2/+2
| | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* Add HTTP protocol using curl v6Alexander Graf2009-05-224-1/+555
| | | | | | | | | | | | | | | Currently Qemu can read from posix I/O and NBD. This patch adds a third 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 don't know if you want to download it yet. Using this patch you can now try it on on the fly. Just use it like: qemu -cdrom http://host/path/my.iso Signed-off-by: Alexander Graf <agraf@suse.de>
* USB serial device supportJason Wessel2009-05-221-2/+1
| | | | | | | | | | | Add in a workaround to allow the usb serial devices to work with the usb pass through mechanism. The ioctl() to request an alternate interface will always return < 0 for a usb-serial device based on the kernel driver. This means there is no alternate interface end point. This was fully tested with a pl2303 usb serial device. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
* serial: fix lost character after sysrqJason Wessel2009-05-221-0/+2
| | | | | | | | | | | | | | | | | | | After creating an automated regression test to test the sysrq responses while running a linux image in qemu, I found that the simulated uart was eating the character right after the sysrq about 75% of the time. The problem is that the qemu sets the LSR_DR (data ready) bit on a serial break. The automated tests can send a break and the sysrq character quickly enough that the qemu serial fifo has a real character available. When there is valid character in the fifo, it gets consumed by the serial driver in the guest OS. The real hardware also appears to set the LSR_DR but always appears to have a null byte in this condition. This patch changes the qemu behavior to match the tested characteristics of a real 16550 chip. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
* usb-serial: implement break event.Jason Wessel2009-05-221-2/+10
| | | | | | | | | | | | | | 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 of making use of the event_trigger to form a urb to send over to the host controller with the serial break status set. This was tested against a linux development image which enables sysrq via a serial break on the ftdi usb console. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
* slirp: Reassign same address to same DHCP clientJan Kiszka2009-05-221-3/+5
| | | | | | | | In case a client restarts a DHCP recovery without releasing its old address, reassign the same address to prevent consuming free addresses and moving away from the standard client address. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* kvm: x86: Save/restore KVM-specific CPU statesJan Kiszka2009-05-225-3/+49
| | | | | | | | | | | | | | Save and restore all so far neglected KVM-specific CPU states. Handling the TSC stabilizes migration in KVM mode. The interrupt_bitmap and mp_state are currently unused, but will become relevant for in-kernel irqchip support. By including proper saving/restoring already, we avoid having to increment CPU_SAVE_VERSION later on once again. v2: - initialize mp_state runnable (for the boot CPU) Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Rework VCPU resetJan Kiszka2009-05-222-2/+8
| | | | | | | | | Use standard callback with highest order to synchronize VCPU on reset after all device callbacks were execute. This allows to remove the special kvm hook in qemu_system_reset. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Introduce reset notifier orderJan Kiszka2009-05-2274-105/+109
| | | | | | | | | | | | | | | Add the parameter 'order' to qemu_register_reset and sort callbacks on registration. On system reset, callbacks with lower order will be invoked before those with higher order. Update all existing users to the standard order 0. Note: At least for x86, the existing users seem to assume that handlers are called in their registration order. Therefore, the patch preserves this property. If someone feels bored, (s)he could try to identify this dependency and express it properly on callback registration. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Fix framebuffer dirty log syncJan Kiszka2009-05-221-4/+1
| | | | | | | | | kvm_physical_sync_dirty_bitmap() takes the end address as second argument, not the region size. Moverover, the kvm API should not be used directly here, but cpu_physical_sync_dirty_bitmap(). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Add missing bits to support live migrationJan Kiszka2009-05-224-1/+21
| | | | | | | | | | | | This patch adds the missing hooks to allow live migration in KVM mode. It adds proper synchronization before/after saving/restoring the VCPU states (note: PPC is untested), hooks into cpu_physical_memory_set_dirty_tracking() to enable dirty memory logging at KVM level, and synchronizes that drity log into QEMU's view before running ram_live_save(). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: Rework dirty bitmap synchronizationJan Kiszka2009-05-224-36/+52
| | | | | | | | | Extend kvm_physical_sync_dirty_bitmap() so that is can sync across multiple slots. Useful for updating the whole dirty log during migration. Moreover, properly pass down errors the whole call chain. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud