aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-02-14Update version for 0.14.0-rc2v0.14.0-rc2Anthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-14Fix build from previous commitAnthony Liguori
I unfortunately got on an unnamed branch and pushed the wrong bits Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-14PATCH] slirp: fix buffer overrunBruce Rogers
Since the addition of the slirp member to struct mbuf, the value of SLIRP_MSIZE and the initialization of m_size have not been correct, resulting in overrunning the end of the malloc'd buffer in some cases. Signed-off-by: Bruce Rogers <brogers@novell.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-14correctly check ppr priority during interrupt injection]Gleb Natapov
TPR blocks all interrupts in a priority class, so simple "less or equal" check is not enough. Signed-off-by: Gleb Natapov <gleb@redhat.com> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-14Merge branch 'linux-user-for-0.14' of git://gitorious.org/qemu-maemo/qemuJustin M. Forbes
2011-02-11qcow2: Fix order in L2 table COWKevin Wolf
When copying L2 tables (this happens only with internal snapshots), the order wasn't completely safe, so that after a crash you could end up with a L2 table that has too low refcount, possibly leading to corruption in the long run. This patch puts the operations in the right order: First allocate the new L2 table and replace the reference, and only then decrease the refcount of the old table. Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 16fde5f2c2788232b16c06d34d0459a5c1ec1f6c)
2011-02-11qemu-img: Improve error messages for failed bdrv_openKevin Wolf
Output the error message string of the bdrv_open return code. Also set a non-empty device name for the images because the unknown feature error message includes it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit b9eaf9ecb15a9c69a592f386159163d5efc3b919)
2011-02-11qed: Report error for unsupported featuresKevin Wolf
Instead of just returning -ENOTSUP, generate a more detailed error. Unfortunately we don't have a helpful text for features that we don't know yet, so just print the feature mask. It might be useful at least if someone asks for help. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> (cherry picked from commit 10b758e85c9b38b4b370cff81435f6ed26024a26)
2011-02-11qcow2: Report error for version > 2Kevin Wolf
The qcow2 driver is now declared responsible for any QCOW image that has version 2 or greater (before this, version 3 would be detected as raw). For everything newer than version 2, an error is reported. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit e8cdcec123facf0ed273d941caeeeb9b08f14955)
2011-02-11qerror: Add QERR_UNKNOWN_BLOCK_FORMAT_FEATUREKevin Wolf
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f54e3641122e51c6343d587805422642f307462e)
2011-02-11qcow2: Fix error handling for reading compressed clustersKevin Wolf
When reading a compressed cluster failed, qcow2 falsely returned success. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> (cherry picked from commit 8af364884355b3f0c5d60a2d2f427927739658ea)
2011-02-11qcow2: Fix error handling for immediate backing file read failureKevin Wolf
Requests could return success even though they failed when bdrv_aio_readv returned NULL for a backing file read. Reported-by: Chunqiang Tang <ctang@us.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 3ab4c7e92d39d40e6dc0bdb1c2320889543691cb)
2011-02-11QCOW2: bug fix - read base image beyond its sizeChunqiang Tang
This patch fixes the following bug in QCOW2. For a QCOW2 image that is larger than its base image, when handling a read request straddling over the end of the base image, the QCOW2 driver attempts to read beyond the end of the base image and the request would fail. This bug was found by Fast Virtual Disk (FVD)'s fully automated testing tool. The following test triggered the bug. dd if=/dev/zero of=/var/ramdisk/truth.raw count=0 bs=1 seek=1098561536 dd if=/dev/zero of=/var/ramdisk/zero-500M.raw count=0 bs=1 seek=593099264 ./qemu-img create -f qcow2 -ocluster_size=65536,backing_fmt=blksim -b /var/ramdisk/zero-500M.raw /var/ramdisk/test.qcow2 1098561536 ./qemu-io --auto --seed=30477694 --truth=/var/ramdisk/truth.raw --format=qcow2 --test=blksim:/var/ramdisk/test.qcow2 --verify_write=true --compare_before=false --compare_after=true --round=100000 --parallel=100 --io_size=10485760 --fail_prob=0 --cancel_prob=0 --instant_qemubh=true Signed-off-by: Chunqiang Tang <ctang@us.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit e0d9c6f93729c9bfc98fcafcd73098bb8e131aeb)
2011-02-11Change snapshot_blkdev hmp to use correct argument type for deviceJes Sorensen
Pointed out by Markus Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 982aa95532a3a7b549695d5b3e18442975eecfb5)
2011-02-09linux-user: Fix possible realloc memory leakStefan Weil
Extract from "man realloc": "If realloc() fails the original block is left untouched; it is not freed or moved." Fix a possible memory leak (reported by cppcheck). Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Riku Voipio <riku.voipio@nokia.com> (cherry picked from commit 8d79de6e42947a4a11ad7c7bb87e8f745a4f8321)
2011-02-09linux-user: Fix possible realloc memory leakStefan Weil
Extract from "man realloc": "If realloc() fails the original block is left untouched; it is not freed or moved." Fix a possible memory leak (reported by cppcheck). Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
2011-02-09linux-user: fix for loopmount ioctlMartin Mohring
In case a chrooted build uses XEN or KVM, a looped mount needs to be done to setup the chroot. The ioctl for loop mount works correctly for arm, mips, ppc32 and sh4, so its now activated. Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
2011-02-08Merge branch 'master' of git+ssh://git.qemu.org/pub/git/qemu-stable-0.14Justin M. Forbes
2011-02-08blockdev: Plug memory leak in drive_init() error pathsMarkus Armbruster
Should have spotted this when doing commit 319ae529. Signed-off-by: Markus Armbruster <armbru@redhat.com>
2011-02-08blockdev: Plug memory leak in drive_uninit()Markus Armbruster
Started leaking in commit 1dae12e6. Signed-off-by: Markus Armbruster <armbru@redhat.com>
2011-02-08x86: Fix MCA broadcast parameters for TCG caseJan Kiszka
When broadcasting MCEs, we need to set MCIP and RIPV in mcg_status like it is done for KVM. Use the symbolic constants at this chance. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 29057492871e63caeab8ee7cdf1062c0270f19d8)
2011-02-08qemu-timer: Fix compilation of new timer code for w32, w64Stefan Weil
qemu_next_alarm_deadline() is needed by MinGW, too. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> (cherry picked from commit f26e5a54f0554798a2e6f7a074b809b13635d007)
2011-02-07Update version for 0.14.0-rc1v0.14.0-rc1Anthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-02-07block: enable in_use flagMarcelo Tosatti
Set block device in use during block migration, disallow drive_del and bdrv_truncate for in use devices. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 8591675f44929a9e4b5d3a5fd702a4b6d41c7903)
2011-02-07Add flag to indicate external users to block deviceMarcelo Tosatti
Certain operations such as drive_del or resize cannot be performed while external users (eg. block migration) reference the block device. Add a flag to indicate that. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit db593f2565dc12442d6bac9e8eaefa027dfcada9)
2011-02-07block-migration: add reference to target DriveInfoMarcelo Tosatti
So that ejection of attached device by guest does not free data in use by block migration instance. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> CC: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit f48905d44f670cd83227b3a8d06ae1406f0c771c)
2011-02-07blockdev: add refcount to DriveInfoMarcelo Tosatti
The host part of a block device can be deleted with in progress block migration. To fix this, add a reference count to DriveInfo, freeing resources on last reference. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> CC: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 84fb392526479d54602a3830326d50d44657f630)
2011-02-07block-migration: actually disable dirty tracking on cleanupMarcelo Tosatti
Call to set_dirty_tracking() is misplaced. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 8f794c557c4b51c7a957d47ef6a2230114bb9e79)
2011-02-07ahci: make number of ports runtime determinedAlexander Graf
Different AHCI controllers have a different number of ports, so the core shouldn't care about the amount of ports available. This patch makes the number of ports available to the AHCI core runtime configurable, allowing us to have multiple different AHCI implementations with different amounts of ports. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 2c4b9d0ea42c27ec2112e437a0fa954afe73bd23)
2011-02-07ahci: Implement HBA resetAlexander Graf
The ahci code was missing its soft reset functionality. This wasn't really an issue for Linux guests, but Windows gets confused when the controller doesn't reset when it tells it so. Using this patch I can now successfully boot Windows 7 from AHCI using AHCI enabled SeaBIOS. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 760c3e44d3a1d8a7e9d22f0429b1805d1c688178)
2011-02-07ahci: send init d2h fis on fis enableAlexander Graf
The drive sends a d2h init fis on initialization. Usually, the guest doesn't receive fises yet at that point though, so the delivery is deferred. Let's reflect that by sending the init fis on fis receive enablement. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 87e62065bb5e0e544e45e6935e3ac2b053fe446e)
2011-02-07ahci: split ICH and AHCI even moreAlexander Graf
Sebastian's patch already did a pretty good job at splitting up ICH-9 AHCI code and the AHCI core. We need some more though. Copyright was missing, the lspci dump belongs to ICH-9, we don't need the AHCI core to have its own qdev device duplicate. So let's split them a bit more in this patch, making things easier to read an understand. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 7fb6577b130c615e42e1ccf8dad69c27c3eef085)
2011-02-07ahci: add license header in ahci.hAlexander Graf
Due to popular request, this patch adds a license header to ahci.h Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit f83a40dcd7c38aef8cb4aa93e1f6f0e21c750992)
2011-02-07ahci: split ICH9 from coreSebastian Herbszt
There are multiple ahci devices out there. The currently implemented ich-9 is only one of the many. So let's split that one out into a separate file to stress the difference. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 03c7a6a8e7122b9c12a532577046094a69593116)
2011-02-07block/vdi: Fix wrong size in conditionally used memset, memcmpStefan Weil
Error report from cppcheck: block/vdi.c:122: error: Using sizeof for array given as function argument returns the size of pointer. block/vdi.c:128: error: Using sizeof for array given as function argument returns the size of pointer. Fix both by setting the correct size. The buggy code is only used when QEMU is build without uuid support. The bug is not critical, so there is no urgent need to apply it to old versions of QEMU. Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 4f3669ea5bd73ade0dce5f1155cb9ad9788fd54c)
2011-02-07Documentation: add Sheepdog disk imagesMORITA Kazutaka
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com> (cherry picked from commit 42af9c30ea9a963ce604ac96230fde2f987634db)
2011-02-07qcow2: Really use cache=unsafe for image creationKevin Wolf
For cache=unsafe we also need to set BDRV_O_CACHE_WB, otherwise we have some strange unsafe writethrough mode. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> (cherry picked from commit e1a7107f2d92af646ec37b74d074dc150e688559)
2011-02-04do not pass NULL to strdup.Gleb Natapov
Also use qemu_strdup() instead of strdup() in bootindex code. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 4fef930af8d7fab4b6c777fa4c6e2b902359262a)
2011-02-04Set the right overflow bit for neon 32 and 64 bit saturating add/sub.Christophe Lyon
Signed-off-by: Christophe Lyon <christophe.lyon@st.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 72902672dc2ed6281cdb205259c1d52ecf01f6b2)
2011-02-04target-arm: Fix Neon vsra instructions.Christophe Lyon
This patch fixes the errors reported by my tests in VSRA. Signed-off-by: Christophe Lyon <christophe.lyon@st.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 5371cb81405a35ca4c1f6ab23f93a4f7260ffa53)
2011-02-04target-sh4: fix negcAurelien Jarno
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 7026259f79ffc85ceaaaeee32df518ea96863ee4)
2011-02-04ioapic: Style & magics cleanupJan Kiszka
Fix a few style issues and convert magic numbers into prober symbolic constants, also fixing the wrong but unused IOAPIC_DM_SIPI value. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 1f5e71a8e6b24dce74b156472ff9253b9bd33a11)
2011-02-04ioapic: Add support for qemu-kvm's vmstate v2Jan Kiszka
qemu-kvm carries the IOAPIC base address in its v2 vmstate. We only support the default base address so far, and saving even that in the device state was rejected. Add a padding field to be able to read qemu-kvm's old state, but increase our version to 3, indicating that we are not saving a valid address. This also gives downstream the chance to change to stop evaluating the base_address and move to v3 as well. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 5dce499948e4a4abe62f010baf4a7ed3d49e53cb)
2011-02-04ioapic: Save/restore irrJan Kiszka
This is a guest modifiable state that must be saved/restored properly. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 35a74c5c5941b474d8b985237e1bde0b8cd2a20f)
2011-02-04ioapic: Implement EOI handling for level-triggered IRQsJan Kiszka
Add the missing EOI broadcast from local APIC to the IOAPICs on completion of level-triggered IRQs. This ensures that a still asserted IRQ source properly re-triggers an APIC IRQ. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 0280b571c1a153f8926612d8c8d7359242d596f5)
2011-02-04vnc: qemu can die if the client is disconnected while updating screenCorentin Chary
agraf reported that qemu_mutex_destroy(vs->output_mutex) while failing in vnc_disconnect_finish(). It's because vnc_worker_thread_loop() tries to unlock the mutex while not locked. The unlocking call doesn't fail (pthread bug ?), but the destroy call does. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 73eb4c04e9e8ea7f6eb83694cb0c43e38d882a7c)
2011-02-04virtio-serial: Make sure virtqueue is ready before discarding dataAmit Shah
This can happen if a port gets unplugged before guest has chance to initialise vqs. Reported-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 7185f9315bcf90e99b123370cf4d19b8c20afbd5)
2011-02-04ui/sdl: Fix handling of caps lock and num lock keysStefan Weil
Starting with SDL version 1.2.14, caps lock and num lock keys will send a SDL_KEYUP when SDL_DISABLE_LOCK_KEYS=1 is set in the environment. The new code sets the environment unconditionally (it won't harm old versions which do not know it). The workaround for SDL_KEYUP is only compiled with old SDL versions. A similar patch without handling of old SDL versions was already published by Benjamin Drung for Ubuntu. Cc: Anthony Liguori <aliguori@us.ibm.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Benjamin Drung <benjamin.drung@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4e79bcbb96d3c189e50adbdac7b1e28d834ba43e)
2011-02-04Unify alarm deadline computationPaolo Bonzini
This patch shows how using the correct formula for qemu_next_deadline_dyntick can simplify the code of host_alarm_handler and eliminate useless duplication. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4c3d45eb694de3e0bda10841a06ba98be4d569b1)
2011-02-04Correct alarm deadline computationPaolo Bonzini
When the QEMU_CLOCK_HOST clock was added, computation of its deadline was added to qemu_next_deadline, which is correct but incomplete. I noticed this by reading the very convoluted rules whereby qemu_next_deadline_dyntick is computed, which miss QEMU_CLOCK_HOST when use_icount is true. This patch inlines qemu_next_deadline into qemu_next_deadline_dyntick, and then corrects the logic to skip only QEMU_CLOCK_VIRTUAL when use_icount is true. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6ad0a1ed21ecd187dbe3239eb45c3598672af6a8)