summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* TCG: Revert ppc64 tcg_out_movi32 changeAndreas Färber2010-08-151-1/+1
| | | | | | | | | | | | | 3b6dac34161bc0a342336072643c2f6d17e0ec45 apparently broke the ppc64 TCG target compilation in the code path without guest base. Reverting this line fixes the build. Signed-off-by: Andreas F?rber <andreas.faerber@web.de> Cc: malc <av1474@comtv.ru> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: malc <av1474@comtv.ru>
* TCG: Fix Darwin/ppc calling convention recognitionAndreas Färber2010-08-151-1/+1
| | | | | | | | | | | | 5da79c86a3744e3a901c7986c109dd06951befd2 broke compilation on Mac OS X v10.5 ppc. Apple's GCC 4.0.1 does not define _CALL_DARWIN. Recognize __APPLE__ again as well. Signed-off-by: Andreas F?rber <andreas.faerber@web.de> Cc: malc <av1474@comtv.ru> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: J?rgen Lock <nox@jelal.kn-bremen.de> Cc: Stefan Weil <weil@mail.berlios.de> Signed-off-by: malc <av1474@comtv.ru>
* RESEND: Inter-VM shared memory PCI deviceCam Macdonell2010-08-105-0/+883
| | | | | | | | | | | | | | | | | | | | | | | | | resend for bug fix related to removal of irqfd Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>] Interrupts are supported between multiple VMs by using a shared memory server by using a chardev socket. -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>] [,chardev=<id>][,msi=on][,ioeventfd=on][,vectors=n][,role=peer|master] -chardev socket,path=<path>,id=<id> The shared memory server, sample programs and init scripts are in a git repo here: www.gitorious.org/nahanni Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Support marking a device as non-migratableCam Macdonell2010-08-102-3/+43
| | | | | | | A non-migratable device should be removed before migration and re-added after. Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add function to assign ioeventfd to MMIO.Cam Macdonell2010-08-102-0/+33
| | | | | Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Device specification for shared memory PCI deviceCam Macdonell2010-08-101-0/+96
| | | | | Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Add qemu_ram_alloc_from_ptr functionCam Macdonell2010-08-102-0/+45
| | | | | | | | | | Provide a function to add an allocated region of memory to the qemu RAM. This patch is copied from Marcelo's qemu_ram_map() in qemu-kvm and given the clearer name qemu_ram_alloc_from_ptr(). Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori2010-08-099-77/+115
|\
| * ide: Avoid canceling IDE DMAAndrea Arcangeli2010-08-031-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason for not actually canceling the I/O is because with virtualization and lots of VM running, a guest fs may mistake a overload of the host, as an IDE timeout. So rather than canceling the I/O, it's safer to wait I/O completion and simulate that the I/O has completed just before the io cancellation was requested by the guest. This way if ntfs or an app writes data without checking for -EIO retval, and it thinks the write has succeeded, it's less likely to run into troubles. Similar issues for reads. Furthermore because the DMA operation is splitted into many synchronous aio_read/write if there's more than one entry in the SG table, without this patch the DMA would be cancelled in the middle, something we've no idea if it happens on real hardware too or not. Overall this seems a great risk for zero gain. This approach is sure safer than previous code given we can't pretend all guest fs code out there to check for errors and reply the DMA if it was completed partially, given a timeout would never materialize on a real harddisk unless there are defective blocks (and defective blocks are practically only an issue for reads never for writes in any recent hardware as writing to blocks is the way to fix them) or the harddisk breaks as a whole. Signed-off-by: Izik Eidus <ieidus@redhat.com> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Change bdrv_eject() not to drop the imageMarkus Armbruster2010-08-032-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bdrv_eject() gets called when a device model opens or closes the tray. If the block driver implements method bdrv_eject(), that method gets called. Drivers host_cdrom implements it, and it opens and closes the physical tray, and nothing else. When a device model opens, then closes the tray, media changes only if the user actively changes the physical media while the tray is open. This is matches how physical hardware behaves. If the block driver doesn't implement method bdrv_eject(), we do something quite different: opening the tray severs the connection to the image by calling bdrv_close(), and closing the tray does nothing. When the device model opens, then closes the tray, media is gone, unless the user actively inserts another one while the tray is open, with a suitable change command in the monitor. This isn't how physical hardware behaves. Rather inconvenient when programs "helpfully" eject media to give you a chance to change it. The way bdrv_eject() behaves here turns that chance into a must, which is not what these programs or their users expect. Change the default action not to call bdrv_close(). Instead, note the tray status in new BlockDriverState member tray_open. Use it in bdrv_is_inserted(). Arguably, the device models should keep track of tray status themselves. But this is less invasive. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Fix bdrv_has_zero_initKevin Wolf2010-08-035-10/+28
| | | | | | | | | | | | | | | | Assuming that any image on a block device is not properly zero-initialized is actually wrong: Only raw images have this problem. Any other image format shouldn't care about it, they initialize everything properly themselves. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block migration: replace tabs by spaces.Yoshiaki Tamura2010-08-031-6/+6
| | | | | | | | | | Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * loadvm: improve tests before bdrv_snapshot_goto()Miguel Di Ciurcio Filho2010-08-032-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch improves the resilience of the load_vmstate() function, doing further and better ordered tests. In load_vmstate(), if there is any error on bdrv_snapshot_goto(), except if the error is on VM state device, load_vmstate() will return zero and the VM will be started with major corruption chances. The current process: - test if there is any writable device without snapshot support - if exists return -error - get the device that saves the VM state, possible return -error but unlikely because it was tested earlier - flush I/O - run bdrv_snapshot_goto() on devices - if fails, give an warning and goes to the next (not good!) - if fails on the VM state device, return zero (not good!) - check if the requested snapshot exists on the device that saves the VM state and the state is not zero - if fails return -error - open the file with the VM state - if fails return -error - load the VM state - if fails return -error - return zero New behavior: - get the device that saves the VM state - if fails return -error - check if the requested snapshot exists on the device that saves the VM state and the state is not zero - if fails return -error - test if there is any writable device without snapshot support - if exists return -error - test if the devices with snapshot support have the requested snapshot - if anyone fails, return -error - flush I/O - run snapshot_goto() on devices - if anyone fails, return -error - open the file with the VM state - if fails return -error - load the VM state - if fails return -error - return zero do_loadvm must not call vm_start if any error has occurred in load_vmstate. Signed-off-by: Miguel Di Ciurcio Filho <miguel.filho@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Change bdrv_commit to handle multiple sectors at onceKevin Wolf2010-08-031-18/+19
| | | | | | | | | | | | | | | | | | | | | | bdrv_commit copies the image to its backing file sector by sector, which is (surprise!) relatively slow. Let's take a larger buffer and handle more sectors at once if possible. With a 1G qcow2 file, this brought the time bdrv_commit takes down from 5:06 min to 1:14 min for me. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | microblaze: Fix the target version of stat64 structEdgar E. Iglesias2010-08-091-6/+8
| | | | | | | | | | | | MicroBlaze needs TARGET_STAT64_HAS_BROKEN_ST_INO. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
* | audio/sdl: return on errormalc2010-08-071-0/+1
| | | | | | | | Signed-off-by: malc <av1474@comtv.ru>
* | mips: Add support for VInt and VEIC irq modesEdgar E. Iglesias2010-08-063-1/+51
| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* | audio/sdl: be more anal about errorsmalc2010-08-061-3/+18
| | | | | | | | Signed-off-by: malc <av1474@comtv.ru>
* | audio: make audio_pt_init block all signalsmalc2010-08-062-52/+31
| | | | | | | | Signed-off-by: malc <av1474@comtv.ru>
* | sparc32: use FW_CFG_CMDLINE_SIZEBlue Swirl2010-08-031-0/+3
|/ | | | | | | Add support for getting kernel command line size with FW_CFG_CMDLINE_SIZE. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* fix last cpu timer initializationArtyom Tarasenko2010-08-021-2/+2
| | | | | | | | | | The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset. Don't mark non-existing timers as running. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Initialize a variable in all casesBlue Swirl2010-07-311-0/+2
| | | | | | | Commit d167f9bc06a577d6c85b8ed6991c1efe175aae7d missed this one: /src/qemu/ui/vnc-enc-tight.c:1483: warning: 'ret' may be used uninitialized in this function Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix uint8_t comparison with negative valueBlue Swirl2010-07-311-1/+1
| | | | | | | | Commit 7bccf57383cca60a778d5c543ac80c9f62d89ef2 missed this one: /src/qemu/ui/vnc-enc-tight.c: In function 'send_sub_rect': /src/qemu/ui/vnc-enc-tight.c:1527: warning: comparison is always true due to limited range of data type Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix a warning on OpenSolarisBlue Swirl2010-07-311-0/+1
| | | | | | | | Add a missing #include statement to avoid a warning: /src/qemu/net/tap-solaris.c: In function 'tap_open': /src/qemu/net/tap-solaris.c:189: warning: implicit declaration of function 'error_report' Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Correctly identify multiple cpus in SMP systemsHervé Poussineau2010-07-312-4/+2
| | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Remove unused constantHervé Poussineau2010-07-311-4/+0
| | | | | | | Remove unused constant MIPS_FCR0 Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* jazz led: Fix debug printsHervé Poussineau2010-07-311-6/+15
| | | | | | | | Add a macro to easily enable/disable debug prints Also fix wrong printf formatters Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* xilinx-s3adsp: Add support for loading u-boot images.Edgar E. Iglesias2010-07-311-1/+11
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* xilinx-s3adsp: Fix loading of raw binaries.Edgar E. Iglesias2010-07-311-0/+1
| | | | | | Set high to a word aligned address beyond loaded image. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Remove unused eventfd.hMike McCormack2010-07-302-2/+0
| | | | | | | | This header is not present on my system and causes a build failure, but is also not used in these files, so remove it. Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* migration: Accept 'cont' only after successful incoming migrationAmit Shah2010-07-306-0/+16
| | | | | | | | | | | | | | | | | When a 'cont' is issued on a VM that's just waiting for an incoming migration, the VM reboots and boots into the guest, possibly corrupting its storage since it could be shared with another VM running elsewhere. Ensure that a VM started with '-incoming' is only run when an incoming migration successfully completes. A new qerror, QERR_MIGRATION_EXPECTED, is added to signal that 'cont' failed due to no incoming migration has been attempted yet. Reported-by: Laine Stump <laine@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* mips64el: fulong: PCI_DEVFN() clean up.Isaku Yamahata2010-07-301-7/+7
| | | | | | | | | | | Use PCI_DEVFN() where appropriate. The resulted stripped binary remains same with/without thie patch. Cc: Huacai Chen <zltjiangshi@gmail.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* remove pointless if from vl.cJoel Schopp2010-07-301-3/+1
| | | | | | | | We already set sockets to nonzero in the code above. So this if statement always evaluates true. Remove it. Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* fix variable type in qemu-io.cJoel Schopp2010-07-301-2/+2
| | | | | | | | | | The variable len can get a negative return value from cvtnum, which we check for, but which is impossible with the current unsigned variable type. Currently the if(len < 0) check is pointless. This patch fixes that. Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* remove dead code from hw/loader.cJoel Schopp2010-07-301-5/+0
| | | | | | | | Removing dead code. Above we already continued when rom->addr + valuegreaterthan0 < addr so this condition is always false. Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* savevm: Fix memory leak of compat structAlex Williamson2010-07-301-0/+6
| | | | | | | | Forgot to check for and free these. Found-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* virtio-serial: Check if more max_ports specified than we can handleAmit Shah2010-07-301-1/+9
| | | | | | | | | | | Currently virtio-serial supports a maximum of 31 ports. Specifying the 'max_ports' parameter to be > 31 on the cmd line causes badness. Ensure we initialise virtio-serial only if max_ports is within the supported range. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevinAurelien Jarno2010-07-3010-12/+59
|\ | | | | | | | | | | | | | | | | | | | | * 'for-anthony' of git://repo.or.cz/qemu/kevin: Fix -snapshot deleting images on disk change block: Use error codes from lower levels for error message block: default to 0 minimal / optiomal I/O size move 'unsafe' to end of caching modes in help virtio-blk: Create exit function to unregister savevm block migration: propagate return value when bdrv_write() returns < 0 ide/atapi: add support for GET EVENT STATUS NOTIFICATION
| * Fix -snapshot deleting images on disk changeBlue Swirl2010-07-263-0/+7
| | | | | | | | | | | | | | | | | | | | | | Block device change command did not copy BDRV_O_SNAPSHOT flag. Thus the new image did not have this flag and the file got deleted during opening. Fix by copying BDRV_O_SNAPSHOT flag. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Use error codes from lower levels for error messageStefan Weil2010-07-261-8/+19
| | | | | | | | | | | | | | | | | | "No such file or directory" is a misleading error message when a user tries to open a file with wrong permissions. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: default to 0 minimal / optiomal I/O sizeChristoph Hellwig2010-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | Currently we set them to 512 bytes unless manually specified. Unforuntaly some brain-dead partitioning tools create unaligned partitions if they get low enough optiomal I/O size values, so don't report any at all unless explicitly set. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * move 'unsafe' to end of caching modes in helpBruce Rogers2010-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Libvirt parses qemu help output to determine qemu features. In particular it probes for the following: "cache=writethrough|writeback|none". The addition of the unsafe cache mode was inserted within this string, as opposed to being added to the end, which impacted libvirt's probe. Unbreak libvirt by keeping the existing cache modes intact and add unsafe to the end. This problem only manifests itself if a caching mode is explicitly specified in the libvirt xml, in which case older syntax for caching is passed to qemu, which it no longer understands. Signed-off-by: Bruce Rogers <brogers@novell.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * virtio-blk: Create exit function to unregister savevmAlex Williamson2010-07-263-0/+10
| | | | | | | | | | | | | | Otherwise we can't migrate after we've removed a virtio block device. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block migration: propagate return value when bdrv_write() returns < 0Yoshiaki Tamura2010-07-261-1/+5
| | | | | | | | | | | | | | | | | | Currently block_load() doesn't check return value of bdrv_write(), and even the destination weren't prepared to execute block migration, it proceeds and guest boots on the target. This patch fix this issue. Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * ide/atapi: add support for GET EVENT STATUS NOTIFICATIONAurelien Jarno2010-07-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GET EVENT STATUS NOTIFICATION is a mandatory command according to MMC-3, even if event status notification is not supported. This patch adds support for this command. It returns NEA ("No Event Available") with an empty "Supported Event Classes" to show that it doesn't event support status notification. If asychronous operation is requested, which requires NCQ support, it returns an error according to the specifications. This fixes HAL support on FreeBSD and derivatives, which fill up the logs every second with: acd0: FAILURE - unknown CMD (0x03) ILLEGAL REQUEST asc=0x20 ascq=0x00 Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | linux-user: fix build on hosts not using guest baseAurelien Jarno2010-07-302-7/+9
| | | | | | | | | | | | | | | | Commit 68a1c816868b3e35a1da698af412b29e61b1948a broke qemu on hosts not using guest base. It uses reserved_va unconditionally in mmap.c. To avoid to many #ifdef #endif blocks, define RESERVED_VA as either reserved_va or 0ul, and use it instead of reserved_va, similarly to what has been done with guest_base/GUEST_BASE.
* | linux-user: Protect against allocation failure in load_symbols.Richard Henderson2010-07-291-0/+10
| | | | | | | | | | | | Cc: malc <av1474@comtv.ru> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: malc <av1474@comtv.ru>
* | cris: Correct settls1 testcase.Edgar E. Iglesias2010-07-291-2/+8
| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | cris: Correct ADDO and ADDOQ testcases.Edgar E. Iglesias2010-07-292-3/+3
| | | | | | | | | | | | Verified on real HW. Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
* | linux-user: Re-use load_elf_image for the main binary.Richard Henderson2010-07-291-277/+103
| | | | | | | | | | | | | | | | | | This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
OpenPOWER on IntegriCloud