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
⌀ |
---|---|---|---|---|---|---|---|
block/nfs: fix naming of runtime opts
commit 94d6a7a accidentally left the naming of runtime opts and QAPI
scheme inconsistent. As one consequence passing of parameters in the
URI is broken. Sync the naming of the runtime opts to the QAPI
scheme.
Please note that this is technically backwards incompatible with the 2.8
release, but the 2.8 release is the only version that had the wrong naming.
Furthermore release 2.8 suffered from a NULL pointer dereference during
URI parsing.
Fixes: 94d6a7a76e9df9919629428f6c598e2b97d9426c
Cc: [email protected]
Signed-off-by: Peter Lieven <[email protected]>
Message-id: [email protected]
[mreitz: Fixed commit message]
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
| f67409a5bb43ebe74401fa8e187267eb0f139293 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f67409a5bb43ebe74401fa8e187267eb0f139293 | 2017-02-12 00:47:42+01:00 |
virtio-gpu: fix information leak in capset get dispatch
In virgl_cmd_get_capset function, it uses g_malloc to allocate
a response struct to the guest. As the 'resp'struct hasn't been full
initialized it will lead the 'resp->padding' field to the guest.
Use g_malloc0 to avoid this.
Signed-off-by: Li Qiang <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
[ kraxel: resolved conflict ]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 85d9d044471f93c48c5c396f7e217b4ef12f69f8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/85d9d044471f93c48c5c396f7e217b4ef12f69f8 | 2017-01-11 09:19:05+01:00 |
9pfs: fix crash when fsdev is missing
If the user passes -device virtio-9p without the corresponding -fsdev, QEMU
dereferences a NULL pointer and crashes.
This is a 2.8 regression introduced by commit 702dbcc274e2c.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Li Qiang <[email protected]>
| f2b58c43758efc61e2a49b899f5e58848489d0dc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f2b58c43758efc61e2a49b899f5e58848489d0dc | 2017-01-03 17:28:44+01:00 |
exec.c: Fix breakpoint invalidation race
A bug (1647683) was reported showing a crash when removing
breakpoints. The reproducer was bisected to 3359baad when tb_flush
was finally made thread safe. While in MTTCG the locking in
breakpoint_invalidate would have prevented any problems, but
currently tb_lock() is a NOP for system emulation.
The race is between a tb_flush from the gdbstub and the
tb_invalidate_phys_addr() in breakpoint_invalidate().
Ideally we'd have actual locking here; for the moment the
simple fix is to do a full tb_flush() for a bp invalidate,
since that is thread-safe even if no lock is taken.
Reported-by: Julian Brown <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| a9353fe897ca2687e5b3385ed39e3db3927a90e0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a9353fe897ca2687e5b3385ed39e3db3927a90e0 | 2016-12-06 20:21:46+00:00 |
test-replication: fix leaks
ASAN spotted:
SUMMARY: AddressSanitizer: 301990288 byte(s) leaked in 33 allocation(s).
Signed-off-by: Marc-André Lureau <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| baf905e580ab9c8eaf228822c4a7b257493b4998 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/baf905e580ab9c8eaf228822c4a7b257493b4998 | 2016-11-15 15:41:00+00:00 |
block: Let write zeroes fallback work even with small max_transfer
Commit 443668ca rewrote the write_zeroes logic to guarantee that
an unaligned request never crosses a cluster boundary. But
in the rewrite, the new code assumed that at most one iteration
would be needed to get to an alignment boundary.
However, it is easy to trigger an assertion failure: the Linux
kernel limits loopback devices to advertise a max_transfer of
only 64k. Any operation that requires falling back to writes
rather than more efficient zeroing must obey max_transfer during
that fallback, which means an unaligned head may require multiple
iterations of the write fallbacks before reaching the aligned
boundaries, when layering a format with clusters larger than 64k
atop the protocol of file access to a loopback device.
Test case:
$ qemu-img create -f qcow2 -o cluster_size=1M file 10M
$ losetup /dev/loop2 /path/to/file
$ qemu-io -f qcow2 /dev/loop2
qemu-io> w 7m 1k
qemu-io> w -z 8003584 2093056
In fairness to Denis (as the original listed author of the culprit
commit), the faulty logic for at most one iteration is probably all
my fault in reworking his idea. But the solution is to restore what
was in place prior to that commit: when dealing with an unaligned
head or tail, iterate as many times as necessary while fragmenting
the operation at max_transfer boundaries.
Reported-by: Ed Swierk <[email protected]>
CC: [email protected]
CC: Denis V. Lunev <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| b2f95feec5e4d546b932848dd421ec3361e8ef77 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b2f95feec5e4d546b932848dd421ec3361e8ef77 | 2016-11-22 15:59:22+01:00 |
milkymist-pfpu: fix potential integer overflow
Since the lm32 is a 32 bit architecture, just return a 32 bit value which
is then converted to a 64 bit value.
Spotted by coverity, CID 1005506.
Signed-off-by: Michael Walle <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| c1a900cf4a3925c2e4b313b82da5df955f17b70a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c1a900cf4a3925c2e4b313b82da5df955f17b70a | 2016-10-28 18:17:23+03:00 |
replication: interrupt failover if the main device is closed
Without this change, there is a race condition in tests/test-replication.
Depending on how fast the failover job (active commit) runs, there is a
chance of two bad things happening:
1) replication_done can be called after the secondary has been closed
and hence when the BDRVReplicationState is not valid anymore.
2) two copies of the active disk are present during the
/replication/secondary/stop test (that test runs immediately after
/replication/secondary/start, which tests failover). This causes the
corruption detector to fire.
Reviewed-by: Wen Congyang <[email protected]>
Reviewed-by: Changlong Xie <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
| 50ab0e0908d592b8bda56c2d7495e1190d734b0b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/50ab0e0908d592b8bda56c2d7495e1190d734b0b | 2016-10-28 21:50:18+08:00 |
trace: Fix 'char **' compilation error in simple backend
Currently, the generated function body will do "strlen(arg)" but the
argument could be 'char **' or 'char * const *'. Avoid that by excluding
such cases in is_string check.
Reported by patchew's "make docker-test-mingw@fedora".
Suggested-by: Eric Blake <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| db4df20de86c6e8ecd6c9f042c029ffb9f9cddac | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/db4df20de86c6e8ecd6c9f042c029ffb9f9cddac | 2016-10-27 19:24:15+01:00 |
net: vmxnet: initialise local tx descriptor
In Vmxnet3 device emulator while processing transmit(tx) queue,
when it reaches end of packet, it calls vmxnet3_complete_packet.
In that local 'txcq_descr' object is not initialised, which could
leak host memory bytes a guest.
Reported-by: Li Qiang <[email protected]>
Signed-off-by: Prasad J Pandit <[email protected]>
Reviewed-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| fdda170e50b8af062cf5741e12c4fb5e57a2eacf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fdda170e50b8af062cf5741e12c4fb5e57a2eacf | 2016-10-26 09:57:59+08:00 |
exec: move cpu_exec_init() calls to realize functions
Modify all CPUs to call it from XXX_cpu_realizefn() function.
Remove all the cannot_destroy_with_object_finalize_yet as
unsafe references have been moved to cpu_exec_realizefn().
(tested with QOM command provided by commit 4c315c27)
for arm:
Setting of cpu->mp_affinity is moved from arm_cpu_initfn()
to arm_cpu_realizefn() as setting of cpu_index is now done
in cpu_exec_realizefn(). To avoid to overwrite an user defined
value, we set it to an invalid value by default, and update
it in realize function only if the value is still invalid.
Signed-off-by: Laurent Vivier <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
Reviewed-by: Andrew Jones <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| ce5b1bbf624b977a55ff7f85bb3871682d03baff | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ce5b1bbf624b977a55ff7f85bb3871682d03baff | 2016-10-24 17:29:16-02:00 |
char: remove use-after-free on win-stdio
Found by reviewing the code, win_stdio_close() is called by
qemu_chr_free() which then call qemu_chr_free_common() taking care of
freeing CharDriverState*.
Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| ba60e727b0a824baa1762264be5ef67dc30a6bac | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ba60e727b0a824baa1762264be5ef67dc30a6bac | 2016-10-24 15:27:19+02:00 |
9pfs: fix information leak in xattr read
9pfs uses g_malloc() to allocate the xattr memory space, if the guest
reads this memory before writing to it, this will leak host heap memory
to the guest. This patch avoid this.
Signed-off-by: Li Qiang <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
| eb687602853b4ae656e9236ee4222609f3a6887d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/eb687602853b4ae656e9236ee4222609f3a6887d | 2016-10-17 14:13:58+02:00 |
hw/intc/arm_gic(v3)_kvm: Initialize gsi routing
Advertise gsi routing and set up irqchip routing entries for
GIC SPIs.
This is not mandated as long as MSI routing is not used
(because the kernel sets a default irqchip routing table).
However once MSI routing gets used (for VIRTIO-PCI vhost for
example), the first call to KVM_SET_GSI_ROUTING overrides the
kernel default irqchip table.
If no routing entry exists for the GSI, any IRQFD signaling for
this GSI will fail.
Signed-off-by: Eric Auger <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| d19a4d4ef448e736d341df47bd1adc78c8e40814 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d19a4d4ef448e736d341df47bd1adc78c8e40814 | 2016-10-04 13:28:08+01:00 |
ppc/xics: An ICS with offset 0 is assumed to be uninitialized
This will make life easier for dealing with dynamically configured
ICSes such as PHB3
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: Nikunj A Dadhania <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 15ed653fa49a7ddda2034db5d722fd6c2d439dd8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/15ed653fa49a7ddda2034db5d722fd6c2d439dd8 | 2016-09-23 12:39:07+10:00 |
docs: Fix description of the leaky bucket algorithm in throttle.txt
Commit 0bab0ebb17759c926bd48fd396bd8cbb2c8e4a3e was supposed to fix
a mistake in the description of the leaky bucket algorithm, but the
version that finally landed after the review process was incorrect.
This patch solves that problem and hopefully clarifies the description
a bit better.
Signed-off-by: Alberto Garcia <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 37e3645ad3974db6008c212edf68c7f9da1bedc7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/37e3645ad3974db6008c212edf68c7f9da1bedc7 | 2016-09-13 18:12:34+03:00 |
vhost-user: Attempt to fix a race with set_mem_table.
The set_mem_table command currently does not seek a reply. Hence, there is
no easy way for a remote application to notify to QEMU when it finished
setting up memory, or if there were errors doing so.
As an example:
(1) Qemu sends a SET_MEM_TABLE to the backend (eg, a vhost-user net
application). SET_MEM_TABLE does not require a reply according to the spec.
(2) Qemu commits the memory to the guest.
(3) Guest issues an I/O operation over a new memory region which was configured on (1).
(4) The application has not yet remapped the memory, but it sees the I/O request.
(5) The application cannot satisfy the request because it does not know about those GPAs.
While a guaranteed fix would require a protocol extension (committed separately),
a best-effort workaround for existing applications is to send a GET_FEATURES
message before completing the vhost_user_set_mem_table() call.
Since GET_FEATURES requires a reply, an application that processes vhost-user
messages synchronously would probably have completed the SET_MEM_TABLE before replying.
Signed-off-by: Prerna Saxena <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 28ed5ef16384f12500abd3647973ee21b03cbe23 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/28ed5ef16384f12500abd3647973ee21b03cbe23 | 2016-08-10 17:47:29+03:00 |
numa: do not leak NumaOptions
In all cases, call qapi_free_NumaOptions(), by using a common ending
block.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 157e94e8a2f7d3e14060d833bd1519a83099eaa9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/157e94e8a2f7d3e14060d833bd1519a83099eaa9 | 2016-08-07 23:59:59+04:00 |
kvm-irqchip: only commit route when irqchip is used
Reported from Alexey Kardashevskiy:
3f1fea0fb5bf "kvm-irqchip: do explicit commit when update irq" produces
a crash on pseries guest running with VFIO on POWER8 machine as it does
not support KVM_CAP_IRQCHIP (KVM_CAP_IRQ_XICS is there instead). At the
result, KVMState::irq_routes is NULL when VFIO calls
kvm_irqchip_commit_routes.
This makes the routing update conditional.
Reported-by: Alexey Kardashevskiy <[email protected]>
Tested-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 7005f7f81cef31bda895d3274c13854c143d3d8d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7005f7f81cef31bda895d3274c13854c143d3d8d | 2016-08-03 13:25:44+10:00 |
vhost: add vhost_net_set_backend()
Not all vhost-user backends support ops->vhost_net_set_backend(). It is
a nicer to provide an assert/error than to crash trying to
call. Furthermore, it improves a bit the code by hiding vhost_ops
details.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 950d94ba0671e7f154a9e87a277f8efbddcee28f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/950d94ba0671e7f154a9e87a277f8efbddcee28f | 2016-07-29 00:33:49+03:00 |
intel_iommu: support all masks in interrupt entry cache invalidation
Linux guests do not gracefully handle cases when the invalidation mask
they wanted is not supported, probably because real hardware always
allowed all.
We can just say that all 16 masks are supported, because both
ioapic_iec_notifier and kvm_update_msi_routes_all invalidate all caches.
Signed-off-by: Radim Krčmář <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| a3f409cb4a35d9aa6a4d24a7a1e05423e189cb7a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a3f409cb4a35d9aa6a4d24a7a1e05423e189cb7a | 2016-07-21 20:44:19+03:00 |
json-streamer: fix double-free on exiting during a parse
Now that json-streamer tries not to leak tokens on incomplete parse,
the tokens can be freed twice if QEMU destroys the json-streamer
object during the parser->emit call. To fix this, create the new
empty GQueue earlier, so that it is already in place when the old
one is passed to parser->emit.
Reported-by: Changlong Xie <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| a942d8fa01f65279cdc135f4294db611bbc088ef | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a942d8fa01f65279cdc135f4294db611bbc088ef | 2016-07-12 18:31:27+02:00 |
ppc: Fix conditions for delivering external interrupts to a guest
External interrupts can bypass the MSR_EE test if they occur in guest
mode and LPES0 is clear. In that case they are directed to the hypervisor
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| d1dbe37c1ee3f14cb64a9ae3c89f637fdd08fca1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d1dbe37c1ee3f14cb64a9ae3c89f637fdd08fca1 | 2016-07-01 09:57:01+10:00 |
ppc: Use a helper to filter writes to LPCR
This handles filtering bits based on what is implemented by a
given architecture version. We also use it to copy to LPCR
some of the relevant 970 HID4 bits.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
[clg: fixed checkpatch.pl errors ]
Signed-off-by: Cédric Le Goater <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 4b3fc37788fe5a9c6ec0c43863c78604db40cbb3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4b3fc37788fe5a9c6ec0c43863c78604db40cbb3 | 2016-07-01 09:57:01+10:00 |
ppc: Improve emulation of THRM registers
The 75x and 74xx processors have some thermal monitoring SPRs that
some OSes such as MacOS do use. Our current "dumb" implementation
isn't good enough and will cause some versions of MacOS to hang during
boot.
This lifts an improved emulation from MacOnLinux and adapts it to
qemu, thus fixing the problem.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
[dwg: Fixed typo in comment, a number of minor checkpatch warnings,
and a compile failure with CONFIG_USER_ONLY]
Signed-off-by: David Gibson <[email protected]>
| f0278900d38b2d8d9531c484bd088d9a7d5d4ea2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f0278900d38b2d8d9531c484bd088d9a7d5d4ea2 | 2016-06-22 11:12:17+10:00 |
backup: follow AioContext change gracefully
Move s->target to the new AioContext when there is an AioContext change.
The backup_run() coroutine does not use asynchronous I/O so there is no
need to wait for in-flight requests in a BlockJobDriver->pause()
callback.
Guest writes are intercepted by the backup job. Treat them as guest
activity and do it even while the job is paused. This is necessary
since the only alternative would be to fail a job that experienced guest
writes during pause once the job is resumed. In practice the guest
writes don't interfere with AioContext switching since bdrv_drain() is
used by bdrv_set_aio_context().
Loops already contain pause points because of block_job_sleep_ns() calls
in the yield_and_check() helper function. It is necessary to convert a
raw qemu_coroutine_yield() to block_job_yield() so the
MIRROR_SYNC_MODE_NONE case can pause.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Message-id: [email protected]
| 5ab4b69ce29908b327a91966dc78ea0fd7424075 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5ab4b69ce29908b327a91966dc78ea0fd7424075 | 2016-06-20 14:25:41+01:00 |
crypto: assert that qcrypto_hash_digest_len is in range
Otherwise unintended results could happen. For example,
Coverity reports a division by zero in qcrypto_afsplit_hash.
While this cannot really happen, it shows that the contract
of qcrypto_hash_digest_len can be improved.
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| b35c1f3361ebf6ec9ea5022903af4b559bff6063 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b35c1f3361ebf6ec9ea5022903af4b559bff6063 | 2016-06-13 12:41:17+01:00 |
linux-user: Support for restarting system calls for Microblaze targets
Update the Microblaze main loop and sigreturn code:
* on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn
* set all guest CPU state within signal.c code on sigreturn
* handle TARGET_QEMU_ESIGRETURN in the main loop as the indication
that the main loop should not touch any guest CPU state
Note that this in passing fixes a bug where we were corrupting
the guest r[3] on sigreturn with the guest's r[10] because
do_sigreturn() was returning env->regs[10] but the register for
syscall return values is env->regs[3].
Signed-off-by: Timothy Edward Baldwin <[email protected]>
Message-id: 1441497448-32489-11-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
Reviewed-by: Edgar E. Iglesias <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
[PMM: Commit message tweaks; drop TARGET_USE_ERESTARTSYS define;
drop whitespace changes]
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| 4134ecfeb903c362558cb1cb594ff532fd83fb84 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4134ecfeb903c362558cb1cb594ff532fd83fb84 | 2016-05-27 14:49:51+03:00 |
vl: Add DT_COCOA DisplayType value
Instead of reusing DT_SDL for Cocoa, use DT_COCOA to indicate
that a Cocoa display was requested.
configure already ensures CONFIG_COCOA and CONFIG_SDL are never
set at the same time. The only case where DT_SDL is used outside
a #ifdef CONFIG_SDL block is in the no_frame/alt_grab/ctrl_grab
check. That means the only user-visible change is that we will
start printing a warning if the SDL-specific options are used in
Cocoa mode. This is a bugfix, because no_frame/alt_grab/ctrl_grab
are not used by Cocoa code.
Cc: Andreas Färber <[email protected]>
Cc: Peter Maydell <[email protected]>
Acked-by: Andreas Färber <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 7b7d2be50c9c0f125b0025024b7048df87ac36bb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7b7d2be50c9c0f125b0025024b7048df87ac36bb | 2016-05-20 14:28:52-03:00 |
ehci: apply limit to iTD/sidt descriptors
Commit "156a2e4 ehci: make idt processing more robust" tries to avoid a
DoS by the guest (create a circular iTD queue and let qemu ehci
emulation run in circles forever). Unfortunately this has two problems:
First it misses the case of siTDs, and second it reportedly breaks
FreeBSD.
So lets go for a different approach: just count the number of iTDs and
siTDs we have seen per frame and apply a limit. That should really
catch all cases now.
Reported-by: 杜少博 <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 1ae3f2f178087711f9591350abad133525ba93f2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1ae3f2f178087711f9591350abad133525ba93f2 | 2016-04-19 08:18:27+02:00 |
tpm: Fix write to file descriptor function
Fix a bug introduced in commit 46f296c while moving send_all to the
tpm_passthrough code. Fix the name of the variable used in the loop.
Signed-off-by: Stefan Berger <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| e7658fcc4c29a29c578acde26f7714023b93b46e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e7658fcc4c29a29c578acde26f7714023b93b46e | 2016-04-13 19:52:34+03:00 |
ivshmem: fix ivshmem-{plain,doorbell} crash without arg
"qemu -device ivshmem-{plain,doorbell}" will crash, because the device
doesn't check that the required argument is provided. (screwed up in
commit 5400c02)
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| 6dc64780c2a88307716649aa9232bcc129c1ab14 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6dc64780c2a88307716649aa9232bcc129c1ab14 | 2016-04-13 12:01:47+02:00 |
Migration: Add i82801b11 migration data
The i82801b11 bridge didn't have a vmsd and thus didn't send
any migration data, including that of its parent PCIBridge object.
The symptom being if the guest used any devices behind the bridge
the guest crashed (mostly with various interrupt related issues).
Note: This will cause migration from old qemus that used this device to
explicitly fail during migration as opposed to the guest crashing.
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Suggested-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 3d100d0fa9ee4826425ea1c2a120a0f661d8e739 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3d100d0fa9ee4826425ea1c2a120a0f661d8e739 | 2016-04-07 19:57:33+03:00 |
qga: fix fd leak with guest-exec i/o channels
Signed-off-by: Yuriy Pudgorodskiy <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Michael Roth <[email protected]>
* squashed in g_io_channel_shutdown() to match cleanup paths for
input/output
Signed-off-by: Michael Roth <[email protected]>
| 3005c2c2fa2875a3413af97e9db368856d3330fd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3005c2c2fa2875a3413af97e9db368856d3330fd | 2016-04-07 11:40:19-05:00 |
usb/uhci: move pid check
commit "5f77e06 usb: add pid check at the first of uhci_handle_td()"
moved the pid verification to the start of the uhci_handle_td function,
to simplify the error handling (we don't have to free stuff which we
didn't allocate in the first place ...).
Problem is now the check fires too often, it raises error IRQs even for
TDs which we are not going to process because they are not set active.
So, lets move down the check a bit, so it is done only for active TDs,
but still before we are going to allocate stuff to process the requested
transfer.
Reported-by: Joe Clifford <[email protected]>
Tested-by: Joe Clifford <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| f419a626c76bcb26697883af702862e8623056f9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f419a626c76bcb26697883af702862e8623056f9 | 2016-04-25 12:05:05+01:00 |
target-tricore: Fix helper_msub64_q_ssov not reseting OVF bit
When this instruction does not produce an overflow the corresponding
bit has to be reset.
Signed-off-by: Bastian Koppelmann <[email protected]>
Message-Id: <[email protected]>
| 9029710b9ead9c11649ec142d18581412d8f3e68 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9029710b9ead9c11649ec142d18581412d8f3e68 | 2016-03-23 09:22:48+01:00 |
docs: fix invalid node name in qmp event
Cc: Dr. David Alan Gilbert <[email protected]>
Cc: Wen Congyang <[email protected]>
Signed-off-by: Wen Congyang <[email protected]>
Signed-off-by: Changlong Xie <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 58346b82edffff0fb886358aa6d69604b215a770 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/58346b82edffff0fb886358aa6d69604b215a770 | 2016-03-14 16:46:43+01:00 |
migration: fix use-after-free in loadvm_postcopy_handle_run_bh
MigrationState is destroyed before we can come into bottom half.
Signed-off-by: Denis V. Lunev <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
CC: Juan Quintela <[email protected]>
CC: Amit Shah <[email protected]>
CC: Dr. David Alan Gilbert <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
| 864699227911909ef1e33ecf91bf3c900715a9b1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/864699227911909ef1e33ecf91bf3c900715a9b1 | 2016-03-11 12:58:45+05:30 |
io: assert errors before asserting content in I/O test
When checking the results of an I/O operation test, assert that
the error objects are NULL before asserting on the content. This
is found to give more useful indication of the problem when
diagnosing test failures.
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| 294bbbb4252ab5ff42d0e2c09f209c0bd7eb9748 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/294bbbb4252ab5ff42d0e2c09f209c0bd7eb9748 | 2016-03-10 17:10:18+00:00 |
cirrus_vga: fix off-by-one in blit_region_is_unsafe
The "max" value is being compared with >=, but addr + width points to
the first byte that will _not_ be copied. Laszlo suggested using a
"greater than" comparison, instead of subtracting one like it is
already done above for the height, so that max remains always positive.
The mistake is "safe"---it will reject some blits, but will never cause
out-of-bounds writes.
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| d2ba7ecb348d3b996fcd920cf1ca7b72722c1dfd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d2ba7ecb348d3b996fcd920cf1ca7b72722c1dfd | 2016-03-01 07:51:32+01:00 |
Change xen_host_pci_sysfs_path() to return void
And assert the snprintf() error, because user can do nothing in case of
snprintf() fail.
Signed-off-by: Cao jin <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 599d0c45615b7d099d256738a586d0f63bc707e6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/599d0c45615b7d099d256738a586d0f63bc707e6 | 2016-01-21 16:45:12+00:00 |
xen: Switch uses of xc_map_foreign_range into xc_map_foreign_pages
In Xen 4.7 we are refactoring parts libxenctrl into a number of
separate libraries which will provide backward and forward API and ABI
compatiblity.
One such library will be libxenforeignmemory which provides access to
privileged foreign mappings and which will provide an interface
equivalent to xc_map_foreign_{pages,bulk}.
In preparation for this switch all uses of xc_map_foreign_range to
xc_map_foreign_pages. This is trivial because size was always
XC_PAGE_SIZE so the necessary adjustments are trivial:
* Pass &mfn (an array of length 1) instead of mfn. The function
takes a pointer to const, so there is no possibily of mfn changing
due to this change.
* Pass nr_pages=1 instead of size=XC_PAGE_SIZE
There is one wrinkle in xen_console.c:con_initialise() where
con->ring_ref is an int but can in some code paths (when !xendev->dev)
be treated as an mfn. I think this is an existing latent truncation
hazard on platforms where xen_pfn_t is 64-bit and int is 32-bit (e.g.
amd64, both arm* variants). I'm unsure under what circumstances
xendev->dev can be NULL or if anything elsewhere ensures the value
fits into an int. For now I just use a temporary xen_pfn_t to in
effect upcast the pointer from int* to xen_pfn_t*.
In xenfb.c:common_bind we now explicitly launder the mfn into a
xen_pfn_t, so it has the correct type to be passed to
xc_map_foreign_pages and doesn't provoke warnings on 32-bit x86.
Signed-off-by: Ian Campbell <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
| 9ed257d1d1c65dbe5a08f207e5106e98384e1860 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9ed257d1d1c65dbe5a08f207e5106e98384e1860 | 2016-01-26 17:19:32+00:00 |
sdhci: don't raise a command index error for an unexpected response
This deletes a block of code that raised a command index error if a
command returned response data, but the guest did not set the
appropriate bits in the response register to handle such a response. I
cannot find any documentation that suggests the controller should
behave in this way, the error code doesn't make sense (command index
error is defined for the case where the index in a response does not
match that of the issued command), and in at least one case (CMD23
issued by UEFI on Raspberry Pi 2), actual hardware does not do this.
Signed-off-by: Andrew Baumann <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 62d32ec817f985ce1c38868d279d449c80975ff2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/62d32ec817f985ce1c38868d279d449c80975ff2 | 2015-12-22 16:34:26+08:00 |
xenfb: avoid reading twice the same fields from the shared page
Reading twice the same field could give the guest an attack of
opportunity. In the case of event->type, gcc could compile the switch
statement into a jump table, effectively ending up reading the type
field multiple times.
This is part of XSA-155.
Signed-off-by: Stefano Stabellini <[email protected]>
| 7ea11bf376aea4bf8340eb363de9777c7f93e556 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7ea11bf376aea4bf8340eb363de9777c7f93e556 | 2015-12-18 15:10:09+00:00 |
qcow2: Fix potential qemu-img check crash on 32 bit hosts
This crash was caught with qemu-iotests test case 138.
Commit b6d36de already fixed a few 32 bit truncation bugs that could
cause qemu-img check to allocate too little memory and consequently
it would segfault. On 32 bit hosts, there is one more place that needs
to be fixed because size_t was involved in the calculation and is a
32 bit type there.
Cc: [email protected]
Reported-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
Tested-by: Michael S. Tsirkin <[email protected]>
| c2551b47c9b9465962c4000268eda1307f55614a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c2551b47c9b9465962c4000268eda1307f55614a | 2015-12-02 13:22:29+01:00 |
tests/Makefile: Add more dependencies for test-timed-average
'make check' failed to compile the test case for mingw because of
undefined references. Pull in a few more dependencies so that it builds.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 5e41fbffa115608fe6f7159d345d6caa0019e687 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5e41fbffa115608fe6f7159d345d6caa0019e687 | 2015-11-25 14:27:43+01:00 |
acpi: fix buffer overrun on migration
ich calls acpi_gpe_init with length ICH9_PMIO_GPE0_LEN so
ICH9_PMIO_GPE0_LEN/2 bytes are allocated, but then the full
ICH9_PMIO_GPE0_LEN bytes are migrated.
As a quick work-around, allocate twice the memory.
We'll probably want to tweak code to avoid
migrating the extra ICH9_PMIO_GPE0_LEN/2 bytes,
but that is a bit trickier to do without breaking
migration compatibility.
Tested-by: "Dr. David Alan Gilbert" <[email protected]>
Reported-by: "Dr. David Alan Gilbert" <[email protected]>
Cc: [email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
| d9a3b33d2c9f996537b7f1d0246dee2d0120cefb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d9a3b33d2c9f996537b7f1d0246dee2d0120cefb | 2015-11-19 15:26:00+02:00 |
target-i386: Fix mulx for identical target regs
The Intel specification clearly indicates that the low part
of the result is written first and the high part of the result
is written second; thus if ModRM:reg and VEX.vvvv are identical,
the final result should be the high part of the result.
At present, TCG may either produce incorrect results or crash
with --enable-checking.
Reported-by: Toni Nedialkov <[email protected]>
Reported-by: Max Reitz <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 9ecac5dad16722ce2a8c3e88d8eeba5794990031 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9ecac5dad16722ce2a8c3e88d8eeba5794990031 | 2015-11-17 17:05:59-02:00 |
target-alpha: fix uninitialized variable
I am not sure why the compiler does not catch it. There is no
semantic change since gen_excp returns EXIT_NORETURN, but the
old code is wrong.
Reported by Coverity.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 74de807f794ac5201b2b3c38ddadeef84a676a97 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/74de807f794ac5201b2b3c38ddadeef84a676a97 | 2015-11-06 15:42:38+03:00 |
pci-assign: do not test path with access() before opening
Using access() is a time-of-check/time-of-use race condition. It is
okay to use them to provide better error messages, but that is pretty
much it.
In this case we can get the same error from fopen(), so just use
strerror and errno there---which actually improves the error
message most of the time.
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 6268520d7df9b3f183bb4397218c9287441bc04f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6268520d7df9b3f183bb4397218c9287441bc04f | 2015-11-06 15:42:38+03:00 |
qxl: Use g_new() & friends where that makes obvious sense
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
for two reasons. One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.
This commit only touches allocations with size arguments of the form
sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 9de68637dff05a18d0eafcff2737e551b70bc490 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9de68637dff05a18d0eafcff2737e551b70bc490 | 2015-11-06 15:42:38+03:00 |
postcopy: Check order of received target pages
Ensure that target pages received within a host page are in order.
This shouldn't trigger, but in the cases where the sender goes
wrong and sends stuff out of order it produces a corruption that's
really nasty to debug.
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| c53b7ddc61198c4af8290d6310592e48e3507c47 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c53b7ddc61198c4af8290d6310592e48e3507c47 | 2015-11-10 15:00:27+01:00 |
target-i386: Use 1UL for bit shift
Fix undefined behavior detected by clang runtime check:
qemu/target-i386/cpu.c:1494:15: runtime error:
left shift of 1 by 31 places cannot be represented in type 'int'
While doing that, add extra parenthesis for clarity.
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 72370dc1149d7c90d2c2218e0d0658bee23a5bf7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/72370dc1149d7c90d2c2218e0d0658bee23a5bf7 | 2015-10-23 13:07:27-02:00 |
configure: avoid polluting global CFLAGS with tasn1 flags
The previous commit
commit 9a2fd4347c40321f5cbb4ab4220e759fcbf87d03
Author: Daniel P. Berrange <[email protected]>
Date: Mon Apr 13 14:01:39 2015 +0100
crypto: add sanity checking of TLS x509 credentials
defined new variables $TEST_LIBS and $TEST_CFLAGS and
used them in tests/Makefile to augment $LIBS and $CFLAGS.
Unfortunately this overlooks the fact that tests/Makefile
is not executed via recursive-make, it is just pulled into
the top level Makefile via an include statement. So rather
than just augmenting the compiler/linker flags for tests
it polluted the global flags.
This is thought to be behind a reported failure when
building the pixman module as a sub-module, since global
$CFLAGS are passed down to configure in pixman.
This change removes the $TEST_LIBS and $TEST_CFLAGS
replacing them with $TASN1_LIBS and $TASN1_CFLAGS,
setting only against specific objects/executables
that need them.
Signed-off-by: Daniel P. Berrange <[email protected]>
| 90246037760a2a1d64da67782200b690de24cc49 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/90246037760a2a1d64da67782200b690de24cc49 | 2015-10-22 19:03:08+01:00 |
qapi: Track location that created an implicit type
A future patch will move some error checking from the parser
to the various QAPISchema*.check() methods, which run only
after parsing completes. It will thus be possible to create
a python instance representing an implicit QAPI type that
parses fine but will fail validation during check(). Since
all errors have to have an associated 'info' location, we
need a location to be associated with those implicit types.
The intuitive info to use is the location of the enclosing
entity that caused the creation of the implicit type.
Note that we do not anticipate builtin types being used in
an error message (as they are not part of the user's QAPI
input, the user can't cause a semantic error in their
behavior), so we exempt those types from requiring info, by
setting a flag to track the completion of _def_predefineds(),
and tracking that flag in _def_entity().
No change to the generated code.
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
[Missing QAPISchemaArrayType.is_implicit() supplied]
Signed-off-by: Markus Armbruster <[email protected]>
| 99df5289d8c7ebf373c3570d8fba3f3a73360281 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/99df5289d8c7ebf373c3570d8fba3f3a73360281 | 2015-10-15 08:39:08+02:00 |
pc: check for underflow in load_linux
If (setup_size+1)*512 is small enough, kernel_size -= setup_size can allocate
a huge amount of memory. Avoid that.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| ec5fd402645fd4f03d89dcd5840b0e8542549e82 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ec5fd402645fd4f03d89dcd5840b0e8542549e82 | 2015-10-08 19:46:01+03:00 |
migration: Use g_new() & friends where that makes obvious sense
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer,
for two reasons. One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.
This commit only touches allocations with size arguments of the form
sizeof(T). Same Coccinelle semantic patch as in commit b45c03f.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: zhanghailiang <[email protected]>
Reviewed-by: Amit Shah <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
| 97f3ad35517e0d02c0149637d1bb10713c52b057 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/97f3ad35517e0d02c0149637d1bb10713c52b057 | 2015-09-29 11:36:35+05:30 |
ui/cocoa.m: prevent stuck key situation
When the user puts QEMU in the background while holding
down a key, QEMU will not receive the keyup event when
the user lets go of the key. When the user goes back to
QEMU, QEMU will think the key is still down causing
stuck key symptoms. This patch fixes this problem by
releasing all down keys when QEMU goes into the
background.
Signed-off-by: John Arbuckle <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 3b178b7130ecf4005cd73d0c40e964c9d0d31a48 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3b178b7130ecf4005cd73d0c40e964c9d0d31a48 | 2015-09-25 23:14:00+01:00 |
hw/vfio/platform: irqfd setup sequence update
With current implementation, eventfd VFIO signaling is first set up and
then irqfd is setup, if supported and allowed.
This start sequence causes several issues with IRQ forwarding setup
which, if supported, is transparently attempted on irqfd setup:
IRQ forwarding setup is likely to fail if the IRQ is detected as under
injection into the guest (active at irqchip level or VFIO masked).
This currently always happens because the current sequence explicitly
VFIO-masks the IRQ before setting irqfd.
Even if that masking were removed, we couldn't prevent the case where
the IRQ is under injection into the guest.
So the simpler solution is to remove this 2-step startup and directly
attempt irqfd setup. This is what this patch does.
Also in case the eventfd setup fails, there is no reason to go farther:
let's abort.
Signed-off-by: Eric Auger <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
| 58892b447f0ffcd0967bc6f1bcb40df288ebeebc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/58892b447f0ffcd0967bc6f1bcb40df288ebeebc | 2015-10-05 12:30:12-06:00 |
spapr_rtas: Prevent QEMU crash during hotplug without a prior device_add
If drmgr is used in the guest to hotplug a device before a device_add
has been issued via the QEMU monitor, QEMU segfaults in configure_connector
call. This occurs due to accessing of NULL FDT which otherwise would have
been created and associated with the DRC during device_add command.
Check for NULL FDT and return failure from configure_connector call.
As per PAPR+, an error value of -9003 seems appropriate for this failure.
Signed-off-by: Bharata B Rao <[email protected]>
Cc: Michael Roth <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| e6fc9568c865f2f81499475a4e322cd563fdfd90 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e6fc9568c865f2f81499475a4e322cd563fdfd90 | 2015-09-23 10:51:09+10:00 |
net: smc91c111: guard flush_queued_packets() on can_rx()
Check that the core can once again receive packets before asking the
net layer to do a flush. This will make it more convenient to flush
packets when adding new conditions to can_receive.
Add missing if braces while moving the can_receive() core code.
Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Tested-by: Richard Purdie <[email protected]>
Message-id: 92e15e12a6964274f4bc0eb71b61a7d94326f6c6.1441873621.git.crosthwaite.peter@gmail.com
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 8d06b149271cbd5b19bed5bde8da5ecef40ecbc6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8d06b149271cbd5b19bed5bde8da5ecef40ecbc6 | 2015-09-17 12:36:03+01:00 |
qapi: Document that input visitor semantics are prone to leaks
Most functions that can return a pointer or set an Error ** value
are decent enough to guarantee a NULL return when reporting an error.
Not so with our generated qapi visitor functions. If the caller
is not careful to clean up partially-allocated objects on error,
then the caller suffers a memory leak.
Properly fixing it is probably complex enough to save for a later
day, so merely document it for now.
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| 2f52e20597ebd55ede668b2b7d162a84f419b03e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2f52e20597ebd55ede668b2b7d162a84f419b03e | 2015-09-04 15:47:14+02:00 |
qga: fail early for invalid time
It's possible to set system time with dates after 2070, however, it's
not possible to set the RTC. It has limitation to up to year
2070 (1970+100). In order to keep both clock in sync and before the
kernel complains on invalid values, bail out early.
Signed-off-by: Marc-André Lureau <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
| 00d2f3707a63881a0cec8d00cbd467f9b2d8af41 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/00d2f3707a63881a0cec8d00cbd467f9b2d8af41 | 2015-07-07 20:14:35-05:00 |
pseries: Update SLOF firmware image to qemu-slof-20150429
The changelog is:
> version: update to 20150429
> pci: Use QEMU created PCI device nodes
> usb: support 64-bit pci bars
> pci: Support 64-bit address translation
> pci: program correct bridge limit registers during probe
> scsi: handle report-luns failure
> Fix "key?" Forth word when using USB keyboards
> Remove bulk.fs package
> Include make.rules in the library Makefiles
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 780184aae65d72378737e9cdb8fb61b0121e1e21 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/780184aae65d72378737e9cdb8fb61b0121e1e21 | 2015-07-07 17:44:49+02:00 |
qdev: fix OVERFLOW_BEFORE_WIDEN
Potentially overflowing expression "1 << prop->bitnr" with
type "int" (32 bits, signed) is evaluated using 32-bit arithmetic,
and then used in a context that expects an expression of type
"uint64_t" (64 bits, unsigned).
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 1fa795a853255fcc93e5d3e2a92d161a2ed96eb8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1fa795a853255fcc93e5d3e2a92d161a2ed96eb8 | 2015-06-23 08:14:13+02:00 |
xen_backend: Remove unused error handling of qemu_set_fd_handler
The function cannot fail, so the check is superfluous.
Signed-off-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 6b5166f8a82888638bb9aba9dc49aa7fa25f292f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6b5166f8a82888638bb9aba9dc49aa7fa25f292f | 2015-06-12 13:26:21+01:00 |
macio: switch pmac_dma_write() over to new offset/len implementation
In particular, this fixes a bug whereby chains of overlapping head/tail chains
would incorrectly write over each other's remainder cache. This is the access
pattern used by OS X/Darwin and fixes an issue with a corrupt Darwin
installation in my local tests.
While we are here, rename the DBDMA_io struct property remainder to
head_remainder for clarification.
Signed-off-by: Mark Cave-Ayland <[email protected]>
Reviewed-by: John Snow <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
| ac58fe7b2c67a9be142beacd4c6ee51f3264d90f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ac58fe7b2c67a9be142beacd4c6ee51f3264d90f | 2015-06-04 20:25:39-04:00 |
vhost-user: Improve -netdev/netdev_add/-net/... error reporting
When -netdev vhost-user fails, it first reports a specific error, then
one or more generic ones, like this:
$ qemu-system-x86_64 -netdev vhost-user,id=foo,chardev=xxx
qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: chardev "xxx" not found
qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: No suitable chardev found
qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: Device 'vhost-user' could not be initialized
With the command line, the messages go to stderr. In HMP, they go to
the monitor. In QMP, the last one becomes the error reply, and the
others go to stderr.
Convert net_init_vhost_user() and its helpers to Error. This
suppresses the unwanted unspecific error messages, and makes the
specific error the QMP error reply.
Cc: Stefan Hajnoczi <[email protected]>
Cc: Jason Wang <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 8190483196148f765c65785876f7b893d64b6cdd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8190483196148f765c65785876f7b893d64b6cdd | 2015-06-09 07:40:24+02:00 |
qmp: fill in the image field in BlockDeviceInfo
The image field in BlockDeviceInfo is supposed to contain an ImageInfo
object. However that is being filled in by bdrv_query_info(), not by
bdrv_block_device_info(), which is where BlockDeviceInfo is actually
created.
Anyone calling bdrv_block_device_info() directly will get a null image
field. As a consequence of this, the HMP command 'info block -n -v'
crashes QEMU.
This patch moves the code that fills in that field from
bdrv_query_info() to bdrv_block_device_info().
Signed-off-by: Alberto Garcia <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| d5a8ee60a0fbc20a2c2d02f3bda1bb1bd365f1ee | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d5a8ee60a0fbc20a2c2d02f3bda1bb1bd365f1ee | 2015-04-28 15:36:09+02:00 |
hw/acpi/aml-build: Make aml_buffer() definition consistent with the spec
According to ACPI spec, DefBuffer can take two parameters: BufferSize
and ByteList. Make it consistent with the spec. Uninitialized buffer
could be requested by passing ByteList as NULL to reserve space.
Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Shannon Zhao <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| ed8b5847e46c24d6e9c286892a00a34bee9b0835 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ed8b5847e46c24d6e9c286892a00a34bee9b0835 | 2015-05-29 11:28:57+01:00 |
vmdk: Fix overflow if l1_size is 0x20000000
Richard Jones caught this bug with afl fuzzer.
In fact, that's the only possible value to overflow (extent->l1_size =
0x20000000) l1_size:
l1_size = extent->l1_size * sizeof(long) => 0x80000000;
g_try_malloc returns NULL because l1_size is interpreted as negative
during type casting from 'int' to 'gsize', which yields a enormous
value. Hence, by coincidence, we get a "not too bad" behavior:
qemu-img: Could not open '/tmp/afl6.img': Could not open
'/tmp/afl6.img': Cannot allocate memory
Values larger than 0x20000000 will be refused by the validation in
vmdk_add_extent.
Values smaller than 0x20000000 will not overflow l1_size.
Cc: [email protected]
Reported-by: Richard W.M. Jones <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Tested-by: Richard W.M. Jones <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 13c4941cdd8685d28c7e3a09e393a5579b58db46 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/13c4941cdd8685d28c7e3a09e393a5579b58db46 | 2015-05-22 17:08:01+02:00 |
Revert "target-alpha: Add vector implementation for CMPBGE"
This reverts commit 32ad48abd74a997220b841e4e913edeb267aa362.
Unfortunately the SSE2 code here fails to compile on some versions
of gcc:
target-alpha/int_helper.c:77:24: error: invalid operands to binary >=
(have '__vector(16) unsigned char' and '__vector(16) unsigned char')
Signed-off-by: Peter Maydell <[email protected]>
| f5790c3bc81702c98c7ddadedb274758cff8cbe7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f5790c3bc81702c98c7ddadedb274758cff8cbe7 | 2015-05-22 12:30:13+01:00 |
sheepdog: fix resource leak with sd_snapshot_create
Signed-off-by: zhanghailiang <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 973a8529c54f9e4410a0e4a18ca1dcb2b085ca7e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/973a8529c54f9e4410a0e4a18ca1dcb2b085ca7e | 2015-05-08 14:11:10+03:00 |
qtest/ahci: Add migration test
Notes:
* The migration is performed on QOSState objects.
* The migration is performed in such a way that it does not assume
consistency between the allocators attached to each. That is to say,
you can use each QOSState object completely independently and then at
an arbitrary point decide to migrate, and the destination object will
now be consistent with the memory within the source guest. The source
object that was migrated from will have a completely blank allocator.
ahci-test.c:
- verify_state is added
- ahci_migrate is added as a frontend to migrate
- test_migrate_sanity test case is added.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Message-id: [email protected]
| 278128ab06c36341edb2c8b0bfcfd92760f4db52 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/278128ab06c36341edb2c8b0bfcfd92760f4db52 | 2015-05-22 15:58:22-04:00 |
m25p80: fix s->blk usage before assignment
Delay the call to blk_blockalign() until s->blk has been assigned.
This never caused a crash because blk_blockalign(NULL, size) defaults to
4096 alignment but it's technically incorrect.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Kevin Wolf <[email protected]>
| c485cf9c9277ca9b3d5227c99a13c374e812f42b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c485cf9c9277ca9b3d5227c99a13c374e812f42b | 2015-04-28 15:36:09+02:00 |
qapi: Add tests of redefined expressions
Demonstrate that the qapi generator doesn't deal very well with
redefined expressions. At the parse level, they are silently
accepted; and while the testsuite just stops at parsing, I've
further tested that many of them cause generator crashes or
invalid C code if they were appended to qapi-schema-test.json.
A later patch will tighten things up and adjust the testsuite
to match.
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| cfdd5bcad515a8371af59dba9625e31a6f6f733e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cfdd5bcad515a8371af59dba9625e31a6f6f733e | 2015-05-05 18:39:01+02:00 |
MAINTAINERS: make image fuzzer Stefan Hajnoczi's responsibility
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| abfe4e9408a9e82bec9e9834eabc65f53907f281 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/abfe4e9408a9e82bec9e9834eabc65f53907f281 | 2015-04-30 15:11:34+02:00 |
target-mips: fix memory leak
Coveristy reports that variable prom_buf/params_buf going
out of scope leaks the storage it points to.
Cc: Aurelien Jarno <[email protected]>
Cc: Leon Alrae <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Leon Alrae <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 3ad9fd5a257794d516db515c217c78a5806112fe | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3ad9fd5a257794d516db515c217c78a5806112fe | 2015-04-30 16:06:17+03:00 |
vfio-pci: Further fix BAR size overflow
In an analysis by Laszlo, the resulting type of our calculation for
the end of the MSI-X table, and thus the start of memory after the
table, is uint32_t. We're therefore not correctly preventing the
corner case overflow that we intended to fix here where a BAR >=4G
could place the MSI-X table to end exactly at the 4G boundary. The
MSI-X table offset is defined by the hardware spec to 32bits, so we
simply use a cast rather than changing data structure types. This
scenario is purely theoretically, typically the MSI-X table is located
at the front of the BAR.
Reported-by: Laszlo Ersek <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
| 07ceaf98800519ef9c5dc893af00f1fe1f9144e4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/07ceaf98800519ef9c5dc893af00f1fe1f9144e4 | 2015-04-28 11:14:02-06:00 |
qga/commands-posix: Fix resource leak
It's detected by coverity. Close the dirfd.
Signed-off-by: Shannon Zhao <[email protected]>
Signed-off-by: Shannon Zhao <[email protected]>
Reviewed-by: Stefan Weil <[email protected]>
Reviewed-by: zhanghailiang <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 8ce1ee4618f4a557959f5a5731f6726b30416df5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8ce1ee4618f4a557959f5a5731f6726b30416df5 | 2015-03-19 11:39:18+03:00 |
virtio-scsi-dataplane: fix memory leak in virtio_scsi_vring_init
if k->set_host_notifier failed, VirtIOSCSIVring *r will leak
Signed-off-by: Bo Su <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Gonglei <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 196d4fc56d824ccbbb58714e9ad0793053ef8260 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/196d4fc56d824ccbbb58714e9ad0793053ef8260 | 2015-03-18 12:08:52+01:00 |
nbd: Fix potential signed overflow issues
Signed-off-by: Max Reitz <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| ac97393dc7c4761af6104fb8fca5f600899f687b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ac97393dc7c4761af6104fb8fca5f600899f687b | 2015-03-18 12:06:56+01:00 |
sysbus: fix memory leak
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 84b5d556dc29c06402783e98ee0eaa3369eb48e1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/84b5d556dc29c06402783e98ee0eaa3369eb48e1 | 2015-03-10 08:15:34+03:00 |
block/raw-posix: fix launching with failed disks
Since commit c25f53b06eba1575d5d0e92a0132455c97825b83 ("raw: Probe
required direct I/O alignment") QEMU has failed to launch if image files
produce I/O errors.
Previously, QEMU would launch successfully and the guest would see the
errors when attempting I/O.
This is a regression and may prevent multipath I/O inside the guest,
where QEMU must launch and let the guest figure out by itself which
disks are online.
Tweak the alignment probing code in raw-posix.c to explicitly look for
EINVAL on Linux instead of bailing. The kernel refuses misaligned
requests with this error code and other error codes can be ignored.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 22d182e82b4ba2fb78b2cc22bcec4e6a440b0ad6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/22d182e82b4ba2fb78b2cc22bcec4e6a440b0ad6 | 2015-03-10 14:02:24+01:00 |
Makefile: fix up parallel building under MSYS+MinGW
This patch enables parallel building of QEMU in MSYS+MinGW environment.
Currently an attempt to build QEMU in parallel fails on generation of
version.lo (and version.o too).
The cause of the failure is that when listing prerequisites "Makefile"
references "config-host.h" by absolute path in some rules and by relative
path in others. Make cannot figure out that these references points to the
same file which leads to the race: the generation of "version.*" which
requires "$(BUILD_DIR)/config-host.h" is launched in parallel with the
generation of "config-host.h" needed by other "Makefile" targets.
This patch removes "$(BUILD_DIR)/" prefix from corresponding prerequisite
of "version.*". There is no other prerequisites "$(BUILD_DIR)/config-host.h"
found.
Also note that not every version of MSYS is able to build QEMU in parallel,
see: "http://sourceforge.net/p/mingw/bugs/1950/". The suggested version is
1.0.17.
Signed-off-by: Vasily Efimov <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 23cab7b7a9cb365b15eee953a0dd6cdb9198ae6c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/23cab7b7a9cb365b15eee953a0dd6cdb9198ae6c | 2015-02-27 18:26:31+01:00 |
sPAPR: Implement EEH RTAS calls
The emulation for EEH RTAS requests from guest isn't covered
by QEMU yet and the patch implements them.
The patch defines constants used by EEH RTAS calls and adds
callbacks sPAPRPHBClass::{eeh_set_option, eeh_get_state, eeh_reset,
eeh_configure}, which are going to be used as follows:
* RTAS calls are received in spapr_pci.c, sanity check is done
there.
* RTAS handlers handle what they can. If there is something it
cannot handle and the corresponding sPAPRPHBClass callback is
defined, it is called.
* Those callbacks are only implemented for VFIO now. They do ioctl()
to the IOMMU container fd to complete the calls. Error codes from
that ioctl() are transferred back to the guest.
[aik: defined RTAS tokens for EEH RTAS calls]
Signed-off-by: Gavin Shan <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| ee954280da8d9ea7afd28b4c288da15fb8b4efca | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ee954280da8d9ea7afd28b4c288da15fb8b4efca | 2015-03-09 15:00:08+01:00 |
usb: Do not prefix error_setg() messages with "Error: "
Because it produces beauties like
(qemu) usb_add mouse
Failed to initialize USB device 'usb-mouse': Error: tried to attach usb device QEMU USB Mouse to a bus with no free ports
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 06f22eb78f3eb557c667f5d0a46099e43a2aeb0d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/06f22eb78f3eb557c667f5d0a46099e43a2aeb0d | 2015-02-18 10:53:10+01:00 |
usb: Improve -usbdevice error reporting a bit
Most LegacyUSBFactory usbdevice_init() methods realize with
qdev_init_nofail(), even though their caller usbdevice_create() can
handle failure. Okay if it really can't fail (I didn't check), but
somewhat brittle.
usb_msd_init() and usb_bt_init() call qdev_init(). The latter
additionally reports an error when qdev_init() fails.
Realization failure produces multiple error reports: a specific one
from qdev_init(), and generic ones from usb_bt_init(),
usb_create_simple(), usbdevice_create() and usb_parse().
Remove realization from the usbdevice_init() methods. Realize in
usbdevice_create(), and produce exactly one error message there. You
still get another one from usb_parse().
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 3bc36a401e0f33e63a4d2c58b646ddf78efb567c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3bc36a401e0f33e63a4d2c58b646ddf78efb567c | 2015-02-18 10:53:10+01:00 |
libqos/ahci: Add ahci_clean_mem
Clean up guest memory being used in ahci_clean_mem, to be
called during ahci_shutdown. With all guest memory leaks removed,
add an option to the allocator to throw an assertion if a leak
occurs.
This test adds some sanity to both the AHCI library and the
allocator.
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 259342d34dbdfb304374f569feec26317edd97c9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/259342d34dbdfb304374f569feec26317edd97c9 | 2015-02-16 15:07:17+00:00 |
vfio: free dynamically-allocated data in instance_finalize
In order to enable out-of-BQL address space lookup, destruction of
devices needs to be split in two phases.
Unrealize is the first phase; once it complete no new accesses will
be started, but there may still be pending memory accesses can still
be completed.
The second part is freeing the device, which only happens once all memory
accesses are complete. At this point the reference count has dropped to
zero, an RCU grace period must have completed (because the RCU-protected
FlatViews hold a reference to the device via memory_region_ref). This is
when instance_finalize is called.
Freeing data belongs in an instance_finalize callback, because the
dynamically allocated memory can still be used after unrealize by the
pending memory accesses.
This starts the process by creating an instance_finalize callback and
freeing most of the dynamically-allocated data in instance_finalize.
Because instance_finalize is also called on error paths or also when
the device is actually not realized, the common code needs some changes
to be ready for this. The error path in vfio_initfn can be simplified too.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
| 77a10d04d033484a913a5ee76eed31a9acc57bae | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/77a10d04d033484a913a5ee76eed31a9acc57bae | 2015-02-10 10:25:44-07:00 |
virtfs-proxy-helper: Fix possible socket leak.
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 88ea8ed74cb6956f43199a098ca4963ae73bba57 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/88ea8ed74cb6956f43199a098ca4963ae73bba57 | 2015-02-10 09:27:20+03:00 |
vhost-scsi: Improve error reporting for invalid vhostfd
We get two error messages: one from monitor_handle_fd_param2(), and
another one from vhost_scsi_realize(). The second one gets suppressed
in QMP context.
That's because monitor_handle_fd_param() calls qerror_report_err().
Calling qerror_report_err() is always inappropriate in realize
methods, because it doesn't return the Error object. It either
reports the error to stderr or the human monitor, or it stores it in
the QMP monitor, where it makes the QMP command fail even when the
realize method ignores the error and succeeds. Fortunately,
vhost_scsi_realize() doesn't do that.
Fix by switching to monitor_handle_fd_param2().
Signed-off-by: Markus Armbruster <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
| 248337e178fbcf1c20132d4f3d1033cb0dde7638 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/248337e178fbcf1c20132d4f3d1033cb0dde7638 | 2015-02-18 10:50:10+01:00 |
usb: Suppress bogus error when automatic usb-hub creation fails
USBDevice's realize method usb_qdev_realize() automatically creates a
usb-hub when only one port is left. Creating devices in realize
methods is questionable, but works.
If usb-hub creation fails, an error is reported to stderr, but the
failure is otherwise ignored. We then create the actual device using
the last port, which may well succeed.
Example:
$ qemu -nodefaults -S -display none -machine usb=on -monitor stdio
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) device_add usb-mouse
[Repeat 36 times]
(qemu) info usb
Device 0.0, Port 1, Speed 12 Mb/s, Product QEMU USB Mouse
Device 0.0, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
Device 0.0, Port 2.1, Speed 12 Mb/s, Product QEMU USB Mouse
[More mice and hubs omitted...]
Device 0.0, Port 2.8.8.8.8.7, Speed 12 Mb/s, Product QEMU USB Mouse
(qemu) device_add usb-mouse
usb hub chain too deep
Failed to initialize USB device 'usb-hub'
(qemu) info usb
[...]
Device 0.0, Port 2.8.8.8.8.7, Speed 12 Mb/s, Product QEMU USB Mouse
Device 0.0, Port 2.8.8.8.8.8, Speed 12 Mb/s, Product QEMU USB Mouse
Despite the "Failed" message, the command actually succeeded.
In QMP, it's worse. When adding the 37th mouse via QMP, the command
fails with
{"error": {"class": "GenericError", "desc": "usb hub chain too deep"}}
Additionally, "Failed to initialize USB device 'usb-hub'" is reported
on stderr. Despite the command failure, the device was created. This
is wrong.
Fix by avoiding qdev_init() for usb-hub creation, so we can ignore
errors cleanly.
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| bd8b92d5c8387c2c94f06665514c05000169fafd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/bd8b92d5c8387c2c94f06665514c05000169fafd | 2015-02-18 10:53:10+01:00 |
device-tree: fix memory leak
Signed-off-by: Sergey Fedorov <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 2bf9febc95e5bcef8edb10ebc967325917b9c958 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2bf9febc95e5bcef8edb10ebc967325917b9c958 | 2015-01-07 16:16:26+01:00 |
target-arm: A64: Fix handling of rotate in logic_imm_decode_wmask
The code in logic_imm_decode_wmask attempts to rotate a mask
value within the bottom 'e' bits of the value with
mask = (mask >> r) | (mask << (e - r));
This has two issues:
* if the element size is 64 then a rotate by zero results
in a shift left by 64, which is undefined behaviour
* if the element size is smaller than 64 then this will
leave junk in the value at bit 'e' and above, which is
not valid input to bitfield_replicate(). As it happens,
the bits at bit 'e' to '2e - r' are exactly the ones
which bitfield_replicate is going to copy in there,
so this isn't a "wrong code generated" bug, but it's
confusing and if we ever put an assert in
bitfield_replicate it would fire on valid guest code.
Fix the former by not doing anything if r is zero, and
the latter by masking with bitmask64(e).
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
| e167adc9d9f5df4f8109aecd4552c407fdce094a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e167adc9d9f5df4f8109aecd4552c407fdce094a | 2015-02-13 05:46:09+00:00 |
spice: fix memory leak
If errors happen for middle items of channel_list,
qmp_query_spice_channels() returns NULL, and the variable
cur_item going out of scope leaks the storage it points to.
The flag is a compatibility thing for older spice-server
versions. Meanwhile our minimum spice version requirement is
new enough that we should never ever see this error, and if we
do something went very seriously wrong. Let's using assert()
instead of returning NULL to avoid a memory leak.
Suggested-by: Paolo Bonzini <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| a41642708a5d1cbe8ad966227bbee1ed5eb421ad | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a41642708a5d1cbe8ad966227bbee1ed5eb421ad | 2014-12-16 14:15:29+01:00 |
hw/pci: fix crash on shpc error flow
If the pci bridge enters in error flow as part
of init process it will only delete the shpc mmio
subregion but not remove it from the properties list,
resulting in segmentation fault when the bridge runs
the exit function.
Example: add a pci bridge without specifing the chassis number:
<qemu-bin> ... -device pci-bridge,id=p1
Result:
(qemu) qemu-system-x86_64: -device pci-bridge,id=p1: Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
qemu-system-x86_64: -device pci-bridge,id=p1: Device
initialization failed.
Segmentation fault (core dumped)
if (child->class->unparent) {
#0 0x00005555558d629b in object_finalize_child_property (obj=0x555556d2e830, name=0x555556d30630 "shpc-mmio[0]", opaque=0x555556a42fc8) at qom/object.c:1078
#1 0x00005555558d4b1f in object_property_del_all (obj=0x555556d2e830) at qom/object.c:367
#2 0x00005555558d4ca1 in object_finalize (data=0x555556d2e830) at qom/object.c:412
#3 0x00005555558d55a1 in object_unref (obj=0x555556d2e830) at qom/object.c:720
#4 0x000055555572c907 in qdev_device_add (opts=0x5555563544f0) at qdev-monitor.c:566
#5 0x0000555555744f16 in device_init_func (opts=0x5555563544f0, opaque=0x0) at vl.c:2213
#6 0x00005555559cf5f0 in qemu_opts_foreach (list=0x555555e0f8e0 <qemu_device_opts>, func=0x555555744efa <device_init_func>, opaque=0x0, abort_on_failure=1) at util/qemu-option.c:1057
#7 0x000055555574a11b in main (argc=16, argv=0x7fffffffdde8, envp=0x7fffffffde70) at vl.c:423
Unparent the shpc mmio region as part of shpc cleanup.
Signed-off-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Amos Kong <[email protected]>
| 109e90e47029f415783cd6e9a0eb9d0f10954c18 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/109e90e47029f415783cd6e9a0eb9d0f10954c18 | 2014-11-24 20:57:10+02:00 |
ppc: fix monitor access to CR
This was off-by-one.
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Tom Musta <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| d29811806067de1516c2f94c0a81885fe2076fc8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d29811806067de1516c2f94c0a81885fe2076fc8 | 2014-11-04 23:26:10+01:00 |
net/socket: fix Uninitialized scalar variable
If is_connected parameter is false, the saddr
variable will no initialize. Coverity report:
uninit_use: Using uninitialized value saddr.sin_port.
We don't need add saddr information to nc->info_str
when is_connected is false.
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Jason Wang <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 8db804ac412010fc96397c2d67ee6417eccd9d34 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8db804ac412010fc96397c2d67ee6417eccd9d34 | 2014-11-21 10:50:54+00:00 |
linux-user: Fix up timer id handling
When creating a timer handle, we give the timer id a special magic offset
of 0xcafe0000. However, we never mask that offset out of the timer id before
we start using it to dereference our timer array. So we always end up aborting
timer operations because the timer id is out of bounds.
This was not an issue before my patch e52a99f756e ("linux-user: Simplify
timerid checks on g_posix_timers range") because before we would blindly mask
anything above the first 16 bits.
This patch simplifies the code around timer id creation by introducing a proper
target_timer_id typedef that is s32, just like Linux has it. It also changes the
magic offset to a value that makes all timer ids be positive.
Reported-by: Tom Musta <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Tom Musta <[email protected]>
Tested-by: Tom Musta <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| aecc88616a64a4e0a1ae0d6986de0054ea9f37d2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/aecc88616a64a4e0a1ae0d6986de0054ea9f37d2 | 2014-11-11 08:13:09+02:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.