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
snapshot: Reset err to NULL to avoid double free If an error occurs in bdrv_snapshot_delete_by_id_or_name(), "err" is freed. If "err" is not set to NULL before calling bdrv_snapshot_delete_by_id_or_name() again, it will not be updated on error, and will be freed again. This can be triggered by starting a VM with at least two drives and then attempting to delete a non-existent snapshot. Broken in commit a89d89d. Signed-off-by: Chris Spiegel <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
ba2b22888c43fdf36f3ae0553c89013616e9c44a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ba2b22888c43fdf36f3ae0553c89013616e9c44a
2014-11-03 09:48:41+00:00
serial: reset thri_pending on IER writes with THRI=0 This is responsible for failure of migration from 2.2 to 2.1, because thr_ipending is always one in practice. serial.c is setting thr_ipending unconditionally. However, thr_ipending is not used at all if THRI=0, and it will be overwritten again the next time THRE or THRI changes. For that reason, we can set thr_ipending to zero every time THRI is reset. There is disagreement on whether LSR.THRE should be resampled when IER.THRI goes from 1 to 1. This patch does not touch the code, leaving that for QEMU 2.3+. This has no semantic change and is enough to fix migration in the common case where the interrupt is not pending or is reported in IIR. It does not change the migration format, so 2.2.0 -> 2.1 will remain broken but we can fix 2.2.1 -> 2.1 without breaking 2.2.1 <-> 2.2.0. The case that remains broken (the one in which the subsection is strictly necessary) is when THRE=1, the THRI interrupt has *not* been acknowledged yet, and a higher-priority interrupt comes. In this case, you need the subsection to tell the source that the lower-priority THRI interrupt is pending. The subsection's breakage of migration, in this case, prevents continuing the VM on the destination with an invalid state. Cc: [email protected] Reported-by: Igor Mammedov <[email protected]> Reviewed-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
4e02b0fcf5c97579d0d3261c80c65abcf92870fe
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4e02b0fcf5c97579d0d3261c80c65abcf92870fe
2014-12-15 14:35:53+01:00
virtio-scsi: Fix memory leak when realize failed Signed-off-by: Fam Zheng <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
93bd49aff9081bbe9440192db9da3676941f77a3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/93bd49aff9081bbe9440192db9da3676941f77a3
2014-10-31 11:29:02+01:00
vga: Make fb endian a common state variable And initialize it based on target endian Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: David Gibson <[email protected]>
2c7d8736af209c7e5840c16a9167ad954774ce4c
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2c7d8736af209c7e5840c16a9167ad954774ce4c
2014-09-30 13:34:09+02:00
qapi: add visit_start_union and visit_end_union In some cases an input visitor might bail out on filling out a struct for various reasons, such as missing fields when running in strict mode. In the case of a QAPI Union type, this may lead to cases where the .kind field which encodes the union type is uninitialized. Subsequently, other visitors, such as the dealloc visitor, may use this .kind value as if it were initialized, leading to assumptions about the union type which in this case may lead to segfaults. For example, freeing an integer value. However, we can generally rely on the fact that the always-present .data void * field that we generate for these union types will always be NULL in cases where .kind is uninitialized (at least, there shouldn't be a reason where we'd do this purposefully). So pass this information on to Visitor implementation via these optional start_union/end_union interfaces so this information can be used to guard against the situation above. We will make use of this information in a subsequent patch for the dealloc visitor. Cc: [email protected] Reported-by: Fam Zheng <[email protected]> Suggested-by: Paolo Bonzini <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Michael Roth <[email protected]> Signed-off-by: Luiz Capitulino <[email protected]>
cee2dedb85b97e4976c83bea84064c3921b8b7ac
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cee2dedb85b97e4976c83bea84064c3921b8b7ac
2014-09-26 13:14:10-04:00
ahci: Add test_hba_enable to ahci-test. This test engages the HBA functionality and initializes values to sane defaults to allow for minimal HBA functionality. Buffers are allocated and pointers are updated to allow minimal I/O commands to complete as expected. Error registers and responses are sanity checked for specification adherence. Signed-off-by: John Snow <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
dbc180e5725e4eb4fd1632d0af41189c7410e459
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/dbc180e5725e4eb4fd1632d0af41189c7410e459
2014-09-22 11:39:42+01:00
docs: List all image elements currently supported by the fuzzer Reviewed-by: Fam Zheng <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Maria Kustova <[email protected]> Message-id: cb71485d0f55d1d8401eebaead8324eb78673060.1408450493.git.maria.k@catit.be Signed-off-by: Stefan Hajnoczi <[email protected]>
56271efdeaa9d01cff9d82c4b8b2ab73152fe1ea
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/56271efdeaa9d01cff9d82c4b8b2ab73152fe1ea
2014-09-22 11:39:35+01:00
configure: check for pixman-1 version commit a93a3af9 introduces use of PIXMAN_TYPE_RGBA, but it's only available in pixman >= 0.21.8. If pixman doesn't meet the version requirement, qemu will fail to build with following message: qemu/ui/qemu-pixman.c: In function ‘qemu_pixelformat_from_pixman’: qemu/ui/qemu-pixman.c:42: error: ‘PIXMAN_TYPE_RGBA’ undeclared (first use in this function) qemu/ui/qemu-pixman.c:42: error: (Each undeclared identifier is reported only once qemu/ui/qemu-pixman.c:42: error: for each function it appears in.) This patch fixes the problem by checking the pixman version. Signed-off-by: Hu Tao <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
236f282c1c7bb41b0ec3b3d771ca652eb85ed81f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/236f282c1c7bb41b0ec3b3d771ca652eb85ed81f
2014-09-15 08:14:19+02:00
iotests: Add more tests for qcow2 corruption Add tests for unaligned L1/L2/reftable entries and non-fatal corruption reports. Signed-off-by: Max Reitz <[email protected]> Reviewed-by: Eric Blake <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
5b0ed2be883238f52567ba2635ea38f34e8eb90d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5b0ed2be883238f52567ba2635ea38f34e8eb90d
2014-09-22 11:39:29+01:00
Fix improper usage of cpu_to_be32 in vpc cpu_to_be32() is wrong since vhd_type is an enum constant (just a regular CPU-endian integer). Signed-off-by: Xiaodong Gong <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
0d4cc3e715f5794077895345577725539afe81eb
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/0d4cc3e715f5794077895345577725539afe81eb
2014-09-10 10:41:29+02:00
ppc: Add software breakpoint support This patch allow insert/remove software breakpoint. When QEMU is not able to handle debug exception then we inject program exception to guest because for software breakpoint QEMU uses a ehpriv-1 instruction; So there cannot be any reason that we are in qemu with exit reason KVM_EXIT_DEBUG for guest set debug exception, only possibility is guest executed ehpriv-1 privilege instruction and that's why we are injecting program exception. Signed-off-by: Bharat Bhushan <[email protected]> [agraf: make deflect comment booke/book3s agnostic] Signed-off-by: Alexander Graf <[email protected]>
8a0548f94edecb96acb9b7fb9106ccc821c4996f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8a0548f94edecb96acb9b7fb9106ccc821c4996f
2014-09-08 12:50:49+02:00
cpus: Define callback for QEMU "nmi" command This introduces an NMI (Non Maskable Interrupt) interface with a single nmi_monitor_handler() method. A machine or a device can implement it. This searches for an QOM object with this interface and if it is implemented, calls it. The callback implements an action required to cause debug crash dump on in-kernel debugger invocation. The callback returns Error**. This adds a nmi_monitor_handle() helper which walks through all objects to find the interface. The interface method is called for all found instances. This adds support for it in qmp_inject_nmi(). Since no architecture supports it at the moment, there is no change in behaviour. This changes inject-nmi command description for HMP and QMP. Signed-off-by: Alexey Kardashevskiy <[email protected]> Reviewed-by: Alexander Graf <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
9cb805fd2674f474d058fee6d7aa9e83fcd3d336
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/9cb805fd2674f474d058fee6d7aa9e83fcd3d336
2014-08-25 13:25:16+02:00
util/path: Use the GLib memory allocation routines In this file, we don't check the return value of malloc/strdup/realloc which may fail. Instead of using these routines, we use the GLib memory APIs g_malloc/g_strdup/g_realloc. They will exit on allocation failure, so there is no need to test for failure, which would be fine for setup. Signed-off-by: zhanghailiang <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
bc5008a832f95aae86efce844382e64d54da2146
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/bc5008a832f95aae86efce844382e64d54da2146
2014-08-24 13:16:32+04:00
block/iscsi: fix memory corruption on iscsi resize bs->total_sectors is not yet updated at this point. resulting in memory corruption if the volume has grown and data is written to the newly availble areas. CC: [email protected] Signed-off-by: Peter Lieven <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
d832fb4d66ead62da4af7e44cce34cd939e865e1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d832fb4d66ead62da4af7e44cce34cd939e865e1
2014-08-22 10:55:22+02:00
block: 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. Patch created with Coccinelle, with two manual changes on top: * Add const to bdrv_iterate_format() to keep the types straight * Convert the allocation in bdrv_drop_intermediate(), which Coccinelle inexplicably misses Coccinelle semantic patch: @@ type T; @@ -g_malloc(sizeof(T)) +g_new(T, 1) @@ type T; @@ -g_try_malloc(sizeof(T)) +g_try_new(T, 1) @@ type T; @@ -g_malloc0(sizeof(T)) +g_new0(T, 1) @@ type T; @@ -g_try_malloc0(sizeof(T)) +g_try_new0(T, 1) @@ type T; expression n; @@ -g_malloc(sizeof(T) * (n)) +g_new(T, n) @@ type T; expression n; @@ -g_try_malloc(sizeof(T) * (n)) +g_try_new(T, n) @@ type T; expression n; @@ -g_malloc0(sizeof(T) * (n)) +g_new0(T, n) @@ type T; expression n; @@ -g_try_malloc0(sizeof(T) * (n)) +g_try_new0(T, n) @@ type T; expression p, n; @@ -g_realloc(p, sizeof(T) * (n)) +g_renew(T, p, n) @@ type T; expression p, n; @@ -g_try_realloc(p, sizeof(T) * (n)) +g_try_renew(T, p, n) Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Max Reitz <[email protected]> Reviewed-by: Jeff Cody <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
5839e53bbc0fec56021d758aab7610df421ed8c8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5839e53bbc0fec56021d758aab7610df421ed8c8
2014-08-20 11:51:28+02:00
vl: free err err is not freed after use, thus causing memory leak. This patch fixes it. Signed-off-by: Hu Tao <[email protected]> Cc: [email protected] Signed-off-by: Michael Tokarev <[email protected]>
3a9cbfe0096ad88d52c39f5a9d03f17251f750a5
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/3a9cbfe0096ad88d52c39f5a9d03f17251f750a5
2014-08-15 18:54:07+04:00
vhdx: Handle failure for potentially large allocations Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the vhdx block driver. Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Benoit Canet <[email protected]>
a67e128a4f40cf07abd86f92d0d3c913db2ad885
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a67e128a4f40cf07abd86f92d0d3c913db2ad885
2014-08-15 15:07:16+02:00
qed: Handle failure for potentially large allocations Some code in the block layer makes potentially huge allocations. Failure is not completely unexpected there, so avoid aborting qemu and handle out-of-memory situations gracefully. This patch addresses the allocations in the qed block driver. Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Benoit Canet <[email protected]>
4f4896db5fb2285df016ff927508560c89b845a4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4f4896db5fb2285df016ff927508560c89b845a4
2014-08-15 15:07:15+02:00
block: Make qiov match the request size until EOF If a read request goes across EOF, the block driver sees a shortened request that stops at EOF (the rest is memsetted in block.c), however the original qiov was used for this request. This patch makes the qiov size match the request size, avoiding a potential buffer overflow in raw-posix. Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Max Reitz <[email protected]>
33f461e0c5d8efa21ef7e746be561fc57a1df106
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/33f461e0c5d8efa21ef7e746be561fc57a1df106
2014-07-14 12:03:20+02:00
usb: initialize libusb_device to avoid crash If libusb_get_device_list() fails, the uninitialized local variable libusb_device would be passed to libusb_free_device_list(), that will cause a crash, like: (gdb) bt #0 0x00007fbbb4bafc10 in pthread_mutex_lock () from /lib64/libpthread.so.0 #1 0x00007fbbb233e653 in libusb_unref_device (dev=0x6275682d627375) at core.c:902 #2 0x00007fbbb233e739 in libusb_free_device_list (list=0x7fbbb6e8436e, unref_devices=<optimized out>) at core.c:653 #3 0x00007fbbb6cd80a4 in usb_host_auto_check (unused=unused@entry=0x0) at hw/usb/host-libusb.c:1446 #4 0x00007fbbb6cd8525 in usb_host_initfn (udev=0x7fbbbd3c5670) at hw/usb/host-libusb.c:912 #5 0x00007fbbb6cc123b in usb_device_init (dev=0x7fbbbd3c5670) at hw/usb/bus.c:106 ... So initialize libusb_device at the begin time. Signed-off-by: Jincheng Miao <[email protected]> Reviewed-by: Gonglei <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
3ce21445387c64032a21ae73c995195307a28a36
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/3ce21445387c64032a21ae73c995195307a28a36
2014-07-01 13:26:37+02:00
target-ppc: KVMPPC_H_CAS fix cpu-version endianess During KVMPPC_H_CAS processing, the cpu-version updated value is stored without taking care of the current endianess. As a consequence, the guest may not switch to the right CPU model, leading to unexpected results. If needed, the value is now converted. Fixes: 6d9412ea8132 ("target-ppc: Implement "compat" CPU option") Signed-off-by: Laurent Dufour <[email protected]> Reviewed-by: Greg Kurz <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
4bce526ec4b88362a684fd858e0e14c83ddf0db4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4bce526ec4b88362a684fd858e0e14c83ddf0db4
2014-07-08 12:10:36+02:00
rdma: bug fixes 1. Fix small memory leak in parsing inet address from command line in data_init() 2. Fix ibv_post_send() return value check and pass error code back up correctly. 3. Fix rdma_destroy_qp() segfault after failure to connect to destination. Reported-by: [email protected] Reported-by: [email protected] Signed-off-by: Michael R. Hines <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
e325b49a320b493cc5d69e263751ff716dc458fe
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e325b49a320b493cc5d69e263751ff716dc458fe
2014-06-23 19:09:50+02:00
tests: fix memory leak in test of string input visitor Signed-off-by: Hu Tao <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
cac124d17c5c3c75c588e12a8d7b44c9b057cb9a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cac124d17c5c3c75c588e12a8d7b44c9b057cb9a
2014-06-19 18:44:21+03:00
target-ppc: Enable PMU SPRs migration This enabled PMU SPRs migration by hooking hypv privileged versions with "KVM one reg" IDs. Signed-off-by: Alexey Kardashevskiy <[email protected]> Reviewed-by: Tom Musta <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
83cc6f8c2f134ccff1a41ed86bbe3bc305e0c334
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/83cc6f8c2f134ccff1a41ed86bbe3bc305e0c334
2014-06-16 13:24:43+02:00
cpu/x86: correctly set errors in x86_cpu_parse_featurestr Because of the "goto out", the contents of local_err are leaked and lost. Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
6b1dd54b6a4652a3a1e15a4beacd3be554a9ade1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/6b1dd54b6a4652a3a1e15a4beacd3be554a9ade1
2014-06-10 19:39:34+04:00
configure: unset interfering variables The check for big or little endianness relies on grep reporting match/non-match on the generated binary. If the user specified --binary-files=without-match in their GREP_OPTIONS, this will fail. Let's follow what autoconf does and unset GREP_OPTIONS and CLICOLOR_FORCE at the beginning of the script. Reported-by: Eugene (jno) Dvurechenski <[email protected]> Suggested-by: Markus Armbruster <[email protected]> Signed-off-by: Cornelia Huck <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
99519e677bd605a681a805b0c759ae886d1d5712
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/99519e677bd605a681a805b0c759ae886d1d5712
2014-06-10 12:34:37+02:00
kvm: Ensure negative return value on kvm_init() error handling path We need to ensure ret < 0 when going through the error path, or QEMU may try to run the half-initialized VM and crash. Signed-off-by: Eduardo Habkost <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
0e1dac6c41f337f997814344a847162968c20c64
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/0e1dac6c41f337f997814344a847162968c20c64
2014-05-30 22:28:55+02:00
qom-test: Test qom-list on link<> properties But don't test their properties, otherwise we will recurse forever. Their properties are already tested when we encounter them as child<> properties elsewhere in the hierarchy, like /machine/unattached/... This would have caught the crash fixed by 92b3eead. Signed-off-by: Cole Robinson <[email protected]> Signed-off-by: Andreas Färber <[email protected]>
0380aef323154205a7d838fb9953423621290d41
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/0380aef323154205a7d838fb9953423621290d41
2014-05-28 17:35:01+02:00
qapi: zero-initialize all QMP command parameters In general QMP command parameter values are specified by consumers of the QMP/HMP interface, but in the case of optional parameters these values may be left uninitialized. It is considered a bug for code to make use of optional parameters that have not been flagged as being present by the marshalling code (via corresponding has_<parameter> parameter), however our marshalling code will still pass these uninitialized values on to the corresponding QMP function (to then be ignored). Some compilers (clang in particular) consider this unsafe however, and generate warnings as a result. As reported by Peter Maydell: This is something clang's -fsanitize=undefined spotted. The code generated by qapi-commands.py in qmp-marshal.c for qmp_marshal_* functions where there are some optional arguments looks like this: bool has_force = false; bool force; mi = qmp_input_visitor_new_strict(QOBJECT(args)); v = qmp_input_get_visitor(mi); visit_type_str(v, &device, "device", errp); visit_start_optional(v, &has_force, "force", errp); if (has_force) { visit_type_bool(v, &force, "force", errp); } visit_end_optional(v, errp); qmp_input_visitor_cleanup(mi); if (error_is_set(errp)) { goto out; } qmp_eject(device, has_force, force, errp); In the case where has_force is false, we never initialize force, but then we use it by passing it to qmp_eject. I imagine we don't then actually use the value, but clang complains in particular for 'bool' variables because the value that ends up being loaded from memory for 'force' is not either 0 or 1 (being uninitialized stack contents). Fix this by initializing all QMP command parameters to {0} in the marshalling code prior to passing them on to the QMP functions. Signed-off-by: Michael Roth <[email protected]> Reported-by: Peter Maydell <[email protected]> Tested-by: Peter Maydell <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Signed-off-by: Luiz Capitulino <[email protected]>
fc13d937269c1cd01a4b7720c1dcce01722727a2
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fc13d937269c1cd01a4b7720c1dcce01722727a2
2014-05-21 09:25:31-04:00
qcow1: Stricter backing file length check Like qcow2 since commit 6d33e8e7, error out on invalid lengths instead of silently truncating them to 1023. Also don't rely on bdrv_pread() catching integer overflows that make len negative, but use unsigned variables in the first place. Cc: [email protected] Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Benoit Canet <[email protected]>
d66e5cee002c471b78139228a4e7012736b375f9
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d66e5cee002c471b78139228a4e7012736b375f9
2014-05-19 11:36:49+02:00
block: add test for vhdx image created by Disk2VHD This adds a test for VHDX images created by Microsoft's tool, Disk2VHD. VHDX images created by this tool have 2 identical header sections, with identical sequence numbers. This makes sure we detect VHDX images with identical headers, and do not flag them as corrupt. Signed-off-by: Jeff Cody <[email protected]> Reviewed-by: Fam Zheng <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
26e2da72796c534ba3bc927a55a757d85bd10a3d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/26e2da72796c534ba3bc927a55a757d85bd10a3d
2014-05-19 11:36:48+02:00
vl.c: remove init_clocks call from main Clocks are initialized in qemu_init_main_loop. They are not needed before it. Initializing them twice is not only unnecessary but is harmful: it results in memory leak and potentially can lead to a situation where different parts of QEMU use different sets of timers. To avoid it remove init_clocks call from main and add an assertion to qemu_clock_init that corresponding clock has not been initialized yet. Signed-off-by: Kirill Batuzov <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
02ce232c5051854bf49e6d2816c65e00f6d7e036
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/02ce232c5051854bf49e6d2816c65e00f6d7e036
2014-05-09 20:57:32+02:00
virtio: avoid buffer overrun on incoming migration CVE-2013-6399 vdev->queue_sel is read from the wire, and later used in the emulation code as an index into vdev->vq[]. If the value of vdev->queue_sel exceeds the length of vdev->vq[], currently allocated to be VIRTIO_PCI_QUEUE_MAX elements, subsequent PIO operations such as VIRTIO_PCI_QUEUE_PFN can be used to overrun the buffer with arbitrary data originating from the source. Fix this by failing migration if the value from the wire exceeds VIRTIO_PCI_QUEUE_MAX. Signed-off-by: Michael Roth <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
4b53c2c72cb5541cf394033b528a6fe2a86c0ac1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4b53c2c72cb5541cf394033b528a6fe2a86c0ac1
2014-05-05 22:15:02+02:00
qdev: Fix crash by validating the object type QEMU crashed when I try to list device parameters and the driver name is actually an available bus name. # qemu -device virtio-pci-bus,? # qemu -device virtio-bus,? # qemu -device virtio-serial-bus,? qdev-monitor.c:212:qdev_device_help: Object 0x7fd932f50620 is not an instance of type device Aborted (core dumped) We can also reproduce this bug by adding device from monitor, so it's worth to fix the crash. (qemu) device_add virtio-serial-bus qdev-monitor.c:491:qdev_device_add: Object 0x7f5e89530920 is not an instance of type device Aborted (core dumped) Cc: [email protected] Signed-off-by: Amos Kong <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Signed-off-by: Andreas Färber <[email protected]>
ce0abca3e35a9f95e9edcb5d6b2910b2fcd52099
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ce0abca3e35a9f95e9edcb5d6b2910b2fcd52099
2014-05-05 19:08:49+02:00
target-arm: Use dedicated CPU state fields for ARM946 access bit registers The ARM946 model currently uses the c5_data and c5_insn fields in the CPU state struct to store the contents of its access permission registers. This is confusing and a good source of bugs because for all the MMU-based CPUs those fields are fault status and fault address registers, which behave completely differently; they just happen to use the same cpreg encoding. Split them out to use their own fields instead. These registers are only present in PMSAv5 MPU systems (of which the ARM946 is our only current example); PMSAv6 and PMSAv7 (which we have no implementations of) handle access permissions differently. We name the new state fields accordingly. Note that this change fixes a bug where a data abort or prefetch abort on the ARM946 would accidentally corrupt the access permission registers because the interrupt handling code assumed the c5_data and c5_insn fields were always fault status registers. Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Peter Crosthwaite <[email protected]>
7e09797c299712cafa7bc05dd57c1b13afcc6039
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/7e09797c299712cafa7bc05dd57c1b13afcc6039
2014-04-17 21:34:04+01:00
vmxnet3: validate queues configuration coming from guest CVE-2013-4544 Signed-off-by: Dmitry Fleytman <[email protected]> Reported-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Dr. David Alan Gilbert <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]>
9878d173f574df74bde0ff50b2f81009fbee81bb
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/9878d173f574df74bde0ff50b2f81009fbee81bb
2014-04-14 11:50:22+01:00
qcow2: Limit snapshot table size Even with a limit of 64k snapshots, each snapshot could have a filename and an ID with up to 64k, which would still lead to pretty large allocations, which could potentially lead to qemu aborting. Limit the total size of the snapshot table to an average of 1k per entry when the limit of 64k snapshots is fully used. This should be plenty for any reasonable user. This also fixes potential integer overflows of s->snapshot_size. Suggested-by: Max Reitz <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
5dae6e30c531feb31eed99f9039b52bf70832ce3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5dae6e30c531feb31eed99f9039b52bf70832ce3
2014-04-01 15:22:35+02:00
qcow2: Don't rely on free_cluster_index in alloc_refcount_block() (CVE-2014-0147) free_cluster_index is only correct if update_refcount() was called from an allocation function, and even there it's brittle because it's used to protect unfinished allocations which still have a refcount of 0 - if it moves in the wrong place, the unfinished allocation can be corrupted. So not using it any more seems to be a good idea. Instead, use the first requested cluster to do the calculations. Return -EAGAIN if unfinished allocations could become invalid and let the caller restart its search for some free clusters. The context of creating a snapsnot is one situation where update_refcount() is called outside of a cluster allocation. For this case, the change fixes a buffer overflow if a cluster is referenced in an L2 table that cannot be represented by an existing refcount block. (new_table[refcount_table_index] was out of bounds) [Bump the qemu-iotests 026 refblock_alloc.write leak count from 10 to 11. --Stefan] Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
b106ad9185f35fc4ad669555ad0e79e276083bd7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b106ad9185f35fc4ad669555ad0e79e276083bd7
2014-04-01 15:21:03+02:00
block/cloop: fix offsets[] size off-by-one cloop stores the number of compressed blocks in the n_blocks header field. The file actually contains n_blocks + 1 offsets, where the extra offset is the end-of-file offset. The following line in cloop_read_block() results in an out-of-bounds offsets[] access: uint32_t bytes = s->offsets[block_num + 1] - s->offsets[block_num]; This patch allocates and loads the extra offset so that cloop_read_block() works correctly when the last block is accessed. Notice that we must free s->offsets[] unconditionally now since there is always an end-of-file offset. Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Max Reitz <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
42d43d35d907579179a39c924d169da924786f65
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/42d43d35d907579179a39c924d169da924786f65
2014-04-01 13:59:47+02:00
Don't enable a HPET timer if HPET is disabled A HPET timer can be started when HPET is not yet enabled. This will not generate an interrupt to the guest, but causes problems when HPET is later enabled. A timer that is created and expires at least once before HPET is enabled will have an initialized comparator based on a hpet_offset of 0 (uninitialized). When HPET is enabled, hpet_set_timer() is called a second time, which modifies the timer expiry to a time based on the difference between current ticks (measured with the newly initialized hpet_offset) and the timer's comparator (which was generated before hpet_offset was initialized). This results in a long period of no HPET timer ticks. When this occurs with a CentOS 5.x guest, the guest may not receive timer interrupts during its narrow timer check window and panic on boot. Signed-off-by: Matt Lupfer <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]>
c36ad13fe9ece9a21a8c1dd082473a2b182298ee
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c36ad13fe9ece9a21a8c1dd082473a2b182298ee
2014-03-27 17:48:11+02:00
target-i386: Avoid shifting left into sign bit Add 'U' suffixes where necessary to avoid (1 << 31) which shifts left into the sign bit, which is undefined behaviour. Add the suffix also for other constants in the same groupings even if they don't shift into bit 31, for consistency. Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
2cd49cbfab0dd294de421893048ab614518fa263
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2cd49cbfab0dd294de421893048ab614518fa263
2014-03-27 19:22:49+04:00
qemu-img: mandate argument to 'qemu-img check --repair' qemu-img check --repair option accepts an argument. The argument to --repair switch can either be 'all' or 'leak'. Fix the long option to mandate argument with --repair switch. The patch fixes following segmentation fault Core was generated by `qemu-img check -f qcow2 --repair all t.qcow2'. Program terminated with signal 11, Segmentation fault. 0 in img_check (argc=6, argv=0x7fffab9b8a10) at qemu-img.c:588 588 if (!strcmp(optarg, "leaks")) { (gdb) bt 0 img_check (argc=6, argv=0x7fffab9b8a10) at qemu-img.c:588 1 __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 2 _start () (gdb) Signed-off-by: Prasad Joshi <[email protected]> Reviewed-by: Leandro Dorileo <[email protected]> Reviewed-by: Kevin Wolf <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
4fd6a984b93701fcb40a0053098ae5c2c4ee27f4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4fd6a984b93701fcb40a0053098ae5c2c4ee27f4
2014-03-25 14:09:44+01:00
s390x/cpu hotplug: Fix memory leak valgrind complains about the following: ==42117== 8 bytes in 1 blocks are definitely lost in loss record 88 of 833 ==42117== at 0x4031AFE: malloc (vg_replace_malloc.c:292) ==42117== by 0x8022F855: malloc_and_trace (vl.c:2715) ==42117== by 0x4145569: g_malloc (in /usr/lib64/libglib-2.0.so.0.3400.2) ==42117== by 0x800F696D: qemu_extend_irqs (irq.c:51) ==42117== by 0x800F6AF7: qemu_allocate_irqs (irq.c:68) ==42117== by 0x8029FA4B: irq_cpu_hotplug_init (sclpcpu.c:84) ==42117== by 0x80297C79: event_realize (event-facility.c:386) ==42117== by 0x80105071: device_set_realized (qdev.c:693) [...] Right it is. Don't drop the pointer of the irq. Signed-off-by: Christian Borntraeger <[email protected]> Reviewed-by: Jason J. Herne <[email protected]>
7b53f2940e3bf43ae50c929330a4837ca4da7a94
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/7b53f2940e3bf43ae50c929330a4837ca4da7a94
2014-03-17 22:01:19+01:00
qcow2: Flush metadata during read-only reopen If lazy refcounts are enabled for a backing file, committing to this backing file may leave it in a dirty state even if the commit succeeds. The reason is that the bdrv_flush() call in bdrv_commit() doesn't flush refcount updates with lazy refcounts enabled, and qcow2_reopen_prepare() doesn't take care to flush metadata. In order to fix this, this patch also fixes qcow2_mark_clean(), which contains another ineffective bdrv_flush() call beause lazy refcounts are disabled only afterwards. All existing callers of qcow2_mark_clean() either don't modify refcounts or already flush manually, so that this fixes only a latent, but not yet actually triggerable bug. Another instance of the same problem is live snapshots. Again, a real corruption is prevented by an explicit flush for non-read-only images in external_snapshot_prepare(), but images using lazy refcounts stay dirty. Cc: [email protected] Signed-off-by: Kevin Wolf <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]>
4c2e5f8f46a17966dc45b5a3e07b97434c0eabdf
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4c2e5f8f46a17966dc45b5a3e07b97434c0eabdf
2014-04-04 14:12:26+02:00
tests/acpi-test: do not fail if iasl is broken There is an issue with iasl on big endian machines: It cannot disassemble acpi tables taken from little endian machines, so we cannot check the expected tables. The acpi test will check if the expected aml files can be disassembled, and will issue an warning not failing the test on those machines until this problem is solved by the acpica community. Signed-off-by: Marcel Apfelbaum <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
dac23a6c05e543590508b48b8ed31d89b0c99c61
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/dac23a6c05e543590508b48b8ed31d89b0c99c61
2014-03-24 12:37:36+02:00
nbd: close socket if connection breaks nbd_receive_reply() is called by the event loop whenever data is available or the socket has been closed by the remote side. This patch closes the socket when an error occurs to prevent the nbd_receive_reply() handler from being called indefinitely after the connection has failed. Note that we were already correctly returning EIO for pending requests but leaving the nbd_receive_reply() handler registered resulted in high CPU consumption and a flood of error messages. Reuse nbd_teardown_connection() to close the socket. Reported-by: Zhifeng Cai <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
4a41a2d68a684241aca96dba066e0699941b730d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4a41a2d68a684241aca96dba066e0699941b730d
2014-03-14 16:28:28+01:00
qemu/slirp: Fix SMB security configuration on newer samba versions The smb.conf automatically generated by qemu's -smb option fails on current samba, because smbd rejects the security=share option with the following warning: > WARNING: Ignoring invalid value 'share' for parameter 'security' Which makes it fall back to security=user without guest login. This results in being unable to login to the samba server from the guest OS. This fixes it by selecting 'user' explicitly and mapping unknown users to guest logins. Signed-off-by: Michael Buesch <[email protected]> Reviewed-by: Michael Tokarev <[email protected]> Signed-off-by: Jan Kiszka <[email protected]>
c2804ee6c0eba19c029bb2950fa2998c16f3ea11
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c2804ee6c0eba19c029bb2950fa2998c16f3ea11
2014-03-12 08:06:22+01:00
vfio: Fix overrun after readlink() fills buffer completely readlink() returns the number of bytes written to the buffer, and it doesn't write a terminating null byte. vfio_init() writes it itself. Overruns the buffer when readlink() filled it completely. Fix by treating readlink() filling the buffer completely as error, like we do in pci-assign.c's assign_failed_examine(). Spotted by Coverity. Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
13665a2d2f675341e73618fcd7f9d36b6c68b509
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/13665a2d2f675341e73618fcd7f9d36b6c68b509
2014-02-26 10:28:36-07:00
hw/arm/musicpal: Remove nonexistent CDTP2, CDTP3 registers The ethernet device in the musicpal only has two tx queues, but we modelled it with four CTDP registers, presumably a cut and paste from the rx queue registers. Since the tx_queue[] array is only 2 entries long this allowed a guest to overrun this buffer. Remove the nonexistent registers. Signed-off-by: Peter Maydell <[email protected]> Message-id: [email protected] Acked-by: Jan Kiszka <[email protected]> Cc: [email protected]
cf143ad35018c5fc1da6365b45acda2b34aba90a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cf143ad35018c5fc1da6365b45acda2b34aba90a
2014-02-26 17:19:59+00:00
hw/intc/exynos4210_combiner: Don't overrun output_irq array in init The Exynos4210 combiner has IIC_NIRQ inputs and IIC_NGRP outputs; use the correct constant in the loop initializing our output sysbus IRQs so that we don't overrun the output_irq[] array. Signed-off-by: Peter Maydell <[email protected]> Message-id: [email protected] Reviewed-by: Andreas Färber <[email protected]> Cc: [email protected]
fce0a826083e0416981e2ea9518ce5faa75b81a3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fce0a826083e0416981e2ea9518ce5faa75b81a3
2014-02-26 17:19:58+00:00
spapr: support only ELF kernel images Currently everybody uses ELF kernel images with "-kernel" option on pseries machine but QEMU still tries to boot from an image even it fails to recognize it is ELF. This produces undefined behaviour if the user tries a kernel image compiled for another architecture. This removes support of raw kernel images. Signed-off-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
133e70ee8831992e309f74c20084bc50e3bcf8e0
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/133e70ee8831992e309f74c20084bc50e3bcf8e0
2014-03-05 03:06:46+01:00
qemu_file: use fwrite() correctly fwrite() returns the number of items written. But when there is one error, it can return a short write. In the particular bug that I was tracking, I did a migration to a read-only filesystem. And it was able to finish the migration correctly. fwrite() never returned a negative error code, nor zero, always 4096. (migration writes chunks of about 14000 bytes). And it was able to "complete" the migration with success (yes, reading the file was a bit more difficult). To add insult to injury, if your amount of memory was big enough (12GB on my case), it overwrote some important structure, and from them, malloc failed. This check makes the problem go away. Signed-off-by: Juan Quintela <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
aded6539d983280212e08d09f14157b1cb4d58cc
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/aded6539d983280212e08d09f14157b1cb4d58cc
2014-02-25 14:26:59+01:00
target-arm: Ignore most exceptions from scalbn when doing fixpoint conversion The VFP fixed point conversion helpers first call float_scalbn and then convert the result to an integer. This scalbn operation may set floating point exception flags for: * overflow & inexact (if it overflows to infinity) * input denormal squashed to zero * output denormal squashed to zero Of these, we only care about the input-denormal flag, since the output of the whole scale-and-convert operation will be an integer (so squashed-output-denormal and overflow don't apply). Suppress the others by saving the pre-scalb exception flags and only copying across a potential input-denormal flag. Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Richard Henderson <[email protected]>
39905e53db75b6df0cfdb65644056a9f1cd10069
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/39905e53db75b6df0cfdb65644056a9f1cd10069
2014-01-07 19:18:08+00:00
virtio-rng: switch exit callback to VirtioDeviceClass This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: [email protected] Acked-by: Andreas Faerber <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
7bb6edb0e3dd78d74e0ac980cf6c0a07307f61bf
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/7bb6edb0e3dd78d74e0ac980cf6c0a07307f61bf
2013-12-09 21:46:48+01:00
qtest: split configuration of qtest accelerator and chardev qtest uses the icount infrastructure to implement a test-driven vm_clock. This however is not necessary when using -qtest as a "probe" together with a normal TCG-, KVM- or Xen-based virtual machine. Hence, split out the call to configure_icount into a new function that is called only for "-machine accel=qtest"; and disable those commands when running with an accelerator other than qtest. This also fixes an assertion failure with "qemu-system-x86_64 -machine accel=qtest" but no -qtest option. This is a valid case, albeit somewhat weird; nothing will happen in the VM but you'll still be able to interact with the monitor or the GUI. Now that qtest_init is not limited to an int(void) function, change global variables that are not used outside qtest_init to arguments. And finally, cleanup useless parts of include/sysemu/qtest.h. The file is not used at all for user-only emulation, and qtest is not available on Win32 due to its usage of sigwait. Reported-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Tested-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
d4fce24f3a59eda081cdf2e38e7001591b95d173
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d4fce24f3a59eda081cdf2e38e7001591b95d173
2013-12-10 12:29:56+02:00
blockdev: fix drive_init() opts and bs_opts leaks These memory leaks also make drive_add if=none,id=drive0 without a file= option leak the options list. This keeps ID "drive0" around forever. Signed-off-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Eric Blake <[email protected]>
ec9c10d29c6bb5613a680af62f5825d3bb2d31d4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ec9c10d29c6bb5613a680af62f5825d3bb2d31d4
2013-11-07 13:53:31+01:00
kvm: Fix uninitialized cpuid_data This error was reported by valgrind when running qemu-system-x86_64 with kvm: ==975== Conditional jump or move depends on uninitialised value(s) ==975== at 0x521C38: cpuid_find_entry (kvm.c:176) ==975== by 0x5235BA: kvm_arch_init_vcpu (kvm.c:686) ==975== by 0x4D5175: kvm_init_vcpu (kvm-all.c:267) ==975== by 0x45035B: qemu_kvm_cpu_thread_fn (cpus.c:858) ==975== by 0xD361E0D: start_thread (pthread_create.c:311) ==975== by 0xD65E9EC: clone (clone.S:113) ==975== Uninitialised value was created by a stack allocation ==975== at 0x5226E4: kvm_arch_init_vcpu (kvm.c:446) Instead of adding more memset calls for parts of cpuid_data, the existing calls were removed and cpuid_data is now initialized completely in one call. Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
ef4cbe14342c1f63b3c754e306218f004f4e26c4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ef4cbe14342c1f63b3c754e306218f004f4e26c4
2013-11-07 13:14:56+02:00
libqtest: add qmp(fmt, ...) -> QDict* function Add a qtest qmp() function that returns the response object. This allows test cases to verify the result or to check for error responses. It also allows waiting for QMP events. Signed-off-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Andreas Färber <[email protected]>
0c460dac03e7919079525d8e24ef2c4c607c219d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/0c460dac03e7919079525d8e24ef2c4c607c219d
2013-11-07 13:58:53+01:00
qxl: simplify qxl_rom_size Nowdays rom size is fixed at 8192 for live migration compat reasons. So we can ditch the pointless math trying to calculate the size needed. Also make the size sanity check fail at compile time not runtime. Signed-off-by: Gerd Hoffmann <[email protected]>
60b3b2a55f4b3fb72419ce7e4b44378dc56eed28
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/60b3b2a55f4b3fb72419ce7e4b44378dc56eed28
2013-09-18 11:13:29+02:00
qcow2_check: Mark image consistent If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
24530f3e060c71b6c57c7a70336f08a13a8b0a3d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/24530f3e060c71b6c57c7a70336f08a13a8b0a3d
2013-09-02 10:15:15+02:00
target-arm: Report unimplemented opcodes (LOG_UNIMP) These unimplemented opcodes are handled like illegal opcodes, but they are used in existing code. We should at least report when they are executed. Signed-off-by: Stefan Weil <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Michael Tokarev <[email protected]>
e0c270d946dc8efd723129b6a9d956b3084b55b1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e0c270d946dc8efd723129b6a9d956b3084b55b1
2013-09-01 19:34:32+04:00
aio: stop using .io_flush() Now that aio_poll() users check their termination condition themselves, it is no longer necessary to call .io_flush() handlers. The behavior of aio_poll() changes as follows: 1. .io_flush() is no longer invoked and file descriptors are *always* monitored. Previously returning 0 from .io_flush() would skip this file descriptor. Due to this change it is essential to check that requests are pending before calling qemu_aio_wait(). Failure to do so means we block, for example, waiting for an idle iSCSI socket to become readable when there are no requests. Currently all qemu_aio_wait()/aio_poll() callers check before calling. 2. aio_poll() now returns true if progress was made (BH or fd handlers executed) and false otherwise. Previously it would return true whenever 'busy', which means that .io_flush() returned true. The 'busy' concept no longer exists so just progress is returned. Due to this change we need to update tests/test-aio.c which asserts aio_poll() return values. Note that QEMU doesn't actually rely on these return values so only tests/test-aio.c cares. Note that ctx->notifier, the EventNotifier fd used for aio_notify(), is now handled as a special case. This is a little ugly but maintains aio_poll() semantics, i.e. aio_notify() does not count as 'progress' and aio_poll() avoids blocking when the user has not set any fd handlers yet. Patches after this remove .io_flush() handler code until we can finally drop the io_flush arguments to aio_set_fd_handler() and friends. Reviewed-by: Paolo Bonzini <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
164a101f28a53cd3db60ed874e7c3630e7988ed8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/164a101f28a53cd3db60ed874e7c3630e7988ed8
2013-08-19 15:45:35+02:00
qapi.py: Restructure lexer and parser The parser has a rather unorthodox structure: Until EOF: Read a section: Generator function get_expr() yields one section after the other, as a string. An unindented, non-empty line that isn't a comment starts a new section. Lexing: Split section into a list of tokens (strings), with help of generator function tokenize(). Parsing: Parse the first expression from the list of tokens, with parse(), throw away any remaining tokens. In parse_schema(): record value of an enum, union or struct key (if any) in the appropriate global table, append expression to the list of expressions. Return list of expressions. Known issues: (1) Indentation is significant, unlike in real JSON. (2) Neither lexer nor parser have any idea of source positions. Error reporting is hard, let's go shopping. (3) The one error we bother to detect, we "report" via raise. (4) The lexer silently ignores invalid characters. (5) If everything in a section gets ignored, the parser crashes. (6) The lexer treats a string containing a structural character exactly like the structural character. (7) Tokens trailing the first expression in a section are silently ignored. (8) The parser accepts any token in place of a colon. (9) The parser treats comma as optional. (10) parse() crashes on unexpected EOF. (11) parse_schema() crashes when a section's expression isn't a JSON object. Replace this piece of original art by a thoroughly unoriginal design. Takes care of (1), (2), (5), (6) and (7), and lays the groundwork for addressing the others. Generated source files remain unchanged. Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Eric Blake <[email protected]> Message-id: [email protected] Signed-off-by: Anthony Liguori <[email protected]>
c7a3f25200c8692e969f21c7f2555630ec0d0d30
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c7a3f25200c8692e969f21c7f2555630ec0d0d30
2013-07-29 10:37:10-05:00
target-mips: fix mipsdsp_trunc16_sat16_round This change corrects rounding and saturation of Q31 fractional value in mipsdsp_trunc16_sat16_round(). Overflow detection was incorrect for the corner case for PRECRQ_RS.PH, and this test case is also part of the change. Signed-off-by: Petar Jovanovic <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
d36c231f4b7386bd8230aa17d362b925aa419b2f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d36c231f4b7386bd8230aa17d362b925aa419b2f
2013-07-29 00:27:36+02:00
rdma: allow state transitions between other states besides ACTIVE This patch is in preparation for the next ones: Until now the MIG_STATE_SETUP state was not really a 'formal' state. It has been used as a 'zero' state and QEMU has been unconditionally transitioning into this state when the QMP migrate command was called. In preparation for timing this state, we have to make this state a a 'real' state which actually gets transitioned from later in the migration_thread() from SETUP => ACTIVE, rather than just automatically dropping into this state at the beginninig of the migration. This means that the state transition function (migration_finish_set_state()) needs to be capable of transitioning from valid states _other_ than just MIG_STATE_ACTIVE. The function is in fact already capable of doing that, but was not allowing the old state to be a parameter specified as an input. This patch fixes that and only makes the transition if the current state matches the old state that the caller intended to transition from. Reviewed-by: Juan Quintela <[email protected]> Tested-by: Michael R. Hines <[email protected]> Signed-off-by: Michael R. Hines <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
d58f574bf39796ed2396dfd1e308352fbb03f944
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d58f574bf39796ed2396dfd1e308352fbb03f944
2013-07-23 13:06:28+02:00
gluster: Return bdrv_has_zero_init = 0 GlusterFS volumes can be backed by block devices, in which case bdrv_create() doesn't make sure that the image is zeroed out. It is currently not possibly to detect whether a given image is backed by a file or a block device, and incorrectly assuming that it is zeroed corrupts images during qemu-img convert, so let's err on the side of caution and always return 0. Cc: [email protected] Signed-off-by: Kevin Wolf <[email protected]>
8ab6feec2c7500faafd9a4571fb40d03dd360a64
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8ab6feec2c7500faafd9a4571fb40d03dd360a64
2013-06-28 09:20:27+02:00
e1000: cleanup process_tx_desc Coverity complains about two overruns in process_tx_desc(). The complaints are false positives, but we might as well eliminate them. The problem is that "hdr" is defined as an unsigned int, but then used to offset an array of size 65536, and another of size 256 bytes. hdr will actually never be greater than 255 though, as it's assigned only once and to the value of tp->hdr_len, which is an uint8_t. This patch simply gets rid of hdr, replacing it with tp->hdr_len, which makes it consistent with all other tp member use in the function. v2: - also cleanup coding style issues in the touched lines Signed-off-by: Andrew Jones <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
a0ae17a63e08a57a644eacc1f0fd89d535ed36bf
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a0ae17a63e08a57a644eacc1f0fd89d535ed36bf
2013-07-04 10:40:56+03:00
sd/pl181.c: Avoid undefined shift behaviour in RWORD macro Add a cast to avoid potentially shifting into the sign bit of a signed value, which is undefined behaviour in C. (Detected with clang's -fsanitize=undefined.) Signed-off-by: Peter Maydell <[email protected]> Message-id: [email protected]
8827b0fb66cab9f7978c4e66dad4cf3c0989a72e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8827b0fb66cab9f7978c4e66dad4cf3c0989a72e
2013-07-15 16:17:30+01:00
memory: fix address space initialization/destruction A couple of fields were left uninitialized. This was not observed earlier because all address spaces were statically allocated. Also free allocation for those fields. Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
4c19eb721a5929f2277d33a98bb59963c58c2e3b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4c19eb721a5929f2277d33a98bb59963c58c2e3b
2013-05-24 18:43:25+02:00
introduce a new qom device to deal with panicked event pvpanic device is used to send guest panic event from guest to qemu. When guest panic happens, pvpanic device driver will write a event number to IO port 0x505(which is the IO port occupied by pvpanic device, by default). On receiving the event, pvpanic device will pause guest cpu(s), and send a qmp event QEVENT_GUEST_PANICKED. Signed-off-by: Wen Congyang <[email protected]> Signed-off-by: Hu Tao <[email protected]> Reviewed-by: Markus Armbruster <[email protected]> Message-id: b66077a40235b3531632a05a6ff373850afc7d2e.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <[email protected]>
eec3d2adc98dd9ef7352823ce6597f88a51cf7cb
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/eec3d2adc98dd9ef7352823ce6597f88a51cf7cb
2013-04-30 10:30:01-05:00
ccid: Fix crash when backend isn't specified Reproducer: ./x86_64-softmmu/qemu-system-x86_64 -device usb-ccid,id=ccid0 -usb -device ccid-card-emulated -monitor stdio Signed-off-by: Cole Robinson <[email protected]> Reviewed-by: Alon Levy <[email protected]>
ae12e3a643c66575c77211e1226ada041e56b889
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ae12e3a643c66575c77211e1226ada041e56b889
2013-04-27 02:38:33+03:00
tcg: Log the contents of the prologue with -d out_asm This makes it easier to verify changes to the code generating the prologue. [Aurelien: change the format from %i to %zu] Reviewed-by: Aurelien Jarno <[email protected]> Signed-off-by: Richard Henderson <[email protected]>
d6b64b2b606fe0fe5f2208e84ff7a28445de666a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d6b64b2b606fe0fe5f2208e84ff7a28445de666a
2013-04-27 02:15:55+02:00
Xen PV backend: Disable use of O_DIRECT by default as it results in crashes. Due to what is almost certainly a kernel bug, writes with O_DIRECT may continue to reference the page after the write has been marked as completed, particularly in the case of TCP retransmit. In other scenarios, this "merely" risks data corruption on the write, but with Xen pages from domU are only transiently mapped into dom0's memory, resulting in kernel panics when they are subsequently accessed. This brings PV devices in line with emulated devices. Removing O_DIRECT is safe as barrier operations are now correctly passed through. See: http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html for more details. Signed-off-by: Alex Bligh <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]>
c1a88ad1f4ac994cd70695bf08141d161e21533e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c1a88ad1f4ac994cd70695bf08141d161e21533e
2013-04-05 15:45:15+00:00
Monitor: Make output buffer dynamic Commit f628926bb423fa8a7e0b114511400ea9df38b76a changed monitor_flush() to retry on qemu_chr_fe_write() errors. However, the Monitor's output buffer can keep growing while the retry is not issued and this can cause the buffer to overflow. To reproduce this issue, just start qemu and type on the Monitor: (qemu) ? This will cause an assertion to trig. To fix this problem this commit makes the Monitor buffer dynamic, which means that it can grow as much as needed. Signed-off-by: Luiz Capitulino <[email protected]> Reviewed-by: Eric Blake <[email protected]> Acked-by: Gerd Hoffmann <[email protected]>
e1f2641b5926d20f63d36f0de45206be774da8da
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e1f2641b5926d20f63d36f0de45206be774da8da
2013-04-05 08:42:29-04:00
block/curl: only restrict protocols with libcurl>=7.19.4 The curl_easy_setopt(state->curl, CURLOPT_PROTOCOLS, ...) interface was introduced in libcurl 7.19.4. Therefore we cannot protect against CVE-2013-0249 when linking against an older libcurl. This fixes the build failure introduced by fb6d1bbd246c7a57ef53d3847ef225cd1349d602. Reported-by: Andreas Färber <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]> Tested-by: Andreas Färber <[email protected]> Message-id: [email protected] Signed-off-by: Anthony Liguori <[email protected]>
8a8f5840082eb65d140ccfe7b128c92390cce1c3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8a8f5840082eb65d140ccfe7b128c92390cce1c3
2013-02-13 11:57:35-06:00
trace: Clean up the "try to update atomic until it worked" loops Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]> Reviewed-by: Harsh Prateek Bora <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
b6b2c9628084f1672b92393cf84039a075a95301
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b6b2c9628084f1672b92393cf84039a075a95301
2013-02-05 21:52:55+01:00
bitops: unify bitops_ffsl with the one in host-utils.h, call it bitops_ctzl We had two copies of a ffs function for longs with subtly different semantics and, for the one in bitops.h, a confusing name: the result was off-by-one compared to the library function ffsl. Unify the functions into one, and solve the name problem by calling the 0-based functions "bitops_ctzl" and "bitops_ctol" respectively. This also fixes the build on platforms with ffsl, including Mac OS X and Windows. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Eric Blake <[email protected]> Tested-by: Andreas Färber <[email protected]> Tested-by: Peter Maydell <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
fbeadf50f2f965741def823036b086bbc2999b1f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fbeadf50f2f965741def823036b086bbc2999b1f
2013-02-02 20:16:00+00:00
s390/sclpconsole: prevent char layer callback during initialization Starting a qemu with an sclp console and pressing a key very early can result in "qemu-system-s390x: hw/s390x/sclpconsole.c:60: receive_from_chr_layer: Assertion `scon->iov' failed." Lets make sure that the init process is finished, since the iov is allocated after CHR_EVENT_OPENED by also checking for scon->iov. Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
760794f784f66e262a9ca32821ba202cdf3a3e4b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/760794f784f66e262a9ca32821ba202cdf3a3e4b
2013-02-13 11:56:02-06:00
hw/9pfs: Fix unchecked strdup() by converting to g_strdup() Note: the allocation in virtio_9p_init() is still leaked. To be fixed in a followup commit. Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
d3f8e138c23ba082f87c96634d06b978473c1e9b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d3f8e138c23ba082f87c96634d06b978473c1e9b
2013-01-30 11:14:46+01:00
fw_cfg: Use void *, size_t instead of uint8_t *, uint32_t for blobs Many callers pass size_t, which gets silently truncated to uint32_t. Harmless, because all practical sizes are well below 4GiB. Clean it up anyway. Size overflow now fails assertions. Bonus: saves a whole bunch of silly casts. Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
089da572b956ef0f8f5b8d5917358e07892a77c2
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/089da572b956ef0f8f5b8d5917358e07892a77c2
2013-01-19 10:22:44+00:00
xen_disk: fix memory leak On ioreq_release the full ioreq was memset to 0, loosing all the data and memory allocations inside the QEMUIOVector, which leads to a memory leak. Create a new function to specifically reset ioreq. Reported-by: Maik Wessler <[email protected]> Signed-off-by: Roger Pau Monné <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]>
282c6a2f292705f823554447ca0b7731b6f81a97
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/282c6a2f292705f823554447ca0b7731b6f81a97
2013-01-14 18:26:53+00:00
migration: fix migration_bitmap leak Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
244eaa7514a944b36273eb8428f32da8e9124fcf
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/244eaa7514a944b36273eb8428f32da8e9124fcf
2012-12-20 22:44:29+01:00
migration: Fix madvise breakage if host and guest have different page sizes madvise(DONTNEED) will throw away the contents of the whole page at the given address, even if the given length is less than the page size. One can argue about whether that's the correct behaviour, but that's what it's done for a long time in Linux at least. That means that the madvise() in ram_load(), on a setup where TARGET_PAGE_SIZE is smaller than the host page size, can throw away data in guest pages adjacent to the one it's actually processing right now, leading to guest memory corruption on an incoming migration. This patch therefore, disables the madvise() if the host page size is larger than TARGET_PAGE_SIZE. This means we don't get the benefits of that madvise() in this case, but a more complete fix is more difficult to accomplish. This at least fixes the guest memory corruption. Signed-off-by: David Gibson <[email protected]> Reported-by: Alexey Kardashevskiy <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
45e6cee42b98d10e2e14885ab656541a9ffd5187
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/45e6cee42b98d10e2e14885ab656541a9ffd5187
2012-12-12 15:03:31-06:00
uhci: Don't crash on device disconnect My recent uhci cleanup series has introduced a regression, where qemu sometimes crashes on a device disconnect. The problem is that the uhci code never checked for a device not / no longer existing, instead it was relying on usb_handle_packet accepting a NULL device. But since we now pass usb_handle_packet q->ep->dev, rather then just a local dev variable, we crash as q->ep == NULL due to the device no longer existing. This patch fixes this. Note that this patch also improves over the old behavior were we would: 1) create a queue for the device 2) create an async for the packet 3) have usb_handle_packet fail 4) destroy the async 5) wait for the queue to be idle for 32 frames 6) destroy the queue Which was rather sub-optimal. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
7f102ebeb5bad7b723a25557234b0feb493f6134
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/7f102ebeb5bad7b723a25557234b0feb493f6134
2012-11-01 15:17:58+01:00
block: bdrv_create(): don't leak cco.filename on error Signed-off-by: Luiz Capitulino <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
80168bff43760bde98388480dc7c93f94693421c
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/80168bff43760bde98388480dc7c93f94693421c
2012-10-24 10:26:19+02:00
target-sparc: Cleanup cpu_src[12] allocation Now that get_temp_tl is used for get_src[12], we don't need to pre-allocate these temporaries. Fallout from this is moving some assignments around cas/casx to avoid uninitialized variable warnings. Signed-off-by: Richard Henderson <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
a4273524875a960e8ef22ed676853e5988fefbea
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a4273524875a960e8ef22ed676853e5988fefbea
2012-10-20 07:56:06+00:00
target-mips: implement unaligned loads using TCG Load/store from helpers should be avoided as they are quite inefficient. Rewrite unaligned loads instructions using TCG and aligned loads. The number of actual loads operations to implement an unaligned load instruction is reduced from up to 8 to 1. Note: As we can't rely on shift by 32 or 64 undefined behaviour, the code loads already shift by one constants. Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
fc40787abcf8452b8f50d92b7a13243a12972c7a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fc40787abcf8452b8f50d92b7a13243a12972c7a
2012-10-31 22:20:47+01:00
hw/ds1338: Fix mishandling of register pointer Correct several deficiencies in the handling of the register pointer: * it should wrap around after 0x3f, not 0xff * guard against the caller handing us an out of range pointer (on h/w this can never happen, because only a 7 bit value is transferred over the I2C bus) * there was confusion over whether nvram[] holds only the 56 bytes of guest-accessible NVRAM, or also the secondary registers which hold the value of the clock captured at the start of a multibyte read. Correct to consistently be the latter, by fixing the array size and the offset used for NVRAM writes. * ds1338_send was attempting to use 'data' as both the data and the register offset simultaneously, which meant that writes to any register were broken; fix to use the register pointer. Signed-off-by: Peter Maydell <[email protected]>
ba4906a9b64e165a958e12f6208ca834dc7a36dc
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ba4906a9b64e165a958e12f6208ca834dc7a36dc
2012-10-12 11:54:38+01:00
memory: abort if a memory region is destroyed during a transaction Destroying a memory region is illegal within a transaction, as until the transaction is committed, the memory core may hold references to the region. Add an assert to check for violations of this rule. Signed-off-by: Avi Kivity <[email protected]>
2be0e25f4b6a4f91e39388cc365bbe53b56ab62a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2be0e25f4b6a4f91e39388cc365bbe53b56ab62a
2012-10-17 17:14:41+02:00
block: avoid buffer overrun by using pstrcpy, not strncpy Also, use PATH_MAX, rather than the arbitrary 1024. Using PATH_MAX is more consistent with other filename-related variables in this file, like backing_filename and tmp_filename. Acked-by: Kevin Wolf <[email protected]> Signed-off-by: Jim Meyering <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
c2cba3d9314f972dfaf724d0ec2d018eb54c95f1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c2cba3d9314f972dfaf724d0ec2d018eb54c95f1
2012-10-05 07:58:36-05:00
block: after creating a live snapshot, make old image read-only Currently, after a live snapshot of a drive, the image that has been 'demoted' to be below the new active layer remains r/w. This patch reopens it read-only. Note that we do not check for error on the reopen(), because we will not abort the snapshots if the reopen fails. This patch depends on the bdrv_reopen() series. Signed-off-by: Jeff Cody <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
870f5681c9dbafc738082b1fd48e0cc013bf43c7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/870f5681c9dbafc738082b1fd48e0cc013bf43c7
2012-09-28 17:51:47+02:00
qxl: Ignore set_client_capabilities pre/post migrate The recent introduction of set_client_capabilities has broken (seamless) migration by trying to call qxl_send_events pre (seamless incoming) and post (*) migration, triggering the following assert: qxl_send_events: Assertion `qemu_spice_display_is_running(&d->ssd)' failed. The solution is easy, pre migration the guest will have already received the client caps on the migration source side, and post migration there no longer is a guest, so we can simply ignore the set_client_capabilities call in both those scenarios. *) Post migration, so not fatal for to the migration itself, but still a crash Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
ab902981cf4d46834d82eb095f2b9ab159e017bf
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ab902981cf4d46834d82eb095f2b9ab159e017bf
2012-09-12 08:09:48+02:00
monitor: Clean up fd sets on monitor disconnect Fd sets are shared by all monitor connections. Fd sets are considered to be in use while at least one monitor is connected. When the last monitor disconnects, all fds that are members of an fd set with no outstanding dup references are closed. This prevents any fd leakage associated with a client disconnect prior to using a passed fd. Signed-off-by: Corey Bryant <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
efb87c169740e618ec548c45c819a43e0ade2bab
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/efb87c169740e618ec548c45c819a43e0ade2bab
2012-08-15 13:16:22+02:00
virtio-blk: fix use-after-free while handling scsi commands The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free. Reproducible by running a guest with aio=native on a block device. Reported-by: Stefan Priebe <[email protected]> Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
730a9c53b4e52681fcfe31cf38854cbf91e132c7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/730a9c53b4e52681fcfe31cf38854cbf91e132c7
2012-08-10 10:25:11+02:00
target-i386: Fix compilation with --enable-debug commit c4baa0503d9623f1ce891f525ccd140c598bc29a improved SSE table type safety which now raises compiler errors when latest QEMU was configured with --enable-debug. Fix this by splitting the SSE tables even further to separate helper functions with different signatures. Instead of crashing by calling address 0, the code now jumps to label illegal_op. Signed-off-by: Stefan Weil <[email protected]> Reviewed-by: Peter Maydell <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
11f8cdbc64e44103480b008a155ace2d0b8a8359
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/11f8cdbc64e44103480b008a155ace2d0b8a8359
2012-07-05 18:55:57+00:00
Add a memory barrier to DMA functions The emulated devices can run simultaneously with the guest, so we need to be careful with ordering of load and stores done by them to the guest system memory, which need to be observed in the right order by the guest operating system. This adds a barrier call to the basic DMA read/write ops which is currently implemented as a smp_mb(), but could be later improved for more fine grained control of barriers. Additionally, a _relaxed() variant of the accessors is provided to easily convert devices who would be performance sensitive and negatively impacted by the change. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
7a0bac4da9c6a2e36d388412f3b4074b10429e8e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/7a0bac4da9c6a2e36d388412f3b4074b10429e8e
2012-06-27 16:33:26-05:00
iommu: Allow PCI to use IOMMU infrastructure This patch adds some hooks to let PCI devices and busses use the new IOMMU infrastructure. When IOMMU support is enabled, each PCI device now contains a DMAContext * which is used by the pci_dma_*() wrapper functions. By default, the contexts are initialized to NULL, assuming no IOMMU. However the platform or host bridge code which sets up the PCI bus can use pci_setup_iommu() to set a function which will determine the correct DMAContext for a given PCI device. Cc: Michael S. Tsirkin <[email protected]> Cc: Richard Henderson <[email protected]> Signed-off-by: David Gibson <[email protected]> Signed-off-by: Eduard - Gabriel Munteanu <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
5fa45de5623abd3a6d0b9575a4f014cbfe886b36
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5fa45de5623abd3a6d0b9575a4f014cbfe886b36
2012-06-27 16:33:26-05:00
s390: make kvm_stat work on s390 Add s390_exit_reasons so kvm_stat doesn't crash when called on s390. Look for 'vendor_id' in /proc/cpuinfo as well, instead of just for 'flags', so we can determine if we run on S390. Signed-off-by: Jens Freimann <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
c5854acb75510969bc3c483f61fbddb027123173
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c5854acb75510969bc3c483f61fbddb027123173
2012-06-18 15:32:45+02:00
rewrite iov_send_recv() and move it to iov.c Make it much more understandable, add a missing iov_cnt argument (number of iovs in the iov), and add comments to it. The new implementation has been extensively tested by splitting a large buffer into many small randomly-sized chunks, sending it over socket to another, slow process and verifying the receiving data is the same. Also add a unit test for iov_send_recv(), sending/ receiving data between two processes over a socketpair using random vectors and random sizes. Signed-off-by: Michael Tokarev <[email protected]>
25e5e4c7e9d5ec3e95c9526d1abaca40ada50ab0
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/25e5e4c7e9d5ec3e95c9526d1abaca40ada50ab0
2012-06-11 23:12:11+04:00
convert net_client_init() to OptsVisitor The net_client_init() prototype is kept intact. Based on "is_netdev", the QemuOpts-rooted QemuOpt-list is parsed as a Netdev or a NetLegacy. The original meat of net_client_init() is moved to and simplified in net_client_init1(): Fields not common between -net and -netdev are clearly separated. Getting the name for the init functions is cleaner: Netdev::id is mandatory, and all init functions handle a NULL NetLegacy::name. NetLegacy::vlan explicitly depends on -net (see below). Verifying the "type=" option for -netdev can be turned into a switch. Format validation with qemu_opts_validate() can be removed because the visitor covers it. Relatedly, the "net_client_types" array is reduced to an array of init functions that can be directly indexed by opts->kind. (Help text is available in the schema JSON.) The outermost negation in the condition around qemu_find_vlan() was flattened, because it expresses the dependent code's requirements more clearly. VLAN lookup is avoided if there's no init function to pass the VLAN to. Whenever the value of type=... is needed, we substitute NetClientOptionsKind_lookup[kind]. The individual init functions are not converted yet, thus the original QemuOpts instance is passed transparently. v1->v2: - NetLegacy::name is optional. Tracked it through all init functions: they all handle a NULL name. Updated commit message accordingly. v2->v3: - NetLegacy::id is allowed and takes precedence over NetLegacy::name. Signed-off-by: Laszlo Ersek <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
6687b79d636cd60ed9adb1177d0d946b58fa7717
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/6687b79d636cd60ed9adb1177d0d946b58fa7717
2012-07-23 11:55:18+01:00