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
⌀ |
---|---|---|---|---|---|---|---|
scsi: build qemu-pr-helper
Introduce a privileged helper to run persistent reservation commands.
This lets virtual machines send persistent reservations without using
CAP_SYS_RAWIO or out-of-tree patches. The helper uses Unix permissions
and SCM_RIGHTS to restrict access to processes that can access its socket
and prove that they have an open file descriptor for a raw SCSI device.
The next patch will also correct the usage of persistent reservations
with multipath devices.
It would also be possible to support for Linux's IOC_PR_* ioctls in
the future, to support NVMe devices. For now, however, only SCSI is
supported.
Signed-off-by: Paolo Bonzini <[email protected]>
| b855f8d175a0a26c9798cbc5962bb8c0d9538231 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b855f8d175a0a26c9798cbc5962bb8c0d9538231 | 2017-09-22 21:07:24+02:00 |
cpu: make cpu_generic_init() abort QEMU on error
Almost every user of cpu_generic_init() checks for
returned NULL and then reports failure in a custom way
and aborts process.
Some users assume that call can't fail and don't check
for failure, though they should have checked for it.
In either cases cpu_generic_init() failure is fatal,
so instead of checking for failure and reporting
it various ways, make cpu_generic_init() report
errors in consistent way and terminate QEMU on failure.
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 4482e05cbbb7e50e476f6a9500cf0b38913bd939 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4482e05cbbb7e50e476f6a9500cf0b38913bd939 | 2017-09-19 09:09:32-03:00 |
crypto: Avoid memory leak on failure
Commit 7836857 introduced a memory leak due to invalid use of
Error vs. visit_type_end(). If visiting the intermediate
members fails, we clear the error and unconditionally use
visit_end_struct() on the same error object; but if that
cleanup succeeds, we then skip the qapi_free call.
Until a later patch adds visit_check_struct(), the only safe
approach is to use two separate error objects.
Signed-off-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
| 95c3df5a24e2f18129b58691c2ebaf0d86808525 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/95c3df5a24e2f18129b58691c2ebaf0d86808525 | 2016-04-05 17:23:21+02:00 |
spapr_pci: drop useless check in spapr_populate_pci_child_dt()
spapr_phb_get_loc_code() either returns a non-null pointer, or aborts
if g_strdup_printf() failed to allocate memory.
Signed-off-by: Greg Kurz <[email protected]>
[dwg: Grammatical fix to commit message]
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| d049bde69d8ab3dfa4edeee48896088ae9feb693 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d049bde69d8ab3dfa4edeee48896088ae9feb693 | 2017-09-15 10:29:48+10:00 |
net/rocker: Plug memory leak in pci_rocker_init()
pci_rocker_init() leaks a World when the name more than 9 chars,
then return a negative value directly, doesn't make a correct
cleanup. So add a new goto label to fix it.
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mao Zhongyi <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 1343a107e46feed8b901bf08ad8485bd5f302912 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1343a107e46feed8b901bf08ad8485bd5f302912 | 2017-09-08 08:17:37+08:00 |
virtio-gpu: don't clear QemuUIInfo information on reset
Don't reset window layout information (passed via virtio_gpu_ui_info) on
device reset, so the user interface window layout will be kept intact
over reboots. The head size and position was commented out already, so
this patch just drops the dead code. Additionally the enabled head mask
must be kept so multihead setups work properly too.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1460595
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
| 79d16c21a565927943486b26789caa62413ff371 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/79d16c21a565927943486b26789caa62413ff371 | 2017-09-13 09:39:32+02:00 |
target/arm: Add Jazelle feature
This adds a feature bit indicating support of the (trivial) Jazelle
implementation if ARM_FEATURE_V6 is set or if the processor is arm926
or arm1026. This fixes the issue that any BXJ instruction will
result in an illegal_op. BXJ instructions will now check if the
architecture supports ARM_FEATURE_JAZELLE.
Signed-off-by: Portia Stephens <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-id: [email protected]
[PMM: edited commit message and comment text a bit]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| c99a55d38dd5b5131f3fcbbaf41828a09ee62544 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c99a55d38dd5b5131f3fcbbaf41828a09ee62544 | 2017-09-07 13:54:55+01:00 |
net/socket: Improve -net socket error reporting
When -net socket fails, it first reports a specific error, then
a generic one, like this:
$ ./x86_64-softmmu/qemu-system-x86_64 -net socket,mcast=230.0.0.1:1234,listen
qemu-system-x86_64: -net socket,mcast=230.0.0.1:1234,listen: exactly one of listen=, connect=, mcast= or udp= is required
qemu-system-x86_64: -net socket,mcast=230.0.0.1:1234,listen: Device 'socket' could not be initialized
Convert net_socket_*_init() to Error to get rid of the superfluous second
error message. After the patch, the effect like this:
$ ./x86_64-softmmu/qemu-system-x86_64 -net socket,mcast=230.0.0.1:1234,listen
qemu-system-x86_64: -net socket,mcast=230.0.0.1:1234,listen: exactly one of listen=, connect=, mcast= or udp= is requireda
This also fixes a few silent failures to report an error.
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Mao Zhongyi <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 0522a959aec29768610900636f6234ab40530f82 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0522a959aec29768610900636f6234ab40530f82 | 2017-09-08 08:17:37+08:00 |
target/ppc: 'PVR != host PVR' in KVM_SET_SREGS workaround
Commit d5fc133eed ("ppc: Rework CPU compatibility testing
across migration") changed the way cpu_post_load behaves with
the PVR setting, causing an unexpected bug in KVM-HV migrations
between hosts that are compatible (POWER8 and POWER8E, for example).
Even with pvr_match() returning true, the guest freezes right after
cpu_post_load. The reason is that the guest kernel can't handle a
different PVR value other that the running host in KVM_SET_SREGS.
In [1] it was discussed the possibility of a new KVM capability
that would indicate that the guest kernel can handle a different
PVR in KVM_SET_SREGS. Even if such feature is implemented, there is
still the problem with older kernels that will not have this capability
and will fail to migrate.
This patch implements a workaround for that scenario. If running
with KVM, check if the guest kernel does not have the capability
(named here as 'cap_ppc_pvr_compat'). If it doesn't, calls
kvmppc_is_pr() to see if the guest is running in KVM-HV. If all this
happens, set env->spr[SPR_PVR] to the same value as the current
host PVR. This ensures that we allow migrations with 'close enough'
PVRs to still work in KVM-HV but also makes the code ready for
this new KVM capability when it is done.
A new function called 'kvmppc_pvr_workaround_required' was created
to encapsulate the conditions said above and to avoid calling too
many kvm.c internals inside cpu_post_load.
[1] https://lists.gnu.org/archive/html/qemu-ppc/2017-06/msg00503.html
Signed-off-by: Daniel Henrique Barboza <[email protected]>
[dwg: Fix for the case of using TCG on a PPC host]
Signed-off-by: David Gibson <[email protected]>
| c363a37a450f925df76b88a87dc733bad75cc452 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c363a37a450f925df76b88a87dc733bad75cc452 | 2017-08-22 21:26:19+10:00 |
trace: add trace_event_get_state_backends()
Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so
the following trace event will not fire when solely enabled by SystemTap
or LTTng UST:
if (trace_event_get_state(TRACE_MY_EVENT)) {
str = g_strdup_printf("Expensive string to generate ...",
...);
trace_my_event(str);
g_free(str);
}
Add trace_event_get_state_backends() to fetch backend dstate. Those
backends that use QEMU dstate fetch it as part of
generate_h_backend_dstate().
Update existing trace_event_get_state() callers to use
trace_event_get_state_backends() instead.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| d87aa138039a4be6d705793fd3e397c69c52405a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d87aa138039a4be6d705793fd3e397c69c52405a | 2017-08-01 12:13:07+01:00 |
dirty-bitmap: Report BlockDirtyInfo.count in bytes, as documented
We've been documenting the value in bytes since its introduction
in commit b9a9b3a4 (v1.3), where it was actually reported in bytes.
Commit e4654d2 (v2.0) then removed things from block/qapi.c, in
preparation for a rewrite to a list of dirty sectors in the next
commit 21b5683 in block.c, but the new code mistakenly started
reporting in sectors.
Fixes: https://bugzilla.redhat.com/1441460
CC: [email protected]
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 6c98c57af3f4fab85bdf5f01616c91322bd4312a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6c98c57af3f4fab85bdf5f01616c91322bd4312a | 2017-07-24 15:06:04+02:00 |
target/alpha: Fix temp leak in gen_bcond
Tested-by: Emilio G. Cota <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| 22d716c28e95e4640e2cd80553eb3f662db3fd50 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/22d716c28e95e4640e2cd80553eb3f662db3fd50 | 2017-07-18 18:41:55-10:00 |
9pfs: local: fix fchmodat_nofollow() limitations
This function has to ensure it doesn't follow a symlink that could be used
to escape the virtfs directory. This could be easily achieved if fchmodat()
on linux honored the AT_SYMLINK_NOFOLLOW flag as described in POSIX, but
it doesn't. There was a tentative to implement a new fchmodat2() syscall
with the correct semantics:
https://patchwork.kernel.org/patch/9596301/
but it didn't gain much momentum. Also it was suggested to look at an O_PATH
based solution in the first place.
The current implementation covers most use-cases, but it notably fails if:
- the target path has access rights equal to 0000 (openat() returns EPERM),
=> once you've done chmod(0000) on a file, you can never chmod() again
- the target path is UNIX domain socket (openat() returns ENXIO)
=> bind() of UNIX domain sockets fails if the file is on 9pfs
The solution is to use O_PATH: openat() now succeeds in both cases, and we
can ensure the path isn't a symlink with fstat(). The associated entry in
"/proc/self/fd" can hence be safely passed to the regular chmod() syscall.
The previous behavior is kept for older systems that don't have O_PATH.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Tested-by: Zhi Yong Wu <[email protected]>
Acked-by: Philippe Mathieu-Daudé <[email protected]>
| 4751fd5328dfcd4fe2f9055728a72a0e3ae56512 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4751fd5328dfcd4fe2f9055728a72a0e3ae56512 | 2017-08-10 14:36:11+02:00 |
nbd: Fix iotests failure due to changed client error message
Commit 8ecaeae8 changed the way the client requests an NBD export,
and in the process also changed the resulting error message when
the export is not present, breaking a couple of iotests. The error
message is now directly given by the server (a failed NBD_OPT_GO)
instead of implied by the client (after exhausting NBD_OPT_LIST),
but looking at the testsuite changes, it proves worthwhile to
reword the error message to be slightly less verbose (as this is
one particular error message likely to be hit by a user).
Note that the error message is now sensitive to which binary is
running the server as well as the client (since the expected
output is replaying a message received from the server - for that
matter, it depends on a server new enough to understand NBD_OPT_GO);
in general iotests are run on client and server from the same source
code base so the default setup will pass; but if it proves
problematic for people overriding QEMU_PROG, QEMU_IMG_PROG,
QEMU_IO_PROG, and QEMU_NBD_PROG to point across multiple builds for
cross-version integration testing, we may have to later tweak or
sanitize the output somehow.
Reported-by: Kevin Wolf <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Tested-by: John Snow <[email protected]>
Reviewed-by: John Snow <[email protected]>
| 9a76bd783d0421962e8c65bb853a57eef4897720 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9a76bd783d0421962e8c65bb853a57eef4897720 | 2017-07-17 13:57:42-05:00 |
Use qemu_tolower() and qemu_toupper(), not tolower() and toupper()
On NetBSD, where tolower() and toupper() are implemented using an
array lookup, the compiler warns if you pass a plain 'char'
to these functions:
gdbstub.c:914:13: warning: array subscript has type 'char'
This reflects the fact that toupper() and tolower() give
undefined behaviour if they are passed a value that isn't
a valid 'unsigned char' or EOF.
We have qemu_tolower() and qemu_toupper() to avoid this problem;
use them.
(The use in scsi-generic.c does not trigger the warning because
it passes a uint8_t; we switch it anyway, for consistency.)
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Acked-by: Christian Borntraeger <[email protected]> for the s390 part.
Acked-by: David Gibson <[email protected]>
Message-id: [email protected]
| 95a5befc2f8b359e72926f89cd661d063c2cf06c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/95a5befc2f8b359e72926f89cd661d063c2cf06c | 2017-07-21 10:32:41+01:00 |
spapr: fix migration to pseries machine < 2.8
since commit 5c4537bd ("spapr: Fix 2.7<->2.8 migration of PCI host bridge"),
some migration fields are forged from the new ones in spapr_pci_pre_save().
It works well, except when the number of MSI devices is 0,
because in this case the function exits immediately.
This fix moves the migration code before the exit code.
The problem can be reproduced with these commands:
source qemu-2.9:
qemu-system-ppc64 -monitor stdio -M pseries-2.6 -nodefaults -S
destination qemu-2.6:
qemu-system-ppc64 -monitor stdio -M pseries-2.6 -nodefaults \
-incoming tcp:0:4444
on the source:
migrate tcp:localhost:4444
Destination fails with the following error:
qemu-system-ppc64: error while loading state for
instance 0x0 of device 'spapr_pci'
qemu-system-ppc64: load of migration failed: Invalid argument
Signed-off-by: Laurent Vivier <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| e806b4db1477a1c6bfda7bba28c7f26c47f18e1e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e806b4db1477a1c6bfda7bba28c7f26c47f18e1e | 2017-07-11 11:04:01+10:00 |
blockjob: Track job ratelimits via bytes, not sectors
The user interface specifies job rate limits in bytes/second.
It's pointless to have our internal representation track things
in sectors/second, particularly since we want to move away from
sector-based interfaces.
Fix up a doc typo found while verifying that the ratelimit
code handles the scaling difference.
Repetition of expressions like 'n * BDRV_SECTOR_SIZE' will be
cleaned up later when functions are converted to iterate over
images by bytes rather than by sectors.
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: John Snow <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| f3e4ce4af336f2ea306fa0f40ec1a5149864ca8c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f3e4ce4af336f2ea306fa0f40ec1a5149864ca8c | 2017-07-10 13:18:06+02:00 |
target-microblaze: dec_barrel: Plug TCG temp leak
Plug TCG temp leak.
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Edgar E. Iglesias <[email protected]>
| 5c8f44b7dbdec77eff2ed3e239ea31d649894932 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5c8f44b7dbdec77eff2ed3e239ea31d649894932 | 2017-07-04 09:22:20+02:00 |
virtio-9p: record element after sanity checks
If the guest sends a malformed request, we end up with a dangling pointer
in V9fsVirtioState. This doesn't seem to cause any bug, but let's remove
this side effect anyway.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
| 3a21fb2af07ca6d22e39a766363befbf833f86bb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3a21fb2af07ca6d22e39a766363befbf833f86bb | 2017-06-29 15:11:50+02:00 |
migration: use bdrv_drain_all_begin/end() instead bdrv_drain_all()
blk/bdrv_drain_all() only takes effect for a single instant and then
resumes block jobs, guest devices, and other external clients like the
NBD server. This can be handy when performing a synchronous drain
before terminating the program, for example.
Monitor commands usually need to quiesce I/O across an entire code
region so blk/bdrv_drain_all() is not suitable. They must use
bdrv_drain_all_begin/end() to mark the region. This prevents new I/O
requests from slipping in or worse - block jobs completing and modifying
the graph.
I audited other blk/bdrv_drain_all() callers but did not find anything
that needs a similar fix. This patch fixes the savevm/loadvm commands.
Although I haven't encountered a read world issue this makes the code
safer.
Suggested-by: Kevin Wolf <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 8649f2f9b2d83b627199babc52b454db136e253c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8649f2f9b2d83b627199babc52b454db136e253c | 2017-06-26 14:51:13+02:00 |
block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()
Calling aio_poll() directly may have been fine previously, but this is
the future, man! The difference between an aio_poll() loop and
BDRV_POLL_WHILE() is that BDRV_POLL_WHILE() releases the AioContext
around aio_poll().
This allows the IOThread to run fd handlers or BHs to complete the
request. Failure to release the AioContext causes deadlocks.
Using BDRV_POLL_WHILE() partially fixes a 'savevm' hang with -object
iothread.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| ea17c9d20d7396351be5e14317354519ff53721d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ea17c9d20d7396351be5e14317354519ff53721d | 2017-06-26 14:51:13+02:00 |
xhci: only update dequeue ptr on completed transfers
The dequeue pointer should only be updated in case the transfer
is actually completed. If we update it for inflight transfers
we will not pick them up again after migration, which easily
triggers with HID devices as they typically have a pending
transfer, waiting for user input to happen.
Fixes: 243afe858b95765b98d16a1f0dd50dca262858ad
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451631
Signed-off-by: Gerd Hoffmann <[email protected]>
Tested-by: Laurent Vivier <[email protected]>
Message-id: [email protected]
| d54fddea989ba4aa2912d49583d86ce01c0d27ea | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d54fddea989ba4aa2912d49583d86ce01c0d27ea | 2017-06-12 16:14:04+02:00 |
block/qcow.c: Fix memory leak in qcow_create()
Coverity points out that the code path in qcow_create() for
the magic "fat:" backing file name leaks the memory used to
store the filename (CID 1307771). Free the memory before
we overwrite the pointer.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 272545cf215f183ecb84c1d0fca3fd38db806977 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/272545cf215f183ecb84c1d0fca3fd38db806977 | 2017-06-09 13:46:20+02:00 |
docker: install ca-certificates package in base image
Resolve SSL verification issue at shippable container's git_sync stage:
shippable logs:
--------------
git_sync
- ssh-agent bash -c 'ssh-add /tmp/ssh/01_deploy; git clone https://github.com/philmd/qemu.git /root/src/github.com/philmd/qemu'
Identity added: /tmp/ssh/01_deploy (rsa w/o comment)
Cloning into '/root/src/github.com/philmd/qemu'...
fatal: unable to access 'https://github.com/philmd/qemu.git/': Problem with the SSL CA cert (path? access rights?)
retrying 1 of 3 times...
Suggested-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
[AJB: fixed re-base conflict following stretch updates]
Signed-off-by: Alex Bennée <[email protected]>
| 2c1c31ed5579573cbb0ea53ec7f10a77c77233d2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2c1c31ed5579573cbb0ea53ec7f10a77c77233d2 | 2017-06-21 15:01:48+01:00 |
9pfs: assume utimensat() and futimens() are present
The utimensat() and futimens() syscalls have been around for ages (ie,
glibc 2.6 and linux 2.6.22), and the decision was already taken to
switch to utimensat() anyway when fixing CVE-2016-9602 in 2.9.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 24df3371d97a7516605aef8abbc253a8c162b211 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/24df3371d97a7516605aef8abbc253a8c162b211 | 2017-05-25 10:30:14+02:00 |
migration: Fix regression with compression threads
Compression threads got broken on commit
commit 247956946651ae0280f7b1ea88bb6237dd01c231
Author: Juan Quintela <[email protected]>
Date: Tue Mar 21 11:45:01 2017 +0100
ram: reorganize last_sent_block
On do_compress_ram_page() we use a different QEMUFile than the
migration one. We need to pass it there. The failure can be seen as:
(qemu) qemu-system-x86_64: Unknown combination of migration flags: 0
qemu-system-x86_64: error while loading state section id 3(ram)
qemu-system-x86_64: load of migration failed: Invalid argument
Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Tested-by: Peter Xu <[email protected]>
| 2bf3aa85f08186b8162b76e7e8efe5b5a44306a6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2bf3aa85f08186b8162b76e7e8efe5b5a44306a6 | 2017-05-17 12:04:59+02:00 |
libvhost-user: fix crash when rings aren't ready
Calling libvhost-user functions like vu_queue_get_avail_bytes() when the
queue doesn't yet have addresses will result in the crashes like the
following:
Program received signal SIGSEGV, Segmentation fault.
0x000055c414112ce4 in vring_avail_idx (vq=0x55c41582fd68, vq=0x55c41582fd68)
at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:940
940 vq->shadow_avail_idx = vq->vring.avail->idx;
(gdb) p vq
$1 = (VuVirtq *) 0x55c41582fd68
(gdb) p vq->vring
$2 = {num = 0, desc = 0x0, avail = 0x0, used = 0x0, log_guest_addr = 0, flags = 0}
at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:940
No locals.
at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:960
num_heads = <optimized out>
out_bytes=out_bytes@entry=0x7fffd035d7c4, max_in_bytes=max_in_bytes@entry=0,
max_out_bytes=max_out_bytes@entry=0) at /home/dgilbert/git/qemu/contrib/libvhost-user/libvhost-user.c:1034
Add a pre-condition checks on vring.avail before accessing it.
Fix documentation and return type of vu_queue_empty() while at it.
Signed-off-by: Marc-André Lureau <[email protected]>
Tested-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 640601c7cb1b6b41d3e1a435b986266c2b71e9bc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/640601c7cb1b6b41d3e1a435b986266c2b71e9bc | 2017-05-10 22:04:23+03:00 |
input: don't queue delay if paused
qemu_input_event_send() discards key event when the guest is paused,
but not the delay.
The delay ends up in the input queue, and qemu_input_event_send_key()
will further fill the queue with upcoming events.
VNC uses qemu_input_event_send_key_delay(), not SPICE, which results
in a different input behaviour on pause: VNC will queue the events
(except the first that is discarded), SPICE will discard all events.
Don't queue delay if paused, and provide same behaviour on SPICE and
VNC clients on resume (and potentially avoid over-allocating the
buffer queue)
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1444326
Signed-off-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 05c6638b203fd7d8bbfa88ac6e6198e32ed0506f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/05c6638b203fd7d8bbfa88ac6e6198e32ed0506f | 2017-05-03 14:19:40+02:00 |
tcg/sparc: Zero extend data argument to store helpers
The C store helper functions take the data argument as a uint8_t,
uint16_t, etc depending on the store size. The SPARC calling
convention requires that data types smaller than the register
size must be extended by the caller. We weren't doing this,
which meant that if QEMU was compiled with optimizations enabled
we could end up storing incorrect values to guest memory.
(In particular the i386 guest BIOS would crash on startup.)
Add code to the trampolines that call the store helpers to
do the zero extension as required.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: [email protected]
Reviewed-by: Richard Henderson <[email protected]>
| 709a340d679d95a0c6cbb9b5f654498f04345b50 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/709a340d679d95a0c6cbb9b5f654498f04345b50 | 2017-04-03 12:59:14+01:00 |
qemu-img: print short help on getopt failure
Printing the full help output obscures the error message for an invalid
command-line option or missing argument.
Before this patch:
$ ./qemu-img --foo
...pages of output...
After this patch:
$ ./qemu-img --foo
qemu-img: unrecognized option '--foo'
Try 'qemu-img --help' for more information
This patch adds the getopt ':' character so that it can distinguish
between missing arguments and unrecognized options. This helps provide
more detailed error messages.
Suggested-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Message-id: [email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
| c919297379e9980c2bcc4d2053addbc1fd6d762b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c919297379e9980c2bcc4d2053addbc1fd6d762b | 2017-03-27 16:50:36+02:00 |
virtio-pci: reset modern vq meta data
We don't reset proxy->vqs[].{num|desc[]|avail[]|used[]}. This means if
a driver enable the vq without setting vq address after reset. The old
addresses were leaked. Fixing this by resetting modern vq meta data
during device reset.
Cc: [email protected]
Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 60a8d8023473dd24957b3a66824f66cd35b80d64 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/60a8d8023473dd24957b3a66824f66cd35b80d64 | 2017-03-15 19:59:18+02:00 |
cirrus: switch to 4 MB video memory by default
Quoting cirrus source code:
Follow real hardware, cirrus card emulated has 4 MB video memory.
Also accept 8 MB/16 MB for backward compatibility.
So just use 4MB by default. We decided to leave that at 8MB by default
a while ago, for live migration compatibility reasons. But we have
compat properties to handle that, so that isn't a compeling reason.
This also removes some sanity check inconsistencies in the cirrus code.
Some places check against the allocated video memory, some places check
against the 4MB physical hardware has. Guest code can trigger asserts
because of that.
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| 73c148130b58709f0f2abfedbae92681d87eb404 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/73c148130b58709f0f2abfedbae92681d87eb404 | 2017-03-16 08:58:15+01:00 |
memory: info mtree check mr range overflow
The address of memory regions might overflow when something wrong
happened, like reported in:
https://lists.gnu.org/archive/html/qemu-devel/2017-03/msg02043.html
For easier debugging, let's try to detect it.
Reported-by: Mark Cave-Ayland <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| b31f84126215e3fd4b8acbc3083ae30d407329e8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b31f84126215e3fd4b8acbc3083ae30d407329e8 | 2017-03-14 13:57:52+01:00 |
target/ppc: fix cpu_ov setting for 32-bit
A bug was introduced in following commit:
dc0ad84 target/ppc: update overflow flags for add/sub
As for 32-bit ppc target extracting bit 63 for overflow is not correct.
Made it dependent on TARGET_LOG_BITS. This had broken booting MacOS
9.2.1 image
Reported-by: Mark Cave-Ayland <[email protected]>
Signed-off-by: Nikunj A Dadhania <[email protected]>
Signed-off-by: David Gibson <[email protected]>
Tested-by: Mark Cave-Ayland <[email protected]>
| 38a61d34875335717f22e3a0eb1e0d5df4f62def | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/38a61d34875335717f22e3a0eb1e0d5df4f62def | 2017-03-14 11:27:23+11:00 |
NetRxPkt: Fix memory corruption on VLAN header stripping
This patch fixed a problem that was introduced in commit eb700029.
When net_rx_pkt_attach_iovec() calls eth_strip_vlan()
this can result in pkt->ehdr_buf being overflowed, because
ehdr_buf is only sizeof(struct eth_header) bytes large
but eth_strip_vlan() can write
sizeof(struct eth_header) + sizeof(struct vlan_header)
bytes into it.
Devices affected by this problem: vmxnet3.
Cc: [email protected]
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| df8bf7a7fe75eb5d5caffa55f5cd4292b757aea6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/df8bf7a7fe75eb5d5caffa55f5cd4292b757aea6 | 2017-03-06 11:46:02+08:00 |
tests: fix usb-test leaks
Fix the usb tests leaks.
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
| 62030ed135e4cfb960cb626510cbb3ea77bb9ef9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/62030ed135e4cfb960cb626510cbb3ea77bb9ef9 | 2017-03-01 11:51:29+04:00 |
tests: fix virtio-scsi-test leak
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
| 3caab54d081bb3ce1b237d9628dd2b8ee7680159 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3caab54d081bb3ce1b237d9628dd2b8ee7680159 | 2017-03-01 11:51:28+04:00 |
tests: fix i440fx-test leaks
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| 1bab33ab4ab4702f53012551cad333beb270f30d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1bab33ab4ab4702f53012551cad333beb270f30d | 2017-03-01 11:51:28+04:00 |
tests: fix hd-geo-test leaks
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| 2c8f86961b6eaac705be21bc98299f5517eb0b6b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2c8f86961b6eaac705be21bc98299f5517eb0b6b | 2017-03-01 11:51:04+04:00 |
target/ppc: support for 32-bit carry and overflow
POWER ISA 3.0 adds CA32 and OV32 status in 64-bit mode. Add the flags
and corresponding defines.
Moreover, CA32 is updated when CA is updated and OV32 is updated when OV
is updated.
Arithmetic instructions:
* Addition and Substractions:
addic, addic., subfic, addc, subfc, adde, subfe, addme, subfme,
addze, and subfze always updates CA and CA32.
=> CA reflects the carry out of bit 0 in 64-bit mode and out of
bit 32 in 32-bit mode.
=> CA32 reflects the carry out of bit 32 independent of the
mode.
=> 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
* Multiply Low and Divide:
For mulld, divd, divde, divdu and divdeu: SO, OV, and OV32 bits
reflects overflow of the 64-bit result
For mullw, divw, divwe, divwu and divweu: SO, OV, and OV32 bits
reflects overflow of the 32-bit result
* Negate with OE=1 (nego)
For 64-bit mode if the register RA contains
0x8000_0000_0000_0000, OV and OV32 are set to 1.
For 32-bit mode if the register RA contains 0x8000_0000, OV and
OV32 are set to 1.
Signed-off-by: Nikunj A Dadhania <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| dd09c36159858c66ab6e47c688e4177dd3912bf0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/dd09c36159858c66ab6e47c688e4177dd3912bf0 | 2017-03-01 11:23:39+11:00 |
qtest: fix a memory leak
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
| fc34059f080680b560b3f656988fdd9a75cd0eab | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fc34059f080680b560b3f656988fdd9a75cd0eab | 2017-03-01 00:09:28+04:00 |
mem-prealloc: reduce large guest start-up and migration time.
Using "-mem-prealloc" option for a large guest leads to higher guest
start-up and migration time. This is because with "-mem-prealloc" option
qemu tries to map every guest page (create address translations), and
make sure the pages are available during runtime. virsh/libvirt by
default, seems to use "-mem-prealloc" option in case the guest is
configured to use huge pages. The patch tries to map all guest pages
simultaneously by spawning multiple threads. Currently limiting the
change to QEMU library functions on POSIX compliant host only, as we are
not sure if the problem exists on win32. Below are some stats with
"-mem-prealloc" option for guest configured to use huge pages.
------------------------------------------------------------------------
Idle Guest | Start-up time | Migration time
------------------------------------------------------------------------
Guest stats with 2M HugePage usage - single threaded (existing code)
------------------------------------------------------------------------
64 Core - 4TB | 54m11.796s | 75m43.843s
64 Core - 1TB | 8m56.576s | 14m29.049s
64 Core - 256GB | 2m11.245s | 3m26.598s
------------------------------------------------------------------------
Guest stats with 2M HugePage usage - map guest pages using 8 threads
------------------------------------------------------------------------
64 Core - 4TB | 5m1.027s | 34m10.565s
64 Core - 1TB | 1m10.366s | 8m28.188s
64 Core - 256GB | 0m19.040s | 2m10.148s
-----------------------------------------------------------------------
Guest stats with 2M HugePage usage - map guest pages using 16 threads
-----------------------------------------------------------------------
64 Core - 4TB | 1m58.970s | 31m43.400s
64 Core - 1TB | 0m39.885s | 7m55.289s
64 Core - 256GB | 0m11.960s | 2m0.135s
-----------------------------------------------------------------------
Changed in v2:
- modify number of memset threads spawned to min(smp_cpus, 16).
- removed 64GB memory restriction for spawning memset threads.
Changed in v3:
- limit number of threads spawned based on
min(sysconf(_SC_NPROCESSORS_ONLN), 16, smp_cpus)
- implement memset thread specific siglongjmp in SIGBUS signal_handler.
Changed in v4
- remove sigsetjmp/siglongjmp and SIGBUS unblock/block for main thread
as main thread no longer touches any pages.
- simplify code my returning memset_thread_failed status from
touch_all_pages.
Signed-off-by: Jitendra Kolhe <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 1e356fc14beaa3ece6c0e961bd479af58be3198b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1e356fc14beaa3ece6c0e961bd479af58be3198b | 2017-03-14 13:26:36+01:00 |
armv7m: Extract "exception taken" code into functions
Extract the code from the tail end of arm_v7m_do_interrupt() which
enters the exception handler into a pair of utility functions
v7m_exception_taken() and v7m_push_stack(), which correspond roughly
to the pseudocode PushStack() and ExceptionTaken().
This also requires us to move the arm_v7m_load_vector() utility
routine up so we can call it.
Handling illegal exception returns has some cases where we want to
take a UsageFault either on an existing stack frame or with a new
stack frame but with a specific LR value, so we want to be able to
call these without having to go via arm_v7m_cpu_do_interrupt().
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
| 39ae2474e337247e5930e8be783b689adc9f6215 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/39ae2474e337247e5930e8be783b689adc9f6215 | 2017-02-28 12:08:18+00:00 |
cputlb: atomically update tlb fields used by tlb_reset_dirty
The main use case for tlb_reset_dirty is to set the TLB_NOTDIRTY flags
in TLB entries to force the slow-path on writes. This is used to mark
page ranges containing code which has been translated so it can be
invalidated if written to. To do this safely we need to ensure the TLB
entries in question for all vCPUs are updated before we attempt to run
the code otherwise a race could be introduced.
To achieve this we atomically set the flag in tlb_reset_dirty_range and
take care when setting it when the TLB entry is filled.
On 32 bit systems attempting to emulate 64 bit guests we don't even
bother as we might not have the atomic primitives available. MTTCG is
disabled in this case and can't be forced on. The copy_tlb_helper
function helps keep the atomic semantics in one place to avoid
confusion.
The dirty helper function is made static as it isn't used outside of
cputlb.
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
| b0706b716769494f321a0d2bfd9fa9893992f995 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b0706b716769494f321a0d2bfd9fa9893992f995 | 2017-02-24 10:32:46+00:00 |
s390x/arch_dump: use proper note name and note size
In binutils/libbfd (bfd/elf.c) it is enforced that all s390
specific ELF notes like e.g. NT_S390_PREFIX or NT_S390_CTRS
have "LINUX" specified as note name and that the namesz is
6. Otherwise the notes are ignored.
QEMU currently uses "CORE" for these notes. Up to now this has
not been a real problem because the dump analysis tool "crash"
does handle that. But it will break all programs that use libbfd
for processing ELF notes.
So fix this and use "LINUX" for all s390 specific notes to comply
with libbfd. Also set the correct namesz.
Reported-by: Philipp Rudo <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| 5f706fdc164b20b48254eadf7bd413edace34499 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5f706fdc164b20b48254eadf7bd413edace34499 | 2017-02-24 10:15:18+01:00 |
usb: ehci: fix memory leak in ehci
In usb_ehci_init function, it initializes 's->ipacket', but there
is no corresponding function to free this. As the ehci can be hotplug
and unplug, this will leak host memory leak. In order to make the
hierarchy clean, we should add a ehci pci finalize function, then call
the clean function in ehci device.
Signed-off-by: Li Qiang <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| d710e1e7bd3d5bfc26b631f02ae87901ebe646b0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d710e1e7bd3d5bfc26b631f02ae87901ebe646b0 | 2017-02-21 08:11:42+01:00 |
xhci: drop ER_FULL_HACK workaround
The nec/renesas driver problems have finally been debugged and root
caused, see commit "7da76e1 xhci: fix event queue IRQ handling".
It's pretty clear now that
(a) The whole "driver can't handle ring full" story is most likely
wrong.
(b) The ER_FULL_HACK workaround based on the false assumtion doesn't
much. It avoids the driver crashing (without commit 7da76e1), but
it doesn't make usb work.
(c) With 7da76e1 applied it doesn't trigger any more.
So, lets kill it. Or, to be exact, lets almost kill it. Some data
fields are kept unused in the state struct, for live migration backward
compatibility.
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| 898248a32915024a4f01ce4f0c3519509fb703cb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/898248a32915024a4f01ce4f0c3519509fb703cb | 2017-02-21 08:11:43+01:00 |
kvm/ioapic: dump real object instead of a fake one
When we do "info ioapic" for kvm ioapic, we were building up a temporary
ioapic object. Let's fetch the real one and update correspond to the
real object as well.
This fixes printing uninitialized version field in
ioapic_print_redtbl().
Reported-by: Peter Maydell <[email protected]>
Suggested-by: Paolo Bonzini <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| c6fcb0e201ad296a9c0f587486830d9508094efb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c6fcb0e201ad296a9c0f587486830d9508094efb | 2017-02-16 14:06:55+01:00 |
block: bdrv_invalidate_cache: invalidate children first
Current implementation invalidates firstly parent bds and then its
children. This leads to the following bug:
after incoming migration, in bdrv_invalidate_cache_all:
1. invalidate parent bds - reopen it with BDRV_O_INACTIVE cleared
2. child is not yet invalidated
3. parent check that its BDRV_O_INACTIVE is cleared
4. parent writes to child
5. assert in bdrv_co_pwritev, as BDRV_O_INACTIVE is set for child
This patch fixes it by just changing invalidate sequence: invalidate
children first.
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Message-id: [email protected]
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
| 16e977d506bcc2d9f7daa4a9f7cc2b48536d9da6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/16e977d506bcc2d9f7daa4a9f7cc2b48536d9da6 | 2017-02-12 00:47:42+01:00 |
target/openrisc: Optimize for r0 being zero
The HW does not special-case r0, but the ABI specifies that r0 should
contain 0. If we expose this fact to the optimizer, we can simplify
a lot of the generated code. We must of course verify that r0==0, but
that is trivial to do with a TB flag.
Signed-off-by: Richard Henderson <[email protected]>
| 6597c28d618a3d16d468770b7c30a0237a8c8ea9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6597c28d618a3d16d468770b7c30a0237a8c8ea9 | 2017-02-14 08:15:00+11:00 |
cipher: fix leak on initialization error
On error path, ctx may be leaked. Assign ctx earlier, and call
qcrypto_cipher_free() on error.
Spotted thanks to ASAN.
Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| d4c64800bbe1332328695a551b84ae68590c90fd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d4c64800bbe1332328695a551b84ae68590c90fd | 2016-12-21 14:26:26+00:00 |
trace: fix generated code build break
If the QEMU source dir is
/var/tmp/aaa-qemu-clone
and the build dir is
/var/tmp/qemu-aio-poll-v2
Then I get an error as:
trace/generated-tracers.c:15950:13: error: invalid suffix "_trace_events"
on integer constant
TraceEvent *2_trace_events[] = {
^
trace/generated-tracers.c:15950:13: error: expected identifier or ‘(’ before
numeric constant
trace/generated-tracers.c: In function ‘trace_2_register_events’:
trace/generated-tracers.c:17949:32: error: invalid suffix "_trace_events" on
integer constant
trace_event_register_group(2_trace_events);
^
make: *** [trace/generated-tracers.o] Error 1
This patch fixes the issue.
Reported-by: Fam Zheng <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
Tested-by: Fam Zheng <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| d4f7ca59017835784c6872dfab0e269d9b41b05a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d4f7ca59017835784c6872dfab0e269d9b41b05a | 2016-11-18 11:09:58+00:00 |
armv7m: MRS/MSR: handle unprivileged access
The MRS and MSR instruction handling has a number of flaws:
* unprivileged accesses should only be able to read
CONTROL and the xPSR subfields, and only write APSR
(others RAZ/WI)
* privileged access should not be able to write xPSR
subfields other than APSR
* accesses to unimplemented registers should log as
guest errors, not abort QEMU
Signed-off-by: Michael Davidsaver <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: [email protected]
[PMM: rewrote commit message]
Signed-off-by: Peter Maydell <[email protected]>
| 58117c9bb429cd9552d998687aa99088eb1d8528 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/58117c9bb429cd9552d998687aa99088eb1d8528 | 2017-01-27 15:20:20+00:00 |
acpi: fix assert failure caused by commit 35c5a52d
Commit 35c5a52d "acpi: do not use TARGET_PAGE_SIZE" changed struct
NvdimmDsmIn from a variable-size structure to a fixed-size structure of
4096 bytes. It forgot to adjust an assert in
nvdimm_dsm_set_label_data(..., NvdimmDsmIn *in, ...):
assert(sizeof(*in) + sizeof(*set_label_data) + set_label_data->length <=
4096);
which could crash QEMU when guest writes NVDIMM labels.
Fix it by replacing sizeof(*in) by offsetof(NvdimmDsmIn, arg3).
Signed-off-by: Haozhong Zhang <[email protected]>
Reported-by: Dan Williams <[email protected]>
Tested-by: Dan Williams <[email protected]>
Reviewed-by: Xiao Guangrong <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 53000638f233d6ba1d584a68b74f2cde79615b80 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/53000638f233d6ba1d584a68b74f2cde79615b80 | 2016-11-01 19:21:09+02:00 |
tests: virtio-9p: add version operation test
This patch lays the foundations to be able to test 9P operations and
provides a test for the version operation as a first example.
A 9P request is composed of a T-message sent by the client (guest) to the
server (QEMU), and a R-message sent by the server back to the client.
The following general calls are available to implement requests for any
9P operations:
v9fs_req_init(): allocates the request structure and the guest memory for
the T-message
v9fs_req_send(): allocates the guest memory for the R-message and sends the
T-message to QEMU
v9fs_req_recv(): waits for QEMU to answer and does some sanity checks on the
returned R-message header
v9fs_req_free(): releases the guest memory and the request structure
Helpers are provided, to be used by each specific 9P operation to copy data
to/from the guest memory.
The version operation is used to negotiate the 9P protocol version to be
used and the maximum buffer size for exchanged data. It is necessarily
the first message of a 9P session. For simplicity, the maximum buffer size
is hardcoded to 4k, which should be enough for functional tests.
The test simply advertises the "9P2000.L" version to QEMU and expects QEMU
to answer it is supported.
References:
http://man.cat-v.org/plan_9/5/intro
http://man.cat-v.org/plan_9/5/version
Signed-off-by: Greg Kurz <[email protected]>
| 6cc9906b4c4a659841485ac483f608dea31dfa63 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6cc9906b4c4a659841485ac483f608dea31dfa63 | 2017-01-03 17:28:44+01:00 |
trace: provide mechanism for registering trace events
Remove the notion of there being a single global array
of trace events, by introducing a method for registering
groups of events.
The module_call_init() needs to be invoked at the start
of any program that wants to make use of the trace
support. Currently this covers system emulators qemu-nbd,
qemu-img and qemu-io.
[Squashed the following fix from Daniel P. Berrange
<[email protected]>:
linux-user/bsd-user: initialize trace events subsystem
The bsd-user/linux-user programs make use of the CPU emulation
code and this now requires that the trace events subsystem
is enabled, otherwise it'll crash trying to allocate an empty
trace events bitmap for the CPU object.
--Stefan]
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Lluís Vilanova <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| fe4db84d49545e669806d0cce12b3aa384e04ac3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fe4db84d49545e669806d0cce12b3aa384e04ac3 | 2016-10-12 09:52:50+02:00 |
virtio-9p: handle handle_9p_output() error
A broken guest may send a request without providing buffers for the reply
or for the request itself, and virtqueue_pop() will return an element with
either in_num == 0 or out_num == 0.
All 9P requests are expected to start with the following 7-byte header:
uint32_t size_le;
uint8_t id;
uint16_t tag_le;
If iov_to_buf() fails to return these 7 bytes, then something is wrong in
the guest.
In both cases, it is wrong to crash QEMU, since the root cause lies in the
guest.
This patch hence does the following:
- keep the check of in_num since pdu_complete() assumes it has enough
space to store the reply and we will send something broken to the guest
- let iov_to_buf() handle out_num == 0, since it will return 0 just like
if the guest had provided an zero-sized buffer.
- call virtio_error() to inform the guest that the device is now broken,
instead of aborting
- detach the request from the virtqueue and free it
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]>
| d3d74d6fe095e2e49d030e0c163cecfb9c20f1d4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d3d74d6fe095e2e49d030e0c163cecfb9c20f1d4 | 2016-10-10 01:16:59+03:00 |
intel_iommu: reject broken EIM
Cluster x2APIC cannot work without KVM's x2apic API when the maximal
APIC ID is greater than 8 and only KVM's LAPIC can support x2APIC, so we
forbid other APICs and also the old KVM case with less than 9, to
simplify the code.
There is no point in enabling EIM in forbidden APICs, so we keep it
enabled only for the KVM APIC; unconditionally, because making the
option depend on KVM version would be a maintanance burden.
Old QEMUs would enable eim whenever intremap was on, which would trick
guests into thinking that they can enable cluster x2APIC even if any
interrupt destination would get clamped to 8 bits.
Depending on your configuration, QEMU could notice that the destination
LAPIC is not present and report it with a very non-obvious:
KVM: injection failed, MSI lost (Operation not permitted)
Or the guest could say something about unexpected interrupts, because
clamping leads to aliasing so interrupts were being delivered to
incorrect VCPUs.
KVM_X2APIC_API is the feature that allows us to enable EIM for KVM.
QEMU 2.7 allowed EIM whenever interrupt remapping was enabled. In order
to keep backward compatibility, we again allow guests to misbehave in
non-obvious ways, and make it the default for old machine types.
A user can enable the buggy mode it with "x-buggy-eim=on".
Signed-off-by: Radim Krčmář <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| fb506e701e9bafa3e0685747c1c98962c52d1962 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fb506e701e9bafa3e0685747c1c98962c52d1962 | 2016-10-17 15:44:49-02:00 |
migration: report an error giving the failed field
When a field fails to load (typically due to a limit
check, or a call to a get/put) report the device and field
to give an indication of the cause.
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: John Snow <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| a1771070e7b892a0bdea81b4a1ec7fcca0af21f5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a1771070e7b892a0bdea81b4a1ec7fcca0af21f5 | 2016-10-13 17:22:38+02:00 |
linux-user/syscall: extend lock around cpu-list
There is a potential race if several threads exit at once. To serialise
the exits extend the lock above the initial checking of the CPU list.
Signed-off-by: Alex Bennée <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| dd1f63493adbbb06fa16ed15f8fc16584f55ee81 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/dd1f63493adbbb06fa16ed15f8fc16584f55ee81 | 2016-10-04 10:00:26+02:00 |
replay: allow replay stopping and restarting
This patch fixes bug with stopping and restarting replay
through monitor.
Signed-off-by: Pavel Dovgalyuk <[email protected]>
Message-Id: <20160926080815.6992.71818.stgit@PASHA-ISP>
Signed-off-by: Paolo Bonzini <[email protected]>
| 6d0ceb80ffe18ad4b28aab7356f440636c0be7be | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6d0ceb80ffe18ad4b28aab7356f440636c0be7be | 2016-09-27 11:57:30+02:00 |
msmouse: Fix segfault caused by free the chr before chardev cleanup.
Segfault happens when leaving qemu with msmouse backend:
#0 0x00007fa8526ac975 in raise () at /lib64/libc.so.6
#1 0x00007fa8526add8a in abort () at /lib64/libc.so.6
#2 0x0000558be78846ab in error_exit (err=16, msg=0x558be799da10 ...
#3 0x0000558be7884717 in qemu_mutex_destroy (mutex=0x558be93be750) at ...
#4 0x0000558be7549951 in qemu_chr_free_common (chr=0x558be93be750) at ...
#5 0x0000558be754999c in qemu_chr_free (chr=0x558be93be750) at ...
#6 0x0000558be7549a20 in qemu_chr_delete (chr=0x558be93be750) at ...
#7 0x0000558be754a8ef in qemu_chr_cleanup () at qemu-char.c:4643
#8 0x0000558be755843e in main (argc=5, argv=0x7ffe925d7118, ...
The chr was freed by msmouse close callback before chardev cleanup,
Then qemu_mutex_destroy triggered raise().
Because freeing chr is handled by qemu_chr_free_common, Remove the free from
msmouse_chr_close to avoid double free.
Fixes: c1111a24a3358ecd2f17be7c8b117cfe8bc5e5f8
Cc: [email protected]
Signed-off-by: Lin Ma <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 9e14037f05e99ca3b8a33d8be9a2a636bbf09326 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9e14037f05e99ca3b8a33d8be9a2a636bbf09326 | 2016-09-22 20:20:53+02:00 |
linux-user: Range check the nfds argument to ppoll syscall
Do an initial range check on the ppoll syscall's nfds argument,
to avoid possible overflow in the calculation of the lock_user()
size argument. The host kernel will later apply the rather lower
limit based on RLIMIT_NOFILE as appropriate.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| ce9c139d93db03e464341385976606b7568b768f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ce9c139d93db03e464341385976606b7568b768f | 2016-09-21 14:25:53+03:00 |
ipmi: check return of qemu_chr_fe_write() for errors
The continue_send() method in ipmi_bmc_extern.c directly
assigns the return value of qemu_chr_fe_write() to the
variable tracking the I/O buffer offset. This ignores the
possibility that the return value could be -1 and so will
cause I/O go backwards on EAGAIN. Fortunately 'outpos' is
unsigned, so can't go negative - it will become MAX_INT
which will cause the loop to stop, and avoid an accidental
out of bounds array access.
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| b72981b910097b31f4d0b9c111a2d2cfd9ee585b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b72981b910097b31f4d0b9c111a2d2cfd9ee585b | 2016-09-13 19:09:42+02:00 |
scsi: mptconfig: fix misuse of MPTSAS_CONFIG_PACK
These issues cause respectively a QEMU crash and a leak of 2 bytes of
stack. They were discovered by VictorV of 360 Marvel Team.
Reported-by: Tom Victor <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
| 65a8e1f6413a0f6f79894da710b5d6d43361d27d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/65a8e1f6413a0f6f79894da710b5d6d43361d27d | 2016-09-13 19:08:46+02:00 |
pc: don't leak a20_line
The irqs array is no longer being used
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| ac64c5fdf8c1e470cfca94d7ad5686770e6e470a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ac64c5fdf8c1e470cfca94d7ad5686770e6e470a | 2016-09-08 18:05:21+04:00 |
s390x/kvm: 2 byte software breakpoint support
Diag 501 (4 bytes) was used until now for software breakpoints on s390.
As instructions on s390 might be 2 bytes long, temporarily overwriting them
with 4 bytes is evil and can result in very strange guest behaviour.
We make use of invalid instruction 0x0000 as new sw breakpoint instruction.
We have to enable interception of that instruction in KVM using a
capability.
If no software breakpoint has been inserted at the reported position, an
operation exception has to be injected into the guest. Otherwise a
breakpoint has been hit and the pc has to be rewound.
If KVM doesn't yet support interception of instruction 0x0000 the
existing mechanism exploiting diag 501 is used. To keep overhead low,
interception of instruction 0x0000 will only be enabled if sw breakpoints
are really used.
Reviewed-by: Christian Borntraeger <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| b60fae32ff33cbaab76d14cc5f55b979cf58516d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b60fae32ff33cbaab76d14cc5f55b979cf58516d | 2016-09-05 15:15:16+02:00 |
qht: do not segfault when gathering stats from an uninitialized qht
So far, QHT functions assume that the passed qht has previously been
initialized--otherwise they segfault.
This patch makes an exception for qht_statistics_init, with the goal
of simplifying calling code. For instance, qht_statistics_init is
called from the 'info jit' dump, and given that under KVM the TB qht
is never initialized, we get a segfault. Thus, instead of complicating
the 'info jit' code with additional checks, let's allow passing an
uninitialized qht to qht_statistics_init.
While at it, add a test for this to test-qht.
Before the patch (for $ qemu -enable-kvm [...]):
(qemu) info jit
[...]
direct jump count 0 (0%) (2 jumps=0 0%)
Program received signal SIGSEGV, Segmentation fault.
After the patch the "TB hash buckets", "TB hash occupancy"
and "TB hash avg chain" lines are omitted.
(qemu) info jit
[...]
direct jump count 0 (0%) (2 jumps=0 0%)
TB hash buckets 0/0 (-nan% head buckets used)
TB hash occupancy nan% avg chain occ. Histogram: (null)
TB hash avg chain nan buckets. Histogram: (null)
[...]
Reported by: Changlong Xie <[email protected]>
Signed-off-by: Emilio G. Cota <[email protected]>
Message-Id: <[email protected]>
[Extract printing statistics to an entirely separate function. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
| 7266ae91a111001abda65c79299c9b7e365456b6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7266ae91a111001abda65c79299c9b7e365456b6 | 2016-08-02 12:03:58+02:00 |
hw/mips_malta: Fix YAMON API print routine
The print routine provided as part of the in-built bootloader had a bug
in that it attempted to use a jump instruction as part of a loop, but
the target has its upper bits zeroed leading to control flow
transferring to 0xb0000814 rather than the intended 0xbfc00814. Fix this
by using a branch instruction instead, which seems more fit for purpose.
A simple way to test this is to build a Linux kernel with EVA enabled &
attempt to boot it in QEMU. It will attempt to print a message
indicating the configuration mismatch but QEMU would previously
incorrectly jump & wind up printing a continuous stream of the letter E.
Signed-off-by: Paul Burton <[email protected]>
Cc: Aurelien Jarno <[email protected]>
Cc: Leon Alrae <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Reviewed-by: Leon Alrae <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
| 7f81dbb9a0e89b5306c1337e0cd0e1cea8a03f6d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7f81dbb9a0e89b5306c1337e0cd0e1cea8a03f6d | 2016-07-28 11:24:00+01:00 |
ppc: Huge page detection mechanism fixes - Episode III
After already fixing two issues with the huge page detection mechanism
(see commit 159d2e39a860 and 86b50f2e1bef), Greg Kurz noticed another
case that caused the guest to crash where QEMU announces huge pages
though they should not be available for the guest:
qemu-system-ppc64 -enable-kvm ... -mem-path /dev/hugepages \
-m 1G,slots=4,maxmem=32G
-object memory-backend-ram,policy=default,size=1G,id=mem-mem1 \
-device pc-dimm,id=dimm-mem1,memdev=mem-mem1 -smp 2 \
-numa node,nodeid=0 -numa node,nodeid=1
That means if there is a global mem-path option, we still have
to look at the memory-backend objects that have been specified
additionally and return their minimum page size if that value
is smaller than the page size of the main memory.
Reported-by: Greg Kurz <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Tested-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 3d4f2534834cd9f9bbb3dd145fa61fd2ac0dd535 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3d4f2534834cd9f9bbb3dd145fa61fd2ac0dd535 | 2016-07-25 10:19:30+10:00 |
linux-user: fix netlink memory corruption
Netlink is byte-swapping data in the guest memory (it's bad).
It's ok when the data come from the host as they are generated by the
host.
But it doesn't work when data come from the guest: the guest can
try to reuse these data whereas they have been byte-swapped.
This is what happens in glibc:
glibc generates a sequence number in nlh.nlmsg_seq and calls
sendto() with this nlh. In sendto(), we byte-swap nlmsg.seq.
Later, after the recvmsg(), glibc compares nlh.nlmsg_seq with
sequence number given in return, and of course it fails (hangs),
because nlh.nlmsg_seq is not valid anymore.
The involved code in glibc is:
sysdeps/unix/sysv/linux/check_pf.c:make_request()
...
req.nlh.nlmsg_seq = time (NULL);
...
if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0,
(struct sockaddr *) &nladdr,
sizeof (nladdr))) < 0)
<here req.nlh.nlmsg_seq has been byte-swapped>
...
do
{
...
ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
...
struct nlmsghdr *nlmh;
for (nlmh = (struct nlmsghdr *) buf;
NLMSG_OK (nlmh, (size_t) read_len);
nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len))
{
<we compare nlmh->nlmsg_seq with corrupted req.nlh.nlmsg_seq>
if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid
|| nlmh->nlmsg_seq != req.nlh.nlmsg_seq)
continue;
...
else if (nlmh->nlmsg_type == NLMSG_DONE)
/* We found the end, leave the loop. */
done = true;
}
}
while (! done);
As we have a continue on "nlmh->nlmsg_seq != req.nlh.nlmsg_seq",
"done" cannot be set to "true" and we have an infinite loop.
It's why commands like "apt-get update" or "dnf update hangs".
Signed-off-by: Laurent Vivier <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| 7d61d892327d803ae43d14500601e48031b4632c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7d61d892327d803ae43d14500601e48031b4632c | 2016-07-19 15:20:59+03:00 |
serial: remove watch on reset
Otherwise, this can cause serial_xmit to be entered with LSR.TEMT=0,
which is invalid and causes an assertion failure.
Reported-by: Bret Ketchum <[email protected]>
Tested-by: Bret Ketchum <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| a1df76da57aa8772a75e7c49f8e3829d07b4c46c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a1df76da57aa8772a75e7c49f8e3829d07b4c46c | 2016-06-29 14:03:47+02:00 |
virtio-bus: common ioeventfd infrastructure
Introduce a set of ioeventfd callbacks on the virtio-bus level
that can be implemented by the individual transports. At the
virtio-bus level, do common handling for host notifiers (which
is actually most of it).
Two things of note:
- When setting the host notifier, we only switch from/to the
generic ioeventfd handler. This fixes a latent bug where we
had no ioeventfd assigned for a certain window.
- We always iterate over all possible virtio queues, even though
ccw (currently) has a lower limit. It does not really matter
here.
Signed-off-by: Cornelia Huck <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 6798e245a3c7e6f34f66a548a108cfa8eba79b7d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6798e245a3c7e6f34f66a548a108cfa8eba79b7d | 2016-06-24 08:47:35+03:00 |
qapi: Factor out QAPISchemaObjectTypeMember.check_clash()
While there, stick in a TODO change key of seen from QAPI name to C
name. Can't do it right away, because it would fail the assertion for
tests/qapi-schema/args-has-clash.json.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
| 577de12d22aba55f31fd68c5724411eb8592a4ca | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/577de12d22aba55f31fd68c5724411eb8592a4ca | 2015-12-17 08:21:26+01:00 |
s390x: Limit s390-ccw machines to 248 CPUs
The sclp scp read info call fills in a buffer with information about the
system. With more than 248 CPUs we overflow the 4k buffer of the SCCB,
leading to random data corruption. Basically ALL guest operating systems
call scp read info, so let's limit the machines to 248 CPUs to make it
obvious that >=249 does not work.
As KVM also limits itself to 248 and TCG on s390 does not support
SMP, this should cause no regression for any user as no VMs with more
than 248 VCPUs were ever possible.
Signed-off-by: Christian Borntraeger <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Boris Fiuczynski <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| dcddc75e4756eac166bb002f71dfb09aca9b59fc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/dcddc75e4756eac166bb002f71dfb09aca9b59fc | 2016-06-14 14:00:05+02:00 |
vmsvga: add more fifo checks
Make sure all fifo ptrs are within range.
Fixes: CVE-2016-4454
Cc: [email protected]
Cc: P J P <[email protected]>
Reported-by: 李强 <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| c2e3c54d3960bc53bfa3a5ce7ea7a050b9be267e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c2e3c54d3960bc53bfa3a5ce7ea7a050b9be267e | 2016-06-06 09:04:19+02:00 |
block: Fix bdrv_next() memory leak
The bdrv_next() users all leaked the BdrvNextIterator after completing
the iteration. Simply changing bdrv_next() to free the iterator before
returning NULL at the end of list doesn't work because some callers exit
the loop before looking at all BDSes.
This patch moves the BdrvNextIterator from the heap to the stack of
the caller and switches to a bdrv_first()/bdrv_next() interface for
initialising the iterator.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
| 88be7b4be4aa17c88247e162bdd7577ea79db94f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/88be7b4be4aa17c88247e162bdd7577ea79db94f | 2016-05-25 19:04:10+02:00 |
esp: check dma length before reading scsi command(CVE-2016-4441)
The 53C9X Fast SCSI Controller(FSC) comes with an internal 16-byte
FIFO buffer. It is used to handle command and data transfer.
Routine get_cmd() uses DMA to read scsi commands into this buffer.
Add check to validate DMA length against buffer size to avoid any
overrun.
Fixes CVE-2016-4441.
Reported-by: Li Qiang <[email protected]>
Cc: [email protected]
Signed-off-by: Prasad J Pandit <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 6c1fef6b59563cc415f21e03f81539ed4b33ad90 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6c1fef6b59563cc415f21e03f81539ed4b33ad90 | 2016-05-23 16:53:46+02:00 |
hw/ppc/spapr: Fix crash when specifying bad parameters to spapr-pci-host-bridge
QEMU currently crashes when using bad parameters for the
spapr-pci-host-bridge device:
$ qemu-system-ppc64 -device spapr-pci-host-bridge,buid=0x123,liobn=0x321,mem_win_addr=0x1,io_win_addr=0x10
Segmentation fault
The problem is that spapr_tce_find_by_liobn() might return NULL, but
the code in spapr_populate_pci_dt() does not check for this condition
and then tries to dereference this NULL pointer.
Apart from that, the return value of spapr_populate_pci_dt() also
has to be checked for all PCI buses, not only for the last one, to
make sure we catch all errors.
Signed-off-by: Thomas Huth <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| da34fed707a3a3ffa229f4e724aea06da1b53fb0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/da34fed707a3a3ffa229f4e724aea06da1b53fb0 | 2016-04-23 16:52:20+10:00 |
configure: Check if struct fsxattr is available from linux header
Fixes build failure with --enable-xfsctl and
new linux headers (>=4.5) and older xfsprogs(<4.5):
In file included from /usr/include/xfs/xfs.h:38:0,
from /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:97:
/usr/include/xfs/xfs_fs.h:42:8: error: redefinition of ‘struct fsxattr’
struct fsxattr {
^
In file included from /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:60:0:
/usr/include/linux/fs.h:155:8: note: originally defined here
struct fsxattr {
This is really a bug in the system headers, but we can work around it
by defining HAVE_FSXATTR in the QEMU headers if linux/fs.h provides
the struct, so that xfs_fs.h doesn't try to define it as well.
CC: [email protected]
CC: Markus Armbruster <[email protected]>
CC: Peter Maydell <[email protected]>
CC: Stefan Weil <[email protected]>
Tested-by: Stefan Weil <[email protected]>
Signed-off-by: Jan Vesely <[email protected]>
[PMM: adjusted commit message, comments]
Signed-off-by: Peter Maydell <[email protected]>
| 277abf15a60f7653bfb05ffb513ed74ffdaea1b7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/277abf15a60f7653bfb05ffb513ed74ffdaea1b7 | 2016-05-02 13:04:26+01:00 |
nbd: fix assert() on qemu-nbd stop
From time to time qemu-nbd is crashing on the following assert:
assert(state == TERMINATING);
nbd_export_closed
nbd_export_put
main
and the state at the moment of the crash is evaluated to TERMINATE.
During shutdown process of the client the nbd_client_thread thread sends
SIGTERM signal and the main thread calls the nbd_client_closed callback.
If the SIGTERM callback will be executed after change the state to
TERMINATING, then the state will once again be TERMINATE.
To solve the issue, we must change the state to TERMINATE only if the state
is RUNNING. In the other case we are shutting down already.
Signed-off-by: Pavel Butsykin <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
| 23994a5f524aa575c7a4b2e5250f17b127d2cf2f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/23994a5f524aa575c7a4b2e5250f17b127d2cf2f | 2016-04-15 17:56:56+02:00 |
nbd: Fix NBD unsupported options
nbd-client.c currently fails to handle unsupported options properly.
If during option haggling the server finds an option that is
unsupported, it returns an NBD_REP_ERR_UNSUP reply.
According to nbd's proto.md, the format for such a reply
should be:
S: 64 bits, 0x3e889045565a9 (magic number for replies)
S: 32 bits, the option as sent by the client to which this is a reply
S: 32 bits, reply type (e.g., NBD_REP_ACK for successful completion,
or NBD_REP_ERR_UNSUP to mark use of an option not known by this server
S: 32 bits, length of the reply. This may be zero for some replies,
in which case the next field is not sent
S: any data as required by the reply (e.g., an export name in the case
of NBD_REP_SERVER, or optional UTF-8 message for NBD_REP_ERR_*)
However, in nbd-client.c, the reply type was being read, and if it
contained an error, it was bailing out and issuing the next option
request without first reading the length. This meant that the
next option / handshake read had an extra 4 or more bytes of data in it.
In practice, this makes Qemu incompatible with servers that do not
support NBD_OPT_LIST.
To verify this isn't an error in the specification or my reading of
it, replies are sent by the reference implementation here:
https://github.com/yoe/nbd/blob/66dfb35/nbd-server.c#L1232
and as is evident it always sends a 'datasize' (aka length) 32 bit
word. Unsupported elements are replied to here:
https://github.com/yoe/nbd/blob/66dfb35/nbd-server.c#L1371
Signed-off-by: Alex Bligh <[email protected]>
Message-Id: <[email protected]>
[rework to ALWAYS consume an optional UTF-8 message from the server]
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 6ff5816478940c76d3412593e503f644af531d49 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6ff5816478940c76d3412593e503f644af531d49 | 2016-04-08 00:07:44+02:00 |
target-mips: indicate presence of IEEE 754-2008 FPU in R6/R5+MSA CPUs
MIPS Release 6 and MIPS SIMD Architecture make it mandatory to have IEEE
754-2008 FPU which is indicated by CP1 FIR.HAS2008, FCSR.ABS2008 and
FCSR.NAN2008 bits set to 1.
In QEMU we still keep these bits cleared as there is no 2008-NaN support.
However, this now causes problems preventing from running R6 Linux with
the v4.5 kernel. Kernel refuses to execute 2008-NaN ELFs on a CPU
whose FPU does not support 2008-NaN encoding:
(...)
VFS: Mounted root (ext4 filesystem) readonly on device 8:0.
devtmpfs: mounted
Freeing unused kernel memory: 256K (ffffffff806f0000 - ffffffff80730000)
request_module: runaway loop modprobe binfmt-464c
Starting init: /sbin/init exists but couldn't execute it (error -8)
request_module: runaway loop modprobe binfmt-464c
Starting init: /bin/sh exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Therefore always indicate presence of 2008-NaN support in R6 as well as in
R5+MSA CPUs, even though this feature is not yet supported by MIPS in QEMU.
Signed-off-by: Leon Alrae <[email protected]>
| ba5c79f26221c0fd7139c883a34a4e75d993f732 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ba5c79f26221c0fd7139c883a34a4e75d993f732 | 2016-03-23 13:36:55+00:00 |
block: Remove copy-on-read from bdrv_move_feature_fields()
Ever since we first introduced bdrv_append() in commit 8802d1fd ('qapi:
Introduce blockdev-group-snapshot-sync command'), the copy-on-read flag
was moved to the new top layer when taking a snapshot. The only problem
is that it doesn't make a whole lot of sense.
The use case for manually enabled CoR is to avoid reading data twice
from a slow remote image, so we want to save it to a local overlay, say
an ISO image accessed via HTTP to a local qcow2 overlay. When taking a
snapshot, we end up with a backing chain like this:
http <- local.qcow2 <- snap_overlay.qcow2
There is no point in doing CoR from local.qcow2 into snap_overlay.qcow2,
we just want to keep copying data from the remote source into
local.qcow2.
The other use case of CoR is in the context of streaming, which isn't
very interesting for bdrv_move_feature_fields() because op blockers
prevent this combination.
This patch makes the copy-on-read flag stay on the image for which it
was originally set and prevents it from being propagated to the new
overlay. It is no longer intended to move CoR to the BlockBackend level.
In order for this to make sense, we also need to keep the respective
image read-write.
As a side effect of these changes, creating a live snapshot image (as
opposed to using an existing externally created one) on top of a COR
block device works now. It used to fail because it tried to open its
backing file both read-only and with COR.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 4c8449832c0add27b898e657a9e7e8603f44157c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4c8449832c0add27b898e657a9e7e8603f44157c | 2016-03-30 11:59:32+02:00 |
quorum: Fix crash in quorum_aio_cb()
quorum_aio_cb() emits the QUORUM_REPORT_BAD event if there's
an I/O error in a Quorum child. However sacb->aiocb must be
correctly initialized for this to happen. read_quorum_children() and
read_fifo_child() are not doing this, which results in a QEMU crash.
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: 8138570d071ba7e25db3736979234a1fd71dbd05.1457610443.git.berto@igalia.com
Signed-off-by: Max Reitz <[email protected]>
| b9c600d20716b3d942cb07188ff998fb236a8365 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b9c600d20716b3d942cb07188ff998fb236a8365 | 2016-03-14 17:35:06+01:00 |
net: filter: correctly remove filter from the list during finalization
Qemu may crash when we want to add two filters on the same netdev but
the initialization of second fails (e.g missing parameters):
./qemu-system-x86_64 -netdev user,id=un0 \
-object filter-buffer,id=f0,netdev=un0,interval=10 \
-object filter-buffer,id=f1,netdev=un0
Segmentation fault (core dumped)
This is because we don't check whether or not the filter was in the
list of netdev. This patch fixes this.
Cc: Yang Hongyang <[email protected]>
Reviewed-by: Yang Hongyang <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 5dd2d45e344b50b018912b6d98ab47493f946eb6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5dd2d45e344b50b018912b6d98ab47493f946eb6 | 2016-03-08 15:34:09+08:00 |
io: bind to socket before creating QIOChannelSocket
In the QIOChannelSocket test we create a socket file
descriptor and then try to create a QIOChannelSocket.
This works on Linux, but fails on Win32 because it is
not valid to call getsockname() on an unbound socket.
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| abc981bf292fb361f8a509c3611ddf2ba2c43360 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/abc981bf292fb361f8a509c3611ddf2ba2c43360 | 2016-03-10 17:10:18+00:00 |
ppc/kvm: Tell the user what might be wrong when using bad CPU types with kvm-hv
Using a CPU type that does not match the host is not possible when using
the kvm-hv kernel module - the PVR is checked in the kernel function
kvm_arch_vcpu_ioctl_set_sregs_hv() and rejected with -EINVAL if it
does not match the host.
However, when the user tries to specify a non-matching CPU type, QEMU
currently only reports "kvm_init_vcpu failed: Invalid argument", and
this is of course not very helpful for the user to solve the problem.
So this patch adds a more descriptive error message that tells the
user to specify "-cpu host" instead.
Signed-off-by: Thomas Huth <[email protected]>
[Removed melodramatic '!' :)]
Signed-off-by: David Gibson <[email protected]>
| 388e47c75be411979c420abbc76a250597f4ea94 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/388e47c75be411979c420abbc76a250597f4ea94 | 2016-02-25 13:58:44+11:00 |
hw: fix some debug message format strings
Signed-off-by: Alyssa Milburn <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 2f448e415f364d0ec4c5556993e44ca183e31c5c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2f448e415f364d0ec4c5556993e44ca183e31c5c | 2016-02-17 09:59:29+11:00 |
hw/arm/virt: fix max-cpus check
mach-virt doesn't yet support hotplug, but command lines specifying
-smp <num>,maxcpus=<bigger-num> don't fail. Of course specifying
bigger-num as something bigger than the machine supports, e.g. > 8
on a gicv2 machine, should fail though. This fix also makes mach-
virt's max-cpus check truly consistent with the one in vl.c:main,
as the one there was already correctly checking max-cpus instead
of smp-cpus.
Reported-by: Shannon Zhao <[email protected]>
Signed-off-by: Andrew Jones <[email protected]>
Reviewed-by: Shannon Zhao <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 7ea686f5dda7cb9a5425fab716ce41260eeecf15 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7ea686f5dda7cb9a5425fab716ce41260eeecf15 | 2016-02-11 11:17:32+00:00 |
fdc: always compile-check debug prints
Coverity noticed that some variables are only used by debug prints, and
called them unused. Always compile the print statements. While we're
here, print to stderr as well.
Bonus: Fix a debug printf I broke in f31937aa8
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
[Touched up commit message. --js]
Message-id: [email protected]
| c691320faa6a1749042134716a628e22abb81ed2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c691320faa6a1749042134716a628e22abb81ed2 | 2016-02-10 13:29:40-05:00 |
build: Don't redefine 'inline'
Actively redefining 'inline' is wrong for C++, where gcc has an
extension 'inline namespace' which fails to compile if the
keyword 'inline' is replaced by a macro expansion. This will
matter once we start to include "qemu/osdep.h" first from C++
files, depending also on whether the system headers are new
enough to be using the gcc extension.
But rather than just guard things by __cplusplus, let's look at
the overall picture. Commit df2542c737ea2 in 2007 defined 'inline'
to the gcc attribute __always_inline__, with the rationale "To
avoid discarded inlining bug". But compilers have improved since
then, and we are probably better off trusting the compiler rather
than trying to force its hand.
So just nuke our craziness.
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| b11d029b0a093e31ae13e4fade03c7848e8af169 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b11d029b0a093e31ae13e4fade03c7848e8af169 | 2016-02-16 09:27:59+01:00 |
isa: Clean up inappropriate hw_error()
isa_bus_irqs(), isa_create() and isa_try_create() call hw_error() when
passed a null bus. Use of hw_error() has always been questionable,
because these are used only during machine initialization, and
printing CPU registers isn't useful there.
Since the previous commit, passing a null bus is a programming error.
Drop the hw_error() and simply let it crash.
Cc: Richard Henderson <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: "Hervé Poussineau" <[email protected]>
Cc: Aurelien Jarno <[email protected]>
Cc: Mark Cave-Ayland <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Hervé Poussineau <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
| 675463d9b6b2c2b65a713a6d906aeebe9e6750ae | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/675463d9b6b2c2b65a713a6d906aeebe9e6750ae | 2016-01-13 15:15:57+01:00 |
ahci-test: fix memory leak
Use the proper free command to detroy an AHCICommand.
Signed-off-by: John Snow <[email protected]>
Message-id: [email protected]
| 248de4a89915001e64176580d620d22b612e06f2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/248de4a89915001e64176580d620d22b612e06f2 | 2016-01-11 14:10:42-05:00 |
net/vmxnet3: return 1 on device activation failure
When reading device status, 0 means device is successfully
activated and 1 means error.
This behavior can be observed by the following steps:
1) run a Linux distro on esxi server (5.5+)
2) modify vmxnet3 Linux driver to give it an invalid
address to 'adapter->shared_pa' which is the
shared memory for guest/host communication
This will trigger device activation failure and kernel
log will have the following message:
[ 7138.403256] vmxnet3 0000:03:00.0 eth1: Failed to activate dev: error 1
So return 1 on device activation failure instead of -1;
Signed-off-by: Miao Yan <[email protected]>
Reviewed-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| fde58177aa112da377bbe1af71e0ec3ee7750196 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fde58177aa112da377bbe1af71e0ec3ee7750196 | 2016-01-11 11:01:34+08:00 |
linux-user: add signalfd/signalfd4 syscalls
This patch introduces a system very similar to the one used in the kernel
to attach specific functions to a given file descriptor.
In this case, we attach a specific "host_to_target()" translator to the fd
returned by signalfd() to be able to byte-swap the signalfd_siginfo
structure provided by read().
This patch allows to execute the example program given by
man signalfd(2):
#include <sys/signalfd.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#define handle_error(msg) \
do { perror(msg); exit(EXIT_FAILURE); } while (0)
int
main(int argc, char *argv[])
{
sigset_t mask;
int sfd;
struct signalfd_siginfo fdsi;
ssize_t s;
sigemptyset(&mask);
sigaddset(&mask, SIGINT);
sigaddset(&mask, SIGQUIT);
/* Block signals so that they aren't handled
according to their default dispositions */
if (sigprocmask(SIG_BLOCK, &mask, NULL) == -1)
handle_error("sigprocmask");
sfd = signalfd(-1, &mask, 0);
if (sfd == -1)
handle_error("signalfd");
for (;;) {
s = read(sfd, &fdsi, sizeof(struct signalfd_siginfo));
if (s != sizeof(struct signalfd_siginfo))
handle_error("read");
if (fdsi.ssi_signo == SIGINT) {
printf("Got SIGINT\n");
} else if (fdsi.ssi_signo == SIGQUIT) {
printf("Got SIGQUIT\n");
exit(EXIT_SUCCESS);
} else {
printf("Read unexpected signal\n");
}
}
}
$ ./signalfd_demo
^CGot SIGINT
^CGot SIGINT
^\Got SIGQUIT
Signed-off-by: Laurent Vivier <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| e36800c91a74b656b4b4c74483863950cf9ec202 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e36800c91a74b656b4b4c74483863950cf9ec202 | 2016-01-08 11:36:12+02:00 |
sun4u: split NPT and INT_DIS accesses between timer and compare registers
Accesses to the timer register high bit should only set NPT, whilst accesses
to the timer compare register high bit should only set INT_DIS. This fixes
issues with the timer being unexpectedly disabled whilst trying to boot
FreeBSD SPARC64.
Signed-off-by: Mark Cave-Ayland <[email protected]>
Reviewed-By: Artyom Tarasenko <[email protected]>
Signed-off-by: Mark Cave-Ayland <[email protected]>
| bf43330aa418908f7a5e2acda28ac1a8ed0d8ad6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bf43330aa418908f7a5e2acda28ac1a8ed0d8ad6 | 2016-01-07 12:21:02+00:00 |
qom-test: Fix qmp() leaks
Before this patch ASAN reported:
SUMMARY: AddressSanitizer: 677165875 byte(s) leaked in 1272437 allocation(s)
After this patch:
SUMMARY: AddressSanitizer: 465 byte(s) leaked in 32 allocation(s)
Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
[Straightforwardly rebased onto the previous patch]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 0d2cd785ef1282b14687f9f7f4b63ae4a2430be3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0d2cd785ef1282b14687f9f7f4b63ae4a2430be3 | 2015-12-04 18:29:31+01:00 |
vhost-user-test: fix crash with glib < 2.36
The prepare callback needs to be implemented with glib < 2.36,
quoting glib documentation:
"Since 2.36 this may be NULL, in which case the effect is as if the
function always returns FALSE with a timeout of -1."
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 45ce512670f34d10be34448e621fd1484bea0ec6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/45ce512670f34d10be34448e621fd1484bea0ec6 | 2015-12-02 16:42:26+02:00 |
qga: flush explicitly when needed
According to the specification:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html
"the application shall ensure that output is not directly followed by
input without an intervening call to fflush() or to a file positioning
function (fseek(), fsetpos(), or rewind()), and input is not directly
followed by output without an intervening call to a file positioning
function, unless the input operation encounters end-of-file."
Without this change, an fwrite() followed by an fread() may lose the
previously written content, as shown in the following test.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1210246
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
* don't confuse {write,read}() with f{write,read}() in
commit msg (Laszlo)
Signed-off-by: Michael Roth <[email protected]>
| 895b00f62a7e86724dc7352d67c7808d37366130 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/895b00f62a7e86724dc7352d67c7808d37366130 | 2015-11-25 17:56:31-06:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.