summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "alpha-softmmu: Disable for the 0.15 release branch."Richard Henderson2011-09-211-0/+1
| | | | | | | | | This reverts commit 46f08792bb4a69ab8aab897c174d82b006026140. This was not supposed to be applied to mainline. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Merge remote-tracking branch 'mst-tmp/for_anthony' into stagingAnthony Liguori2011-09-2014-96/+110
|\
| * pci_bridge: simplify memory regions some moreMichael S. Tsirkin2011-09-202-13/+24
| | | | | | | | | | | | | | | | replace alloc/free with struct members. todo: smash with initial implementation after testing. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: implement bridge filteringMichael S. Tsirkin2011-09-194-76/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support bridge filtering on top of the memory API as suggested by Avi Kivity: Create a memory region for the bridge's address space. This region is not directly added to system_memory or its descendants. Devices under the bridge see this region as its pci_address_space(). The region is as large as the entire address space - it does not take into account any windows. For each of the three windows (pref, non-pref, vga), create an alias with the appropriate start and size. Map the alias into the bridge's parent's pci_address_space(), as subregions. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci_bridge: use parent bus's address spaceWen Congyang2011-09-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The switch to the new memory API caused the following problem: The pci device may call pci_register_bar() to use PCI bus's address space. But we don't init PCI bus's address space if it is not bus 0. A crash was reported: http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg02243.html More work will be needed to make bridge filtering work correctly with the memory API. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: Remove unused mem_base from PCIBusJan Kiszka2011-09-191-1/+0
| | | | | | | | | | | | | | Obsoleted by f64e02b6cc. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: interrupt pin documentation updateMichael S. Tsirkin2011-09-1910-14/+8
| | | | | | | | | | | | | | | | | | Fix up some erroneous comments in code: interrupt pins are named A-D, the interrupt pin register is always readonly and isn't zeroed out on reset. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: Remove unused pci_reserve_capabilityJan Kiszka2011-09-192-8/+0
| | | | | | | | | | | | | | eepro100 was the last user. Now pci_add_capability is powerful enough. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2011-09-2018-177/+254
|\ \
| * | rbd: allow escaping in config stringSage Weil2011-09-201-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | The config string is variously delimited by =, @, and /, depending on the field. Allow these characters to be escaped by preceeding them with \. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | linux-aio: remove process requests callbackPaolo Bonzini2011-09-201-10/+1
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | block: avoid SIGUSR2Frediano Ziglio2011-09-202-29/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that iothread is always compiled sending a signal seems only an additional step. This patch also avoid writing to two pipe (one from signal and one in qemu_service_io). Work with kvm enabled or disabled. strace output is more readable (less syscalls). [ kwolf: Merged build fix by Paolo Bonzini ] Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | scsi: fix sign extension problemsPaolo Bonzini2011-09-201-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assigning a 32-bit value to cmd->xfer (which is 64-bits) it can be erroneously sign extended because the intermediate 32-bit computation is signed. Fix this by standardizing on the ld*_be_p functions. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | rbd: call flush, if availableSage Weil2011-09-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | librbd recently added async writeback and flush support. If the new rbd_flush() call is available, call it. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | rbd: update comment headingSage Weil2011-09-201-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | Properly document the configuration string syntax and semantics. Remove (out of date) details about the librbd implementation. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | rbd: ignore failures when reading from default conf locationSage Weil2011-09-201-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we are reading from the default config location, ignore any failures. It is perfectly legal for the user to specify exactly the options they need and to not rely on any config file. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | AHCI Port Interrupt Enable register cleaning on soft resetAlexander Motin2011-09-201-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've found that FreeBSD AHCI driver doesn't work with AHCI hardware emulation of QEMU 0.15.0. I believe the problem is on QEMU's side. As I see, it clears port's Interrupt Enable register each time when reset of any level happens. Is is reasonable for the global controller reset. It is probably not good, but acceptable for FreeBSD driver for the port hard reset. But it is IMO wrong for the device soft reset. None of real hardware I know behaves that way. Signed-off-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | posix-aio-compat: Removed unused offset variableFrediano Ziglio2011-09-201-3/+2
| | | | | | | | | | | | | | | Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | VMDK: fix leak of extent_fileFam Zheng2011-09-201-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Release extent_file on error in vmdk_parse_extents. Added closing files in freeing extents. Signed-off-by: Fam Zheng <famcool@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | scsi-disk: lazily allocate bounce bufferPaolo Bonzini2011-09-201-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | It will not be needed for reads and writes if the HBA provides a sglist. In addition, this lets scsi-disk refuse commands with an excessive allocation length, as well as limit memory on usual well-behaved guests. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | scsi-disk: commonize iovec creation between reads and writesPaolo Bonzini2011-09-201-24/+18
| | | | | | | | | | | | | | | | | | | | | Also, consistently use qiov.size instead of iov.iov_len. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | dma-helpers: rewrite completion/cancellationPaolo Bonzini2011-09-201-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes various problems with completion/cancellation: * if the io_func fails to get an AIOCB, the callback wasn't called * If DMA encounters a bounce buffer conflict, and the DMA operation is canceled before the bottom half fires, bad things happen. * memory is not unmapped after cancellation, again causing problems when doing DMA to I/O areas * cancellation could leak the iovec * the callback was missed if the I/O operation failed without returning an AIOCB and probably more that I've missed. The patch fixes them by sharing the cleanup code between completion and cancellation. The dma_bdrv_cb now returns a boolean completed/not completed flag, and the wrapper dma_continue takes care of tasks to do upon completion. Most of these are basically impossible in practice, but it is better to be tidy... Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | dma-helpers: allow including from target-independent codePaolo Bonzini2011-09-201-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Target-independent code cannot construct sglists, but it can take them from the outside as a black box. Allow this. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | dma-helpers: rename is_write to to_devPaolo Bonzini2011-09-194-10/+10
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | scsi-generic: do not disable FUAPaolo Bonzini2011-09-191-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | I found no rationale for this in the logs, and it is quite bad because it will make scsi-generic unsafe WRT power failures. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | raw-posix: Fix bdrv_flush error return valuesKevin Wolf2011-09-191-1/+8
| | | | | | | | | | | | | | | | | | bdrv_flush is supposed to use 0/-errno return values Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | nbd: support NBD_SET_FLAGS ioctlPaolo Bonzini2011-09-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The nbd kernel module cannot enable DISCARD requests unless it is informed about it. The flags field in the header is used for this, and this patch adds support for it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | nbd: sync API definitions with upstreamPaolo Bonzini2011-09-192-1/+12
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | nbd: support feature negotiationPaolo Bonzini2011-09-194-19/+39
| |/ | | | | | | | | | | | | | | | | nbd supports writing flags in bytes 24...27 of the header, and uses that for the read-only flag. Add support for it in qemu-nbd. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'kiszka/queues/slirp' into stagingAnthony Liguori2011-09-201-0/+1
|\ \
| * | slirp: Fill TCP/IP header template after SYN receptionJan Kiszka2011-09-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures we can cleanly signal the drop in case the connection timer fires. So far we sent those frames to nowhere (target IP 0.0.0.0). Found by the new assertion on invalid IPs in arp_table_search. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* | | Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2011-09-2030-111/+292
|\ \ \
| * | | HMP: info status: Print the VM stateLuiz Capitulino2011-09-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today our printf format for the "info status" command is: VM status: %s Where the string can be "running", "running (single step mode)" or "paused". This commit extends it to: VM status: %s (%s) The second string corresponds to the "status" field as returned by the query-status QMP command and it's only printed if "status" is not "running" or "paused". Example: VM status: paused (shutdown) PS: libvirt uses "info status" when using HMP, but the new format should not break it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | QMP: query-status: Introduce 'status' keyLuiz Capitulino2011-09-154-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This new key reports the current VM status to clients. Please, check the documentation being added in this commit for more details. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | Monitor/QMP: Don't allow cont on bad VM stateLuiz Capitulino2011-09-154-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have two states where issuing cont before system_reset can cause problems: RSTATE_SHUTDOWN (when -no-shutdown is used) and RSTATE_PANICKED (which only happens with kvm). This commit fixes that by doing the following when state is RSTATE_SHUTDOWN or RSTATE_PANICKED: 1. returning an error to the user/client if cont is issued 2. automatically transition to RSTATE_PAUSED during system_reset Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | Drop the vm_running global variableLuiz Capitulino2011-09-1514-27/+29
| | | | | | | | | | | | | | | | | | | | | | | | Use runstate_is_running() instead, which is introduced by this commit. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | Drop the incoming_expected global variableLuiz Capitulino2011-09-153-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test against RSTATE_IN_MIGRATE instead. Please, note that the RSTATE_IN_MIGRATE state is only set when all the initial VM setup is done, while 'incoming_expected' was set right in the beginning when parsing command-line options. Shouldn't be a problem as far as I could check. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | runstate_set(): Check for valid transitionsLuiz Capitulino2011-09-152-1/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit could have been folded with the previous one, however doing it separately will allow for easy bisect and revert if needed. Checking and testing all valid transitions wasn't trivial, chances are this will need broader testing to become more stable. This is a transition table as suggested by LluĂ­s Vilanova. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | RunState: Add additional statesLuiz Capitulino2011-09-154-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, only vm_start() and vm_stop() change the VM state. That's, the state is only changed when starting or stopping the VM. This commit adds the runstate_set() function, which makes it possible to also do state transitions when the VM is stopped or running. Additional states are also added and the current state is stored. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | Replace the VMSTOP macros with a proper state typeLuiz Capitulino2011-09-1524-76/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today, when notifying a VM state change with vm_state_notify(), we pass a VMSTOP macro as the 'reason' argument. This is not ideal because the VMSTOP macros tell why qemu stopped and not exactly what the current VM state is. One example to demonstrate this problem is that vm_start() calls vm_state_notify() with reason=0, which turns out to be VMSTOP_USER. This commit fixes that by replacing the VMSTOP macros with a proper state type called RunState. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | Move vm_state_notify() prototype from cpus.h to sysemu.hLuiz Capitulino2011-09-152-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's where all the state handling functions prototypes are located. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | | | wavaudio: Use stdio instead of QEMUFileJuan Quintela2011-09-201-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEMUFile * is only intended for migration nowadays. Using it for anything else just adds pain and a layer of buffers for no good reason. Signed-off-by: Juan Quintela <quintela@redhat.com> CC: malc <av1474@comtv.ru> Signed-off-by: malc <av1474@comtv.ru>
* | | | wavcapture: Use stdio instead of QEMUFileJuan Quintela2011-09-201-23/+56
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | QEMUFile * is only intended for migration nowadays. Using it for anything else just adds pain and a layer of buffers for no good reason. Signed-off-by: Juan Quintela <quintela@redhat.com> CC: malc <av1474@comtv.ru> Signed-off-by: malc <av1474@comtv.ru>
* | | sun4u: don't set up isa_mem_baseBlue Swirl2011-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we use memory API in sun4u.c, after 71579cae30b53c910cd6c47ab4e683f647d36519, setting up isa_mem_base puts vga.chain4 outside of the physical address space. Fix by removing obsolete isa_mem_base set up. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | tcg/ppc64: Only one call output register needed for 64 bit hostsStefan Weil2011-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The second register is only needed for 32 bit hosts. Cc: Vassili Karpov <av1474@comtv.ru> Fine-with-me'd-by: Vassili Karpov <av1474@comtv.ru> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | tcg/sparc: Only one call output register needed for 64 bit hostsStefan Weil2011-09-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The second register is only needed for 32 bit hosts. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | tcg/s390: Only one call output register needed for 64 bit hostsStefan Weil2011-09-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The second register is only needed for 32 bit hosts. Cc: Alexander Graf <agraf@suse.de> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | tcg/ia64: Only one call output register needed for 64 bit hostsStefan Weil2011-09-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | The second register is never used for ia64 hosts. Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | tcg/i386: Only one call output register needed for 64 bit hostsStefan Weil2011-09-171-1/+3
| | | | | | | | | | | | | | | | | | | | | The second register is only needed for 32 bit hosts. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | target-i386: Fix several SSE3 instructions.Max Reitz2011-09-171-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | haddp[sd], hsubp[sd] and addsubp[sd] operate on floats, thus it is necessary to use the appropriate floating point calculation functions. If this is not done, those functions operate merely on integers, which is not correct. Signed-off-by: Max Reitz <max@tyndur.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OpenPOWER on IntegriCloud