commit_msg
stringlengths 1
24.2k
| commit_hash
stringlengths 2
84
⌀ | project
stringlengths 2
40
| source
stringclasses 4
values | labels
int64 0
1
| repo_url
stringlengths 26
70
⌀ | commit_url
stringlengths 74
118
⌀ | commit_date
stringlengths 25
25
⌀ |
---|---|---|---|---|---|---|---|
build: allow automatic git submodule updates to be disabled
Some people building QEMU use VPATH builds where the source directory is on a
read-only volume. In such a case 'scripts/git-submodules.sh update' will always
fail and users are required to run it manually themselves on their original
writable source directory.
While this is already supported, it is nice to give users a command line flag
to configure to permanently disable automatic submodule updates, as it means
they won't get hard to diagnose failures from git-submodules.sh at an arbitrary
later date.
This patch thus introduces a flag '--disable-git-update' which will prevent
'make' from ever running 'scripts/git-submodules.sh update'. It will still run
the 'status' command to determine if a submodule update is needed, but when it
does this it'll simply stop and print a message instructing the developer what
todo. eg
$ ./configure --target-list=x86_64-softmmu --disable-git-update
...snip...
$ make
GEN config-host.h
GEN trace/generated-tcg-tracers.h
GEN trace/generated-helpers-wrappers.h
GEN trace/generated-helpers.h
GEN trace/generated-helpers.c
GEN module_block.h
GIT submodule checkout is out of date. Please run
scripts/git-submodule.sh update ui/keycodemapdb
from the source directory checkout /home/berrange/src/virt/qemu
make: *** [Makefile:31: git-submodule-update] Error 1
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| f62bbee55d503f639ee9498878ebf42ff4f4299a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f62bbee55d503f639ee9498878ebf42ff4f4299a | 2017-11-06 11:04:36+00:00 |
hw/net/vmxnet3: Fix code to work on big endian hosts, too
Since commit ab06ec43577177a442e8 we test the vmxnet3 device in the
pxe-tester, too (when running "make check SPEED=slow"). This now
revealed that the code is not working there if the host is a big
endian machine (for example ppc64 or s390x) - "make check SPEED=slow"
is now failing on such hosts.
The vmxnet3 code lacks endianness conversions in a couple of places.
Interestingly, the bitfields in the structs in vmxnet3.h already tried to
take care of the *bit* endianness of the C compilers - but the code missed
to change the *byte* endianness when reading or writing the corresponding
structs. So the bitfields are now wrapped into unions which allow to change
the byte endianness during runtime with the non-bitfield member of the union.
With these changes, "make check SPEED=slow" now properly works on big endian
hosts, too.
Reported-by: David Gibson <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| c527e0afcd7d719abc3a5ca5e4c8ac2fe48b999f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c527e0afcd7d719abc3a5ca5e4c8ac2fe48b999f | 2017-11-20 11:08:00+08:00 |
Revert "s390x/ccw: create s390 phb conditionally"
This reverts commit d32bd032d8fde41281aae34c16a4aa97e9acfeac.
Turns out that old QEMUs always created a pci host bridge
and for many CPU models the migration from old QEMUs to new
QEMUs will fail with
qemu-system-s390x: Unknown savevm section or instance 'PCIBUS' 0
qemu-system-s390x: load of migration failed: Invalid argument
As a quick fix we will revert the commit and always create the
pci host bridge.
Signed-off-by: Christian Borntraeger <[email protected]>
[fixed revert to keep the comment fixup, added a comment in the code]
Cc: Cornelia Huck <[email protected]>
Cc: David Hildenbrand <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| c1843e20924c9f79c8233ea34db31f3ae2a74677 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c1843e20924c9f79c8233ea34db31f3ae2a74677 | 2017-10-06 10:53:02+02:00 |
390x/css: introduce maximum data address checking
The architecture mandates the addresses to be accessed on the first
indirection level (that is, the data addresses without IDA, and the
(M)IDAW addresses with (M)IDA) to be checked against an CCW format
dependent limit maximum address. If a violation is detected, the storage
access is not to be performed and a channel program check needs to be
generated. As of today, we fail to do this check.
Let us stick even closer to the architecture specification.
Signed-off-by: Halil Pasic <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Pierre Morel <[email protected]>
Reviewed-by: Dong Jia Shi <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| 62a2554ec2630896d1299e1a282a64c7f3b00da0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/62a2554ec2630896d1299e1a282a64c7f3b00da0 | 2017-10-06 10:53:02+02:00 |
checkpatch: fix incompatibility with old perl
Do not use '/r' modifier which was introduced in perl 5.14.
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Fixes: 3e5875afc0f ("checkpatch: check trace-events code style")
Tested-by: Alex Williamson <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 45042732f39ecd42794c256bf98f231e58849c3e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/45042732f39ecd42794c256bf98f231e58849c3e | 2017-10-05 10:22:44-04:00 |
ppc/kvm: change kvmppc_get_htab_fd() to return -errno on error
When kvmppc_get_htab_fd() fails, its return value is propagated up to
qemu_savevm_state_iterate() or to qemu_savevm_state_complete_precopy().
All savevm handlers expect to receive a negative errno on error.
Let's patch kvmppc_get_htab_fd() accordingly.
While here, let's change htab_load() in the spapr code to also
propagate the error, since it doesn't make sense to abort() if
we couldn't get the htab fd from KVM.
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 82be8e7394b31fd2d740651365b8ebdd0c847529 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/82be8e7394b31fd2d740651365b8ebdd0c847529 | 2017-09-27 13:05:41+10:00 |
net/rocker: Remove the dead error handling
Memory allocation functions like world_alloc, desc_ring_alloc etc,
they are all wrappers around g_malloc, g_new etc. But g_malloc and
similar functions doesn't return null. Because they ignore the fact
that g_malloc() of 0 bytes returns null. So error checks for these
allocation failure are superfluous. Now, remove them entirely.
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mao Zhongyi <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 107e4b352cc309f9bd7588ef1a44549200620078 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/107e4b352cc309f9bd7588ef1a44549200620078 | 2017-09-08 08:17:37+08:00 |
qapi-schema: Rocker doc section contains unrelated stuff, fix
Bug: section "Rocker switch device" starts with the rocker stuff, but
then has unrelated stuff, like ReplayMode, xen-load-devices-state, ...
Cause: rocker.json is included in the middle of section "QMP commands".
Fix: include it in a sane place, namely next to the other sub-schemas.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
| c7a4e0c40d29ba889b7ebcf4ec97c58be421123b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c7a4e0c40d29ba889b7ebcf4ec97c58be421123b | 2017-09-04 13:09:12+02:00 |
tests: fix incorrect size_t format in benchmark-crypto
$ make check-speed
tests/benchmark-crypto-hash.c: In function 'test_hash_speed':
tests/benchmark-crypto-hash.c:44:5: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' [-Werror=format=]
g_print("Testing chunk_size %ld bytes ", chunk_size);
^
tests/benchmark-crypto-hash.c: In function 'main':
tests/benchmark-crypto-hash.c:62:9: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' [-Werror=format=]
snprintf(name, sizeof(name), "/crypto/hash/speed-%lu", i);
^
cc1: all warnings being treated as errors
rules.mak:66: recipe for target 'tests/benchmark-crypto-hash.o' failed
make: *** [tests/benchmark-crypto-hash.o] Error 1
Reviewed-by: Longpeng(Mike) <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| 8c0a6dc96cd14c48da4a61fe35431f36d6e6e467 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8c0a6dc96cd14c48da4a61fe35431f36d6e6e467 | 2017-09-04 10:45:19+01:00 |
vga: fix display update region calculation (split screen)
vga display update mis-calculated the region for the dirty bitmap
snapshot in case split screen mode is used. This can trigger an
assert in cpu_physical_memory_snapshot_get_dirty().
Impact: DoS for privileged guest users.
Fixes: CVE-2017-13673
Fixes: fec5e8c92becad223df9d972770522f64aafdb72
Cc: P J P <[email protected]>
Reported-by: David Buchanan <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| e65294157d4b69393b3f819c99f4f647452b48e3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e65294157d4b69393b3f819c99f4f647452b48e3 | 2017-09-01 13:52:43+02:00 |
qxl: drop mono cursor support
The chunk size sanity check in qxl_render_cursor works for
SPICE_CURSOR_TYPE_ALPHA cursors only. So support for
SPICE_CURSOR_TYPE_MONO cursors must be broken for ages without anyone
noticing. Most likely it simply isn't used any more by guest drivers.
Drop the dead code.
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| 79c5a10cdda1aed00d7ee4ef87de2ef8c854f4a5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/79c5a10cdda1aed00d7ee4ef87de2ef8c854f4a5 | 2017-09-01 13:52:43+02:00 |
libvhost-user: quit when no more data received
End processing of messages when VHOST_USER_NONE
is received.
Without this we run into a vubr_panic() call and get
"PANIC: Unhandled request: 0"
Signed-off-by: Jens Freimann <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 2566378d6d13bf4d28c7770bdbda5f7682594bbe | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2566378d6d13bf4d28c7770bdbda5f7682594bbe | 2017-08-09 04:22:13+03:00 |
block/nfs: fix mutex assertion in nfs_file_close()
Commit c096358e747e88fc7364e40e3c354ee0bb683960 introduced assertion
checks for when qemu_mutex() functions are called without the
corresponding qemu_mutex_init() having initialized the mutex.
This uncovered a latent bug in qemu's nfs driver - in
nfs_client_close(), the NFSClient structure is overwritten with zeros,
prior to the mutex being destroyed.
Go ahead and destroy the mutex in nfs_client_close(), and change where
we call qemu_mutex_init() so that it is correctly balanced.
There are also a couple of memory leaks obscured by the memset, so this
fixes those as well.
Finally, we should be able to get rid of the memset(), as it isn't
necessary.
Cc: [email protected]
Signed-off-by: Jeff Cody <[email protected]>
Reviewed-by: Peter Lieven <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 113fe792fd4931dd0538f03859278b8719ee4fa2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/113fe792fd4931dd0538f03859278b8719ee4fa2 | 2017-08-08 15:19:16+02:00 |
hw/ppc/spapr_rtc: Mark the RTC device with user_creatable = false
QEMU currently aborts unexpectedly when a user tries to do something
like this:
$ qemu-system-ppc64 -nographic -S -nodefaults -monitor stdio
QEMU 2.9.92 monitor - type 'help' for more information
(qemu) device_add spapr-rtc,id=spapr-rtc
(qemu) device_del spapr-rtc
**
ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)
Aborted (core dumped)
The RTC device is not meant to be hot-pluggable - it's an internal
device only and it even should not be possible to create it a
second time with the "-device" parameter, so let's mark this
with "user_creatable = false".
Signed-off-by: Thomas Huth <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 8ccccff9dd7ba24c7a78861172e8dc6b07f1c392 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8ccccff9dd7ba24c7a78861172e8dc6b07f1c392 | 2017-08-22 21:26:46+10:00 |
qemu-iotests/162: Fix leaked temporary files
qemu-iotests 162 left qemu-nbd.pid behind in the scratch directory, and
potentially a file called '42' in the current directory. Make sure to
clean it up after completing the tests.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| a8e9c8480e30ee91d05ea096016526af46b1337e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a8e9c8480e30ee91d05ea096016526af46b1337e | 2017-08-01 18:09:33+02:00 |
Revert "syscall: fix dereference of undefined pointer"
This reverts commit bc658e4a2e81593f75a3ae34b112be77efbb3e0a.
Some versions of gcc warn about this:
linux-user/syscall.c: In function ‘do_ioctl_rt’:
linux-user/syscall.c:5577:37: error: ‘host_rt_dev_ptr’ may be used uninitialized in this function [-Werror=uninitialized]
and in particular the Travis builds fail; they use
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3.
Revert the change to fix the travis builds.
Signed-off-by: Peter Maydell <[email protected]>
| bdf211f884113426e1f8226b69731593efa003ea | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bdf211f884113426e1f8226b69731593efa003ea | 2017-07-31 13:56:54+01:00 |
qcow2-bitmap: fix bitmap_free
Fix possible crash on error path in
qcow2_remove_persistent_dirty_bitmap. Although bitmap_free was added in
88ddffae8fc the bug was introduced later in commit 469c71edc72 (when
qcow2_remove_persistent_dirty_bitmap was added).
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
| b6b75a99dab760c902c3d355519e0dc2616872e1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b6b75a99dab760c902c3d355519e0dc2616872e1 | 2017-07-25 16:33:31+02:00 |
target/alpha: Fix temp leak in gen_fbcond
Tested-by: Emilio G. Cota <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| 6a9b110d54b885dbb29872a142cc4d2a402fada8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6a9b110d54b885dbb29872a142cc4d2a402fada8 | 2017-07-18 18:42:02-10:00 |
target/sh4: Merge DREG into fpr64 routines
Also add a debugging assert that we did signal illegal opc
for odd double-precision registers.
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
[aurel32: fix whitespace issues]
Signed-off-by: Aurelien Jarno <[email protected]>
| 1e0b21d856d7654ea683e743e964c3b292122081 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1e0b21d856d7654ea683e743e964c3b292122081 | 2017-07-18 23:39:17+02:00 |
trace: update old trace events in docs
Commit c5f1ad429cdf26023cf331075a7d327708e3db6d ("block: Remove
bdrv_aio_readv/writev/flush()") removed
bdrv_aio_readv()/bdrv_aio_writev() so the example in the tracing
documentation is no longer valid.
Reported-by: Wang Dong <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 304187c51cfe1ffda1afc9b86c4ccae1cbac68cb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/304187c51cfe1ffda1afc9b86c4ccae1cbac68cb | 2017-07-17 13:11:13+01:00 |
spapr: Remove 'awaiting_allocation' DRC flag
The awaiting_allocation flag in the DRC was introduced by aab9913
"spapr_drc: Prevent detach racing against attach for CPU DR", allegedly to
prevent a guest crash on racing attach and detach. Except.. information
from the BZ actually suggests a qemu crash, not a guest crash. And there
shouldn't be a problem here anyway: if the guest has already moved the DRC
away from UNUSABLE state, the detach would already be deferred, and if it
hadn't it should be safe to detach it (the guest should fail gracefully
when it attempts to change the allocation state).
I think this was probably just a bandaid for some other problem in the
state management. So, remove awaiting_allocation and associated code.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Tested-by: Greg Kurz <[email protected]>
Tested-by: Daniel Barboza <[email protected]>
| 82a93a1d307064f35c363f79b04b0a0149ac53d9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/82a93a1d307064f35c363f79b04b0a0149ac53d9 | 2017-07-17 15:07:05+10:00 |
Revert "exec.c: Fix breakpoint invalidation race"
Now that we have proper locking after MTTCG patches have landed, we
can revert the commit. This reverts commit
a9353fe897ca2687e5b3385ed39e3db3927a90e0.
CC: Peter Maydell <[email protected]>
CC: Alex Bennée <[email protected]>
Signed-off-by: Pranith Kumar <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 406bc339b0505fcfc2ffcbca1f05a3756e338a65 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/406bc339b0505fcfc2ffcbca1f05a3756e338a65 | 2017-07-14 11:05:19+02:00 |
xilinx: Fix latent error handling bug
Assigning directly to *errp is not valid, as errp may be null,
&error_fatal, or &error_abort. The !*errp conditional protects
against the latter two, but we then leak @local_err. Fortunately,
the qdev core always passes pointer to null, so this is "merely" a
latent bug.
Use error_propagate() instead.
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: [email protected]
Signed-off-by: Eduardo Habkost <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
[Commit message clarified]
Signed-off-by: Markus Armbruster <[email protected]>
| a9859c90a5db200fd4f63ab2cdc973343348b9ef | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a9859c90a5db200fd4f63ab2cdc973343348b9ef | 2017-07-13 13:45:53+02:00 |
tcg/mips: Bugfix for crash when running program with qemu-i386.
When running a helloworld program with qemu-i386 in linux-user
mode on Loongson 3A3000, it will crash. This patch fix the bug.
Signed-off-by: Jiang Biao <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| 8b8d768f19037a825a0bc81654492caa7c8fab8b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8b8d768f19037a825a0bc81654492caa7c8fab8b | 2017-07-09 21:11:38-10:00 |
vhost-user: unregister slave req handler at cleanup time
If the backend sends a request just before closing the socket,
the aio dispatcher might schedule its reading after the vhost
device has been cleaned, leading to a NULL pointer dereference
in slave_read();
vhost_user_cleanup() already closes the socket but it is not
enough, the handler has to be unregistered.
Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| b9ec9bd468b2c5b218d16642e8f8ea4df60418bb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b9ec9bd468b2c5b218d16642e8f8ea4df60418bb | 2017-07-03 22:29:49+03:00 |
qom/cpu: remove host_tid field
This was only used by the gdbstub and even then was only being set for
subsequent threads. Rather the continue duplicating the number just
make the gdbstub get the information from TaskState structure.
Now the tid is correctly reported for all threads the bug I was seeing
with "vCont;C04:0;c" packets is fixed as the correct tid is reported
to gdb.
I moved cpu_gdb_index into the gdbstub to facilitate easy access to
the TaskState which is used elsewhere in gdbstub.
To prevent BSD failing to build I've included ts_tid into its
TaskStruct but not populated it - which was the same state as the old
cpu->host_tid. I'll leave it up to the BSD maintainers to actually
populate this properly if they want a working gdbstub with
user-threads.
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Reviewed-by: Claudio Imbrenda <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| bd88c780e6a17188f7fd676f3a056e5db21500e0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bd88c780e6a17188f7fd676f3a056e5db21500e0 | 2017-07-14 12:04:41+02:00 |
pci: Clean up error checking in pci_add_capability()
On success, pci_add_capability2() returns a positive value. On
failure, it sets an error and return a negative value.
pci_add_capability() laboriously checks this behavior. No other
caller does. Drop the checks from pci_add_capability().
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mao Zhongyi <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 673b0d7ccc34e9617d99ed4c29caa964f19a4c5a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/673b0d7ccc34e9617d99ed4c29caa964f19a4c5a | 2017-07-03 22:29:48+03:00 |
spapr: prevent QEMU crash when CPU realization fails
ICPState objects were being allocated before CPU thread realization.
However commit 9ed656631d73 (xics: setup cpu at realize time) reversed it
by allocating ICPState objects after CPU thread is realized. But it
didn't take care to fix the error path because of which we observe
a SIGSEGV when CPU thread realization fails during cold/hotplug.
Fix this by ensuring that we do object_unparent() of ICPState object
only in case when is was created earlier.
Signed-off-by: Bharata B Rao <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 6595ab31583ed3ca4a7820dc888fe2de3c37c8a2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6595ab31583ed3ca4a7820dc888fe2de3c37c8a2 | 2017-06-30 14:03:31+10:00 |
scripts: Test script to look for -device crashes
Test code to check if we can crash QEMU using -device. It will
test all accel/machine/device combinations by default, which may
take a few hours (it's more than 90k test cases). There's a "-r"
option that makes it test a random sample of combinations.
The scripts contains a whitelist for: 1) known error messages
that make QEMU exit cleanly; 2) known QEMU crashes.
This is the behavior when the script finds a failure:
* Known clean (exitcode=1) errors generate DEBUG messages
(hidden by default)
* Unknown clean (exitcode=1) errors will generate INFO messages
(visible by default)
* Known crashes generate error messages, but are not fatal
(unless --strict mode is used)
* Unknown crashes generate fatal error messages
Having an updated whitelist of known clean errors is useful to make the
script less verbose and run faster when in --quick mode, but the
whitelist doesn't need to be always up to date.
Signed-off-by: Eduardo Habkost <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 23ea4f30320bbd36a5d202ee469374ec3c747286 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/23ea4f30320bbd36a5d202ee469374ec3c747286 | 2017-06-05 14:59:09-03:00 |
q35/mch: implement extended TSEG sizes
The q35 machine type currently lets the guest firmware select a 1MB, 2MB
or 8MB TSEG (basically, SMRAM) size. In edk2/OVMF, we use 8MB, but even
that is not enough when a lot of VCPUs (more than approx. 224) are
configured -- SMRAM footprint scales largely proportionally with VCPU
count.
Introduce a new property for "mch" called "extended-tseg-mbytes", which
expresses (in megabytes) the user's choice of TSEG (SMRAM) size.
Invent a new, QEMU-specific register in the config space of the DRAM
Controller, at offset 0x50, in order to allow guest firmware to query the
TSEG (SMRAM) size.
According to Intel Document Number 316966-002, Table 5-1 "DRAM Controller
Register Address Map (D0:F0)":
Warning: Address locations that are not listed are considered Intel
Reserved registers locations. Reads to Reserved registers may
return non-zero values. Writes to reserved locations may
cause system failures.
All registers that are defined in the PCI 2.3 specification,
but are not necessary or implemented in this component are
simply not included in this document. The
reserved/unimplemented space in the PCI configuration header
space is not documented as such in this summary.
Offsets 0x50 and 0x51 are not listed in Table 5-1. They are also not part
of the standard PCI config space header. And they precede the capability
list as well, which starts at 0xe0 for this device.
When the guest writes value 0xffff to this register, the value that can be
read back is that of "mch.extended-tseg-mbytes" -- unless it remains
0xffff. The guest is required to write 0xffff first (as opposed to a
read-only register) because PCI config space is generally not cleared on
QEMU reset, and after S3 resume or reboot, new guest firmware running on
old QEMU could read a guest OS-injected value from this register.
After reading the available "extended" TSEG size, the guest firmware may
actually request that TSEG size by writing pattern 11b to the ESMRAMC
register's TSEG_SZ bit-field. (The Intel spec referenced above defines
only patterns 00b (1MB), 01b (2MB) and 10b (8MB); 11b is reserved.)
On the QEMU command line, the value can be set with
-global mch.extended-tseg-mbytes=N
The default value for 2.10+ q35 machine types is 16. The value is limited
to 0xfff (4095) at the moment, purely so that the product (4095 MB) can be
stored to the uint32_t variable "tseg_size" in mch_update_smram(). Users
are responsible for choosing sensible TSEG sizes.
On 2.9 and earlier q35 machine types, the default value is 0. This lets
the 11b bit pattern in ESMRAMC.TSEG_SZ, and the register at offset 0x50,
keep their original behavior.
When "extended-tseg-mbytes" is nonzero, the new register at offset 0x50 is
set to that value on reset, for completeness.
PCI config space is migrated automatically, so no VMSD changes are
necessary.
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1447027
Ref: https://lists.01.org/pipermail/edk2-devel/2017-May/010456.html
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 2f295167e0c429cec233aef7dc8e9fd6f90376df | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2f295167e0c429cec233aef7dc8e9fd6f90376df | 2017-06-16 18:07:08+03:00 |
curl: split curl_find_state/curl_init_state
If curl_easy_init fails, a CURLState is left with s->in_use = 1. Split
curl_init_state in two, so that we can distinguish the two failures and
call curl_clean_state if needed.
While at it, simplify curl_find_state, removing a dummy loop. The
aio_poll loop is moved to the sole caller that needs it.
Reviewed-by: Jeff Cody <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: [email protected]
Signed-off-by: Jeff Cody <[email protected]>
| 3ce6a729b5d78b13283ddc6c529811f67519a62d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3ce6a729b5d78b13283ddc6c529811f67519a62d | 2017-05-16 10:34:45-04:00 |
qcow2: Optimize write zero of unaligned tail cluster
We've already improved discards to operate efficiently on the tail
of an unaligned qcow2 image; it's time to make a similar improvement
to write zeroes. The special case is only valid at the tail
cluster of a file, where we must recognize that any sectors beyond
the image end would implicitly read as zero, and therefore should
not penalize our logic for widening a partial cluster into writing
the whole cluster as zero.
However, note that for now, the special case of end-of-file is only
recognized if there is no backing file, or if the backing file has
the same length; that's because when the backing file is shorter
than the active layer, we don't have code in place to recognize
that reads of a sector unallocated at the top and beyond the backing
end-of-file are implicitly zero. It's not much of a real loss,
because most people don't use images that aren't cluster-aligned,
or where the active layer is a different size than the backing
layer (especially where the difference falls within a single cluster).
Update test 154 to cover the new scenarios, using two images of
intentionally differing length.
While at it, fix the test to gracefully skip when run as
./check -qcow2 -o compat=0.10 154
since the older format lacks zero clusters already required earlier
in the test.
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
| fbaa6bb3d3b4be71b7e234e908cb3c6bd280a222 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fbaa6bb3d3b4be71b7e234e908cb3c6bd280a222 | 2017-05-11 14:28:07+02:00 |
target/sh4: fix RTE instruction delay slot
The ReTurn from Exception (RTE) instruction loads the system register
(SR) with the saved system register (SSR). It has a delay slot, and
behaves specially according to the SH4 manual:
The SR value accessed by the instruction in the RTE delay slot is the
value restored from SSR by the RTE instruction. The SR and MD values
defined prior to RTE execution are used to fetch the instruction in
the RTE delay slot.
The instruction in the delay slot being often a NOP, it doesn't cause
any issue most of the time except in some rare cases where the NOP is
being splitted in a different TB (for example when the TCG op buffer
is full). In that case the NOP is fetched with the user permissions
and causes an instruction TLB protection violation exception.
This patches fixes that by introducing a new delay slot flag for the
RTE instruction. Given it's a privileged instruction, the RTE delay
slot instruction is always fetched in privileged mode. It is therefore
enough to to check for this flag in cpu_mmu_index.
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| be53081a619443dc4512039d89345475ef7d9a46 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/be53081a619443dc4512039d89345475ef7d9a46 | 2017-05-30 21:00:56+02:00 |
Revert "COLO-compare: Optimize tcp compare trace event"
This reverts commit 0fc8aec7de64f2bf83a274a2a38b938ce03425d2.
In commit 2dfe5113b11 we split a trace event with a lot of arguments
in two, because the UST trace backend has a limit on the number
of arguments you can have in a single trace event. Unfortunately
we subsequently forgot about this, and in commit 0fc8aec7de64f2
we merged the two trace events again, recreating the "UST backend
doesn't build" bug.
Signed-off-by: Peter Maydell <[email protected]>
| 51b9d495f2a99c65c9e524c8f6fe283ebfabae1d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/51b9d495f2a99c65c9e524c8f6fe283ebfabae1d | 2017-04-26 16:19:27+01:00 |
tests: Add a tester for HMP commands
HMP commands do not get any automatic testing yet, so on certain
QEMU machines, some HMP commands were causing crashes in the past.
Thus we should test HMP commands in our test suite, too, to avoid
that such problems creep in again in the future.
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
| 78f86a2b7c6b5c490a612729816473485d7ac570 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/78f86a2b7c6b5c490a612729816473485d7ac570 | 2017-04-26 14:42:31+01:00 |
use _Static_assert in QEMU_BUILD_BUG_ON
QEMU_BUILD_BUG_ON should use C11's _Static_assert, if the compiler supports it,
to provide more readable messages on failure.
We check for _Static_assert in configure, and set CONFIG_STATIC_ASSERT
accordingly. QEMU_BUILD_BUG_ON invokes _Static_assert if CONFIG_STATIC_ASSERT
is defined, and reverts to the old way otherwise.
That way, systems without C11 conforming compiler will still have the old
messages, as verified by intentionally breaking the configure check.
the following example output was generated by inverting the condition in
QEMU_BUILD_BUG_ON:
without _Static_assert:
> In file included from /qemu/include/qemu/osdep.h:36:0,
> from /qemu/qga/commands.c:13:
> /qemu/qga/commands.c: In function ‘qmp_guest_exec_status’:
> /qemu/include/qemu/compiler.h:89:12: error: negative width in bit-field ‘<anonymous>’
> struct { \
> ^
> /qemu/include/qemu/compiler.h:96:38: note: in expansion of macro QEMU_BUILD_BUG_ON_STRUCT’
> #define QEMU_BUILD_BUG_ON(x) typedef QEMU_BUILD_BUG_ON_STRUCT(x) \
> ^~~~~~~~~~~~~~~~~~~~~~~~
> /qemu/include/qemu/atomic.h:146:5: note: in expansion of macro ‘QEMU_BUILD_BUG_ON’
> QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
> ^~~~~~~~~~~~~~~~~
> /qemu/include/qemu/atomic.h:417:5: note: in expansion of macro ‘atomic_load_acquire’
> atomic_load_acquire(ptr)
> ^~~~~~~~~~~~~~~~~~~
> /qemu/qga/commands.c:160:21: note: in expansion of macro ‘atomic_mb_read’
> bool finished = atomic_mb_read(&gei->finished);
> ^~~~~~~~~~~~~~
with _Static_assert:
> In file included from /qemu/include/qemu/osdep.h:36:0,
> from /qemu/qga/commands.c:13:
> /qemu/qga/commands.c: In function ‘qmp_guest_exec_status’:
> /qemu/include/qemu/compiler.h:94:30: error: static assertion failed: "not expecting: sizeof(*&gei->finished) > sizeof(void *)"
> #define QEMU_BUILD_BUG_ON(x) _Static_assert(!(x), #x)
> ^
> /qemu/include/qemu/atomic.h:146:5: note: in expansion of macro ‘QEMU_BUILD_BUG_ON’
> QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
> ^~~~~~~~~~~~~~~~~
> /qemu/include/qemu/atomic.h:417:5: note: in expansion of macro ‘atomic_load_acquire’
> atomic_load_acquire(ptr)
> ^~~~~~~~~~~~~~~~~~~
> /qemu/qga/commands.c:160:21: note: in expansion of macro ‘atomic_mb_read’
> bool finished = atomic_mb_read(&gei->finished);
> ^~~~~~~~~~~~~~
Signed-off-by: Andreas Grapentin <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 09d352042fa91d296079e449c4d7fd6f42d5db05 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/09d352042fa91d296079e449c4d7fd6f42d5db05 | 2017-05-10 10:19:23+03:00 |
ui/console: ensure do_safe_dpy_refresh holds BQL
I missed the fact that when an exclusive work item runs it drops the
BQL to ensure all no vCPUs are stuck waiting for it, hence causing a
deadlock. However the actual helper needs to take the BQL especially
as we'll be messing with device emulation bits during the update which
all assume BQL is held.
We make a minor cpu_reloading_memory_map which must try and unlock the
RCU if we are actually outside the running context.
Reported-by: Laurent Desnogues <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
| 85390939190e4b7eeba57765e344947c328cd166 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/85390939190e4b7eeba57765e344947c328cd166 | 2017-03-28 10:52:24+01:00 |
cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16
The switch from pointers to addresses (commit
026aeffcb4752054830ba203020ed6eb05bcaba8 and
ffaf857778286ca54e3804432a2369a279e73aa7) added
a off-by-one bug to 16bit backward blits. Fix.
Reported-by: 李强 <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Li Qiang <[email protected]>
Message-id: [email protected]
| f019722cbbb45aea153294fc8921fcc96a4d3fa2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f019722cbbb45aea153294fc8921fcc96a4d3fa2 | 2017-03-17 10:23:44+01:00 |
hw/misc/imx6_src: Don't crash trying to reset missing CPUs
Commit 4881658a4b introduced a call to arm_get_cpu_by_id(),
and Coverity noticed that we weren't checking that it didn't
return NULL (CID 1371652).
Normally this won't happen (because all 4 CPUs are expected
to exist), but it's possible the user requested fewer CPUs
on the command line. Handle this possibility by silently
doing nothing, which is the same behaviour as before commit
4881658a4b and also how we handle the other CPU operations
(since we ignore the INVALID_PARAM returns from arm_set_cpu_on()
and friends).
There is a slight behavioural difference to the pre-4881658a4b
situation: the "reset this core" bit will remain set rather
than not being permitted to be set. The imx6 datasheet is
unclear about the behaviour in this odd corner case, so we
opt for the simpler code rather than complicated logic to
maintain identical behaviour.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Reviewed-by: Alex Bennée <[email protected]>
| 5e2fb7c598c6ae2481ca65d3a730b7fc29fdefbb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5e2fb7c598c6ae2481ca65d3a730b7fc29fdefbb | 2017-03-14 16:13:22+00:00 |
9pfs: fix fd leak in local_opendir()
Coverity issue CID1371731
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
| faab207f115cf9738f110cb088ab35a4b7aef73a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/faab207f115cf9738f110cb088ab35a4b7aef73a | 2017-03-06 17:34:01+01:00 |
qmp: Drop duplicated QMP command object checks
qmp_check_input_obj() duplicates qmp_dispatch_check_obj(), except the
latter screws up an error message. handle_qmp_command() runs first
the former, then the latter via qmp_dispatch(), masking the screwup.
qemu-ga also masks the screwup, because it also duplicates checks,
just differently.
qmp_check_input_obj() exists because handle_qmp_command() needs to
examine the command before dispatching it. The previous commit got
rid of this need, except for a tracepoint, and a bit of "id" code that
relies on qdict not being null.
Fix up the error message in qmp_dispatch_check_obj(), drop
qmp_check_input_obj() and the tracepoint. Protect the "id" code with
a conditional.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
| 104fc3027960dd2aa9d310936a6cb201c60e1088 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/104fc3027960dd2aa9d310936a6cb201c60e1088 | 2017-03-05 09:14:19+01:00 |
tests: fix virtio-blk-test leaks
Use qvirtio_pci_device_find_slot() to avoid leaking the non-hp
device. Add assert() to avoid further leaks in the future.
Use qvirtio_pci_device_free() to correctly free QVirtioPCIDevice.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 80e1eea37a25a7696137e680285e36d0bfdc9f34 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/80e1eea37a25a7696137e680285e36d0bfdc9f34 | 2017-03-01 11:58:57+04:00 |
tests: fix q35-test leaks
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| fb6faea888c1e54059aed7f87be93de623b346ee | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fb6faea888c1e54059aed7f87be93de623b346ee | 2017-03-01 11:50:33+04:00 |
9pfs: local: symlink: don't follow symlinks
The local_symlink() callback is vulnerable to symlink attacks because it
calls:
(1) symlink() which follows symbolic links for all path elements but the
rightmost one
(2) open(O_NOFOLLOW) which follows symbolic links for all path elements but
the rightmost one
(3) local_set_xattr()->setxattr() which follows symbolic links for all
path elements
(4) local_set_mapped_file_attr() which calls in turn local_fopen() and
mkdir(), both functions following symbolic links for all path
elements but the rightmost one
This patch converts local_symlink() to rely on opendir_nofollow() and
symlinkat() to fix (1), openat(O_NOFOLLOW) to fix (2), as well as
local_set_xattrat() and local_set_mapped_file_attrat() to fix (3) and
(4) respectively.
This partly fixes CVE-2016-9602.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 38771613ea6759f499645afd709aa422161eb27e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/38771613ea6759f499645afd709aa422161eb27e | 2017-02-28 11:21:15+01:00 |
9pfs: local: unlinkat: don't follow symlinks
The local_unlinkat() callback is vulnerable to symlink attacks because it
calls remove() which follows symbolic links in all path elements but the
rightmost one.
This patch converts local_unlinkat() to rely on opendir_nofollow() and
unlinkat() instead.
Most of the code is moved to a separate local_unlinkat_common() helper
which will be reused in a subsequent patch to fix the same issue in
local_remove().
This partly fixes CVE-2016-9602.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| df4938a6651b1f980018f9eaf86af43e6b9d7fed | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/df4938a6651b1f980018f9eaf86af43e6b9d7fed | 2017-02-28 11:21:15+01:00 |
migration/vmstate: split up vmstate_base_addr
Currently vmstate_base_addr does several things: it pinpoints the field
within the struct, possibly allocates memory and possibly does the first
pointer dereference. Obviously allocation is needed only for load.
Let us split up the functionality in vmstate_base_addr and move the
address manipulations (that is everything but the allocation logic) to
load and save so it becomes more obvious what is actually going on. Like
this all the address calculations (and the handling of the flags
controlling these) is in one place and the sequence is more obvious.
The newly introduced function vmstate_handle_alloc also fixes the
allocation for the unused VMS_VBUFFER|VMS_MULTIPLY|VMS_ALLOC scenario
and is substantially simpler than the original vmstate_base_addr.
In load and save some asserts are added so it's easier to debug
situations where we would end up with a null pointer dereference.
Signed-off-by: Halil Pasic <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
| cbfda0e6cfb9d2c7c99b9475bb85ef29f1643ce3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cbfda0e6cfb9d2c7c99b9475bb85ef29f1643ce3 | 2017-02-28 11:29:00+00:00 |
option: Fix checking of sizes for overflow and trailing crap
parse_option_size()'s checking for overflow and trailing crap is
wrong. Has always been that way. qemu_strtosz() gets it right, so
use that.
This adds support for size suffixes 'P', 'E', and ignores case for all
suffixes, not just 'k'.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
| 75cdcd1553e74b5edc58aed23e3b2da8dabb1876 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/75cdcd1553e74b5edc58aed23e3b2da8dabb1876 | 2017-02-23 20:35:36+01:00 |
check-qdict: Tighten qdict_crumple_test_recursive() some
Consistently check for unexpected QDict entries, and qdict_get_qdict()
success. The latter doesn't tighten the test, it only makes it fail
more nicely.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| a68931ea5f87ee3cc3144348596077de87f94c93 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a68931ea5f87ee3cc3144348596077de87f94c93 | 2017-02-22 19:51:51+01:00 |
target/openrisc: Fix exception handling status registers
I am working on testing instruction emulation patches for the linux
kernel. During testing I found these 2 issues:
- sets DSX (delay slot exception) but never clears it
- EEAR for illegal insns should point to the bad exception (as per
openrisc spec) but its not
This patch fixes these two issues by clearing the DSX flag when not in a
delay slot and by setting EEAR to exception PC when handling illegal
instruction exceptions.
After this patch the openrisc kernel with latest patches boots great on
qemu and instruction emulation works.
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Stafford Horne <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| c56e3b86701501364a4756201b6a9db9454463ab | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c56e3b86701501364a4756201b6a9db9454463ab | 2017-02-14 08:14:59+11:00 |
qemu-img: Avoid setting ret to unused value in img_convert()
Coverity points out that we assign the return value from
bdrv_snapshot_load_tmp() to 'ret' in img_convert(), but then
never use that variable. (We check for failure by looking
at local_err instead.) Drop the unused assignment, bringing
the call into line with the following call to
bdrv_snapshot_laod_tmp_by_id_or_name().
(Fixes CID 1247240.)
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
| 10d6eda1926804a09aa0710ca62933087813de0b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/10d6eda1926804a09aa0710ca62933087813de0b | 2017-02-12 00:56:32+01:00 |
ahci: advertise HOST_CAP_64
The AHCI emulation code supports 64-bit addressing and should advertise this
fact in the Host Capabilities register. Both Linux and Windows drivers test
this bit to decide if the upper 32 bits of various registers may be written
to, and at least some versions of Windows have a bug where DMA is attempted
with an address above 4GB but, in the absence of HOST_CAP_64, the upper 32
bits are left unititialized which leads to a memory corruption.
[Maintainer edit:
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1411105,
which affects Windows Server 2008 SP2 in some cases.]
Signed-off-by: Ladi Prosek <[email protected]>
Message-id: [email protected]
[Amended commit message --js]
Signed-off-by: John Snow <[email protected]>
| 98cb5dccb192b0082626080890dac413473573c6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/98cb5dccb192b0082626080890dac413473573c6 | 2017-02-10 11:47:11-05:00 |
trace: Lock vCPU list when initializing dynamic tracing state
Fixes potential corruption when a vCPU is hot-(un)plugged while
initializing the current one.
Signed-off-by: Lluís Vilanova <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| fff895dfdbe41965f7b0430e3d9e8b7bd8fc8eda | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fff895dfdbe41965f7b0430e3d9e8b7bd8fc8eda | 2017-01-16 13:40:56+00:00 |
migration: Allow "device add" options to only add migratable devices
Introduce checks for the unmigratable flag in the VMStateDescription
structs of respective devices when user attempts to add them. If the
"--only-migratable" was specified, all unmigratable devices will
rightly fail to add. This feature is made compatible for both "-device"
and "-usbdevice" command line options and covers their hmp and qmp
counterparts as well.
Signed-off-by: Ashijeet Acharya <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
| a3a3d8c73889282eb696535f1b5345d88b4dc58c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a3a3d8c73889282eb696535f1b5345d88b4dc58c | 2017-01-24 17:54:47+00:00 |
virtio-gpu: fix memory leak in update_cursor_data_virgl
In update_cursor_data_virgl function, if the 'width'/ 'height'
is not equal to current cursor's width/height it will return
without free the 'data' allocated previously. This will lead
a memory leak issue. This patch fix this issue.
Signed-off-by: Li Qiang <[email protected]>
Message-id: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 2d1cd6c7a91a4beb99a0c3a21be529222a708545 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2d1cd6c7a91a4beb99a0c3a21be529222a708545 | 2016-12-05 09:37:52+01:00 |
target-xtensa: implement RER/WER instructions
RER and WER are privileged instructions for accessing external
registers. External register address space is local to processor core.
There's no alignment requirements, addressable units are 32-bit wide
registers.
Signed-off-by: Max Filippov <[email protected]>
| 3a3c9dc4ca2eaa612cbd5d4c85d674b15eadfb02 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3a3c9dc4ca2eaa612cbd5d4c85d674b15eadfb02 | 2017-01-16 19:19:03-08:00 |
virtio-gpu: fix information leak in getting capset info dispatch
In virgl_cmd_get_capset_info dispatch function, the 'resp' hasn't
been full initialized before writing to the guest. This will leak
the 'resp.padding' and 'resp.hdr.padding' fieds to the guest. This
patch fix this issue.
Signed-off-by: Li Qiang <[email protected]>
Message-id: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 42a8dadc74f8982fc269e54e3c5627b54d9f83d8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/42a8dadc74f8982fc269e54e3c5627b54d9f83d8 | 2016-12-05 09:37:52+01:00 |
migration: re-active images while migration been canceled after inactive them
commit fe904ea8242cbae2d7e69c052c754b8f5f1ba1d6 fixed a case
which migration aborted QEMU because it didn't regain the control
of images while some errors happened.
Actually, there are another two cases can trigger the same error reports:
" bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed",
Case 1, codes path:
migration_thread()
migration_completion()
bdrv_inactivate_all() ----------------> inactivate images
qemu_savevm_state_complete_precopy()
socket_writev_buffer() --------> error because destination fails
qemu_fflush() ----------------> set error on migration stream
-> qmp_migrate_cancel() ----------------> user cancelled migration concurrently
-> migrate_set_state() ------------------> set migrate CANCELLIN
migration_completion() -----------------> go on to fail_invalidate
if (s->state == MIGRATION_STATUS_ACTIVE) -> Jump this branch
Case 2, codes path:
migration_thread()
migration_completion()
bdrv_inactivate_all() ----------------> inactivate images
migreation_completion() finished
-> qmp_migrate_cancel() ---------------> user cancelled migration concurrently
qemu_mutex_lock_iothread();
qemu_bh_schedule (s->cleanup_bh);
As we can see from above, qmp_migrate_cancel can slip in whenever
migration_thread does not hold the global lock. If this happens after
bdrv_inactive_all() been called, the above error reports will appear.
To prevent this, we can call bdrv_invalidate_cache_all() in qmp_migrate_cancel()
directly if we find images become inactive.
Besides, bdrv_invalidate_cache_all() in migration_completion() doesn't have the
protection of big lock, fix it by add the missing qemu_mutex_lock_iothread();
Signed-off-by: zhanghailiang <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
| 1d2acc3162d9c7772510c973f446353fbdd1f9a8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1d2acc3162d9c7772510c973f446353fbdd1f9a8 | 2017-01-24 18:00:31+00:00 |
pseries: Update SLOF firmware image to 20161019
The main changes are:
* virtio-serial
* booting speed imrovement
* better PCI bridge support
The complete changelog is:
> virtio-serial: Fix compile error
> scsi: Remove debug functions from scsi-loader.fs
> scsi: Remove unused read-6 command
> obp-tftp: Remove the ciregs-buffer
> libnet: Simplify the net-load arguments passing
> libnet: Simplify the Forth-to-C wrapper of ping()
> Do not link libnet to net-snk anymore, and remove net-snk from board-qemu
> Add a Forth-to-C wrapper for the ping command, too
> Link libnet code to Paflof and add a wrapper for netboot()
> Remember execution tokens of "write" and "read" for socket operations
> Add virtio-serial device support
> Generalize output banner write routine
> Improve indentation in OF.fs
> scsi: implement READ (16) command
> rtas: Improve rtas-do-config-@ and rtas-do-config-! a little bit
> libnet: Make netapps.h includable from .code files
> libnet: Remove unused prototypes from netapps.h
> libnet: Fix the printout of the ping command
> libnet: Make sure to close sockets when we're done
> scsi: implement read-capacity-16
> pci: Fix secondary and subordinate PCI bus enumeration with board-qemu
> pci-phb: Fix stack underflow in phb-pci-walk-bridge
> paflof: Add a read() function to read keyboard input
> paflof: Add socket(), send() and recv() functions to paflof
> paflof: Provide get_timer() and set_timer() helper functions
> paflof: Add a write_mm_log helper function
> paflof: Copy sbrk code from net-snk
> paflof: Use CFLAGS from make.rules instead of completely redefining them
> Do not include the FCode evaluator by default anymore
> Source code beautification of board-qemu/slof/pci-interrupts.fs
> Allow PCI devices in PCI bridge slots greater than 4
> Fix bad interrupt pin numbering in interrupt-map property of PCI bridges
> Improve SLOF_alloc_mem_aligned()
> instance: Fix set-my-args for empty arguments
> Fix remaining compiler warnings in sloffs.c
> Remove misleading padding fields from ROM header definition
> Improve indentation in calculatecrc.h
> Do not include calculatecrc.h from assembler files
> Remove unused defines in calculatecrc.h
> libnet: Re-initialize global variables at the beginning of tftp()
> Remove dependency on cpu/@0 for booting
> usb: Set XHCI slot speed according to port status
> usb: Build correct route string for USB3 devices behind a hub
> usb: Initialize USB3 devices on a hub and keep track of hub topology
> usb: Increase amount of maximum slot IDs and add a sanity check
> usb: Move XHCI port state arrays from header to .c file
> tools: add copy functionality
> tools: added support to sloffs to read from /dev/slof_flash
> tools: added file append functionality
> tools: use crc checking code from romfs/tools
> tools: added initial version of sloffs
> romfs: factored out crc code, to make it usable from other locations
> tools: remove unused parts from the Makefile
> usb-hid: Fix non-working comma key
> fat-files: Fix access to FAT32 dir/files when cluster > 16-bits
> virtio-net: fix ring handling in receive
> net: Remove remainders of the MTFTP code
> net: Move also files from clients/net-snk/app/netapps/ to lib/libnet/
> net: Move files from clients/net-snk/app/netlib/ to lib/libnet/
> net-snk: Get rid of netlib and netapps prefixes in include statements
> usb-xhci: assign field4 before conditional
> Improve F12 key handling in boot menu
> Fix stack underflow that occurs with duplicated ESC in input
> rtas-nvram: optimize erase
> ipv6: Replace magic number 1500 with ETH_MTU_SIZE (i.e. 1518)
> ipv6: Fix NULL pointer dereference in ip6addr_add()
> ipv6: Fix memory leak in set_ipv6_address() / ip6_create_ll_address()
> ipv6: Clear memory after malloc if necessary
> ipv6: Fix possible NULL-pointer dereference in send_ipv6()
> ping: use gateway address for routing
> ping: add netmask in the ping argument
> xhci: fix missing keys from keyboard
> xhci: add memory barrier after filling the trb
> loaders: Remove netflash command
> boot: Remove legacy Forth words for network loading
> base: Move cnt-bits and bcd-to-bin to board-js2x folder
> base: Move huge-tftp-load variable to obp-tftp package
> base: Remove unused IP address conversion functions
> virtio: White space cleanup in virtio-9p.c
> virtio: Add modern version 1.0 support to 9p driver
> virtio: Set a proper name for virtio-9p device tree nodes
> pci: Fix mistype in "unkown-bridge"
> ipv6: Indent code with tabs, not with spaces
> ipv6: send_ipv6() has to return after doing NDP
> ipv6: Do not use unitialized MAC address array
> ipv6: Add support for sending packets through a router
> Remove unused sms code.
> virtio-net: initialize to populate mac address
> libbootmsg: Do not use '\b' characters when printing checkpoints
> dev-null: The "read" function has to return 0 if nothing has been read
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| f77d4ff8506ca4f608052486d87f8a3ed03d5202 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f77d4ff8506ca4f608052486d87f8a3ed03d5202 | 2016-10-28 09:36:58+11:00 |
trace: don't abort qemu if ftrace can't be initialized
If the ftrace backend is compiled into QEMU, any attempt
to start QEMU while non-root will fail due to the
inability to open /sys/kernel/debug/tracing/tracing_on.
Add a fallback into the code so that it connects up the
trace_marker_fd variable to /dev/null when getting
EACCES on the 'trace_on' file. This allows QEMU to
run, with ftrace turned into a no-op.
[Fixed s/setting/getting/ and s/EACCESS/EACCES/ errors pointed out by
Eric Blake <[email protected]>.
--Stefan]
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 8ed5372874377af4a84a330eeaff1d9d663ca930 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8ed5372874377af4a84a330eeaff1d9d663ca930 | 2016-10-12 09:35:54+02:00 |
tests: acpi: extend cphp testcase with numa check
so it would be possible to verify _PXM generation in
DSDT and SRAT tables.
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| d6309c170eb99950c9f1d881a5ff7163ae28d353 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d6309c170eb99950c9f1d881a5ff7163ae28d353 | 2016-10-10 01:16:58+03:00 |
cadence_gem: Fix priority queue out of bounds access
There was an error with some of the register implementation assuming
there are 16 priority queues supported when the IP only supports 8. This
patch corrects the registers to only support 8 queues.
Signed-off-by: Alistair Francis <[email protected]>
Reported-by: Paolo Bonzini <[email protected]>
Message-id: 33bf2d28326d22875602234b8b15cf56fb678333.1474911607.git.alistair.francis@xilinx.com
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 79b2ac8f28748b09816d09bd62a2b49ddc01ebeb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/79b2ac8f28748b09816d09bd62a2b49ddc01ebeb | 2016-10-04 13:28:09+01:00 |
linux-user: Use glib malloc functions in load_symbols()
Switch to using the glib malloc functions in load_symbols();
this deals with a Coverity complaint about possible
integer overflow calculating the allocation size with
'nsyms * sizeof(*syms)'.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| 0ef9ea290ed9319cb788ea40be06dd18b32ba05a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0ef9ea290ed9319cb788ea40be06dd18b32ba05a | 2016-09-21 14:28:20+03:00 |
usb-mtp: fix sending files larger than 4gb
MTP requires that if a file is larger than 4gb or if sending data larger
than 4gb, that the length field be set to 0xFFFFFFFF.
Also widened a couple variables to prevent overflow errors.
Signed-off-by: Isaac Lozano <[email protected]>
Message-id: 01ad8ec7775f58575801ac3f13716f553a16815e.1470477265.git.109lozanoi@gmail.com
Signed-off-by: Gerd Hoffmann <[email protected]>
| 8a5865f331028e66b4ed233129d7a914c2d5bfc7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8a5865f331028e66b4ed233129d7a914c2d5bfc7 | 2016-09-14 11:17:06+02:00 |
tests: fix rsp leak in postcopy-test
In all cases, even when the dict doesn't contain 'ram', the qmp response
must be unref.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 5b1ded224f46d56053f419cf24c1335b6dde40ee | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5b1ded224f46d56053f419cf24c1335b6dde40ee | 2016-09-08 18:05:22+04:00 |
vnc: fix qemu crash because of SIGSEGV
The backtrace is:
0x00007f0b75cdf880 in pixman_image_get_stride () from /lib64/libpixman-1.so.0
0x00007f0b77bcb3cf in vnc_server_fb_stride (vd=0x7f0b7a1a2bb0) at ui/vnc.c:680
vnc_dpy_copy (dcl=0x7f0b7a1a2c00, src_x=224, src_y=263, dst_x=319, dst_y=363, w=1, h=1) at ui/vnc.c:915
0x00007f0b77bbcc35 in dpy_gfx_copy (con=0x7f0b7a146210, src_x=src_x@entry=224, src_y=src_y@entry=263, dst_x=dst_x@entry=319,
dst_y=dst_y@entry=363, w=1, h=1) at ui/console.c:1575
0x00007f0b77bbda4e in qemu_console_copy (con=<optimized out>, src_x=src_x@entry=224, src_y=src_y@entry=263, dst_x=dst_x@entry=319,
dst_y=dst_y@entry=363, w=<optimized out>, h=<optimized out>) at ui/console.c:2111
0x00007f0b77ac0980 in cirrus_do_copy (h=<optimized out>, w=<optimized out>, src=<optimized out>, dst=<optimized out>, s=0x7f0b7b086090) at hw/display/cirrus_vga.c:774
cirrus_bitblt_videotovideo_copy (s=0x7f0b7b086090) at hw/display/cirrus_vga.c:793
cirrus_bitblt_videotovideo (s=0x7f0b7b086090) at hw/display/cirrus_vga.c:915
cirrus_bitblt_start (s=0x7f0b7b086090) at hw/display/cirrus_vga.c:1056
0x00007f0b77965cfb in memory_region_write_accessor (mr=0x7f0b7b096e40, addr=320, value=<optimized out>, size=1, shift=<optimized out>,mask=<optimized out>, attrs=...) at /root/rpmbuild/BUILD/master/qemu/memory.c:525
0x00007f0b77963f59 in access_with_adjusted_size (addr=addr@entry=320, value=value@entry=0x7f0b69a268d8, size=size@entry=4,
access_size_min=<optimized out>, access_size_max=<optimized out>, access=access@entry=0x7f0b77965c80 <memory_region_write_accessor>,
mr=mr@entry=0x7f0b7b096e40, attrs=attrs@entry=...) at /root/rpmbuild/BUILD/master/qemu/memory.c:591
0x00007f0b77968315 in memory_region_dispatch_write (mr=mr@entry=0x7f0b7b096e40, addr=addr@entry=320, data=18446744073709551362,
size=size@entry=4, attrs=attrs@entry=...) at /root/rpmbuild/BUILD/master/qemu/memory.c:1262
0x00007f0b779256a9 in address_space_write_continue (mr=0x7f0b7b096e40, l=4, addr1=320, len=4, buf=0x7f0b77713028 "\002\377\377\377",
attrs=..., addr=4273930560, as=0x7f0b7827d280 <address_space_memory>) at /root/rpmbuild/BUILD/master/qemu/exec.c:2544
address_space_write (as=<optimized out>, addr=<optimized out>, attrs=..., buf=<optimized out>, len=<optimized out>) at /root/rpmbuild/BUILD/master/qemu/exec.c:2601
0x00007f0b77925c1d in address_space_rw (as=<optimized out>, addr=<optimized out>, attrs=..., attrs@entry=...,
buf=buf@entry=0x7f0b77713028 "\002\377\377\377", len=<optimized out>, is_write=<optimized out>) at /root/rpmbuild/BUILD/master/qemu/exec.c:2703
0x00007f0b77962f53 in kvm_cpu_exec (cpu=cpu@entry=0x7f0b79fcc2d0) at /root/rpmbuild/BUILD/master/qemu/kvm-all.c:1965
0x00007f0b77950cc6 in qemu_kvm_cpu_thread_fn (arg=0x7f0b79fcc2d0) at /root/rpmbuild/BUILD/master/qemu/cpus.c:1078
0x00007f0b744b3dc5 in start_thread (arg=0x7f0b69a27700) at pthread_create.c:308
0x00007f0b70d3d66d in clone () from /lib64/libc.so.6
The code path while meeting segfault:
vnc_dpy_copy
vnc_update_client
vnc_disconnect_finish [while vnc_disconnect_start() is invoked because somethins wrong]
vnc_update_server_surface
vd->server = NULL;
vnc_server_fb_stride
pixman_image_get_stride(vd->server)
Let's add a non-NULL check before calling vnc_server_fb_stride() to avoid segmentation fault.
Cc: Gerd Hoffmann <[email protected]>
Cc: Daniel P. Berrange <[email protected]>
Reported-by: Yanying Zhuang <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 3e10c3ecfcaf604d8b400d6e463e1a186ce97d9b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3e10c3ecfcaf604d8b400d6e463e1a186ce97d9b | 2016-09-13 08:01:39+02:00 |
tests: fix test-vmstate leaks
Spotted thanks to ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 4ae3c0e27fff7e41fd75fc63a35703bc64785863 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4ae3c0e27fff7e41fd75fc63a35703bc64785863 | 2016-09-08 17:57:32+04:00 |
coroutine: Assert that no locks are held on termination
A coroutine that takes a lock must also release it again. If the
coroutine terminates without having released all its locks, it's buggy
and we'll probably run into a deadlock sooner or later. Make sure that
we don't get such cases.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 1b7f01d966f97b7820f3cdd471461cf0799a93cc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1b7f01d966f97b7820f3cdd471461cf0799a93cc | 2016-09-05 19:06:48+02:00 |
target-sh4: Use glib allocator in movcal helper
Coverity spots that helper_movcal() calls malloc() but doesn't
check for failure. Fix this by switching to the glib allocation
functions, which abort on allocation failure.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Acked-by: Aurelien Jarno <[email protected]>
| 01a720125f5e2f0a23d2682b39dead2fcc820066 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/01a720125f5e2f0a23d2682b39dead2fcc820066 | 2016-07-22 11:33:24+01:00 |
arm_gicv3: Add assert()s to tell Coverity that offsets are aligned
Coverity complains that the GICR_IPRIORITYR case in gicv3_readl()
can overflow an array, because it doesn't know that the offsets
passed to that function must be word aligned. Add some assert()s
which hopefully tell Coverity that this isn't possible.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
| acd82796211041c5af43c8c523b85d250c2ccebe | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/acd82796211041c5af43c8c523b85d250c2ccebe | 2016-07-19 17:56:27+01:00 |
vnc: fix incorrect checking condition when updating client
vs->disconnecting is set to TRUE and vs->ioc is closed, but
vs->ioc isn't set to NULL, so that the vnc_disconnect_finish()
isn't invoked when you update client in vnc_update_client()
after vnc_disconnect_start invoked. Let's using change the checking
condition to avoid resource leak.
Signed-off-by: Haibin Wang <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 5a693efda84d7df5136cc2bd31c959bb1530b0c9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5a693efda84d7df5136cc2bd31c959bb1530b0c9 | 2016-07-12 08:34:13+02:00 |
qxl: factor out qxl_get_check_slot_offset
New helper function which translates a qxl physical address into
memory slot and offset. Also applies sanity checks. Factored out
from qxl_phys2virt. No functional change.
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| 726bdf653aca9b87e28c9a56dd94c4667ddfacbc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/726bdf653aca9b87e28c9a56dd94c4667ddfacbc | 2016-07-06 10:31:11+02:00 |
megasas: remove unnecessary megasas_use_msi()
megasas overwrites user configuration when msi_init fail to flag internal msi
state, which is unsuitable. megasa_use_msi() is unnecessary, we can call
msi_uninit() directly when unrealize, even no need to call msi_enabled() first.
cc: Hannes Reinecke <[email protected]>
cc: Paolo Bonzini <[email protected]>
cc: Markus Armbruster <[email protected]>
cc: Marcel Apfelbaum <[email protected]>
cc: Michael S. Tsirkin <[email protected]>
Acked-by: Hannes Reinecke <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Cao jin <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| afea4e1410654154018587dd35c1b250ba4d8ec4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/afea4e1410654154018587dd35c1b250ba4d8ec4 | 2016-07-05 13:14:41+03:00 |
target-sparc: fix register corruption in ldstub if there is no write permission
Signed-off-by: Artyom Tarasenko <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Mark Cave-Ayland <[email protected]>
| b64d2e57e704edbb56ae969de864292dd38379bf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b64d2e57e704edbb56ae969de864292dd38379bf | 2016-06-24 18:18:32+01:00 |
linux-user: Avoid possible misalignment in host_to_target_siginfo()
host_to_target_siginfo() is implemented by a combination of
host_to_target_siginfo_noswap() followed by tswap_siginfo().
The first of these two functions assumes that the target_siginfo_t
it is writing to is correctly aligned, but the pointer passed
into host_to_target_siginfo() is directly from the guest and
might be misaligned. Use a local variable to avoid this problem.
(tswap_siginfo() does now correctly handle a misaligned destination.)
We have to add a memset() to host_to_target_siginfo_noswap()
to avoid some false positive "may be used uninitialized" warnings
from gcc about subfields of the _sifields union if it chooses to
inline both tswap_siginfo() and host_to_target_siginfo_noswap()
into host_to_target_siginfo().
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 55d72a7eb32858d50ba0777cfde2027d007010b2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/55d72a7eb32858d50ba0777cfde2027d007010b2 | 2016-06-24 11:55:44+03:00 |
ppc: Add real mode CI load/store instructions for P7 and P8
Those instructions are only available in hypervisor real mode and
allow cache inhibited garded access to devices in that mode.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
[clg: fixed checkpatch.pl errors ]
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| b781537560e3b968b6fe1395e3d07bd67f0009ba | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b781537560e3b968b6fe1395e3d07bd67f0009ba | 2016-06-23 12:43:54+10:00 |
qdev_try_create(): Assert that devices we put onto the system bus are SysBusDevices
If qdev_try_create() is passed NULL for the bus, it will automatically
put the newly created device onto the default system bus. However
if the device is not actually a SysBusDevice then this will result
in later crashes (for instance when running the monitor "info qtree"
command) because code reasonably assumes that all devices on the system
bus are system bus devices.
Generally the mistake is that the calling code should create the
object with object_new(TYPE_FOO) rather than qdev_create(NULL, TYPE_FOO);
see commit 6749695eaaf346c1 for an example of fixing this bug.
Assert in qdev_try_create() if the device isn't suitable to put on
the system bus, so that this mistake results in failure earlier
and more reliably.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| 7474f1be701f136b224af5e1abe55e97dc3f29a5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7474f1be701f136b224af5e1abe55e97dc3f29a5 | 2016-06-14 15:07:43+01:00 |
vmsvga: don't process more than 1024 fifo commands at once
vmsvga_fifo_run is called in regular intervals (on each display update)
and will resume where it left off. So we can simply exit the loop,
without having to worry about how processing will continue.
Fixes: CVE-2016-4453
Cc: [email protected]
Cc: P J P <[email protected]>
Reported-by: 李强 <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| 4e68a0ee17dad7b8d870df0081d4ab2e079016c2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4e68a0ee17dad7b8d870df0081d4ab2e079016c2 | 2016-06-06 09:04:29+02:00 |
linux-user: Check array bounds in errno conversion
Check array bounds in host_to_target_errno() and target_to_host_errno().
Signed-off-by: Timothy Edward Baldwin <[email protected]>
Message-id: 1441497448-32489-2-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
[PMM: Add a lower-bound check, use braces on if(), tweak commit message]
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
| 2466119c9551d606a0f92f9832e0c865bc04b488 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2466119c9551d606a0f92f9832e0c865bc04b488 | 2016-05-27 14:49:48+03:00 |
net: fix OptsVisitor memory leak
Fixes 96a1616("qapi-dealloc: Reduce use outside of generated code")
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 044d65525f6ac2093042ae18dbf8c1300b5c1c18 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/044d65525f6ac2093042ae18dbf8c1300b5c1c18 | 2016-04-06 09:52:07+08:00 |
.travis.yml: collapse the test matrix
Remove the concept of TARGETS and build the complete target list for
each config combination. Now the matrix is just based on CONFIG stanzas
and we use the additional stuff for:
- things that only work on one compiler (sparse, gcov, gprof)
- combos where "make check" fails
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: David Gibson <[email protected]>
| 6c9332918620a1512f6af5ff250b38228d13a4d6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6c9332918620a1512f6af5ff250b38228d13a4d6 | 2016-04-05 10:08:09+01:00 |
char: fix broken EAGAIN retry on OS-X due to errno clobbering
Some of the chardev I/O paths really want to write the
complete data buffer even though the channel is in
non-blocking mode. To achieve this they look for EAGAIN
and g_usleep() for 100ms. Unfortunately the code is set
to check errno == EAGAIN a second time, after the g_usleep()
call has completed. On OS-X at least, g_usleep clobbers
errno to ETIMEDOUT, causing the retry to be skipped.
This failure to retry means the full data isn't written
to the chardev backend, which causes various failures
including making the tests/ahci-test qtest hang.
Rather than playing games trying to reset errno just
simplify the code to use a goto to retry instead of a
a loop.
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 53628efbc8aa7a7ab5354d24b971f4d69452151d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/53628efbc8aa7a7ab5354d24b971f4d69452151d | 2016-04-05 11:46:52+02:00 |
qapi: Split visit_end_struct() into pieces
As mentioned in previous patches, we want to call visit_end_struct()
functions unconditionally, so that visitors can release resources
tied up since the matching visit_start_struct() without also having
to worry about error priority if more than one error occurs.
Even though error_propagate() can be safely used to ignore a second
error during cleanup caused by a first error, it is simpler if the
cleanup cannot set an error. So, split out the error checking
portion (basically, input visitors checking for unvisited keys) into
a new function visit_check_struct(), which can be safely skipped if
any earlier errors are encountered, and leave the cleanup portion
(which never fails, but must be called unconditionally if
visit_start_struct() succeeded) in visit_end_struct().
Generated code in qapi-visit.c has diffs resembling:
|@@ -59,10 +59,12 @@ void visit_type_ACPIOSTInfo(Visitor *v,
| goto out_obj;
| }
| visit_type_ACPIOSTInfo_members(v, obj, &err);
|- error_propagate(errp, err);
|- err = NULL;
|+ if (err) {
|+ goto out_obj;
|+ }
|+ visit_check_struct(v, &err);
| out_obj:
|- visit_end_struct(v, &err);
|+ visit_end_struct(v);
| out:
and in qapi-event.c:
@@ -47,7 +47,10 @@ void qapi_event_send_acpi_device_ost(ACP
| goto out;
| }
| visit_type_q_obj_ACPI_DEVICE_OST_arg_members(v, ¶m, &err);
|- visit_end_struct(v, err ? NULL : &err);
|+ if (!err) {
|+ visit_check_struct(v, &err);
|+ }
|+ visit_end_struct(v);
| if (err) {
| goto out;
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
[Conflict with a doc fixup resolved]
Signed-off-by: Markus Armbruster <[email protected]>
| 15c2f669e3fb2bc97f7b42d1871f595c0ac24af8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/15c2f669e3fb2bc97f7b42d1871f595c0ac24af8 | 2016-05-12 09:47:55+02:00 |
ivshmem: Failed realize() can leave migration blocker behind
If pci_ivshmem_realize() fails after it created its migration blocker,
the blocker is left in place. Fix that by creating it last.
Likewise, if it fails after it called fifo8_create(), it leaks fifo
memory. Fix that the same way.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
| d855e2756554583b2b041c9e0a8381bdd202cbc3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d855e2756554583b2b041c9e0a8381bdd202cbc3 | 2016-03-21 21:29:00+01:00 |
aio-posix: Change CONFIG_EPOLL to CONFIG_EPOLL_CREATE1
CONFIG_EPOLL was being used to guard epoll_create1 which results
in build failures on CentOS 5.
Signed-off-by: Matthew Fortune <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 147dfab747dd1720cb6350b6b746ca84e15f9a24 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/147dfab747dd1720cb6350b6b746ca84e15f9a24 | 2016-03-17 09:50:14+00:00 |
pc-dimm: fix error handling in pc_dimm_check_memdev_is_busy()
If host_memory_backend_get_memory() were to return error and
NULL MemoryRegion, pc_dimm_check_memdev_is_busy() would crash
dereferencing NULL pointer in memory_region_is_mapped().
But if error is set and non NULL MemoryRegion is returned
then error_setg() will fail with "error already set" assertion
in error_setv()
To avoid above issues use typical error handling pattern
for property setters:
Error *local_error = NULL;
...
error_propagate(errp, local_err);
Reported-by: Markus Armbruster <[email protected]>
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| c9f4b77ad5783bd84bca4ab99d4b3d6ee61de01c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c9f4b77ad5783bd84bca4ab99d4b3d6ee61de01c | 2016-03-11 14:55:15+02:00 |
target-arm: Forbid mode switch to Mon from Secure EL1
In v8 trying to switch mode to Mon from Secure EL1 is an
illegal mode switch. (In v7 this is impossible as all secure
modes except User are at EL3.) We can handle this case by
making a switch to Mon valid only if the current EL is 3,
which then gives the correct answer whether EL3 is AArch32
or AArch64.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Sergey Fedorov <[email protected]>
Message-id: [email protected]
| 58ae2d1f037fae1d90eed4522053a85d79edfbec | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/58ae2d1f037fae1d90eed4522053a85d79edfbec | 2016-02-26 15:09:41+00:00 |
usb: check RNDIS buffer offsets & length
When processing remote NDIS control message packets,
the USB Net device emulator uses a fixed length(4096) data buffer.
The incoming informationBufferOffset & Length combination could
overflow and cross that range. Check control message buffer
offsets and length to avoid it.
Reported-by: Qinghao Tang <[email protected]>
Signed-off-by: Prasad J Pandit <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| fe3c546c5ff2a6210f9a4d8561cc64051ca8603e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fe3c546c5ff2a6210f9a4d8561cc64051ca8603e | 2016-02-23 10:38:01+01:00 |
throttle: Check that burst_level leaks correctly
This patch expands test_leak_bucket() to check that burst_level leaks
correctly.
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| eb8a1a1cbda15d776d6d505f14f61c7852f6a51a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/eb8a1a1cbda15d776d6d505f14f61c7852f6a51a | 2016-02-22 14:08:06+01:00 |
ipmi_bmc_sim: Fix off by one in check.
Found by Paolo.
Cc: Paolo Bonzini <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Shannon Zhao <[email protected]>
Cc: Xiao Guangrong <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 93a5364620dbfcf3cc13866d0e218fc3624c1edf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/93a5364620dbfcf3cc13866d0e218fc3624c1edf | 2016-02-09 15:46:54+01:00 |
qmp: Fix reference-counting of qnull on empty output visit
Commit 6c2f9a15 ensured that we would not return NULL when the
caller used an output visitor but had nothing to visit. But
in doing so, it added a FIXME about a reference count leak
that could abort qemu in the (unlikely) case of SIZE_MAX such
visits (more plausible on 32-bit). (Although that commit
suggested we might fix it in time for 2.5, we ran out of time;
fortunately, it is unlikely enough to bite that it was not
worth worrying about during the 2.5 release.)
This fixes things by documenting the internal contracts, and
explaining why the internal function can return NULL and only
the public facing interface needs to worry about qnull(),
thus avoiding over-referencing the qnull_ global object.
It does not, however, fix the stupidity of the stack mixing
up two separate pieces of information; add a FIXME to explain
that issue, which will be fixed shortly in a future patch.
Signed-off-by: Eric Blake <[email protected]>
Cc: [email protected]
Message-Id: <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| a86156401559cb4401cf9ecc704faeab6fc8bb19 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a86156401559cb4401cf9ecc704faeab6fc8bb19 | 2016-02-08 17:29:57+01:00 |
virtio-gpu: fix memory leak in error path
Found by Coverity Scan, buf not freed on error.
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
| 8d94c1ca53c638f6ec76840b0cb24677fb7705bf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8d94c1ca53c638f6ec76840b0cb24677fb7705bf | 2016-02-03 10:41:36+01:00 |
scsi: revert change to scsi_req_cancel_async and add assertions
Fam Zheng noticed that the change in commit 36896bf ("scsi: always call
notifier on async cancellation", 2015-12-16) could cause a leak of
the request; scsi_req_cancel_async now calls scsi_req_ref
multiple times for multiple cancellations, but there is only
one call to scsi_req_cancel_complete.
So revert the patch and instead assert that the problematic case (a call
to scsi_req_cancel_async after the aiocb has been completed) cannot
happen.
Signed-off-by: Paolo Bonzini <[email protected]>
| 3daa41078aedf227ec98b0d1c9d56b77b6d20153 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3daa41078aedf227ec98b0d1c9d56b77b6d20153 | 2016-01-15 18:57:32+01:00 |
qemu-iotests: Reduce racy output in 028
On my machine, './check -qcow2 028' was failing about 80% of the
time, due to a race in how many times the repeated attempts
to run 'info block-jobs' could occur before the job was done,
showing up as a failure of fewer '(qemu) ' prompts than in the
expected output. Silence the output during the repetitions, then
add a final clean command to keep the expected output useful;
once patched, I was finally able to run the test 20 times in a
row with no failures.
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| a174da3613f548d58433f64cf3c99dd302c6154a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a174da3613f548d58433f64cf3c99dd302c6154a | 2016-01-20 13:36:23+01:00 |
net/vmxnet3: fix debug macro pattern for vmxnet3
Vmxnet3 uses the following debug macro style:
#ifdef SOME_DEBUG
# define debug(...) do{ printf(...); } while (0)
# else
# define debug(...) do{ } while (0)
#endif
If SOME_DEBUG is undefined, then format string inside the
debug macro will never be checked by compiler. Code is
likely to break in the future when SOME_DEBUG is enabled
because of lack of testing. This patch changes this
to the following:
#define debug(...) \
do { if (SOME_DEBUG_ENABLED) printf(...); } while (0)
Signed-off-by: Miao Yan <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 71c2f5b9b3f386b6acae54f5646a445e50717806 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/71c2f5b9b3f386b6acae54f5646a445e50717806 | 2016-01-11 11:01:34+08:00 |
io: fix stack allocation when sending of file descriptors
When sending file descriptors over a socket, we have to
allocate a data buffer to hold the FDs in the scmsghdr.
Unfortunately we allocated the buffer on the stack inside
an if () {} block, but called sendmsg() outside the block.
So the stack bytes holding the FDs were liable to be
overwritten with other data. By luck this was not a problem
when sending 1 FD, but if sending 2 or more then it would
fail.
The fix is to simply move the variables outside the nested
'if' block. To keep valgrind quiet we also zero-initialize
the 'control' buffer.
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| 7b3c618ad0cd0154993b5b5dbd34e0010960585a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7b3c618ad0cd0154993b5b5dbd34e0010960585a | 2015-12-23 10:53:03+00:00 |
block-migration: limit the memory usage
If we set migration speed in a very large value, block-migration will try to read
all data to the memory. Because
(block_mig_state.submitted + block_mig_state.read_done) * BLOCK_SIZE
will be overflow, and it will be always less than rate limit.
There is no need to read too many data into memory when the rate limit is very large.
So limit the memory usage can fix the overflow problem.
Signed-off-by: Wen Congyang <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| f77dcdbc76dbf9bade9739e85e1013639e535835 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f77dcdbc76dbf9bade9739e85e1013639e535835 | 2015-11-25 15:27:28+01:00 |
PPC: Fix lswx bounds checks
The lswx instruction checks whether the desired string actually fits
into all defined registers. Unfortunately it does the calculation wrong,
resulting in illegal instruction traps for loads that really should fit.
Fix it up, making Mac OS happier.
Signed-off-by: Alexander Graf <[email protected]>
Signed-off-by: Mark Cave-Ayland <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 488661ee9dd300110a6612d52fe68e2bb3539a5f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/488661ee9dd300110a6612d52fe68e2bb3539a5f | 2015-11-12 13:15:54+11:00 |
usb: Use g_new() & friends where that makes obvious sense
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
for two reasons. One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.
This commit only touches allocations with size arguments of the form
sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 98f343395e937fa1db3a28dfb4f303f97cfddd6c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/98f343395e937fa1db3a28dfb4f303f97cfddd6c | 2015-11-06 15:42:38+03:00 |
bt: fix use of uninitialized variable seqlen
sdp_svc_match, sdp_attr_match and sdp_svc_attr_match read the last
argument. The only sensible way to change the code is to make that last
argument "len" instead of "seqlen" which is the length of a subsequence
in the previous "if" branch.
To make the structure of the code clearer, use "else" instead of
"else if".
Reported by Coverity.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 374ec0669a1aa3affac7850a16c6cad18221c439 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/374ec0669a1aa3affac7850a16c6cad18221c439 | 2015-11-06 15:42:38+03:00 |
xen: fix invalid assertion
Asserting "true" is not that useful.
Reported by Coverity.
Signed-off-by: Paolo Bonzini <[email protected]>
Acked-by: Stefano Stabellini <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 2c21ec3d1818cb0395b5a9b73128e6920d44def7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2c21ec3d1818cb0395b5a9b73128e6920d44def7 | 2015-11-06 15:42:38+03:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.