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
⌀ |
---|---|---|---|---|---|---|---|
Make page_find() return 0 for too-large addresses (Eduardo Habkost)
On some cases, such as under KVM, tb_invalidate_phys_page_range()
may be called for large addresses, when qemu is configured to more than
4GB of RAM.
On these cases, qemu was crashing because it was using an index too
large for l1_map[], that supports only 32-bit addresses when compiling
without CONFIG_USER_ONLY.
Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5227 c046a42c-6fe2-441c-8c8c-71466251a162
| 434929bf11f0573d953c24287badbc2431a042ef | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/434929bf11f0573d953c24287badbc2431a042ef | 2008-09-15 15:56:30+00:00 |
Silence gcc warning about constant overflow
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5175 c046a42c-6fe2-441c-8c8c-71466251a162
| 47ad35f16ae4b6b93cbfa238d51d4edc7dea90b5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/47ad35f16ae4b6b93cbfa238d51d4edc7dea90b5 | 2008-09-06 17:50:16+00:00 |
Fix windows build
Right now, the Windows build is broken because of NBD. Using a mingw32 cross
compiler is also badly broken.
This patch fixes the Windows build by stubbing out NBD support until someone
fixes it for Windows. It also santizing the mingw32 cross compiler support
by replacing the --enable-mingw32 option with a compiler check to determine
if we're on windows or not.
Also remove the weird SDL pseudo-detection for mingw32 using a cross compiler.
The hardcoded sdl-config name is seemly arbitrary. If you cross compiler SDL
correctly and modify your PATH variable appropriately, it will Just Work when
cross compiling.
The audio driver detection is also broken for cross compiling so you have to
specify the audio drivers explicitly for now.
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5046 c046a42c-6fe2-441c-8c8c-71466251a162
| cd01b4a312248dd4e12c3d389d1a349cea4015d8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cd01b4a312248dd4e12c3d389d1a349cea4015d8 | 2008-08-21 19:25:45+00:00 |
Cut the translation block after translating a break insn. This avoids an issue where QEMU finds an illegal CRIS insn while the guest is returning through a signal return trampoline.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3997 c046a42c-6fe2-441c-8c8c-71466251a162
| 4f400ab52009ed8f76fa541454a4368f9515f897 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4f400ab52009ed8f76fa541454a4368f9515f897 | 2008-02-28 09:37:58+00:00 |
Fix a crash with monitor input arriving before readline_start has been called
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3749 c046a42c-6fe2-441c-8c8c-71466251a162
| ad8efe4b6e27f0ea87d6510c11ae11377eade93d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ad8efe4b6e27f0ea87d6510c11ae11377eade93d | 2007-11-30 16:45:21+00:00 |
Parallel flash bugfixes:
- always need to register flash area back to IO_MEM_ROMD at reset time
- disabled buffered write as it's not actually supported
- don't check flash time at registration time
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2678 c046a42c-6fe2-441c-8c8c-71466251a162
| 95d1f3edd5ecebcf8d1b8efe1a0b4533e3629e39 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/95d1f3edd5ecebcf8d1b8efe1a0b4533e3629e39 | 2007-04-16 07:14:26+00:00 |
Fix off-by-one error
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2573 c046a42c-6fe2-441c-8c8c-71466251a162
| 4f14e88c5991877085b1090508ee222d6f3ef088 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4f14e88c5991877085b1090508ee222d6f3ef088 | 2007-04-01 16:23:36+00:00 |
Fix PCI config space overflow, by Herbert Xu.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2238 c046a42c-6fe2-441c-8c8c-71466251a162
| a2d4e44b485222a8972ea9e555b148148c655bb9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a2d4e44b485222a8972ea9e555b148148c655bb9 | 2006-12-10 23:20:45+00:00 |
packet fix for for netware 3.11 (initial patch by Mark Jonckheere) - security bug fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1363 c046a42c-6fe2-441c-8c8c-71466251a162
| 40545f84cfcbe4b73cca040b3043a1c2de935762 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/40545f84cfcbe4b73cca040b3043a1c2de935762 | 2005-04-10 14:51:41+00:00 |
BSR/BSF undefined behaviour fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@809 c046a42c-6fe2-441c-8c8c-71466251a162
| 686f3f266b829b06c7b170db7b4ce97abfbfc517 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/686f3f266b829b06c7b170db7b4ce97abfbfc517 | 2004-05-16 15:56:04+00:00 |
vm86 emulation closer to Linux kernel code - added correct IRQ emulation for dosemu
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@136 c046a42c-6fe2-441c-8c8c-71466251a162
| 46ddf5511d31101d83e38db17056f4178ac14bc9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/46ddf5511d31101d83e38db17056f4178ac14bc9 | 2003-05-10 12:36:41+00:00 |
i386: fix read/write cr with icount option
Running Windows with icount causes a crash in instruction of write cr.
This patch fixes it.
Reading and writing cr cause an icount read because there are called
cpu_get_apic_tpr and cpu_set_apic_tpr functions. So, there is need
gen_io_start()/gen_io_end() calls.
Signed-off-by: Mihail Abakumov <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 5b003a40bb1ab14d0398e91f03393d3c6b9577cd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5b003a40bb1ab14d0398e91f03393d3c6b9577cd | 2017-06-07 18:22:02+02:00 |
fw_cfg: fix memory corruption when all fw_cfg slots are used
When all the fw_cfg slots are used, a write is made outside the
bounds of the fw_cfg files array as part of the sort algorithm.
Fix it by avoiding an unnecessary array element move.
Fix also an assert while at it.
Signed-off-by: Marcel Apfelbaum <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| d6b6abc51dda79a97f2c7bd6652c1940c068f1ec | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d6b6abc51dda79a97f2c7bd6652c1940c068f1ec | 2018-01-19 11:18:51-02:00 |
readline: add a free function
Fixes leaks such as:
Direct leak of 2 byte(s) in 1 object(s) allocated from:
#0 0x7eff58beb850 in malloc (/lib64/libasan.so.4+0xde850)
#1 0x7eff57942f0c in g_malloc ../glib/gmem.c:94
#2 0x7eff579431cf in g_malloc_n ../glib/gmem.c:331
#3 0x7eff5795f6eb in g_strdup ../glib/gstrfuncs.c:363
#4 0x55db720f1d46 in readline_hist_add /home/elmarco/src/qq/util/readline.c:258
#5 0x55db720f2d34 in readline_handle_byte /home/elmarco/src/qq/util/readline.c:387
#6 0x55db71539d00 in monitor_read /home/elmarco/src/qq/monitor.c:3896
#7 0x55db71f9be35 in qemu_chr_be_write_impl /home/elmarco/src/qq/chardev/char.c:167
#8 0x55db71f9bed3 in qemu_chr_be_write /home/elmarco/src/qq/chardev/char.c:179
#9 0x55db71fa013c in fd_chr_read /home/elmarco/src/qq/chardev/char-fd.c:66
#10 0x55db71fe18a8 in qio_channel_fd_source_dispatch /home/elmarco/src/qq/io/channel-watch.c:84
#11 0x7eff5793a90b in g_main_dispatch ../glib/gmain.c:3182
#12 0x7eff5793b7ac in g_main_context_dispatch ../glib/gmain.c:3847
#13 0x55db720af3bd in glib_pollfds_poll /home/elmarco/src/qq/util/main-loop.c:214
#14 0x55db720af505 in os_host_main_loop_wait /home/elmarco/src/qq/util/main-loop.c:261
#15 0x55db720af6d6 in main_loop_wait /home/elmarco/src/qq/util/main-loop.c:515
#16 0x55db7184e0de in main_loop /home/elmarco/src/qq/vl.c:1995
#17 0x55db7185e956 in main /home/elmarco/src/qq/vl.c:4914
#18 0x7eff4ea17039 in __libc_start_main (/lib64/libc.so.6+0x21039)
(while at it, use g_new0(ReadLineState), it's a bit easier to read)
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| e5dc1a6c6c4359cd783810f63eb68e9e09350708 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e5dc1a6c6c4359cd783810f63eb68e9e09350708 | 2018-01-16 14:54:50+01:00 |
sdhci: convert the DPRINT() calls into trace events
zero-initialize ADMADescr 'dscr' in sdhci_do_adma() to avoid:
hw/sd/sdhci.c: In function ‘sdhci_do_adma’:
hw/sd/sdhci.c:714:29: error: ‘dscr.addr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
trace_sdhci_adma("link", s->admasysaddr);
^
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 8be487d8f184f2f721cabeac559fb7a6cba18c95 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8be487d8f184f2f721cabeac559fb7a6cba18c95 | 2018-01-16 13:28:18+00:00 |
migration: Guard ram_bytes_remaining against early call
Calling ram_bytes_remaining during the early part of setup is unsafe
because the ram_state isn't yet initialised.
This can happen in the sequence:
migrate
migrate_cancel
info migrate
if the migrate sticks trying to connect (e.g. to an unresponsive
destination due to the connect timeout). Here 'info migrate' sees
a state of CANCELLING and so assumes the migrate has partially happened.
partial fix for:
RH bz: https://bugzilla.redhat.com/show_bug.cgi?id=1525899
Reported-by: Xianxian Wang <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| bae416e5ba65701d3c5238164517158066d615e5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bae416e5ba65701d3c5238164517158066d615e5 | 2018-01-15 12:48:04+01:00 |
nvme: Add tracing
Add trace output for commands, errors, and undefined behavior.
Add guest error log output for undefined behavior.
Report invalid undefined accesses to MMIO.
Annotate unlikely error checks with unlikely.
Signed-off-by: Doug Gale <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 1ee24514aed34760fb2863d98bea3a1b705d9c9f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1ee24514aed34760fb2863d98bea3a1b705d9c9f | 2017-12-22 15:03:41+01:00 |
tests/boot-serial-test: Make sure that we check the timeout regularly
If the guest continuesly writes characters to the UART, we never leave
the inner while loop and thus never check whether we've reached the
timeout value. So if we fail to find the expected string in the UART
output, the test just hangs and never finishs. Use a counter to regularly
break out of the while loop to check the timeout.
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 92b540dac9fc3a572c7342edd0b073000f5a6abf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/92b540dac9fc3a572c7342edd0b073000f5a6abf | 2017-12-21 09:22:45+01:00 |
block/curl: fix minor memory leaks
Signed-off-by: Jeff Cody <[email protected]>
Reviewed-by: Richard W.M. Jones <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
| 996922de45299878cdc4c15b72b19edf2bc618a4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/996922de45299878cdc4c15b72b19edf2bc618a4 | 2017-12-18 15:44:39-05:00 |
tpm-passthrough: workaround a possible race
The TPM backend processing thread has common shared variable race
issues. (they should not be so easy to reach since guest interaction
with the device is slow compared to host emulation)
An obvious one is setting op_cancelled from device thread after
calling write(cancel_fd). The backend thread may return before the
device thread has set the variable. Instead set it before
cancellation. Even if the write() failed, the end result is command
get possibly cancelled (even if cancellation came from external
sources it doesn't matter much).
It's worth to consider removing the backend processing thread for now.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Stefan Berger <[email protected]>
Signed-off-by: Stefan Berger <[email protected]>
| 21cb1e63a594e36ff350fba41600190fb0a1f42b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/21cb1e63a594e36ff350fba41600190fb0a1f42b | 2017-12-14 23:39:14-05:00 |
block: Check for inserted BlockDriverState in blk_io_limits_disable()
When you set I/O limits using block_set_io_throttle or the command
line throttling.* options they are kept in the BlockBackend regardless
of whether a BlockDriverState is attached to the backend or not.
Therefore when removing the limits using blk_io_limits_disable() we
need to check if there's a BDS before attempting to drain it, else it
will crash QEMU. This can be reproduced very easily using HMP:
(qemu) drive_add 0 if=none,throttling.iops-total=5000
(qemu) drive_del none0
Reported-by: sochin jiang <[email protected]>
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: 0d3a67ce8d948bb33e08672564714dcfb76a3d8c.1510339534.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 48bf7ea81aa848027bad24f7e7791b503dff727d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/48bf7ea81aa848027bad24f7e7791b503dff727d | 2017-11-13 14:38:46+00:00 |
nbd-client: Refuse read-only client with BDRV_O_RDWR
The NBD spec says that clients should not try to write/trim to
an export advertised as read-only by the server. But we failed
to check that, and would allow the block layer to use NBD with
BDRV_O_RDWR even when the server is read-only, which meant we
were depending on the server sending a proper EPERM failure for
various commands, and also exposes a leaky abstraction: using
qemu-io in read-write mode would succeed on 'w -z 0 0' because
of local short-circuiting logic, but 'w 0 0' would send a
request over the wire (where it then depends on the server, and
fails at least for qemu-nbd but might pass for other NBD
implementations).
With this patch, a client MUST request read-only mode to access
a server that is doing a read-only export, or else it will get
a message like:
can't open device nbd://localhost:10809/foo: request for write access conflicts with read-only export
It is no longer possible to even attempt writes over the wire
(including the corner case of 0-length writes), because the block
layer enforces the explicit read-only request; this matches the
behavior of qcow2 when backed by a read-only POSIX file.
Fix several iotests to comply with the new behavior (since
qemu-nbd of an internal snapshot, as well as nbd-server-add over QMP,
default to a read-only export, we must tell blockdev-add/qemu-io to
set up a read-only client).
CC: [email protected]
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
| 1104d83c726d2b20f9cec7b99ab3570a2fdbd46d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1104d83c726d2b20f9cec7b99ab3570a2fdbd46d | 2017-11-09 10:10:17-06:00 |
vhost: fix error check in vhost_verify_ring_mappings()
Since commit f1f9e6c5 "vhost: adapt vhost_verify_ring_mappings() to
virtio 1 ring layout", we check the mapping of each part (descriptor
table, available ring and used ring) of each virtqueue separately.
The checking of a part is done by the vhost_verify_ring_part_mapping()
function: it returns either 0 on success or a negative errno if the
part cannot be mapped at the same place.
Unfortunately, the vhost_verify_ring_mappings() function checks its
return value the other way round. It means that we either:
- only verify the descriptor table of the first virtqueue, and if it
is valid we ignore all the other mappings
- or ignore all broken mappings until we reach a valid one
ie, we only raise an error if all mappings are broken, and we consider
all mappings are valid otherwise (false success), which is obviously
wrong.
This patch ensures that vhost_verify_ring_mappings() only returns
success if ALL mappings are okay.
Reported-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 2fe45ec3bffbd3a26f2ed39f60bab0ca5217d8f6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2fe45ec3bffbd3a26f2ed39f60bab0ca5217d8f6 | 2017-12-01 19:05:58+02:00 |
nvic: Fix miscalculation of offsets into ITNS array
This calculation of the first exception vector in
the ITNS<n> register being accessed:
int startvec = 32 * (offset - 0x380) + NVIC_FIRST_IRQ;
is incorrect, because offset is in bytes, so we only want
to multiply by 8.
Spotted by Coverity (CID 1381484, CID 1381488), though it is
not correct that it actually overflows the buffer, because
we have a 'startvec + i < s->num_irq' guard.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
| cf5f7937b05c84d5565134f058c00cd48304a117 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cf5f7937b05c84d5565134f058c00cd48304a117 | 2017-10-12 16:33:16+01:00 |
target/arm: Add v8M support to exception entry code
Add support for v8M and in particular the security extension
to the exception entry code. This requires changes to:
* calculation of the exception-return magic LR value
* push the callee-saves registers in certain cases
* clear registers when taking non-secure exceptions to avoid
leaking information from the interrupted secure code
* switch to the correct security state on entry
* use the vector table for the security state we're targeting
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
| d3392718e1fcf0859fb7c0774a8e946bacb8419c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d3392718e1fcf0859fb7c0774a8e946bacb8419c | 2017-10-06 16:46:49+01:00 |
aio: fix assert when remove poll during destroy
After iothread is enabled internally inside QEMU with GMainContext, we
may encounter this warning when destroying the iothread:
(qemu-system-x86_64:19925): GLib-CRITICAL **: g_source_remove_poll:
assertion '!SOURCE_DESTROYED (source)' failed
The problem is that g_source_remove_poll() does not allow to remove one
source from array if the source is detached from its owner
context. (peterx: which IMHO does not make much sense)
Fix it on QEMU side by avoid calling g_source_remove_poll() if we know
the object is during destruction, and we won't leak anything after all
since the array will be gone soon cleanly even with that fd.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-id: [email protected]
[peterx: write the commit message]
Signed-off-by: Peter Xu <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| f708a5e71cba0d784e307334c07ade5f56f827ab | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f708a5e71cba0d784e307334c07ade5f56f827ab | 2017-10-03 14:36:19-04:00 |
hw/isa/pc87312: Mark the device with user_creatable = false
QEMU currently aborts if you try to use the device at the command
line:
$ ppc64-softmmu/qemu-system-ppc64 -S -machine prep -device pc87312
Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
qemu-system-ppc64: -device pc87312: Device 'parallel0' is in use
Aborted (core dumped)
It uses parallel_hds in its realize function, so I can not be
instantiated by the user again.
Signed-off-by: Thomas Huth <[email protected]>
Reviewed-by: Hervé Poussineau <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 35deebb2327227d8c5f4816476befb06f6329de6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/35deebb2327227d8c5f4816476befb06f6329de6 | 2017-09-26 09:11:23+03:00 |
throttle: Assert that bkt->max is valid in throttle_compute_wait()
If bkt->max == 0 and bkt->burst_length > 1 then we could have a
division by 0 in throttle_do_compute_wait(). That configuration is
however not permitted and is already detected by throttle_is_valid(),
but let's assert it in throttle_compute_wait() to make it explicit.
Found by Coverity (CID: 1381016).
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| b5806108d20fc32b4692e721d8bd6376f4ca4a69 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b5806108d20fc32b4692e721d8bd6376f4ca4a69 | 2017-09-26 14:46:23+02:00 |
slirp: Add explanation for hostfwd parsing failure
e.g.
./x86_64-softmmu/qemu-system-x86_64 -nographic -netdev 'user,id=vnet,hostfwd=:555.0.0.0:0-:22'
qemu-system-x86_64: -netdev user,id=vnet,hostfwd=:555.0.0.0:0-:22: Invalid host forwarding rule ':555.0.0.0:0-:22' (Bad host address)
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Samuel Thibault <[email protected]>
| 0e7e4fb0a6b8f1043182dcccc91a7b984587d1ae | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0e7e4fb0a6b8f1043182dcccc91a7b984587d1ae | 2017-09-24 20:04:09+02:00 |
mps2-an511: Fix wiring of UART overflow interrupt lines
Fix an error that meant we were wiring every UART's overflow
interrupts into the same inputs 0 and 1 of the OR gate,
rather than giving each its own input.
Cc: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: [email protected]
| ce3bc112cdb1d462e2d52eaa17a7314e7f3af504 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ce3bc112cdb1d462e2d52eaa17a7314e7f3af504 | 2017-09-14 18:43:19+01:00 |
vhost-user: disable the *broken* subprocess tests
tests/vhost-user-test keeps failing on build-system since Aug 15:
ERROR:tests/vhost-user-test.c:835:test_flags_mismatch: child process (/i386/vhost-user/flags-mismatch/subprocess [4836]) failed unexpectedly
...
ERROR:tests/vhost-user-test.c:807:test_connect_fail: child process (/x86_64/vhost-user/connect-fail/subprocess [58910]) failed unexpectedly
Suggested-by: Peter Maydell <[email protected]>
Suggested-by: Daniel P. Berrange <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 20784087eb875e22cf0021989e61716304b63c84 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/20784087eb875e22cf0021989e61716304b63c84 | 2017-09-05 19:31:13+01:00 |
target/arm: Tighten up Thumb decode where new v8M insns will be
Tighten up the T32 decoder in the places where new v8M instructions
will be:
* TT/TTT/TTA/TTAT are in what was nominally LDREX/STREX r15, ...
which is UNPREDICTABLE:
make the UNPREDICTABLE behaviour be to UNDEF
* BXNS/BLXNS are distinguished from BX/BLX via the low 3 bits,
which in previous architectural versions are SBZ:
enforce the SBZ via UNDEF rather than ignoring it, and move
the "ARCH(5)" UNDEF case up so we don't leak a TCG temporary
* SG is in the encoding which would be LDRD/STRD with rn = r15;
this is UNPREDICTABLE and we currently UNDEF:
move this check further up the code so that we don't leak
TCG temporaries in the UNDEF case and have a better place
to put the SG decode.
This means that if a v8M binary is accidentally run on v7M
or if a test case hits something that we haven't implemented
yet the behaviour will be obvious (UNDEF) rather than obscure
(plough on treating it as a different instruction).
In the process, add some comments about the instruction patterns
at these points in the decode. Our Thumb and ARM decoders are
very difficult to understand currently, but gradually adding
comments like this should help to clarify what exactly has
been decoded when.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Edgar E. Iglesias <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
| ebfe27c593e5b222aa2a1fc545b447be3d995faa | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ebfe27c593e5b222aa2a1fc545b447be3d995faa | 2017-09-04 15:21:51+01:00 |
qcow: Change signature of get_cluster_offset()
The old signature has an ambiguous meaning for a return of 0:
either no allocation was requested or necessary, or an error
occurred (but any errno associated with the error is lost to
the caller, which then has to assume EIO).
Better is to follow the example of qcow2, by changing the
signature to have a separate return value that cleanly
distinguishes between failure and success, along with a
parameter that cleanly holds a 64-bit value. Then update all
callers.
While auditing that all return paths return a negative errno
(rather than -1), I also simplified places where we can pass
NULL rather than a local Error that just gets thrown away.
Suggested-by: Kevin Wolf <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 56439e9d55626b65ecb887f1ac3714652555312e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/56439e9d55626b65ecb887f1ac3714652555312e | 2017-09-04 18:33:00+02:00 |
throttle: Update the throttle_fix_bucket() documentation
The way the throttling algorithm works is that requests start being
throttled once the bucket level exceeds the burst limit. When we get
there the bucket leaks at the level set by the user (bkt->avg), and
that leak rate is what prevents guest I/O from exceeding the desired
limit.
If we don't allow bursts (i.e. bkt->max == 0) then we can start
throttling requests immediately. The problem with keeping the
threshold at 0 is that it only allows one request at a time, and as
soon as there's a bit of I/O from the guest every other request will
be throttled and performance will suffer considerably. That can even
make the guest unable to reach the throttle limit if that limit is
high enough, and that happens regardless of the block scheduler used
by the guest.
Increasing that threshold gives flexibility to the guest, allowing it
to perform short bursts of I/O before being throttled. Increasing the
threshold too much does not make a difference in the long run (because
it's the leak rate what defines the actual throughput) but it does
allow the guest to perform longer initial bursts and exceed the
throttle limit for a short while.
A burst value of bkt->avg / 10 allows the guest to perform 100ms'
worth of I/O at the target rate without being throttled.
Signed-off-by: Alberto Garcia <[email protected]>
Message-id: 31aae6645f0d1fbf3860fb2b528b757236f0c0a7.1503580370.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 0770a7a6466cc2dbf4ac91841173ad4488e1fbc7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0770a7a6466cc2dbf4ac91841173ad4488e1fbc7 | 2017-08-29 16:54:44+01:00 |
slirp: check len against dhcp options array end
While parsing dhcp options string in 'dhcp_decode', if an options'
length 'len' appeared towards the end of 'bp_vend' array, ensuing
read could lead to an OOB memory access issue. Add check to avoid it.
This is CVE-2017-11434.
Reported-by: Reno Robert <[email protected]>
Signed-off-by: Prasad J Pandit <[email protected]>
Signed-off-by: Samuel Thibault <[email protected]>
| 413d463f43fbc4dd3a601e80a5724aa384a265a0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/413d463f43fbc4dd3a601e80a5724aa384a265a0 | 2017-08-03 00:26:44+02:00 |
Makefile: Let "make check-help" work without running ./configure
Currently if you do "make check-help" in a fresh checkout, only an error
is printed which is not nice:
$ make check-help V=1
cc -nostdlib -o check-help.mo
cc: fatal error: no input files
compilation terminated.
rules.mak:115: recipe for target 'check-help.mo' failed
make: *** [check-help.mo] Error 1
Move the config-host.mak condition into the body of
tests/Makefile.include and always include the rule for check-help.
Reported-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
| e45eaef9b6ec4af55402980aba726e860f771bb6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e45eaef9b6ec4af55402980aba726e860f771bb6 | 2017-08-15 15:10:15+08:00 |
block/vpc.c: Handle write failures in get_image_offset()
Coverity (CID 1355236) points out that get_image_offset() doesn't check that
it actually succeeded in writing the updated block bitmap to the file.
Check the error return from bdrv_pwrite_sync() and propagate an error
response back up to the function which calls get_image_offset() for
a write so that it can return the error to its caller.
get_sector_offset() is only used for reads, but we move it to the
same API for consistency.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| cfc87e00c22ab4ea0262c9771c803ed03d754001 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cfc87e00c22ab4ea0262c9771c803ed03d754001 | 2017-07-18 15:14:35+02:00 |
docker: install clang since Shippable setup_ve() verify it is available
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
| 118d1becc0e6332145bb9d6aee8ed232eed770e8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/118d1becc0e6332145bb9d6aee8ed232eed770e8 | 2017-07-18 10:58:36+01:00 |
block: rip out all traces of password prompting
Now that qcow & qcow2 are wired up to get encryption keys
via the QCryptoSecret object, nothing is relying on the
interactive prompting for passwords. All the code related
to password prompting can thus be ripped out.
Reviewed-by: Alberto Garcia <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
| 788cf9f8c8cbda53843e060540f3e91a060eb744 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/788cf9f8c8cbda53843e060540f3e91a060eb744 | 2017-07-11 17:44:56+02:00 |
qcow2: report encryption specific image information
Currently 'qemu-img info' reports a simple "encrypted: yes"
field. This is not very useful now that qcow2 can support
multiple encryption formats. Users want to know which format
is in use and some data related to it.
Wire up usage of the qcrypto_block_get_info() method so that
'qemu-img info' can report about the encryption format
and parameters in use
$ qemu-img create \
--object secret,id=sec0,data=123456 \
-o encrypt.format=luks,encrypt.key-secret=sec0 \
-f qcow2 demo.qcow2 1G
Formatting 'demo.qcow2', fmt=qcow2 size=1073741824 \
encryption=off encrypt.format=luks encrypt.key-secret=sec0 \
cluster_size=65536 lazy_refcounts=off refcount_bits=16
$ qemu-img info demo.qcow2
image: demo.qcow2
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 480K
encrypted: yes
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
encrypt:
ivgen alg: plain64
hash alg: sha256
cipher alg: aes-256
uuid: 3fa930c4-58c8-4ef7-b3c5-314bb5af21f3
format: luks
cipher mode: xts
slots:
[0]:
active: true
iters: 1839058
key offset: 4096
stripes: 4000
[1]:
active: false
key offset: 262144
[2]:
active: false
key offset: 520192
[3]:
active: false
key offset: 778240
[4]:
active: false
key offset: 1036288
[5]:
active: false
key offset: 1294336
[6]:
active: false
key offset: 1552384
[7]:
active: false
key offset: 1810432
payload offset: 2068480
master key iters: 438487
corrupt: false
With the legacy "AES" encryption we just report the format
name
$ qemu-img create \
--object secret,id=sec0,data=123456 \
-o encrypt.format=aes,encrypt.key-secret=sec0 \
-f qcow2 demo.qcow2 1G
Formatting 'demo.qcow2', fmt=qcow2 size=1073741824 \
encryption=off encrypt.format=aes encrypt.key-secret=sec0 \
cluster_size=65536 lazy_refcounts=off refcount_bits=16
$ ./qemu-img info demo.qcow2
image: demo.qcow2
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 196K
encrypted: yes
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
encrypt:
format: aes
corrupt: false
Reviewed-by: Alberto Garcia <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
| 0a12f6f80eeebeebd492db7d8c4237fe5c712f68 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0a12f6f80eeebeebd492db7d8c4237fe5c712f68 | 2017-07-11 17:44:57+02:00 |
nbd: Fix regression on resiliency to port scan
Back in qemu 2.5, qemu-nbd was immune to port probes (a transient
server would not quit, regardless of how many probe connections
came and went, until a connection actually negotiated). But we
broke that in commit ee7d7aa when removing the return value to
nbd_client_new(), although that patch also introduced a bug causing
an assertion failure on a client that fails negotiation. We then
made it worse during refactoring in commit 1a6245a (a segfault
before we could even assert); the (masked) assertion was cleaned
up in d3780c2 (still in 2.6), and just recently we finally fixed
the segfault ("nbd: Fully intialize client in case of failed
negotiation"). But that still means that ever since we added
TLS support to qemu-nbd, we have been vulnerable to an ill-timed
port-scan being able to cause a denial of service by taking down
qemu-nbd before a real client has a chance to connect.
Since negotiation is now handled asynchronously via coroutines,
we no longer have a synchronous point of return by re-adding a
return value to nbd_client_new(). So this patch instead wires
things up to pass the negotiation status through the close_fn
callback function.
Simple test across two terminals:
$ qemu-nbd -f raw -p 30001 file
$ nmap 127.0.0.1 -p 30001 && \
qemu-io -c 'r 0 512' -f raw nbd://localhost:30001
Note that this patch does not change what constitutes successful
negotiation (thus, a client must enter transmission phase before
that client can be considered as a reason to terminate the server
when the connection ends). Perhaps we may want to tweak things
in a later patch to also treat a client that uses NBD_OPT_ABORT
as being a 'successful' negotiation (the client correctly talked
the NBD protocol, and informed us it was not going to use our
export after all), but that's a discussion for another day.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451614
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 0c9390d978cbf61e8f16c9f580fa96b305c43568 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0c9390d978cbf61e8f16c9f580fa96b305c43568 | 2017-06-15 11:04:05+02:00 |
blockdev: use drained_begin/end for qmp_block_resize
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1447551
If one tries to issue a block_resize while a guest is busy
accessing the disk, it is possible that qemu may deadlock
when invoking aio_poll from both the main loop and the iothread.
Replace another instance of bdrv_drain_all that doesn't
quite belong.
Cc: [email protected]
Suggested-by: Paolo Bonzini <[email protected]>
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 698bdfa07d66b5ec218a60229e58eae1dcde00e5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/698bdfa07d66b5ec218a60229e58eae1dcde00e5 | 2017-05-11 12:08:24+02:00 |
trace: disallow more than 10 arguments per trace event
The UST trace backend can only cope with upto 10 arguments. To ensure we
don't exceed the limit when UST is not compiled in, disallow more than
10 arguments upfront.
This prevents the case where:
commit 0fc8aec7de64f2bf83a274a2a38b938ce03425d2
Author: Zhang Chen <[email protected]>
Date: Tue Apr 18 10:20:20 2017 +0800
COLO-compare: Optimize tcp compare trace event
Optimize two trace events as one, adjust print format make
it easy to read. rename trace_colo_compare_pkt_info_src/dst
to trace_colo_compare_tcp_info.
regressed the fix done in
commit 2dfe5113b11ce0ddb08176ebb54ab7ac4104b413
Author: Alex Bennée <[email protected]>
Date: Fri Oct 28 14:25:59 2016 +0100
net: split colo_compare_pkt_info into two trace events
It seems there is a limit to the number of arguments a UST trace event
can take and at 11 the previous trace command broke the build. Split the
trace into a src pkt and dst pkt trace to fix this.
Signed-off-by: Alex Bennée <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Now we get an immediate fail even when UST is disabled:
GEN net/trace.h
Traceback (most recent call last):
File "/home/berrange/src/virt/qemu/scripts/tracetool.py", line 154, in <module>
main(sys.argv)
File "/home/berrange/src/virt/qemu/scripts/tracetool.py", line 145, in main
events.extend(tracetool.read_events(fh))
File "/home/berrange/src/virt/qemu/scripts/tracetool/__init__.py", line 307, in read_events
event = Event.build(line)
File "/home/berrange/src/virt/qemu/scripts/tracetool/__init__.py", line 244, in build
event = Event(name, props, fmt, args)
File "/home/berrange/src/virt/qemu/scripts/tracetool/__init__.py", line 196, in __init__
"argument count" % name)
ValueError: Event 'colo_compare_tcp_info' has more than maximum permitted argument count
Makefile:96: recipe for target 'net/trace.h-timestamp' failed
Signed-off-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| f3fddaf60b9b983b82cd11e8087e7c8a3903ee14 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f3fddaf60b9b983b82cd11e8087e7c8a3903ee14 | 2017-05-08 09:38:30-04:00 |
target/ppc: Implement H_REGISTER_PROCESS_TABLE H_CALL
The H_REGISTER_PROCESS_TABLE H_CALL is used by a guest to indicate to the
hypervisor where in memory its process table is and how translation should
be performed using this process table.
Provide the implementation of this H_CALL for a guest.
We first check for invalid flags, then parse the flags to determine the
operation, and then check the other parameters for valid values based on
the operation (register new table/deregister table/maintain registration).
The process table is then stored in the appropriate location and registered
with the hypervisor (if running under KVM), and the LPCR_[UPRT/GTSE] bits
are updated as required.
Signed-off-by: Suraj Jitindar Singh <[email protected]>
Signed-off-by: Sam Bobroff <[email protected]>
[dwg: Correct missing prototype and uninitialized variable]
Signed-off-by: David Gibson <[email protected]>
| b4db54132ffeadafa9516cc553ba9548e42d42ad | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b4db54132ffeadafa9516cc553ba9548e42d42ad | 2017-04-26 12:00:41+10:00 |
virtio-scsi: Fix acquire/release in dataplane handlers
After the AioContext lock push down, there is a race between
virtio_scsi_dataplane_start and those "assert(s->ctx &&
s->dataplane_started)", because the latter doesn't isn't wrapped in
aio_context_acquire.
Reproducer is simply booting a Fedora guest with an empty
virtio-scsi-dataplane controller:
qemu-system-x86_64 \
-drive if=none,id=root,format=raw,file=Fedora-Cloud-Base-25-1.3.x86_64.raw \
-device virtio-scsi \
-device scsi-disk,drive=root,bootindex=1 \
-object iothread,id=io \
-device virtio-scsi-pci,iothread=io \
-net user,hostfwd=tcp::10022-:22 -net nic,model=virtio -m 2048 \
--enable-kvm
Fix this by moving acquire/release pairs from virtio_scsi_handle_*_vq to
their callers - and wrap the broken assertions in.
Signed-off-by: Fam Zheng <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 71407786054cad26de7ef66718b2a57a4bcb49b5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/71407786054cad26de7ef66718b2a57a4bcb49b5 | 2017-03-24 11:49:03+01:00 |
test-keyval: Tweaks to improve list coverage
We have a negative test case for a list index with leading zero. Add
positive ones.
Tweak the test case for list index greater or equal the number of
elements: test "equal" instead of "greater" to guard against
off-by-one mistakes.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| b2cd5b925c529d91fae5fe8373490714e1a8fe6c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b2cd5b925c529d91fae5fe8373490714e1a8fe6c | 2017-03-21 10:41:43+01:00 |
sparc/sparc64: grab BQL before calling cpu_check_irqs
IRQ modification is part of device emulation and should be done while
the BQL is held to prevent races when MTTCG is enabled. This adds
assertions in the hw emulation layer and wraps the calls from helpers
in the BQL.
Reported-by: Mark Cave-Ayland <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
| 5ee5993001cf32addb86a92e2ae8cb090fbc1462 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5ee5993001cf32addb86a92e2ae8cb090fbc1462 | 2017-03-09 10:41:38+00:00 |
keyval: Support lists
Additionally permit non-negative integers as key components. A
dictionary's keys must either be all integers or none. If all keys
are integers, convert the dictionary to a list. The set of keys must
be [0,N].
Examples:
* list.1=goner,list.0=null,list.1=eins,list.2=zwei
is equivalent to JSON [ "null", "eins", "zwei" ]
* a.b.c=1,a.b.0=2
is inconsistent: a.b.c clashes with a.b.0
* list.0=null,list.2=eins,list.2=zwei
has a hole: list.1 is missing
Similar design flaw as for objects: there is no way to denote an empty
list. While interpreting "key absent" as empty list seems natural
(removing a list member from the input string works when there are
multiple ones, so why not when there's just one), it doesn't work:
"key absent" already means "optional list absent", which isn't the
same as "empty list present".
Update the keyval object visitor to use this a.0 syntax in error
messages rather than the usual a[0].
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
[Off-by-one fix squashed in, as per Kevin's review]
Reviewed-by: Kevin Wolf <[email protected]>
| 0b2c1beea4358e40d1049b8ee019408ce96b37ce | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0b2c1beea4358e40d1049b8ee019408ce96b37ce | 2017-03-07 16:07:48+01:00 |
colo-compare: kick compare thread to exit after some cleanup in finalization
We should call g_main_loop_quit() to notify colo compare thread to
exit, Or it will run in g_main_loop_run() forever.
Besides, the finalizing process can't happen in context of colo thread,
it is reasonable to remove the 'if (qemu_thread_is_self(&s->thread))'
branch.
Before compare thead exits, some cleanup works need to be
done, All unhandled packets need to be released and connection_track_table
needs to be freed, or there will be memory leak.
Signed-off-by: zhanghailiang <[email protected]>
Reviewed-by: Zhang Chen <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| dfd917a9c2bed578c31043126c9f558190bf21e4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/dfd917a9c2bed578c31043126c9f558190bf21e4 | 2017-03-06 11:46:02+08:00 |
tests: Cover input visit beyond end of list
When you try to visit beyond the end of a list, the qobject input
visitor crashes, and the string visitor screws returns garbage. The
generated list visits never go beyond the list end, but manual visits
could.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
| a9416dc62c36079b93b4951c894a0b15e53bb38c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a9416dc62c36079b93b4951c894a0b15e53bb38c | 2017-03-05 09:14:20+01:00 |
tests: check path to avoid a failing qga/get-vcpus test
The qga/get-vcpus test fails in a simple chroot environment, as
used in an openSUSE Build Service local build, so first check
that the sysfs based path exists in order to avoid calling this
test in an environment where it won't work right.
Signed-off-by: Bruce Rogers <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
| ec72c0e271f2b13953079a4f4dadb49ac5910b54 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ec72c0e271f2b13953079a4f4dadb49ac5910b54 | 2017-03-06 00:54:19-06:00 |
tests: fix ipmi-kcs-test leak
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
| 3f5f5d04cdc8f8f2212fa9d391020df9c9922040 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3f5f5d04cdc8f8f2212fa9d391020df9c9922040 | 2017-03-01 11:51:05+04:00 |
tests: fix vhost-user-test leaks
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 0c0eb30260b424d2a68603b89f1d829db18772c2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0c0eb30260b424d2a68603b89f1d829db18772c2 | 2017-03-01 11:51:00+04:00 |
target/ppc: update overflow flags for add/sub
* SO and OV reflects overflow of the 64-bit result in 64-bit mode and
overflow of the low-order 32-bit result in 32-bit mode
* OV32 reflects overflow of the low-order 32-bit independent of the mode
Signed-off-by: Nikunj A Dadhania <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| dc0ad84449a4e2f28d2cc055998cb10c1a4d89a9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/dc0ad84449a4e2f28d2cc055998cb10c1a4d89a9 | 2017-03-01 11:23:39+11:00 |
qmp: Clean up how we enforce capability negotiation
To enforce capability negotiation before normal operation,
handle_qmp_command() inspects every command before it's handed off to
qmp_dispatch(). This is a bit of a layering violation, and results in
duplicated code.
Before capability negotiation (!cur_mon->in_command_mode), we fail
commands other than "qmp_capabilities". This is what enforces
capability negotiation.
Afterwards, we fail command "qmp_capabilities".
Clean this up as follows.
The obvious place to fail a command is the command itself, so move the
"afterwards" check to qmp_qmp_capabilities().
We do the "before" check in every other command, but that would be
bothersome. Instead, start with an alternate list of commands that
contains only "qmp_capabilities". Switch to the full list in
qmp_qmp_capabilities().
Additionally, replace the generic human-readable error message for
CommandNotFound by one that reminds the user to run qmp_capabilities.
Without that, we'd regress commit 2d5a834.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
[Mirco-optimization squashed in, commit message typo fixed]
Reviewed-by: Eric Blake <[email protected]>
| 635db18f68ded6abec11cd4cf64ebc15c1c6b190 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/635db18f68ded6abec11cd4cf64ebc15c1c6b190 | 2017-03-05 09:14:11+01:00 |
virtio: add missing region cache init in virtio_load()
Commit 97cd965c070152bc626c7507df9fb356bbe1cd81 ("virtio: use
VRingMemoryRegionCaches for avail and used rings") switched to a memory
region cache to avoid repeated map/unmap operations.
The virtio_load() process is a little tricky because vring addresses are
serialized in two separate places. VIRTIO 1.0 devices serialize desc
and then a subsection with used and avail. Legacy devices only
serialize desc.
Live migration of VIRTIO 1.0 devices fails on the destination host with:
VQ 0 size 0x80 < last_avail_idx 0x12f8 - used_idx 0x0
Failed to load virtio-blk:virtio
error while loading state for instance 0x0 of device '0000:00:04.0/virtio-blk'
This happens because the memory region cache is only initialized after
desc is loaded and not after the used and avail subsection is loaded.
If the guest chose memory addresses that don't match the legacy ring
layout then the wrong guest memory location is accessed.
Wait until all ring addresses are known before trying to initialize the
region cache. Also clarify the incomplete comment about VIRTIO-1 ring
address subsection.
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Tested-by: Eric Auger <[email protected]>
| 874adf45dbfbae2810423527d777ba37bc5ca974 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/874adf45dbfbae2810423527d777ba37bc5ca974 | 2017-03-02 07:14:28+02:00 |
9pfs: local: chmod: don't follow symlinks
The local_chmod() callback is vulnerable to symlink attacks because it
calls:
(1) chmod() which follows symbolic links for all path elements
(2) local_set_xattr()->setxattr() which follows symbolic links for all
path elements
(3) 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
We would need fchmodat() to implement AT_SYMLINK_NOFOLLOW to fix (1). This
isn't the case on linux unfortunately: the kernel doesn't even have a flags
argument to the syscall :-\ It is impossible to fix it in userspace in
a race-free manner. This patch hence converts local_chmod() to rely on
open_nofollow() and fchmod(). This fixes the vulnerability but introduces
a limitation: the target file must readable and/or writable for the call
to openat() to succeed.
It introduces a local_set_xattrat() replacement to local_set_xattr()
based on fsetxattrat() to fix (2), and a local_set_mapped_file_attrat()
replacement to local_set_mapped_file_attr() based on local_fopenat()
and mkdirat() to fix (3). No effort is made to factor out code because
both local_set_xattr() and local_set_mapped_file_attr() will be dropped
when all users have been converted to use the "at" versions.
This partly fixes CVE-2016-9602.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| e3187a45dd02a7490f9191c16527dc28a4ba45b9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e3187a45dd02a7490f9191c16527dc28a4ba45b9 | 2017-02-28 11:21:15+01:00 |
9pfs: local: lsetxattr: don't follow symlinks
The local_lsetxattr() callback is vulnerable to symlink attacks because
it calls lsetxattr() which follows symbolic links in all path elements but
the rightmost one.
This patch introduces a helper to emulate the non-existing fsetxattrat()
function: it is implemented with /proc/self/fd which provides a trusted
path that can be safely passed to lsetxattr().
local_lsetxattr() is converted to use this helper and opendir_nofollow().
This partly fixes CVE-2016-9602.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 3e36aba757f76673007a80b3cd56a4062c2e3462 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3e36aba757f76673007a80b3cd56a4062c2e3462 | 2017-02-28 11:21:15+01:00 |
io: fully parse & validate HTTP headers for websocket protocol handshake
The current websockets protocol handshake code is very relaxed, just
doing crude string searching across the HTTP header data. This causes
it to both reject valid connections and fail to reject invalid
connections. For example, according to the RFC 6455 it:
- MUST reject any method other than "GET"
- MUST reject any HTTP version less than "HTTP/1.1"
- MUST reject Connection header without "Upgrade" listed
- MUST reject Upgrade header which is not 'websocket'
- MUST reject missing Host header
- MUST treat HTTP header names as case insensitive
To do all this validation correctly requires that we fully parse the
HTTP headers, populating a data structure containing the header
fields.
After this change, we also reject any path other than '/'
Signed-off-by: Daniel P. Berrange <[email protected]>
| 07e95cd529af345fdeea230913f68eff5b925bb6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/07e95cd529af345fdeea230913f68eff5b925bb6 | 2017-02-28 11:51:16+00:00 |
hw/ppc/spapr: Check for valid page size when hot plugging memory
On POWER, the valid page sizes that the guest can use are bound
to the CPU and not to the memory region. QEMU already has some
fancy logic to find out the right maximum memory size to tell
it to the guest during boot (see getrampagesize() in the file
target/ppc/kvm.c for more information).
However, once we're booted and the guest is using huge pages
already, it is currently still possible to hot-plug memory regions
that does not support huge pages - which of course does not work
on POWER, since the guest thinks that it is possible to use huge
pages everywhere. The KVM_RUN ioctl will then abort with -EFAULT,
QEMU spills out a not very helpful error message together with
a register dump and the user is annoyed that the VM unexpectedly
died.
To avoid this situation, we should check the page size of hot-plugged
DIMMs to see whether it is possible to use it in the current VM.
If it does not fit, we can print out a better error message and
refuse to add it, so that the VM does not die unexpectely and the
user has a second chance to plug a DIMM with a matching memory
backend instead.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1419466
Signed-off-by: Thomas Huth <[email protected]>
[dwg: Fix a build error on 32-bit builds with KVM]
Signed-off-by: David Gibson <[email protected]>
| df58713396f8b2deb923e39c00b10744c5c63909 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/df58713396f8b2deb923e39c00b10744c5c63909 | 2017-02-22 14:28:53+11:00 |
armv7m: R14 should reset to 0xffffffff
For M profile (unlike A profile) the reset value of R14 is specified
as 0xffffffff. (The rationale is that this is an illegal exception
return value, so if guest code tries to return to it it will result
in a helpful exception.)
Registers r0 to r12 and the flags are architecturally UNKNOWN on
reset, so we leave those at zero.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-id: [email protected]
| 056f43df9168413f304500b69c33158d66efb7cf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/056f43df9168413f304500b69c33158d66efb7cf | 2017-01-27 15:29:08+00:00 |
hw/scsi: Fix debug message of cdb structure in scsi-generic
When running with debug enabled, the scsi-generic cdb that is
dumped skips byte 0 of the command, which is the opcode. This
makes identifying which command is being issued/completed a
little difficult. Example:
0x00 0x00 0x01 0x00 0x00
scsi-generic: scsi_read_data 0x0
scsi-generic: Data ready tag=0x0 len=164
scsi-generic: scsi_read_data 0x0
scsi-generic: Command complete 0x0x10a42c60 tag=0x0 status=0
Improve this by adding a message prior to the loop, similar to
what exists for scsi-disk. Clean up a few other messages to be
more explicit of what is being represented. Example:
scsi-generic: Command: data=0x12 0x00 0x00 0x01 0x00 0x00
scsi-generic: scsi_read_data tag=0x0
scsi-generic: Data ready tag=0x0 len=164
scsi-generic: scsi_read_data tag=0x0
scsi-generic: Command complete 0x0x10a452d0 tag=0x0 status=0
Signed-off-by: Eric Farman <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 2e144aa7793f4d2a2e8e0446f1e2c1e0eee79a93 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2e144aa7793f4d2a2e8e0446f1e2c1e0eee79a93 | 2017-01-27 18:07:31+01:00 |
hw/isa/lpc_ich9: add broadcast SMI feature
The generic edk2 SMM infrastructure prefers
EFI_SMM_CONTROL2_PROTOCOL.Trigger() to inject an SMI on each processor. If
Trigger() only brings the current processor into SMM, then edk2 handles it
in the following ways:
(1) If Trigger() is executed by the BSP (which is guaranteed before
ExitBootServices(), but is not necessarily true at runtime), then:
(a) If edk2 has been configured for "traditional" SMM synchronization,
then the BSP sends directed SMIs to the APs with APIC delivery,
bringing them into SMM individually. Then the BSP runs the SMI
handler / dispatcher.
(b) If edk2 has been configured for "relaxed" SMM synchronization,
then the APs that are not already in SMM are not brought in, and
the BSP runs the SMI handler / dispatcher.
(2) If Trigger() is executed by an AP (which is possible after
ExitBootServices(), and can be forced e.g. by "taskset -c 1
efibootmgr"), then the AP in question brings in the BSP with a
directed SMI, and the BSP runs the SMI handler / dispatcher.
The smaller problem with (1a) and (2) is that the BSP and AP
synchronization is slow. For example, the "taskset -c 1 efibootmgr"
command from (2) can take more than 3 seconds to complete, because
efibootmgr accesses non-volatile UEFI variables intensively.
The larger problem is that QEMU's current behavior diverges from the
behavior usually seen on physical hardware, and that keeps exposing
obscure corner cases, race conditions and other instabilities in edk2,
which generally expects / prefers a software SMI to affect all CPUs at
once.
Therefore introduce the "broadcast SMI" feature that causes QEMU to inject
the SMI on all VCPUs.
While the original posting of this patch
<http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg05658.html>
only intended to speed up (2), based on our recent "stress testing" of SMM
this patch actually provides functional improvements.
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Igor Mammedov <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 5ce45c7a2b15cda0a4d8f6c38c4036df25dc9c42 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5ce45c7a2b15cda0a4d8f6c38c4036df25dc9c42 | 2017-01-27 18:07:31+01:00 |
aio-posix: honor is_external in AioContext polling
AioHandlers marked ->is_external must be skipped when aio_node_check()
fails. bdrv_drained_begin() needs this to prevent dataplane from
submitting new I/O requests while another thread accesses the device and
relies on it being quiesced.
This patch fixes the following segfault:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00005577f6127dad in bdrv_io_plug (bs=0x5577f7ae52f0) at qemu/block/io.c:2650
2650 bdrv_io_plug(child->bs);
[Current thread is 1 (Thread 0x7ff5c4bd1c80 (LWP 10917))]
(gdb) bt
#0 0x00005577f6127dad in bdrv_io_plug (bs=0x5577f7ae52f0) at qemu/block/io.c:2650
#1 0x00005577f6114363 in blk_io_plug (blk=0x5577f7b8ba20) at qemu/block/block-backend.c:1561
#2 0x00005577f5d4091d in virtio_blk_handle_vq (s=0x5577f9ada030, vq=0x5577f9b3d2a0) at qemu/hw/block/virtio-blk.c:589
#3 0x00005577f5d4240d in virtio_blk_data_plane_handle_output (vdev=0x5577f9ada030, vq=0x5577f9b3d2a0) at qemu/hw/block/dataplane/virtio-blk.c:158
#4 0x00005577f5d88acd in virtio_queue_notify_aio_vq (vq=0x5577f9b3d2a0) at qemu/hw/virtio/virtio.c:1304
#5 0x00005577f5d8aaaf in virtio_queue_host_notifier_aio_poll (opaque=0x5577f9b3d308) at qemu/hw/virtio/virtio.c:2134
#6 0x00005577f60ca077 in run_poll_handlers_once (ctx=0x5577f79ddbb0) at qemu/aio-posix.c:493
#7 0x00005577f60ca268 in try_poll_mode (ctx=0x5577f79ddbb0, blocking=true) at qemu/aio-posix.c:569
#8 0x00005577f60ca331 in aio_poll (ctx=0x5577f79ddbb0, blocking=true) at qemu/aio-posix.c:601
#9 0x00005577f612722a in bdrv_flush (bs=0x5577f7c20970) at qemu/block/io.c:2403
#10 0x00005577f60c1b2d in bdrv_close (bs=0x5577f7c20970) at qemu/block.c:2322
#11 0x00005577f60c20e7 in bdrv_delete (bs=0x5577f7c20970) at qemu/block.c:2465
#12 0x00005577f60c3ecf in bdrv_unref (bs=0x5577f7c20970) at qemu/block.c:3425
#13 0x00005577f60bf951 in bdrv_root_unref_child (child=0x5577f7a2de70) at qemu/block.c:1361
#14 0x00005577f6112162 in blk_remove_bs (blk=0x5577f7b8ba20) at qemu/block/block-backend.c:491
#15 0x00005577f6111b1b in blk_remove_all_bs () at qemu/block/block-backend.c:245
#16 0x00005577f60c1db6 in bdrv_close_all () at qemu/block.c:2382
#17 0x00005577f5e60cca in main (argc=20, argv=0x7ffea6eb8398, envp=0x7ffea6eb8440) at qemu/vl.c:4684
The key thing is that bdrv_close() uses bdrv_drained_begin() and
virtio_queue_host_notifier_aio_poll() must not be called.
Thanks to Fam Zheng <[email protected]> for identifying the root cause of
this crash.
Reported-by: Alberto Garcia <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Tested-by: Alberto Garcia <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 59c9f437c59a4bf0594ed300d28fb24c645963a5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/59c9f437c59a4bf0594ed300d28fb24c645963a5 | 2017-01-26 10:02:33+00:00 |
ppc: Validate compatibility modes when setting
Current ppc_set_compat() will attempt to set any compatiblity mode
specified, regardless of whether it's available on the CPU. The caller is
expected to make sure it is setting a possible mode, which is awkwward
because most of the information to make that decision is at the CPU level.
This begins to clean this up by introducing a ppc_check_compat() function
which will determine if a given compatiblity mode is supported on a CPU
(and also whether it lies within specified minimum and maximum compat
levels, which will be useful later). It also contains an assertion that
the CPU has a "virtual hypervisor"[1], that is, that the guest isn't
permitted to execute hypervisor privilege code. Without that, the guest
would own the PCR and so could override any mode set here. Only machine
types which use a virtual hypervisor (i.e. 'pseries') should use
ppc_check_compat().
ppc_set_compat() is modified to validate the compatibility mode it is given
and fail if it's not available on this CPU.
[1] Or user-only mode, which also obviously doesn't allow access to the
hypervisor privileged PCR. We don't use that now, but could in future.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Alexey Kardashevskiy <[email protected]>
| 9d2179d6f960aef1b8aab4d014fd8385f0a187e5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9d2179d6f960aef1b8aab4d014fd8385f0a187e5 | 2017-01-31 10:10:13+11:00 |
audio: ac97: add exit function
Currently the ac97 device emulation doesn't have a exit function,
hot unplug this device will leak some memory. Add a exit function to
avoid this.
Signed-off-by: Li Qiang <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 12351a91da97b414eec8cdb09f1d9f41e535a401 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/12351a91da97b414eec8cdb09f1d9f41e535a401 | 2017-01-11 09:19:03+01:00 |
m25p80: don't let rogue SPI controllers cause buffer overruns
In normal operation we should never attempt to put more
data into the data[] array than it can hold. However if the
SPI controller connected to us misbehaves then it can send
us a sequence of commands that attempt this. Since the
controller might be in the guest (if the hardware does SPI
via bit-banging), catch the possible overrun conditions and
reset the flash internal state, logging them as guest errors.
Signed-off-by: Jean-Christophe Dubois <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
[PMM: rewrote commit message to be more exact about when
this can happen]
Signed-off-by: Peter Maydell <[email protected]>
| 24cb2e0d57cea0cbc163f23fa47d530b35425a21 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/24cb2e0d57cea0cbc163f23fa47d530b35425a21 | 2017-01-09 11:40:23+00:00 |
target/xtensa: tests: fix timer tests
Don't expect that CCOUNT increments are equal to the number of executed
instructions. Verify that timer interrupt does not fire before the
programmed CCOMPARE value and does fire after.
Signed-off-by: Max Filippov <[email protected]>
| 72b3b8f24a4ada7f6e97fe5cd83e04f94b1f25e0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/72b3b8f24a4ada7f6e97fe5cd83e04f94b1f25e0 | 2017-01-15 13:01:56-08:00 |
9pfs: add cleanup operation in FileOperations
Currently, the backend of VirtFS doesn't have a cleanup
function. This will lead resource leak issues if the backed
driver allocates resources. This patch addresses this issue.
Signed-off-by: Li Qiang <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
| 702dbcc274e2ca43be20ba64c758c0ca57dab91d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/702dbcc274e2ca43be20ba64c758c0ca57dab91d | 2016-11-23 13:53:34+01:00 |
ipmi: fix qemu crash while migrating with ipmi
Qemu crash in the source side while migrating, after starting ipmi service inside vm.
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -smp 4 -m 4096 \
-drive file=/work/suse/suse11_sp3_64_vt,format=raw,if=none,id=drive-virtio-disk0,cache=none \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 \
-vnc :99 -monitor vc -device ipmi-bmc-sim,id=bmc0 -device isa-ipmi-kcs,bmc=bmc0,ioport=0xca2
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffec4268700 (LWP 7657)]
__memcpy_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:2757
(gdb) bt
#0 __memcpy_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:2757
#1 0x00005555559ef775 in memcpy (__len=3, __src=0xc1421c, __dest=<optimized out>)
at /usr/include/bits/string3.h:51
#2 qemu_put_buffer (f=0x555557a97690, buf=0xc1421c <Address 0xc1421c out of bounds>, size=3)
at migration/qemu-file.c:346
#3 0x00005555559eef66 in vmstate_save_state (f=f@entry=0x555557a97690,
vmsd=0x555555f8a5a0 <vmstate_ISAIPMIKCSDevice>, opaque=0x555557231160,
vmdesc=vmdesc@entry=0x55555798cc40) at migration/vmstate.c:333
#4 0x00005555557cfe45 in vmstate_save (f=f@entry=0x555557a97690, se=se@entry=0x555557231de0,
vmdesc=vmdesc@entry=0x55555798cc40) at /mnt/sdb/zyy/qemu/migration/savevm.c:720
#5 0x00005555557d2be7 in qemu_savevm_state_complete_precopy (f=0x555557a97690,
iterable_only=iterable_only@entry=false) at /mnt/sdb/zyy/qemu/migration/savevm.c:1128
#6 0x00005555559ea102 in migration_completion (start_time=<synthetic pointer>,
old_vm_running=<synthetic pointer>, current_active_state=<optimized out>,
s=0x5555560eaa80 <current_migration.44078>) at migration/migration.c:1707
#7 migration_thread (opaque=0x5555560eaa80 <current_migration.44078>) at migration/migration.c:1855
#8 0x00007ffff3900dc5 in start_thread (arg=0x7ffec4268700) at pthread_create.c:308
#9 0x00007fffefc6c71d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Signed-off-by: Zhuang Yanying <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| d668fc4c7c69a3251be5965601015f3c17800818 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d668fc4c7c69a3251be5965601015f3c17800818 | 2016-11-18 17:50:09+02:00 |
raw_bsd: don't check size alignment when only offset is set
We make sure that the size is aligned to sector length to prevent any
round ups. Otherwise we could end up reading/writing data outside the
area specified by user. This is only needed when user supplies the size
option to avoid any surprises. It is not necessary when only offset is
set.
More over, the check made it difficult to use the offset option without
size option. The check puts unneeded restriction on the offset which had
to be aligned too. Because bdrv_getlength() returns aligned value having
unaligned offset would make the check fail.
Signed-off-by: Tomáš Golembiovský <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 80a15e3e2eed96926d886693663503985c9a98bb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/80a15e3e2eed96926d886693663503985c9a98bb | 2016-11-11 15:54:55+01:00 |
block/nbd: Fix the leaked visitor
This patch frees the leaked visitor in nbd_refresh_filename() and uses
visit_free() to fix it. The leak was introduced by the commit 491d6c7.
Signed-off-by: Ashijeet Acharya <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| a1d4e38a8b01a6699355c31867d524f8d4cd480e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a1d4e38a8b01a6699355c31867d524f8d4cd480e | 2016-11-11 15:54:55+01:00 |
vl: exit qemu on guest panic if -no-shutdown is not set
For automated testing purposes it can be helpful to exit qemu
(poweroff) when the guest panics. Make this the default unless
-no-shutdown is specified.
For internal-errors like errors from KVM_RUN the behaviour is
not changed, in other words QEMU does not exit to allow debugging
in the QEMU monitor.
Signed-off-by: Christian Borntraeger <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 864111f422babcf8ce837fb47f7f9e1948446f22 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/864111f422babcf8ce837fb47f7f9e1948446f22 | 2016-11-02 09:28:56+01:00 |
nvdimm acpi: introduce fit buffer
The buffer is used to save the FIT info for all the presented nvdimm
devices which is updated after the nvdimm device is plugged or
unplugged. In the later patch, it will be used to construct NVDIMM
ACPI _FIT method which reflects the presented nvdimm devices after
nvdimm hotplug
As FIT buffer can not completely mapped into guest address space,
OSPM will exit to QEMU multiple times, however, there is the race
condition - FIT may be changed during these multiple exits, so that
some rules are introduced:
1) the user should hold the @lock to access the buffer and
2) mark @dirty whenever the buffer is updated.
@dirty is cleared for the first time OSPM gets fit buffer, if
dirty is detected in the later access, OSPM will restart the
access
As fit should be updated after nvdimm device is successfully realized
so that a new hotplug callback, post_hotplug, is introduced
Signed-off-by: Xiao Guangrong <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 75b0713e189a981e5bfd087d5f35705446bbb12a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/75b0713e189a981e5bfd087d5f35705446bbb12a | 2016-11-01 19:21:09+02:00 |
9pfs: fix integer overflow issue in xattr read/write
The v9fs_xattr_read() and v9fs_xattr_write() are passed a guest
originated offset: they must ensure this offset does not go beyond
the size of the extended attribute that was set in v9fs_xattrcreate().
Unfortunately, the current code implement these checks with unsafe
calculations on 32 and 64 bit values, which may allow a malicious
guest to cause OOB access anyway.
Fix this by comparing the offset and the xattr size, which are
both uint64_t, before trying to compute the effective number of bytes
to read or write.
Suggested-by: Greg Kurz <[email protected]>
Signed-off-by: Li Qiang <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Reviewed-By: Guido Günther <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
| 7e55d65c56a03dcd2c5d7c49d37c5a74b55d4bd6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7e55d65c56a03dcd2c5d7c49d37c5a74b55d4bd6 | 2016-11-01 12:03:01+01:00 |
net: split colo_compare_pkt_info into two trace events
It seems there is a limit to the number of arguments a UST trace event
can take and at 11 the previous trace command broke the build. Split the
trace into a src pkt and dst pkt trace to fix this.
Signed-off-by: Alex Bennée <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 2dfe5113b11ce0ddb08176ebb54ab7ac4104b413 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2dfe5113b11ce0ddb08176ebb54ab7ac4104b413 | 2016-10-28 19:00:15+01:00 |
scripts/hxtool: fix undefined behavour of echo
Avoid undefined behaviour of echo(1) with backslashes in arguments
The behaviour is implementation-defined, different /bin/sh's behave
differently.
Signed-off-by: Daniel Shahaf <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 5a1de0b325c9c3df41cb41bcea8dca5fafc67b9a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5a1de0b325c9c3df41cb41bcea8dca5fafc67b9a | 2016-10-28 18:17:23+03:00 |
net: eepro100: fix memory leak in device uninit
The exit dispatch of eepro100 network card device doesn't free
the 's->vmstate' field which was allocated in device realize thus
leading a host memory leak. This patch avoid this.
Signed-off-by: Li Qiang <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 2634ab7fe29b3f75d0865b719caf8f310d634aae | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2634ab7fe29b3f75d0865b719caf8f310d634aae | 2016-10-26 09:57:59+08:00 |
target-m68k: manage scaled index
Scaled index is not supported by 68000, 68008, and 68010.
EA = (bd + PC) + Xn.SIZE*SCALE + od
Ignore it:
M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL
2.4 BRIEF EXTENSION WORD FORMAT COMPATIBILITY
"If the MC68000 were to execute an instruction that
encoded a scaling factor, the scaling factor would be
ignored and would not access the desired memory address.
The earlier microprocessors do not recognize the brief
extension word formats implemented by newer processors.
Although they can detect illegal instructions, they do not
decode invalid encodings of the brief extension word formats
as exceptions."
Signed-off-by: Laurent Vivier <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
| d8633620a112296fcf6a6ae9a1cbba614c0ca502 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d8633620a112296fcf6a6ae9a1cbba614c0ca502 | 2016-10-25 20:54:47+02:00 |
libqos: Change PCI accessors to take opaque BAR handle
The usual use model for the libqos PCI functions is to map a specific PCI
BAR using qpci_iomap() then pass the returned token into IO accessor
functions. This, and the fact that iomap() returns a (void *) which
actually contains a PCI space address, kind of suggests that the return
value from iomap is supposed to be an opaque token.
..except that the callers expect to be able to add offsets to it. Which
also assumes the compiler will support pointer arithmetic on a (void *),
and treat it as working with byte offsets.
To clarify this situation change iomap() and the IO accessors to take
a definitely opaque BAR handle (enforced with a wrapper struct) along with
an offset within the BAR. This changes both the functions and all the
callers.
There were a number of places that checked if iomap() returned non-NULL,
and or initialized it to NULL before hand. Since iomap() already assert()s
if it fails to map the BAR, these tests were mostly pointless and are
removed.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
| b4ba67d9a702507793c2724e56f98e9b0f7be02b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b4ba67d9a702507793c2724e56f98e9b0f7be02b | 2016-10-28 09:38:27+11:00 |
Fix masking of PC lower bits when doing exception returns
In commit 9b6a3ea7a699594 store_reg() was changed to mask
both bits 0 and 1 of the new PC value when in ARM mode.
Unfortunately this broke the exception return code paths
when doing a return from ARM mode to Thumb mode: in some
of these we write a new CPSR including new Thumb mode
bit via gen_helper_cpsr_write_eret(), and then use store_reg()
to write the new PC. In this case if the new CPSR specified
Thumb mode then masking bit 1 of the PC is incorrect
(these code paths correspond to the v8 ARM ARM pseudocode
function AArch32.ExceptionReturn(), which always aligns the
new PC appropriately for the new instruction set state).
Instead of using store_reg() in exception-return code paths,
call a new store_pc_exc_ret() which stores the raw new PC
value to env->regs[15], and then mask it appropriately in
the subsequent helper_cpsr_write_eret() where the new
env->thumb state is available.
This fixes a bug introduced by 9b6a3ea7a699594 which caused
crashes/hangs or otherwise bad behaviour for Linux when
userspace was using Thumb.
Reported-by: Jerome Forissier <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
| fb0e8e79a9d77ee240dbca036fa8698ce654e5d1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fb0e8e79a9d77ee240dbca036fa8698ce654e5d1 | 2016-10-17 19:29:03+01:00 |
intel_iommu: redo configuraton check in realize
* there no point in configuring the device if realization is going to
fail, so move the check to the beginning,
* create a separate function for the check,
* use error_setg() instead error_report().
Reviewed-by: Igor Mammedov <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 6333e93c772f78baf26a5c97c1a67ffa7cd76068 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6333e93c772f78baf26a5c97c1a67ffa7cd76068 | 2016-10-17 15:44:49-02:00 |
9pfs: fix potential host memory leak in v9fs_read
In 9pfs read dispatch function, it doesn't free two QEMUIOVector
object thus causing potential memory leak. This patch avoid this.
Signed-off-by: Li Qiang <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
| e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | 2016-10-17 14:13:58+02:00 |
trace: move colo trace events to net/ sub-directory
The colo patch series added various trace events to the top
level trace-events file, despite the files using them being
in a sub-dir.
commit 30656b097e9dd7978d3fe9416cb9f5a421a9e63e
Author: Zhang Chen <[email protected]>
Date: Tue Sep 27 10:22:34 2016 +0800
filter-rewriter: rewrite tcp packet to keep secondary connection
commit f4b618360e5a81b097e2e35d52011bec3c63af68
Author: Zhang Chen <[email protected]>
Date: Tue Sep 27 10:22:31 2016 +0800
colo-compare: add TCP, UDP, ICMP packet comparison
We add TCP,UDP,ICMP packet comparison to replace
IP packet comparison. This can increase the
accuracy of the package comparison.
Less checkpoint more efficiency.
Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Li Zhijian <[email protected]>
Signed-off-by: Wen Congyang <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
commit 0682e15b19b2f41c0568142b42518b9471168597
Author: Zhang Chen <[email protected]>
Date: Tue Sep 27 10:22:30 2016 +0800
colo-compare: introduce packet comparison thread
commit 59509ec16b7ee92b3f8261c554023aa1d3169317
Author: Zhang Chen <[email protected]>
Date: Tue Sep 27 10:22:27 2016 +0800
net/colo.c: add colo.c to define and handle packet
This moves all events into net/trace-events where they
were supposed to live.
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 170f75ad80115c509d3bedfcbbf4a8237ff6f771 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/170f75ad80115c509d3bedfcbbf4a8237ff6f771 | 2016-10-12 09:35:53+02:00 |
target-ppc: fix invalid mask - cmpl, bctar
cmpl: invalid bit mask should be 0x00400001
bctar: invalid bit mask should be 0x0000E000
Signed-off-by: Avinesh Kumar <[email protected]>
Signed-off-by: Rajalakshmi Srinivasaraghavan <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 4aaefd93b9a7f5fdef83a757702b228d2144112a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4aaefd93b9a7f5fdef83a757702b228d2144112a | 2016-10-05 11:05:28+11:00 |
oslib-posix: add helpers for stack alloc and free
the allocated stack will be adjusted to the minimum supported stack size
by the OS and rounded up to be a multiple of the system pagesize.
Additionally an architecture dependent guard page is added to the stack
to catch stack overflows.
Signed-off-by: Peter Lieven <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 8737d9e0c4017aaa5ab1fcf1356c8ee4f7caf1df | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8737d9e0c4017aaa5ab1fcf1356c8ee4f7caf1df | 2016-09-29 14:13:39+02:00 |
virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error()
The virtio_scsi_bad_req() function is called when a guest sends a
request with missing or ill-sized headers. This generally happens
when the virtio_scsi_parse_req() function returns an error.
With this patch, virtio_scsi_bad_req() will mark the device as broken,
detach the request from the virtqueue and free it, instead of forcing
QEMU to exit.
In nearly all locations where virtio_scsi_bad_req() is called, the only
thing to do next is to return to the caller.
The virtio_scsi_handle_cmd_req_prepare() function is an exception though.
It is called in a loop by virtio_scsi_handle_cmd_vq() and passed requests
freshly popped from a cmd virtqueue; virtio_scsi_handle_cmd_req_prepare()
does some sanity checks on the request and returns a boolean flag to
indicate whether the request should be queued or not. In the latter case,
virtio_scsi_handle_cmd_req_prepare() has detected a non-fatal error and
sent a response back to the guest.
We have now a new condition to take into account: the device is broken
and should stop all processing.
The return value of virtio_scsi_handle_cmd_req_prepare() is hence changed
to an int. A return value of zero means that the request should be queued.
Other non-fatal error cases where the request shoudn't be queued return
a negative errno (values are vaguely inspired by the error condition, but
the only goal here is to discriminate the case we're interested in).
And finally, if virtio_scsi_bad_req() was called, -EINVAL is returned. In
this case, virtio_scsi_handle_cmd_vq() detaches and frees already queued
requests, instead of submitting them.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 661e32fb3cb71c7e019daee375be4bb487b9917c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/661e32fb3cb71c7e019daee375be4bb487b9917c | 2016-10-10 01:16:59+03:00 |
ppc: restrict the use of the rfi instruction
Power ISA 2.x has deleted the rfi instruction and rfid shoud be used
instead on cpus following this instruction set or later.
This will raise an invalid exception when rfi is used on such
processors: Book3S 64-bit processors.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Reviewed-by: David Gibson <[email protected]>
[clg: the required fix in openbios, commit b747b6acc272 ('ppc: use
rfid when running under a CPU from the 970 family.'), is now
merged in qemu under commit 5cebd885d0d2 ('Update OpenBIOS
images to b747b6a built from submodule.') ]
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 6ca038c292d9274dc224d401a1ba16eb5a1dd501 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6ca038c292d9274dc224d401a1ba16eb5a1dd501 | 2016-09-23 10:29:40+10:00 |
tests: fix check-qom-interface leaks
Found thanks to ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 265804b5d755502438b4d42a3682f54e03ea4d32 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/265804b5d755502438b4d42a3682f54e03ea4d32 | 2016-09-08 17:57:32+04:00 |
qemu-char: avoid segfault if user lacks of permisson of a given logfile
Function qemu_chr_alloc returns NULL if it failed to open logfile by any reason,
says no write permission. For backends tty, stdio and msmouse, They need to
check this return value to avoid segfault in this case.
Signed-off-by: Lin Ma <[email protected]>
Cc: qemu-stable <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 71200fb9664c2967a1cdd22b68b0da3a8b2b3eb7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/71200fb9664c2967a1cdd22b68b0da3a8b2b3eb7 | 2016-09-14 22:52:43+02:00 |
usb:xhci:fix memory leak in usb_xhci_exit
If the xhci uses msix, it doesn't free the corresponding
memory, thus leading a memory leak. This patch avoid this.
Signed-off-by: Li Qiang <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| b53dd4495ced2432a0b652ea895e651d07336f7e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b53dd4495ced2432a0b652ea895e651d07336f7e | 2016-09-13 12:33:09+02:00 |
target-i386: Fixed syscall posssible segfault
In user-mode emulation env->idt.base memory is
allocated in linux-user/main.c with
size 8*512 = 4096 (for 64-bit).
When fake interrupt EXCP_SYSCALL is thrown
do_interrupt_user checks destination privilege level
for this fake exception, and tries to read 4 bytes
at address base + (256 * 2^4)=4096, that causes
segfault.
Privlege level was checked only for int's, so lets
read dpl from memory only for this case.
Signed-off-by: Stanislav Shmarov <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 885b7c44e4f8b7a012a92770a0dba8b238662caa | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/885b7c44e4f8b7a012a92770a0dba8b238662caa | 2016-09-14 22:52:44+02:00 |
test-logging: don't hard-code paths in /tmp
Since f6880b7f [qemu-log: support simple pid substitution for logs],
test-logging creates files with hard-coded names in /tmp. In the best
case, this prevents multiple developers from running "make check" on
the same machine. In the worst case, it allows for symlink attacks,
enabling an attacker to overwrite files that are writable to the
developer running "make check".
Instead of hard-coding the paths, create a temporary directory using
g_dir_make_tmp() and clean it up afterwards.
Fixes: f6880b7f ("qemu-log: support simple pid substitution for logs")
Signed-off-by: Sascha Silbe <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 5f9f818ea88a013b2464563be354dd2f0f316407 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5f9f818ea88a013b2464563be354dd2f0f316407 | 2016-08-19 12:44:11+01:00 |
block/nbd: Use QemuOpts for runtime options
Using QemuOpts will prevent qemu from crashing if the input options have
not been validated (which is the case when they are specified on the
command line or in a json: filename) and some have the wrong type.
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 7ccc44fd7d1dfa62c4d6f3a680df809d6e7068ce | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7ccc44fd7d1dfa62c4d6f3a680df809d6e7068ce | 2016-08-15 15:52:28+02:00 |
macio: set res_count value to 0 after non-block ATAPI DMA transfers
res_count should be set to the number of outstanding bytes after a DBDMA
request. Unfortunately this wasn't being set to zero by the non-block
transfer codepath meaning drivers that checked the descriptor result for
such requests (e.g reading the CDROM TOC) would assume from a non-zero result
that the transfer had failed.
Signed-off-by: Mark Cave-Ayland <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 16275edb342342625cd7e7ac2048436474465b50 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/16275edb342342625cd7e7ac2048436474465b50 | 2016-08-08 09:45:03+10:00 |
qdist: use g_renew and g_new instead of g_realloc and g_malloc.
This is safer against overflow. g_renew is available in all
version of glib, while g_realloc_n is only available in 2.24.
Signed-off-by: Emilio G. Cota <[email protected]>
Message-Id: <[email protected]>
[Rewritten to use g_new/g_renew. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
| 071d4054770205ddb8a58a9e2735069d8fe52af1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/071d4054770205ddb8a58a9e2735069d8fe52af1 | 2016-08-03 18:42:35+02:00 |
Revert "vhost-net: do not crash if backend is not present"
Now that get_vhost_net() returns non-null after a successful
vhost_net_init(), we no longer need to check this case.
This reverts commit ecd34898596c60f79886061618dd7e01001113ad.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| bb12e761e8e7b5c3c3d77bd08de9f007727a941e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bb12e761e8e7b5c3c3d77bd08de9f007727a941e | 2016-07-29 00:33:48+03:00 |
target-i386: Fix apic object leak when CPU is deleted
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 67e55caa6dcb91c80428cee6fe463f8dd8a755ab | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/67e55caa6dcb91c80428cee6fe463f8dd8a755ab | 2016-07-20 12:02:18-03:00 |
s390x/pci: fix stpcifc_service_call
Firstly the function misses dmaas checking. This patch adds it.
Secondly the function uses s390_pci_find_dev_by_fh() to look up the
zpci device. This may fail if the guest provides a valid and disabled
fh but fh of the associated zpci device is enabled. Thus we use
s390_pci_find_dev_by_idx() instead.
Signed-off-by: Yi Min Zhao <[email protected]>
Reviewed-by: Pierre Morel <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| 0a608a6e132abffa8fd9455e2354a47acb95847e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0a608a6e132abffa8fd9455e2354a47acb95847e | 2016-07-11 09:48:05+02:00 |
s390x/pci: fix failures of dma map/unmap
In commit d78c19b5cf4821d0c198f4132a085bdbf19dda4c, vfio code stores
the IOMMU's offset_within_address_space and adjusts the IOVA before
calling vfio_dma_map/vfio_dma_unmap. But s390_translate_iommu already
considers the base address of an IOMMU memory region.
Thus we use pal as the size and 0x0 as the base address to initialize
IOMMU memory subregion.
Signed-off-by: Yi Min Zhao <[email protected]>
Reviewed-by: Pierre Morel <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| f7c40aa1e7feb50bc4d4bc171fa811bdd9a93e51 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f7c40aa1e7feb50bc4d4bc171fa811bdd9a93e51 | 2016-07-11 09:48:05+02:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.