aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-08-25ioh3420: Remove obsoleted, unused ioh3420_init functionKnut Omang
Signed-off-by: Knut Omang <knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pcie: Rename the pcie_cap_ari_* functions to pcie_cap_arifwd_*Knut Omang
Rename helper functions to make a clearer distinction between the PCIe capability/control register feature ARI forwarding and a device that supports the ARI feature via an ARI extended PCIe capability. Signed-off-by: Knut Omang <knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pcie: Fix incorrect write to the ari capability next function fieldKnut Omang
PCI_ARI_CAP_NFN, a macro for reading next function was used instead of the intended write. Signed-off-by: Knut Omang <knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25ssdt-tpm: add generated hex file to gitMichael S. Tsirkin
Needed for systems without IASL. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25Add ACPI tables for TPMStefan Berger
Add an SSDT ACPI table for the TPM device. Add a TCPA table for BIOS logging area when a TPM is being used. The latter follows this spec here: http://www.trustedcomputinggroup.org/files/static_page_files/DCD4188E-1A4B-B294-D050A155FB6F7385/TCG_ACPIGeneralSpecification_PublicReview.pdf This patch has Michael Tsirkin's patches folded in. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pc: reserve more memory for ACPI for new machine typesMichael S. Tsirkin
commit 868270f23d8db2cce83e4f082fe75e8625a5fbf9 acpi-build: tweak acpi migration limits broke kernel loading with -kernel/-initrd: it doubled the size of ACPI tables but did not reserve enough memory. As a result, issues on boot and halt are observed. Fix this up by doubling reserved memory for new machine types. Cc: qemu-stable@nongnu.org Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-25pcihp: fix possible array out of boundsGonglei
Prevent out-of-bounds array access on acpi_pcihp_pci_status. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
2014-08-25pci_bridge: manually destroy memory regions within PCIBridgeWindowsPaolo Bonzini
The regions are destroyed and recreated on configuration space accesses. We need to destroy them before the containing PCIBridgeWindows object is freed. Reported-by: Gonglei <arei.gonglei@huawei.com> Reported-by: Knut Omang <knut.omang@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-24vmxnet3: Pad short frames to minimum size (60 bytes)Ben Draper
When running VMware ESXi under qemu-kvm the guest discards frames that are too short. Short ARP Requests will be dropped, this prevents guests on the same bridge as VMware ESXi from communicating. This patch simply adds the padding on the network device itself. Signed-off-by: Ben Draper <ben@xrsa.net> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Cc: qemu-stable@nongnu.org Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24libdecnumber: Fix warnings from smatch (missing static, boolean operations)Stefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24linux-user: fix file descriptor leakszhanghailiang
Handle variable "fd_orig" going out of scope leaks the handle. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24po: Fix Makefile rules for in-tree builds without configurationStefan Weil
Adding 'update' to the phony targets fixes this error: $ LANG=C make -C po update make: Entering directory `/qemu/po' LINK update /qemu/po/de_DE.po: file not recognized: File format not recognized collect2: error: ld returned 1 exit status make: *** [update] Error 1 make: Leaving directory `/qemu/po' Some other phony targets (build, install) were also added, and the existing .PHONY statement was moved to a more prominent position at the beginning of the Makefile. The patch also fixes a 2nd bug. The default target should be 'all', but instead 'modules' (from rules.mak) was the default. Fix this by adding 'all' as a target before any include statement. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24slirp/misc: Use the GLib memory allocation APIszhanghailiang
Here we don't check the return value of malloc() which may fail. Use the g_new() instead, which will abort the program when there is not enough memory. Also, use g_strdup instead of strdup and remove the unnecessary strdup function. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24configure: no need to mkdir QMPLiming Wang
commit 7537fe04 QMP: QMP/ -> docs/qmp/ Above commit has moved last QMP files to docs/qmp and it's not necessary to create QMP directory. So remove it from configure. Signed-off-by: Liming Wang <liming.wang@canonical.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24dma: axidma: Variablise repeated s->streams[i] sub-exprPeter Crosthwaite
This have 6 inline usages. Make it a bit more readable by using a local variable. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24microblaze: ml605: Get rid of ddr_base variablePeter Crosthwaite
It's a constant based on a macro. Just use the macro in place. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24tests/bios-tables-test: check the value returned by fopen()zhanghailiang
The function fopen() may fail, so check its return value. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Li Liu <john.liuli@huawei.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24tcg: dump op count into qemu logzhanghailiang
fopen() may fail and it does not check its return vaule here, it is better to dump op count to the normal log file. Signed-off-by: Li Liu <john.liuli@huawei.com> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-24util/path: Use the GLib memory allocation routineszhanghailiang
In this file, we don't check the return value of malloc/strdup/realloc which may fail. Instead of using these routines, we use the GLib memory APIs g_malloc/g_strdup/g_realloc. They will exit on allocation failure, so there is no need to test for failure, which would be fine for setup. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-08-22Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell
Block patches # gpg: Signature made Fri 22 Aug 2014 14:47:53 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (29 commits) qemu-img: Allow cache mode specification for amend qemu-img: Allow source cache mode specification vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wanted blkdebug: Delete BH in bdrv_aio_cancel qemu-iotests: add test case 101 for short file I/O raw-posix: fix O_DIRECT short reads block/iscsi: fix memory corruption on iscsi resize block/vvfat.c: remove debugging code to reinit stderr if NULL iotests: Add test for image filename construction quorum: Implement bdrv_refresh_filename() nbd: Implement bdrv_refresh_filename() blkverify: Implement bdrv_refresh_filename() blkdebug: Implement bdrv_refresh_filename() block: Add bdrv_refresh_filename() virtio-blk: fix reference a pointer which might be freed virtio-blk: allow block_resize with dataplane block: acquire AioContext in qmp_block_resize() qemu-iotests: Fix 028 reference output for qed test-coroutine: test cost introduced by coroutine iotests: Add test for qcow2's cache options ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-22Merge remote-tracking branch 'remotes/riku/linux-user-for-upstream' into stagingPeter Maydell
* remotes/riku/linux-user-for-upstream: (22 commits) linux-user: check return value of malloc() linux-user: writev Partial Writes linux-user: Support target-to-host translation of mlockall argument linux-user: clock_nanosleep errno Handling on PPC linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2 linux-user: Move get_ppc64_abi linux-user: Detect fault in sched_rr_get_interval linux-user: Handle NULL sched_param argument to sched_* linux-user: Detect Negative Message Sizes in msgsnd System Call linux-user: Conditionally Pass Attribute Pointer to mq_open() linux-user: Make ipc syscall's third argument an abi_long linux-user: Properly Handle semun Structure In Cross-Endian Situations linux-user: Dereference Pointer Argument to ipc/semctl Sys Call linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2 linux-user: add setns and unshare linux-user: support ioprio_{get, set} syscalls linux-user: support timerfd_{create, gettime, settime} syscalls linux-user: fix readlink handling with magic exe symlink linux-user: Fix conversion of sigevent argument to timer_create linux-user: Fix syscall instruction usermode emulation on X86_64 ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-22qemu-img: Allow cache mode specification for amendMax Reitz
qemu-img amend may extensively modify the target image, depending on the options to be amended (e.g. conversion to qcow2 compat level 0.10 from 1.1 for an image with many unallocated zero clusters). Therefore it makes sense to allow the user to specify the cache mode to be used. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-08-22qemu-img: Allow source cache mode specificationMax Reitz
Many qemu-img subcommands only read the source file(s) once. For these use cases, a full write-back cache is unnecessary and mainly clutters host cache memory. Though this is generally no concern as cache memory is freely available and can be scaled by the host OS, it may become a concern with thin provisioning. For these cases, it makes sense to allow users to freely specify the source cache mode (e.g. use no cache at all). This commit adds a new switch (-T) for the qemu-img subcommands check, compare, convert and rebase to specify the cache to be used for source images (the backing file in case of rebase). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-08-22linux-user: check return value of malloc()zhanghailiang
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Acked-by: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: writev Partial WritesTom Musta
Although not technically not required by POSIX, the writev system call will typically write out its buffers individually. That is, if the first buffer is written successfully, but the second buffer pointer is invalid, then the first chuck will be written and its size is returned. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Support target-to-host translation of mlockall argumentTom Musta
The argument to the mlockall system call is not necessarily the same on all platforms and thus may require translation prior to passing to the host. For example, PowerPC 64 bit platforms define values for MCL_CURRENT (0x2000) and MCL_FUTURE (0x4000) which are different from Intel platforms (0x1 and 0x2, respectively) Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: clock_nanosleep errno Handling on PPCTom Musta
The clock_nanosleep syscall is unusual in that it returns positive numbers in error handling situations, versus returning -1 and setting errno, or returning a negative errno value. On POWER, the kernel will set the SO bit of CR0 to indicate failure in a syscall. QEMU has generic handling to do this for syscalls with standard return values. Add special case code for clock_nanosleep to handle CR0 properly. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2Tom Musta
The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Move get_ppc64_abiTom Musta
The get_ppc64_abi is used to determine the ELF ABI (i.e. V1 or V2). This routine is currently implemented in the linux-user/elfload.c file but is useful in other scenarios. Move the routine to a more generally available location (linux-user/ppc/target_cpu.h). Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Detect fault in sched_rr_get_intervalTom Musta
Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Handle NULL sched_param argument to sched_*Tom Musta
The sched_getparam, sched_setparam and sched_setscheduler system calls take a pointer argument to a sched_param structure. When this pointer is null, errno should be set to EINVAL. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Detect Negative Message Sizes in msgsnd System CallTom Musta
The msgsnd system call takes an argument that describes the message size (msgsz) and is of type size_t. The system call should set errno to EINVAL in the event that a negative message size is passed. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Conditionally Pass Attribute Pointer to mq_open()Tom Musta
The mq_open system call takes an optional struct mq_attr pointer argument in the fourth position. This pointer is used when O_CREAT is specified in the flags (second) argument. It may be NULL, in which case the queue is created with implementation defined attributes. Change the code to properly handle the case when NULL is passed in the arg4 position. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Make ipc syscall's third argument an abi_longTom Musta
For those target ABIs that use the ipc system call (e.g. POWER), the third argument is used in the shmat path as a pointer. It therefore must be declared as an abi_long (versus int) so that the address bits are not lost in truncation. In fact, all arguments to do_ipc should be declared as abit_long. In fact, it makes more sense for all of the arguments to be declaried as abi_long (except call). Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Properly Handle semun Structure In Cross-Endian SituationsTom Musta
The semun union used in the semctl system call contains both an int (val) and pointers. In cross-endian situations on 64 bit targets, the value passed to semctl is an 8 byte (abi_long) value and thus does not have the 4-byte val field in the correct location. In order to rectify this, the other half of the union must be accessed. This is achieved in code by performing a byte swap on the entire 8 byte union, followed by a 4-byte swap of the first half. Also, eliminate an extraneous (dead) line of code that sets target_su.val in the IPC_SET/IPC_GET case. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Dereference Pointer Argument to ipc/semctl Sys CallTom Musta
When the ipc system call is used to wrap a semctl system call, the ptr argument to ipc needs to be dereferenced prior to passing it to the semctl handler. This is because the fourth argument to semctl is a union and not a pointer to a union. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2Tom Musta
The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 elements of the semid_ds structure from <sys/sem.h>. So eliminate these from the target_semid_ds structure. Signed-off-by: Tom Musta <tommusta@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: add setns and unshareRiku Voipio
Add support for the setns and unshare syscalls, trivially passed through to the host. Based on patches by Paul Burton, added configure check. Signed-off-by: Paul Burton <paul@archlinuxmips.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: support ioprio_{get, set} syscallsPaul Burton
Add support for the ioprio_get & ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton <paul@archlinuxmips.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: support timerfd_{create, gettime, settime} syscallsRiku Voipio
Adds support for the timerfd_create, timerfd_gettime & timerfd_settime syscalls, allowing use of timerfds by target programs. v2: By Riku - added configure check for timerfd and ifdefs for benefit of old distributions like RHEL5. Signed-off-by: Paul Burton <paul@archlinuxmips.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: fix readlink handling with magic exe symlinkMike Frysinger
The current code always returns the length of the path when it should be returning the number of bytes it wrote to the output string. Further, readlink is not supposed to append a NUL byte, but the current snprintf logic will always do just that. Even further, if you pass in a length of 0, you're suppoesd to get back an error (EINVAL), but the current logic just returns 0. Further still, if there was an error reading the symlink, we should not go ahead and try to read the target buffer as it is garbage. Simple test for the first two issues: $ cat test.c int main() { char buf[50]; size_t len; for (len = 0; len < 10; ++len) { memset(buf, '!', sizeof(buf)); ssize_t ret = readlink("/proc/self/exe", buf, len); buf[20] = '\0'; printf("readlink(/proc/self/exe, {%s}, %zu) = %zi\n", buf, len, ret); } return 0; } Now compare the output of the native: $ gcc test.c -o /tmp/x $ /tmp/x $ strace /tmp/x With what qemu does: $ armv7a-cros-linux-gnueabi-gcc test.c -o /tmp/x -static $ qemu-arm /tmp/x $ qemu-arm -strace /tmp/x Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Fix conversion of sigevent argument to timer_createPeter Maydell
There were a number of bugs in the conversion of the sigevent argument to timer_create from target to host format: * signal number not converted from target to host * thread ID not copied across * sigev_value not copied across * we never unlocked the struct when we were done Between them, these problems meant that SIGEV_THREAD_ID timers (and the glibc-implemented SIGEV_THREAD timers which depend on them) didn't work. Fix these problems and clean up the code a little by pulling the struct conversion out into its own function, in line with how we convert various other structs. This allows the test program in bug LP:1042388 to run. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: Fix syscall instruction usermode emulation on X86_64Jincheng Miao
Currently syscall instruction is buggy on user mode X86_64, the EIP is updated after do_syscall(), that is too late for clone(). Because clone() will create a thread at the env->EIP (the address of syscall insn), and then child thread enters do_syscall() again, that is not expected. Sometimes it is tragic. User mode syscall insn emulation is not used MSR, so the action should be same to INT 0x80. INT 0x80 will update EIP in do_interrupt(), ditto for syscall() for consistency. Signed-off-by: Jincheng Miao <jmiao@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: redirect openat callsRiku Voipio
While Mikhail fixed /proc/self/maps, it was noticed openat calls are not redirected currently. Some archs don't have open at all, so openat needs to be redirected. Fix this by consolidating open/openat code to do_openat - open is implemented using openat(AT_FDCWD, ... ), which according to open(2) man page is identical. Since all targets now have openat, remove the ifdef around sys_openat and openat: case in do_syscall. Cc: Mikhail Ilin <m.ilin@samsung.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22linux-user: /proc/self/maps contentMikhail Ilyin
Build /proc/self/maps doing a match against guest memory translation table. Output only that map records which are valid for guest memory layout. Signed-off-by: Mikhail Ilyin <m.ilin@samsung.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2014-08-22vmdk: Use bdrv_nb_sectors() where sectors, not bytes are wantedMarkus Armbruster
Instead of bdrv_getlength(). Commit 57322b7 did this all over block, but one more bdrv_getlength() has crept in since. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-08-22blkdebug: Delete BH in bdrv_aio_cancelFam Zheng
Otherwise error_callback_bh will access the already released acb. Cc: qemu-stable@nongnu.org Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-08-22qemu-iotests: add test case 101 for short file I/OStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-08-22raw-posix: fix O_DIRECT short readsStefan Hajnoczi
The following O_DIRECT read from a <512 byte file fails: $ truncate -s 320 test.img $ qemu-io -n -c 'read -P 0 0 512' test.img qemu-io: can't open device test.img: Could not read image for determining its format: Invalid argument Note that qemu-io completes successfully without the -n (O_DIRECT) option. This patch fixes qemu-iotests ./check -nocache -vmdk 059. Cc: qemu-stable@nongnu.org Suggested-by: Kevin Wolf <kwolf@redhat.com> Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-08-22block/iscsi: fix memory corruption on iscsi resizePeter Lieven
bs->total_sectors is not yet updated at this point. resulting in memory corruption if the volume has grown and data is written to the newly availble areas. CC: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>