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
⌀ |
---|---|---|---|---|---|---|---|
hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all
The qemu_chr_fe_write method will return -1 on EAGAIN if the
chardev backend write would block. Almost no callers of the
qemu_chr_fe_write() method check the return value, instead
blindly assuming data was successfully sent. In most cases
this will lead to silent data loss on interactive consoles,
but in some cases (eg RNG EGD) it'll just cause corruption
of the protocol being spoken.
We unfortunately can't fix the virtio-console code, due to
a bug in the Linux guest drivers, which would cause the
entire Linux kernel to hang if we delay processing of the
incoming data in any way. Fixing this requires first fixing
the guest driver to not hold spinlocks while writing to the
hvc device backend.
Fixes bug: https://bugs.launchpad.net/qemu/+bug/1586756
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 6ab3fc32ea640026726bc5f9f4db622d0954fb8a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6ab3fc32ea640026726bc5f9f4db622d0954fb8a | 2016-09-13 19:09:42+02:00 |
virtio: zero vq->inuse in virtio_reset()
vq->inuse must be zeroed upon device reset like most other virtqueue
fields.
In theory, virtio_reset() just needs assert(vq->inuse == 0) since
devices must clean up in-flight requests during reset (requests cannot
not be leaked!).
In practice, it is difficult to achieve vq->inuse == 0 across reset
because balloon, blk, 9p, etc implement various different strategies for
cleaning up requests. Most devices call g_free(elem) directly without
telling virtio.c that the VirtQueueElement is cleaned up. Therefore
vq->inuse is not decremented during reset.
This patch zeroes vq->inuse and trusts that devices are not leaking
VirtQueueElements across reset.
I will send a follow-up series that refactors request life-cycle across
all devices and converts vq->inuse = 0 into assert(vq->inuse == 0) but
this more invasive approach is not appropriate for stable trees.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Cc: qemu-stable <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Ladi Prosek <[email protected]>
| 4b7f91ed0270a371e1933efa21ba600b6da23ab9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4b7f91ed0270a371e1933efa21ba600b6da23ab9 | 2016-09-09 20:58:34+03:00 |
acpi-build: fix array leak
The free_ranges array is used as a temporary pointer array, the segment
should still be freed, however, it shouldn't free the elements themself.
Signed-off-by: Marc-André Lureau <[email protected]>
Tested-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Marcel Apfelbaum <[email protected]>
| 354fb471bd5faf527f3fa25388b8cffa6bd937d0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/354fb471bd5faf527f3fa25388b8cffa6bd937d0 | 2016-09-08 18:05:21+04:00 |
s390x/css: handle cssid 255 correctly
The cssid 255 is reserved but still valid from an architectural
point of view. However, feeding a bogus schid of 0xffffffff into
the virtio hypercall will lead to a crash:
Stack trace of thread 138363:
#0 0x00000000100d168c css_find_subch (qemu-system-s390x)
#1 0x00000000100d3290 virtio_ccw_hcall_notify
#2 0x00000000100cbf60 s390_virtio_hypercall
#3 0x000000001010ff7a handle_hypercall
#4 0x0000000010079ed4 kvm_cpu_exec (qemu-system-s390x)
#5 0x00000000100609b4 qemu_kvm_cpu_thread_fn
#6 0x000003ff8b887bb4 start_thread (libpthread.so.0)
#7 0x000003ff8b78df0a thread_start (libc.so.6)
This is because the css array was only allocated for 0..254
instead of 0..255.
Let's fix this by bumping MAX_CSSID to 255 and fencing off the
reserved cssid of 255 during css image allocation.
Reported-by: Christian Borntraeger <[email protected]>
Tested-by: Christian Borntraeger <[email protected]>
Cc: [email protected]
Signed-off-by: Cornelia Huck <[email protected]>
| 882b3b97697affb36ca3d174f42f846232008979 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/882b3b97697affb36ca3d174f42f846232008979 | 2016-09-05 15:15:16+02:00 |
net: vmxnet: use g_new for pkt initialisation
When network transport abstraction layer initialises pkt, the maximum
fragmentation count is not checked. This could lead to an integer
overflow causing a NULL pointer dereference. Replace g_malloc() with
g_new() to catch the multiplication overflow.
Reported-by: Li Qiang <[email protected]>
Signed-off-by: Prasad J Pandit <[email protected]>
Acked-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| 47882fa4975bf0b58dd74474329fdd7154e8f04c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/47882fa4975bf0b58dd74474329fdd7154e8f04c | 2016-08-18 12:05:18+08:00 |
9pfs: forbid illegal path names
Empty path components don't make sense for most commands and may cause
undefined behavior, depending on the backend.
Also, the walk request described in the 9P spec [1] clearly shows that
the client is supposed to send individual path components: the official
linux client never sends portions of path containing the / character for
example.
Moreover, the 9P spec [2] also states that a system can decide to restrict
the set of supported characters used in path components, with an explicit
mention "to remove slashes from name components".
This patch introduces a new name_is_illegal() helper that checks the
names sent by the client are not empty and don't contain unwanted chars.
Since 9pfs is only supported on linux hosts, only the / character is
checked at the moment. When support for other hosts (AKA. win32) is added,
other chars may need to be blacklisted as well.
If a client sends an illegal path component, the request will fail and
ENOENT is returned to the client.
[1] http://man.cat-v.org/plan_9/5/walk
[2] http://man.cat-v.org/plan_9/5/intro
Suggested-by: Peter Maydell <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| fff39a7ad09da07ef490de05c92c91f22f8002f2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fff39a7ad09da07ef490de05c92c91f22f8002f2 | 2016-08-30 19:21:39+01:00 |
linux-user: Handle brk() attempts with very large sizes
In do_brk(), we were inadvertently truncating the size
of a requested brk() from the guest by putting it into an
'int' variable. This meant that we would incorrectly report
success back to the guest rather than a failed allocation,
typically resulting in the guest then segfaulting. Use
abi_ulong instead.
This fixes a crash in the '31370.cc' test in the gcc libstdc++ test
suite (the test case starts by trying to allocate a very large
size and reduces the size until the allocation succeeds).
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| ef4330c23bb47b97a859dbdbae1c784fd2ca402f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ef4330c23bb47b97a859dbdbae1c784fd2ca402f | 2016-08-04 16:38:17+03:00 |
trace: Conditionally trace events based on their per-vCPU state
Events with the 'vcpu' property are conditionally emitted according to
their per-vCPU state. Other events are emitted normally based on their
global tracing state.
Note that the per-vCPU condition check applies to all tracing backends.
Signed-off-by: Lluís Vilanova <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 40b9cd25f789e02145fda5e1f3fde7e7dd9e3b61 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/40b9cd25f789e02145fda5e1f3fde7e7dd9e3b61 | 2016-07-18 18:23:12+01:00 |
qdist: return "(empty)" instead of NULL when printing an empty dist
Printf'ing a NULL string is undefined behaviour. Avoid it.
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Emilio G. Cota <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 11b7b07f8a15879134a54e73fade98d5e11e04f8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/11b7b07f8a15879134a54e73fade98d5e11e04f8 | 2016-08-03 18:44:56+02:00 |
ui: avoid crash if vnc client disconnects with writes pending
The vnc_client_read() function is called from the vnc_client_io()
event handler callback when there is incoming data to process.
If it detects that the client has disconnected, then it will
trigger cleanup and free'ing of the VncState client struct at
a safe time.
Unfortunately, the vnc_client_io() event handler will also call
vnc_client_write() to handle any outgoing data writes. So if
vnc_client_io() was invoked with both G_IO_IN and G_IO_OUT
events set, and the client disconnects, we may try to write to
a client which has just been freed.
https://bugs.launchpad.net/qemu/+bug/1594861
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| ea697449884d83b83fefbc9cd87bdde0c94b49d6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ea697449884d83b83fefbc9cd87bdde0c94b49d6 | 2016-07-12 08:34:13+02:00 |
ppc/hash64: Add proper real mode translation support
This adds proper support for translating real mode addresses based
on the combination of HV and LPCR bits. This handles HRMOR offset
for hypervisor real mode, and both RMA and VRMA modes for guest
real mode. PAPR mode adjusts the offsets appropriately to match the
RMA used in TCG, but we need to limit to the max supported by the
implementation (16G).
This includes some fixes by Cédric Le Goater <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
[dwg: Adjusted for differences in my version of the prereq patches]
Signed-off-by: David Gibson <[email protected]>
| 912acdf487a3c8c0083b904fdb917fe6d79f87a7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/912acdf487a3c8c0083b904fdb917fe6d79f87a7 | 2016-07-05 14:31:08+10:00 |
ppc: Print HSRR0/HSRR1 in "info registers"
They are generally useful when debugging HV mode stuff
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]>
| f2b70fded9b32c4b9e45e5b7f11bfc2ef961ede7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f2b70fded9b32c4b9e45e5b7f11bfc2ef961ede7 | 2016-07-01 09:57:01+10:00 |
char: clean up remaining chardevs when leaving
This helps to remove various chardev resources leaks when leaving qemu.
Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| c1111a24a3358ecd2f17be7c8b117cfe8bc5e5f8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c1111a24a3358ecd2f17be7c8b117cfe8bc5e5f8 | 2016-06-29 16:49:41+02:00 |
qapi: Add new clone visitor
We have a couple places in the code base that want to deep-clone
one QAPI object into another, and they were resorting to serializing
the struct out to QObject then reparsing it. A much more efficient
version can be done by adding a new clone visitor.
Since cloning is still relatively uncommon, expose the use of the
new visitor via a QAPI_CLONE() macro that takes care of type-punning
the underlying function pointer, rather than generating lots of
unused functions for types that won't be cloned. And yes, we're
relying on the compiler treating all pointers equally, even though
a strict C program cannot portably do so - but we're not the first
one in the qemu code base to expect it to work (hello, glib!).
The choice of adding a fourth visitor type deserves some explanation.
On the surface, the clone visitor is mostly an input visitor (it
takes arbitrary input - in this case, another QAPI object - and
creates a new QAPI object during the course of the visit). But
ever since commit da72ab0 consolidated enum visits based on the
visitor type, using VISITOR_INPUT would cause us to run
visit_type_str(), even though for cloning there is nothing to do
(we just copy the enum value across, without regards to its mapping
to strings). Also, since our input happens to be a QAPI object,
we can also satisfy the internal checks for VISITOR_OUTPUT. So in
the end, I settled with a new VISITOR_CLONE, and chose its value
such that many internal checks can use 'v->type & mask', sticking
to 'v->type == value' where the difference matters.
Note that we can only clone objects (including alternates) and lists,
not built-ins or enums. The visitor core hides integer width from
the actual visitor (since commit 04e070d), and as long as that's the
case, we can't clone top-level integers. Then again, those can
always be cloned by direct copy, since they are not objects with
deep pointers, so it's no real loss. And restricting cloning to
just objects and lists is cleaner than restricting it to non-integers.
As such, I documented that the clone visitor is for direct use only
by code internal to QAPI, and should not be used on incomplete objects
(other than a hack to work around the fact that we allow NULL in place
of "" in visit_type_str() in other output visitors). Note that as
written, the clone visitor will never fail on a complete object.
Scalars (including enums) not at the root of the clone copy just fine
with no additional effort while visiting the scalar, by virtue of a
g_memdup() each time we push another struct onto the stack. Cloning
a string requires deduplication of a pointer, which means it can also
provide the guarantee of an input visitor of never producing NULL
even when still accepting NULL in place of "" the way the QMP output
visitor does.
Cloning an 'any' type could be possible by incrementing the QObject
refcnt, but it's not obvious whether that is better than implementing
a QObject deep clone. So for now, we document it as unsupported,
and intentionally omit the .type_any() callback to let a developer
know their usage needs implementation.
Add testsuite coverage for several different clone situations, to
ensure that the code is working. I also tested that valgrind was
happy with the test.
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| a15fcc3cf69ee3d408f60d6cc316488d2b0249b4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a15fcc3cf69ee3d408f60d6cc316488d2b0249b4 | 2016-07-06 10:52:04+02:00 |
target-ppc: Bug in BookE wait instruction
Fixed bug in code generation for the PowerPC "wait" instruction. It
doesn't make sense to store a non-initialized register.
Signed-off-by: Jakub Horak <[email protected]>
[dwg: revised commit message]
Signed-off-by: David Gibson <[email protected]>
| 35b5066ea7c2c3051fbc5a24b3d463b9800063e2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/35b5066ea7c2c3051fbc5a24b3d463b9800063e2 | 2016-06-17 15:59:16+10:00 |
Make avx2 configure test work with -O2
When configured with --extra-cflags=-O2 gcc optimised out the test
and the readelf failed the check leaving avx2 disabled.
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| fc6e1de9d885377e1e68e50e25ed5425540b9b81 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fc6e1de9d885377e1e68e50e25ed5425540b9b81 | 2016-06-16 18:39:04+02:00 |
linux-user: In fork_end(), remove correct CPUs from CPU list
In fork_end(), we must fix the list of current CPUs to match the fact
that the child of the fork has only one thread. Unfortunately we were
removing the wrong CPUs from the list, which meant that if the child
subsequently did an exclusive operation it would deadlock in
start_exclusive() waiting for a sibling CPU which didn't exist.
In particular this could cause hangs doing git submodule init
operations, as reported in https://bugs.launchpad.net/qemu/+bug/955379
comment #47.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| 014628a705bdaf31c09915c29e61f4088956564d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/014628a705bdaf31c09915c29e61f4088956564d | 2016-06-08 12:06:57+03:00 |
block: Fix bdrv_all_delete_snapshot() error handling
The code to exit the loop after bdrv_snapshot_delete_by_id_or_name()
returned failure was duplicated. The first copy of it was too early so
that the AioContext lock would not be freed. This patch removes it so
that only the second, correct copy remains.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 2a9170bcd4980cdd75791f3aa0f762c5e53334bb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2a9170bcd4980cdd75791f3aa0f762c5e53334bb | 2016-06-08 10:21:09+02:00 |
linux-user: Fix race between multiple signals
If multiple host signals are received in quick succession they would
be queued in TaskState then delivered to the guest in spite of
signals being supposed to be blocked by the guest signal handler's
sa_mask. Fix this by decoupling the guest signal mask from the
host signal mask, so we can have protected sections where all
host signals are blocked. In particular we block signals from
when host_signal_handler() queues a signal from the guest until
process_pending_signals() has unqueued it. We also block signals
while we are manipulating the guest signal mask in emulation of
sigprocmask and similar syscalls.
Blocking host signals also ensures the correct behaviour with respect
to multiple threads and the overrun count of timer related signals.
Alas blocking and queuing in qemu is still needed because of virtual
processor exceptions, SIGSEGV and SIGBUS.
Blocking signals inside process_pending_signals() protects against
concurrency problems that would otherwise happen if host_signal_handler()
ran and accessed the signal data structures while process_pending_signals()
was manipulating them.
Since we now track the guest signal mask separately from that
of the host, the sigsuspend system calls must track the signal
mask passed to them, because when we process signals as we leave
the sigsuspend the guest signal mask in force is that passed to
sigsuspend.
Signed-off-by: Timothy Edward Baldwin <[email protected]>
Message-id: 1441497448-32489-19-git-send-email-T.E.Baldwin99@members.leeds.ac.uk
[PMM: make signal_pending a simple flag rather than a word with two flag bits;
ensure we don't call block_signals() twice in sigreturn codepaths;
document and assert() the guarantee that using do_sigprocmask() to
get the current mask never fails; use the qemu atomics.h functions
rather than raw volatile variable access; add extra commentary and
documentation; block SIGSEGV/SIGBUS in block_signals() and in
process_pending_signals() because they can't occur synchronously here;
check the right do_sigprocmask() call for errors in ssetmask syscall;
expand commit message; fixed sigsuspend() hanging]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| 3d3efba020da1de57a715e2087cf761ed0ad0904 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3d3efba020da1de57a715e2087cf761ed0ad0904 | 2016-06-07 16:39:07+03:00 |
vga: add sr_vbe register set
Commit "fd3c136 vga: make sure vga register setup for vbe stays intact
(CVE-2016-3712)." causes a regression. The win7 installer is unhappy
because it can't freely modify vga registers any more while in vbe mode.
This patch introduces a new sr_vbe register set. The vbe_update_vgaregs
will fill sr_vbe[] instead of sr[]. Normal vga register reads and
writes go to sr[]. Any sr register read access happens through a new
sr() helper function which will read from sr_vbe[] with vbe active and
from sr[] otherwise.
This way we can allow guests update sr[] registers as they want, without
allowing them disrupt vbe video modes that way.
Cc: [email protected]
Reported-by: Thomas Lamprecht <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
| 94ef4f337fb614f18b765a8e0e878a4c23cdedcd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/94ef4f337fb614f18b765a8e0e878a4c23cdedcd | 2016-05-23 14:28:25+02:00 |
migration: define 'tls-creds' and 'tls-hostname' migration parameters
Define two new migration parameters to be used with TLS encryption.
The 'tls-creds' parameter provides the ID of an instance of the
'tls-creds' object type, or rather a subclass such as 'tls-creds-x509'.
Providing these credentials will enable use of TLS on the migration
data stream.
If using x509 certificates, together with a migration URI that does
not include a hostname, the 'tls-hostname' parameter provides the
hostname to use when verifying the server's x509 certificate. This
allows TLS to be used in combination with fd: and exec: protocols
where a TCP connection is established by a 3rd party outside of
QEMU.
NB, this requires changing the migrate_set_parameter method in the
HMP to accept a 's' (string) value instead of 'i' (integer). This
is backwards compatible, because the parsing of strings allows the
quotes to be optional, thus any integer is also a valid string.
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
| 69ef1f36b0f882fc5ba9491fb272fa5f83ac1d3d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/69ef1f36b0f882fc5ba9491fb272fa5f83ac1d3d | 2016-05-26 11:32:10+05:30 |
ppc: Add dummy SPR_IC for POWER8
It's supposed to be an instruction counter. For now make us not
crash when accessing it.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 21a558bed91f363ea8fc3f9a95b222a0949c70e7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/21a558bed91f363ea8fc3f9a95b222a0949c70e7 | 2016-03-24 11:17:34+11:00 |
ivshmem: Fix harmless misuse of Error
We reuse errp after passing it host_memory_backend_get_memory(). If
both host_memory_backend_get_memory() and the reuse set an error, the
reuse will fail the assertion in error_setv(). Fortunately,
host_memory_backend_get_memory() can't fail.
Pass it &error_abort to make our assumption explicit, and to get the
assertion failure in the right place should it become invalid.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
| 9cf70c52253ccadc137d40eb0de2c0f25a127334 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9cf70c52253ccadc137d40eb0de2c0f25a127334 | 2016-03-21 21:29:00+01:00 |
spapr_pci: (Mostly) remove spapr-pci-vfio-host-bridge
Now that the regular spapr-pci-host-bridge can handle EEH, there are only
two things that spapr-pci-vfio-host-bridge does differently:
1. automatically sizes its DMA window to match the host IOMMU
2. checks if the attached VFIO container is backed by the
VFIO_SPAPR_TCE_IOMMU type on the host
(1) is not particularly useful, since the default window used by the
regular host bridge will work with the host IOMMU configuration on all
current systems anyway.
Plus, automatically changing guest visible configuration (such as the DMA
window) based on host settings is generally a bad idea. It's not
definitively broken, since spapr-pci-vfio-host-bridge is only supposed to
support VFIO devices which can't be migrated anyway, but still.
(2) is not really useful, because if a guest tries to configure EEH on a
different host IOMMU, the first call will fail and that will be that.
It's possible there are scripts or tools out there which expect
spapr-pci-vfio-host-bridge, so we don't remove it entirely. This patch
reduces it to just a stub for backwards compatibility.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Alexey Kardashevskiy <[email protected]>
| 72700d7e733948fa7fbb735ccdf2209931c88476 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/72700d7e733948fa7fbb735ccdf2209931c88476 | 2016-03-16 09:55:11+11:00 |
balloon: fix segfault and harden the stats queue
The segfault here is triggered by the driver notifying the stats queue
twice after adding a buffer to it. This effectively resets stats_vq_elem
back to NULL and QEMU crashes on the next stats timer tick in
balloon_stats_poll_cb.
This is a regression introduced in 51b19ebe4320f3dc, although admittedly
the device assumed too much about the stats queue protocol even before
that commit. This commit adds a few more checks and ensures that the one
stats buffer gets deallocated on device reset.
Cc: [email protected]
Signed-off-by: Ladi Prosek <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 4eae2a657d1ff5ada56eb9b4966eae0eff333b0b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4eae2a657d1ff5ada56eb9b4966eae0eff333b0b | 2016-03-11 14:54:28+02:00 |
ipmi: remove IPMI_CHECK_CMD_LEN() macro
Most IPMI command handlers in the BMC simulator start with a call to
the macro IPMI_CHECK_CMD_LEN() which verifies that a minimal number of
arguments expected by the command are indeed available. To achieve
this task, the macro implicitly uses local variables which is
misleading in the code.
This patch adds a 'cmd_len_min' attribute to the struct IPMICmdHandler
defining the minimal number of arguments expected by the command and
moves this check in the global command handler ipmi_sim_handle_command().
To clarify the checks being done on the received command, the patch
introduces a helper ipmi_get_handler().
Signed-off-by: Cédric Le Goater <[email protected]>
Acked-by: Corey Minyard <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 4f298a4b2957b7833bc607c951ca27c458d98d88 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4f298a4b2957b7833bc607c951ca27c458d98d88 | 2016-03-11 16:59:13+02: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]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 888ea96aae29ce6a28afb86c2eee30068dc14d46 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/888ea96aae29ce6a28afb86c2eee30068dc14d46 | 2016-02-16 12:07:03+00:00 |
qdev: Free QemuOpts when the QOM path goes away
Otherwise there is a race where the DEVICE_DELETED event has been sent but
attempts to reuse the ID will fail.
Note that similar races exist for other QemuOpts, which this patch
does not attempt to fix.
For example, if the device is a block device, then unplugging it also
deletes its backend. However, this backend's get deleted in
drive_info_del(), which is only called when properties are
destroyed. Just like device_finalize(), drive_info_del() is called
some time after DEVICE_DELETED is sent. A separate patch series has
been sent to plug this other bug. Character devices also have yet to
be fixed.
Reported-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| abed886ec60cf239a03515cf0b30fb11fa964c44 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/abed886ec60cf239a03515cf0b30fb11fa964c44 | 2016-01-18 17:47:58+01:00 |
scripts/kvm/kvm_stat: Fix rlimit for unprivileged users
Setting the hard limit as a unprivileged user either returns an error
when it is higher than the current one or irreversibly sets it lower.
Therefore we leave the hardlimit untouched as long as we don't need to
raise it as this needs CAP_SYS_RESOURCE.
This gives admins the possibility to run the script as an unprivileged
user to increase security.
Signed-off-by: Janosch Frank <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 1cd55f9dc7debdad0d54f4fad8617527433b4c4b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1cd55f9dc7debdad0d54f4fad8617527433b4c4b | 2016-01-26 15:58:13+01:00 |
configure: fix trace backend check
Found thanks to shellcheck!
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 713572a7b59acfcf8fe0f35c799f647792c8c8cd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/713572a7b59acfcf8fe0f35c799f647792c8c8cd | 2016-01-11 11:39:28+03:00 |
qcow2: Point to amend function in check
If a reference count is not representable with the current refcount
order, the image check should point to qemu-img amend for increasing the
refcount order. However, qemu-img amend needs write access to the image
which cannot be provided if the image is marked corrupt; and the image
check will not mark the image consistent unless everything actually is
consistent.
Therefore, if an image is marked corrupt and the image check encounters
a reference count overflow, it cannot be fixed by using qemu-img amend
to increase the refcount order. Instead, one has to use qemu-img convert
to create a completely new copy of the image in this case.
Alternatively, we may want to give the user a way of manually removing
the corrupt flag, maybe through qemu-img amend, but this is not part of
this patch.
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 03bb78ed250874f76e0854aa4d5d95af1e12613e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/03bb78ed250874f76e0854aa4d5d95af1e12613e | 2015-12-18 14:34:43+01:00 |
Fix memory leak on error
hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611
hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in 34f2af3d
Signed-off-by: Stefano Dong (董兴水) <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 903a41d3415960240cb3b9f1d66f3707b27010d6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/903a41d3415960240cb3b9f1d66f3707b27010d6 | 2015-11-26 14:27:52+02:00 |
qapi: Fix c_name() munging
The method c_name() is supposed to do two different actions: munge
'-' into '_', and add a 'q_' prefix to ticklish names. But it did
these steps out of order, making it possible to submit input that
is not ticklish until after munging, where the output then lacked
the desired prefix.
The failure is exposed easily if you have a compiler that recognizes
C11 keywords, and try to name a member '_Thread-local', as it would
result in trying to compile the declaration 'uint64_t _Thread_local;'
which is not valid. However, this name violates our conventions
(ultimately, want to enforce that no qapi names start with single
underscore), so the test is slightly weaker by instead testing
'wchar-t'; the declaration 'uint64_t wchar_t;' is valid in C (where
wchar_t is only a typedef) but would fail with a C++ compiler (where
it is a keyword).
Fix things by reversing the order of actions within c_name().
Signed-off-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| c43567c12042cf401b039bfc94a5f85e1cc1e796 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c43567c12042cf401b039bfc94a5f85e1cc1e796 | 2015-12-17 08:21:27+01:00 |
qdev: Change Property::offset field to ptrdiff_t type
Property::offset field is calculated as a diff between two pointers:
arrayprop->prop.offset = eltptr - (void *)dev;
If offset is declared as int, this subtraction can cause type overflow,
thus leading to failure of the subsequent assertion:
assert(qdev_get_prop_ptr(dev, &arrayprop->prop) == eltptr);
So ptrdiff_t should be used instead.
Signed-off-by: Ildar Isaev <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 3b6ca4022d150ad273d4cd9556c2f4873389f965 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3b6ca4022d150ad273d4cd9556c2f4873389f965 | 2015-11-18 21:11:55+01:00 |
fw_cfg: replace ioport data read with generic method
IOPort read access is limited to one byte at a time by
fw_cfg_comb_valid(). As such, fw_cfg_comb_read() may safely
ignore its size argument (which will always be 1), and simply
call its fw_cfg_read() helper function once, returning 8 bits
via the least significant byte of a 64-bit return value.
This patch replaces fw_cfg_comb_read() with the generic method
fw_cfg_data_read(), and removes the unused fw_cfg_read() helper.
When called with size = 1, fw_cfg_data_read() acts exactly like
fw_cfg_read(), performing the same set of sanity checks, and
executing the while loop at most once (subject to the current
read offset being within range).
Cc: Laszlo Ersek <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Marc Marí <[email protected]>
Signed-off-by: Gabriel Somlo <[email protected]>
Message-id: [email protected]
Reviewed-by: Laszlo Ersek <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 6c8d56a2e95712a6206a2671d2b04b2e59cabc0b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6c8d56a2e95712a6206a2671d2b04b2e59cabc0b | 2015-12-15 11:46:13+01:00 |
virtio-blk: Fix double completion for werror=stop
When a request R is absorbed by request M, it is appended to the
"mr_next" queue led by M, and is completed together with the completion
of M, in virtio_blk_rw_complete.
During DMA restart in virtio_blk_dma_restart_bh, requests in s->rq are
parsed and submitted again, possibly with a stale req->mr_next. It could
be a problem if the request merging in virtio_blk_handle_request hasn't
refreshed every mr_next pointer, in which case, virtio_blk_rw_complete
could walk through unexpected requests following the stale pointers.
Fix this by unsetting the pointer in virtio_blk_rw_complete. It is safe
because this req is either completed and freed right away, or it will be
restarted and parsed from scratch out of the vq later.
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 10f5a72f70862d299ddbdf226d6dc71fa4ae34dd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/10f5a72f70862d299ddbdf226d6dc71fa4ae34dd | 2015-11-17 18:35:57+08:00 |
virtio-blk: Account for failed and invalid operations
Signed-off-by: Alberto Garcia <[email protected]>
Message-id: 4f623ce52c9d673d35a043fc2959526b41b685c6.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 01762e03222154fef6d98087ce391aed8a157be5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/01762e03222154fef6d98087ce391aed8a157be5 | 2015-11-12 16:22:46+01:00 |
block: Add ioctl parameter fields to BlockRequest
The two fields that will be used by ioctl handling code later are added
as union, because it's used exclusively by ioctl code which dosn't need
the four fields in the other struct of the union.
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 8b45f6878d291646cadc4786ae807e6a42c188b4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8b45f6878d291646cadc4786ae807e6a42c188b4 | 2015-11-12 16:22:42+01:00 |
ppc: Add/Re-introduce MMU model definitions needed by PR KVM
Commit aa4bb5875231 (ppc: Add mmu_model defines for arch 2.03 and 2.07)
removed the mmu_model definition POWERPC_MMU_2_06a which is needed by
PR KVM. Reintroduce it and also add POWERPC_MMU_2_07a.
This fixes QEMU crash (qemu: fatal: Unknown MMU model) during booting
of PR KVM guest.
Signed-off-by: Bharata B Rao <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| ba3ecda05e933acf6fff618716b6f6d2ed6a5a07 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ba3ecda05e933acf6fff618716b6f6d2ed6a5a07 | 2015-11-11 11:05:30+11:00 |
nvme: generate OpenFirmware device path in the "bootorder" fw_cfg file
Background on QEMU boot indices
-------------------------------
Normally, the "bootindex" property is configured for bootable devices
with:
DEVICE_instance_init()
device_add_bootindex_property(..., "bootindex", ...)
object_property_add(..., device_get_bootindex,
device_set_bootindex, ...)
and when the bootindex is set on the QEMU command line, with
-device DEVICE,...,bootindex=N
the setter that was configured above is invoked:
device_set_bootindex()
/* parse boot index */
visit_type_int32()
/* verify unicity */
check_boot_index()
/* store parsed boot index */
...
/* insert device path to boot order */
add_boot_device_path()
In the last step, add_boot_device_path() ensures that an OpenFirmware
device path will show up in the "bootorder" fw_cfg file, at a position
corresponding to the device's boot index. Thus guest firmware (SeaBIOS and
OVMF) can try to boot off the device with the right priority.
NVMe boot index
---------------
In QEMU commit 33739c712982,
nvma: ide: add bootindex to qom property
the following generic setters / getters:
- device_set_bootindex()
- device_get_bootindex()
were open-coded for NVMe, under the names
- nvme_set_bootindex()
- nvme_get_bootindex()
Plus nvme_instance_init() was added to configure the "bootindex" property
manually, designating the open-coded getter & setter, rather than calling
device_add_bootindex_property().
Crucially, nvme_set_bootindex() avoided the final add_boot_device_path()
call. This fact is spelled out in the message of commit 33739c712982, and
it was presumably the entire reason for all of the code duplication.
Now, Vladislav filed an RFE for OVMF
<https://github.com/tianocore/edk2/issues/48>; OVMF should boot off NVMe
devices. It is simple to build edk2's existent NvmExpressDxe driver into
OVMF, but the boot order matching logic in OVMF can only handle NVMe if
the "bootorder" fw_cfg file includes such devices.
Therefore this patch converts the NVMe device model to
device_set_bootindex() all the way.
Device paths
------------
device_set_bootindex() accepts an optional parameter called "suffix". When
present, it is expected to take the form of an OpenFirmware device path
node, and it gets appended as last node to the otherwise auto-generated
OFW path.
For NVMe, the auto-generated part is
/pci@i0cf8/pci8086,5845@6[,1]
^ ^ ^ ^
| | PCI slot and (present when nonzero)
| | function of the NVMe controller, both hex
| "driver name" component, built from PCI vendor & device IDs
PCI root at system bus port, PIO
to which here we append the suffix
/namespace@1,0
^ ^
| big endian (MSB at lowest address) numeric interpretation
| of the 64-bit IEEE Extended Unique Identifier, aka EUI-64,
| hex
32-bit NVMe namespace identifier, aka NSID, hex
resulting in the OFW device path
/pci@i0cf8/pci8086,5845@6[,1]/namespace@1,0
The reason for including the NSID and the EUI-64 is that an NVMe device
can in theory produce several different namespaces (distinguished by
NSID). Additionally, each of those may (optionally) have an EUI-64 value.
For now, QEMU only provides namespace 1.
Furthermore, QEMU doesn't even represent the EUI-64 as a standalone field;
it is embedded (and left unused) inside the "NvmeIdNs.res30" array, at the
last eight bytes. (Which is fine, since EUI-64 can be left zero-filled if
unsupported by the device.)
Based on the above, we set the "unit address" part of the last
("namespace") node to fixed "1,0".
OVMF will then map the above OFW device path to the following UEFI device
path fragment, for boot order processing:
PciRoot(0x0)/Pci(0x6,0x1)/NVMe(0x1,00-00-00-00-00-00-00-00)
^ ^ ^ ^ ^ ^
| | | | | octets of the EUI-64 in address order
| | | | NSID
| | | NVMe namespace messaging device path node
| PCI slot and function
PCI root bridge
Cc: Keith Busch <[email protected]> (supporter:nvme)
Cc: Kevin Wolf <[email protected]> (supporter:Block layer core)
Cc: [email protected] (open list:nvme)
Cc: Gonglei <[email protected]>
Cc: Vladislav Vovchenko <[email protected]>
Cc: Feng Tian <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Kevin O'Connor <[email protected]>
Signed-off-by: Laszlo Ersek <[email protected]>
Acked-by: Gonglei <[email protected]>
Acked-by: Keith Busch <[email protected]>
Tested-by: Vladislav Vovchenko <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| a907ec52cc1aefc820768b6e341b56f8f3caaca7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a907ec52cc1aefc820768b6e341b56f8f3caaca7 | 2016-02-02 12:45:01+01:00 |
qbool: Make conversion from QObject * accept null
qobject_to_qbool() crashes on null, which is a trap for the unwary.
Return null instead, and simplify a few callers.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Luiz Capitulino <[email protected]>
| 14b6160099f0caf5dc9d62e637b007bc5d719a96 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/14b6160099f0caf5dc9d62e637b007bc5d719a96 | 2015-10-29 14:34:44+01:00 |
hw/pci-host/bonito: Avoid buffer overrun for bad LDMA/COP accesses
The LDMA and COP memory regions represent four 32 bit registers
each, but the memory regions themselves are 0x100 bytes large.
Add guards to the read and write accessors so that bogus accesses
beyond the four defined registers don't just run off the end of
the bonldma and boncop structs and into whatever lies beyond.
Signed-off-by: Peter Maydell <[email protected]>
Acked-by: Aurelien Jarno <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
| 58d479786b11a7e982419c1e0905b8490ef9a787 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/58d479786b11a7e982419c1e0905b8490ef9a787 | 2015-08-13 16:22:53+01:00 |
pc-dimm: Fail realization for invalid nodes in non-NUMA config
pc_dimm_realize() validates the NUMA node to which memory hotplug is
being performed only in case of NUMA configuration. Include a check to
fail for invalid nodes in case of non-NUMA configuration too.
Signed-off-by: Bharata B Rao <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| 32532f215c49f005aaef942adfae34cbcc5fa678 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/32532f215c49f005aaef942adfae34cbcc5fa678 | 2015-10-06 16:51:08-03:00 |
linux-user: assert that target_mprotect cannot fail
All error conditions that target_mprotect checks are also checked
by target_mmap. EACCESS cannot happen because we are just removing
PROT_WRITE. ENOMEM should not happen because we are modifying a
whole VMA (and we have bigger problems anyway if it happens).
Fixes a Coverity false positive, where Coverity complains about
target_mprotect's return value being passed to tb_invalidate_phys_range.
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| 86abac06c142d20772b3f2e04c9bf02b7936a0b3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/86abac06c142d20772b3f2e04c9bf02b7936a0b3 | 2015-10-01 11:43:42+03:00 |
ui/cocoa.m: verify with user before quitting QEMU
This patch prevents the user from accidentally quitting QEMU by pushing
Command-Q or by pushing the close button on the main window. When
the user does one of these two things, a dialog box appears verifying
with the user if he or she wants to quit QEMU.
Signed-off-by: John Arbuckle <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| d9bc14f63e880010ba72b3a0169ff8ef52275a63 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d9bc14f63e880010ba72b3a0169ff8ef52275a63 | 2015-09-25 23:13:59+01:00 |
spapr_drc: Fix potential undefined behaviour
The DRC_INDEX_ID_MASK macro does a left shift on ~0, which is a signed
quantity, and therefore undefined behaviour according to the C spec. In
particular this causes warnings from the clang sanitizer.
This fixes it by calculating the same mask without using ~0 (I think the
new method is a more common idiom for generating masks anyway). For good
measure I also use 1ULL to force the expression's type to unsigned long
long, which should be good for assigning to anything we're going to want
to.
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Alexey Kardashevskiy <[email protected]>
| 627c2ef7898794a28d706ecdf094491bebbb083a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/627c2ef7898794a28d706ecdf094491bebbb083a | 2015-09-23 10:51:09+10:00 |
ui: Add dpy_gfx_check_format() to check backend shared surface support
This allows VGA to decide whether to use a shared surface based on
whether the UI backend supports the format or not. Backends that
don't provide the new callback fallback to native 32 bpp which
is equivalent to what was supported before.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
[ kraxel: fix console check, allow only 32 bpp as fallback ]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 49743df399ca1029f4e22b52e9238d8e25c26bb2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/49743df399ca1029f4e22b52e9238d8e25c26bb2 | 2015-01-19 13:33:26+01:00 |
xen/pt: Check for return values for xen_host_pci_[get|set] in init
and if we have failures we call xen_pt_destroy introduced in
'xen/pt: Move bulk of xen_pt_unregister_device in its own routine.'
and free all of the allocated structures.
Acked-by: Stefano Stabellini <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
| 3d3697f2576424a2c0830a7b2e7c94c79dea9b50 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3d3697f2576424a2c0830a7b2e7c94c79dea9b50 | 2015-09-10 16:47:26+00:00 |
xen/pt: Sync up the dev.config and data values.
For a passthrough device we maintain a state of emulated
registers value contained within d->config. We also consult
the host registers (and apply ro and write masks) whenever
the guest access the registers. This is done in xen_pt_pci_write_config
and xen_pt_pci_read_config.
Also in this picture we call pci_default_write_config which
updates the d->config and if the d->config[PCI_COMMAND] register
has PCI_COMMAND_MEMORY (or PCI_COMMAND_IO) acts on those changes.
On startup the d->config[PCI_COMMAND] are the host values, not
what the guest initial values should be, which is exactly what
we do _not_ want to do for 64-bit BARs when the guest just wants
to read the size of the BAR. Huh you say?
To get the size of 64-bit memory space BARs, the guest has
to calculate ((BAR[x] & 0xFFFFFFF0) + ((BAR[x+1] & 0xFFFFFFFF) << 32))
which means it has to do two writes of ~0 to BARx and BARx+1.
prior to this patch and with XSA120-addendum patch (Linux kernel)
the PCI_COMMAND register is copied from the host it can have
PCI_COMMAND_MEMORY bit set which means that QEMU will try to
update the hypervisor's P2M with BARx+1 value to ~0 (0xffffffff)
(to sync the guest state to host) instead of just having
xen_pt_pci_write_config and xen_pt_bar_reg_write apply the
proper masks and return the size to the guest.
To thwart this, this patch syncs up the host values with the
guest values taking into account the emu_mask (bit set means
we emulate, PCI_COMMAND_MEMORY and PCI_COMMAND_IO are set).
That is we copy the host values - masking out any bits which
we will emulate. Then merge it with the initial emulation register
values. Lastly this value is then copied both in
dev.config _and_ XenPTReg->data field.
There is also reg->size accounting taken into consideration
that ends up being used in patch.
xen/pt: Check if reg->init function sets the 'data' past the reg->size
This fixes errors such as these:
(XEN) memory_map:add: dom2 gfn=fffe0 mfn=fbce0 nr=20
(DEBUG) 189 pci dev 04:0 BAR16 wrote ~0.
(DEBUG) 200 pci dev 04:0 BAR16 read 0x0fffe0004.
(XEN) memory_map:remove: dom2 gfn=fffe0 mfn=fbce0 nr=20
(DEBUG) 204 pci dev 04:0 BAR16 wrote 0x0fffe0004.
(DEBUG) 217 pci dev 04:0 BAR16 read upper 0x000000000.
(XEN) memory_map:add: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20
(XEN) p2m.c:883:d0v0 p2m_set_entry failed! mfn=ffffffffffffffff rc:-22
(XEN) memory_map:fail: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20 ret:-22
(XEN) memory_map:remove: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20
(XEN) p2m.c:920:d0v0 gfn_to_mfn failed! gfn=ffffffff00000 type:4
(XEN) p2m.c:920:d0v0 gfn_to_mfn failed! gfn=ffffffff00001 type:4
..
(XEN) memory_map: error -22 removing dom2 access to [fbce0,fbcff]
(DEBUG) 222 pci dev 04:0 BAR16 read upper 0x0ffffffff.
(XEN) memory_map:remove: dom2 gfn=ffffffff00000 mfn=fbce0 nr=20
(XEN) memory_map: error -22 removing dom2 access to [fbce0,fbcff]
[The DEBUG is to illustate what the hvmloader was doing]
Also we swap from xen_host_pci_long to using xen_host_pci_get_[byte,word,long].
Otherwise we get:
xen_pt_config_reg_init: Offset 0x0004 mismatch! Emulated=0x0000, host=0x2300017, syncing to 0x2300014.
xen_pt_config_reg_init: Error: Offset 0x0004:0x2300014 expands past register size(2)!
which is not surprising. We read the value as an 32-bit (from host),
then operate it as a 16-bit - and the remainder is left unchanged.
We end up writing the value as 16-bit (so 0014) to dev.config
(as we use proper xen_set_host_[byte,word,long] so we don't spill
to other registers) but in XenPTReg->data it is as 32-bit (0x2300014)!
It is harmless as the read/write functions end up using an size mask
and never modify the bits past 16-bit (reg->size is 2).
This patch fixes the warnings by reading the value using the
proper size.
Note that the check for size is still left in-case the developer
sets bits past the reg->size in the ->init routines. The author
tried to fiddle with QEMU_BUILD_BUG to make this work but failed.
Reviewed-by: Stefano Stabellini <[email protected]>
Reported-by: Sander Eikelenboom <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Stefano Stabellini <[email protected]>
| 2e87512eccf3c5e40f3142ff5a763f4f850839f4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2e87512eccf3c5e40f3142ff5a763f4f850839f4 | 2015-09-10 16:47:03+00:00 |
AioContext: avoid leaking BHs on cleanup
BHs are freed during aio_bh_poll(). This leads to memory leaks if there
is no aio_bh_poll() between qemu_bh_delete() and aio_ctx_finalize().
Suggested-by: Paolo Bonzini <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| a076972a4d36381d610a854f0c336507650a1d34 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a076972a4d36381d610a854f0c336507650a1d34 | 2015-07-29 10:02:06+01:00 |
block: vpc - prevent overflow if max_table_entries >= 0x40000000
When we allocate the pagetable based on max_table_entries, we multiply
the max table entry value by 4 to accomodate a table of 32-bit integers.
However, max_table_entries is a uint32_t, and the VPC driver accepts
ranges for that entry over 0x40000000. So during this allocation:
s->pagetable = qemu_try_blockalign(bs->file, s->max_table_entries * 4);
The size arg overflows, allocating significantly less memory than
expected.
Since qemu_try_blockalign() size argument is size_t, cast the
multiplication correctly to prevent overflow.
The value of "max_table_entries * 4" is used elsewhere in the code as
well, so store the correct value for use in all those cases.
We also check the Max Tables Entries value, to make sure that it is <
SIZE_MAX / 4, so we know the pagetable size will fit in size_t.
Cc: [email protected]
Reported-by: Richard W.M. Jones <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| b15deac79530d818092cb49a8021bcce83d71b5b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b15deac79530d818092cb49a8021bcce83d71b5b | 2015-07-27 17:19:06+02:00 |
qga/commands-posix: Fix bug in guest-fstrim
The FITRIM ioctl updates the fstrim_range structure it receives. This
way the caller can determine how many bytes were trimmed. The
guest-fstrim logic reuses the same fstrim_range for each filesystem,
effectively limiting each filesystem to trim at most as much as the
previous was able to trim.
If a previous filesystem would have trimmed 0 bytes, than the next
filesystem would report an error 'Invalid argument' because a FITRIM
request with length 0 is not valid.
This change resets the fstrim_range structure for each filesystem.
Signed-off-by: Justin Ossevoort <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
| 73a652a1b08445e8d91e50cdbb2da50e571c61b3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/73a652a1b08445e8d91e50cdbb2da50e571c61b3 | 2015-07-07 20:13:13-05:00 |
block/iscsi: add support for request timeouts
libiscsi starting with 1.15 will properly support timeout of iscsi
commands. The default will remain no timeout, but this can
be changed via cmdline parameters, e.g.:
qemu -iscsi timeout=30 -drive file=iscsi://...
If a timeout occurs a reconnect is scheduled and the timed out command
will be requeued for processing after a successful reconnect.
The required API call iscsi_set_timeout is present since libiscsi
1.10 which was released in October 2013. However, due to some bugs
in the libiscsi code the use is not recommended before version 1.15.
Please note that this patch bumps the libiscsi requirement to 1.10
to have all function and macros defined. The patch fixes also a
off-by-one error in the NOP timeout calculation which was fixed
while touching these code parts.
Signed-off-by: Peter Lieven <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 5dd7a535b71a0f2f8e7af75c5d694174359ce323 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5dd7a535b71a0f2f8e7af75c5d694174359ce323 | 2015-07-02 09:20:18+01:00 |
crypto: avoid undefined behavior in nettle calls
Calling a function pointer that was cast from an incompatible function
results in undefined behavior. 'void *' isn't compatible with 'struct
XXX *', so we can't cast to nettle_cipher_func, but have to provide a
wrapper. (Conversion from 'void *' to 'struct XXX *' might require
computation, which won't be done if we drop argument's true type, and
pointers can have different sizes so passing arguments on stack would
bug.)
Having two different prototypes based on nettle version doesn't make
this solution any nicer.
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| d3462e378f40ba6838b6c42584c30769ca633e6f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d3462e378f40ba6838b6c42584c30769ca633e6f | 2015-07-16 20:00:21+02:00 |
linux-user: Fix length handling in host_to_target_cmsg
The previous code for handling payload length when converting
cmsg structures from host to target had a number of problems:
* we required the msg->msg_controllen to declare the buffer
to have enough space for final trailing padding (we were
checking against CMSG_SPACE), whereas the kernel does not
require this, and common userspace code assumes this. (In
particular, glibc's "try to talk to nscd" code that it will
run on startup will receive a cmsg with a 4 byte payload and
only allocate 4 bytes for it, which was causing us to do
the wrong thing on architectures that need 8-alignment.)
* we weren't correctly handling the fact that the SO_TIMESTAMP
payload may be larger for the target than the host
* we weren't marking the messages with MSG_CTRUNC when we did
need to truncate a message that wasn't truncated by the host,
but were instead logging a QEMU message; since truncation is
always the result of a guest giving us an insufficiently
sized buffer, we should report it to the guest as the kernel
does and don't log anything
Rewrite the parts of the function that deal with length to
fix these issues, and add a comment in target_to_host_cmsg
to explain why the overflow logging it does is a QEMU bug,
not a guest issue.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| c2aeb2586bd258ad76fcfe308f883075e73ff1d2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c2aeb2586bd258ad76fcfe308f883075e73ff1d2 | 2015-06-16 08:21:01+03:00 |
target-arm: Correct "preferred return address" for cpreg access exceptions
The architecture defines that when taking an exception trying to
access a coprocessor register, the "preferred return address" for
the exception is the address of the instruction that caused the
exception. Correct an off-by-4 error which meant we were returning
the address after the instruction for traps which happened because
of a failure of a runtime access-check function on an AArch32
register. (Traps caused by translate-time checkable permissions
failures had the correct address, as did traps on AArch64 registers.)
This fixes https://bugs.launchpad.net/qemu/+bug/1463338
Reported-by: Robert Buhren <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
| 3977ee5d7a9f2e3664dd8b233f3224694e23b62b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3977ee5d7a9f2e3664dd8b233f3224694e23b62b | 2015-06-15 18:06:11+01:00 |
slirp: use less predictable directory name in /tmp for smb config (CVE-2015-4037)
In this version I used mkdtemp(3) which is:
_BSD_SOURCE
|| /* Since glibc 2.10: */
(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
(POSIX.1-2008), so should be available on systems we care about.
While at it, reset the resulting directory name within smb structure
on error so cleanup function wont try to remove directory which we
failed to create.
Signed-off-by: Michael Tokarev <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| 8b8f1c7e9ddb2e88a144638f6527bf70e32343e3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8b8f1c7e9ddb2e88a144638f6527bf70e32343e3 | 2015-06-03 14:21:45+03:00 |
audio: expose drv_opaque to init_out and init_in
Currently the opaque pointer returned by audio_driver's init is only
exposed to the driver's fini, but not to audio_pcm_ops. This way if
someone wants to share a variable with the driver and the pcm, he must
use global variables. This patch fixes it by adding a third parameter to
audio_pcm_op's init_out and init_in.
Signed-off-by: Kővágó, Zoltán <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 5706db1deb061ee9affdcea81e59c4c2cad7c41e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5706db1deb061ee9affdcea81e59c4c2cad7c41e | 2015-06-15 12:42:47+02:00 |
qapi: New QMP command query-qmp-schema for QMP introspection
qapi/introspect.json defines the introspection schema. It's designed
for QMP introspection, but should do for similar uses, such as QGA.
The introspection schema does not reflect all the rules and
restrictions that apply to QAPI schemata. A valid QAPI schema has an
introspection value conforming to the introspection schema, but the
converse is not true.
Introspection lowers away a number of schema details, and makes
implicit things explicit:
* The built-in types are declared with their JSON type.
All integer types are mapped to 'int', because how many bits we use
internally is an implementation detail. It could be pressed into
external interface service as very approximate range information,
but that's a bad idea. If we need range information, we better do
it properly.
* Implicit type definitions are made explicit, and given
auto-generated names:
- Array types, named by appending "List" to the name of their
element type, like in generated C.
- The enumeration types implicitly defined by simple union types,
named by appending "Kind" to the name of their simple union type,
like in generated C.
- Types that don't occur in generated C. Their names start with ':'
so they don't clash with the user's names.
* All type references are by name.
* The struct and union types are generalized into an object type.
* Base types are flattened.
* Commands take a single argument and return a single result.
Dictionary argument or list result is an implicit type definition.
The empty object type is used when a command takes no arguments or
produces no results.
The argument is always of object type, but the introspection schema
doesn't reflect that.
The 'gen': false directive is omitted as implementation detail.
The 'success-response' directive is omitted as well for now, even
though it's not an implementation detail, because it's not used by
QMP.
* Events carry a single data value.
Implicit type definition and empty object type use, just like for
commands.
The value is of object type, but the introspection schema doesn't
reflect that.
* Types not used by commands or events are omitted.
Indirect use counts as use.
* Optional members have a default, which can only be null right now
Instead of a mandatory "optional" flag, we have an optional default.
No default means mandatory, default null means optional without
default value. Non-null is available for optional with default
(possible future extension).
* Clients should *not* look up types by name, because type names are
not ABI. Look up the command or event you're interested in, then
follow the references.
TODO Should we hide the type names to eliminate the temptation?
New generator scripts/qapi-introspect.py computes an introspection
value for its input, and generates a C variable holding it.
It can generate awfully long lines. Marked TODO.
A new test-qmp-input-visitor test case feeds its result for both
tests/qapi-schema/qapi-schema-test.json and qapi-schema.json to a
QmpInputVisitor to verify it actually conforms to the schema.
New QMP command query-qmp-schema takes its return value from that
variable. Its reply is some 85KiBytes for me right now.
If this turns out to be too much, we have a couple of options:
* We can use shorter names in the JSON. Not the QMP style.
* Optionally return the sub-schema for commands and events given as
arguments.
Right now qmp_query_schema() sends the string literal computed by
qmp-introspect.py. To compute sub-schema at run time, we'd have to
duplicate parts of qapi-introspect.py in C. Unattractive.
* Let clients cache the output of query-qmp-schema.
It changes only on QEMU upgrades, i.e. rarely. Provide a command
query-qmp-schema-hash. Clients can have a cache indexed by hash,
and re-query the schema only when they don't have it cached. Even
simpler: put the hash in the QMP greeting.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 39a181581650f4d50f4445bc6276d9716cece050 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/39a181581650f4d50f4445bc6276d9716cece050 | 2015-09-21 09:56:49+02:00 |
qemu-iotests: expand test 093 to support group throttling
This patch improves the test by attaching a different number of drives
to the VM and putting them in the same throttling group. The test
verifies that the I/O is evenly distributed among all members of the
group, and that the limits are enforced.
By default the test is repeated 3 times with 1, 2 and 3 drives, but
the maximum number of simultaneous drives is configurable.
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-id: 513df1da5c658878191b579ebcddd985adcd4122.1433779731.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 2db33f88d2b340c049c576ad75d442e4b6ffe768 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2db33f88d2b340c049c576ad75d442e4b6ffe768 | 2015-06-12 14:00:00+01:00 |
sdl2: fix crash in handle_windowevent() when restoring the screen size
The Ctrl-Alt-u keyboard shortcut restores the screen to its original
size. In the SDL2 UI this is done by destroying the window and
creating a new one. The old window emits SDL_WINDOWEVENT_HIDDEN when
it's destroyed, but trying to call SDL_GetWindowFromID() from that
event's window ID returns a null pointer. handle_windowevent() assumes
that the pointer is never null so it results in a crash.
Cc: [email protected]
Signed-off-by: Alberto Garcia <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 08d49df0dbaacc220a099dbfb644e1dc0eda57be | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/08d49df0dbaacc220a099dbfb644e1dc0eda57be | 2015-06-09 10:25:21+02:00 |
monitor: Fix QMP ABI breakage around "id"
Commit 65207c5 accidentally dropped a line of code we need along with
a comment that became wrong then. This made QMP reject "id":
{"execute": "system_reset", "id": "1"}
{"error": {"class": "GenericError", "desc": "QMP input object member 'id' is unexpected"}}
Put the lost line right back, so QMP again accepts and returns "id",
as promised by the ABI:
{"execute": "system_reset", "id": "1"}
{"return": {}, "id": "1"}
Reported-by: Fabio Fantoni <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Don Slutz <[email protected]>
Tested-by: Fabio Fantoni <[email protected]>
Signed-off-by: Wen Congyang <[email protected]>
Signed-off-by: Pavel Fedin <[email protected]>
Tested-by: Eric Blake <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 779cec4d20907cbccb26fbf5f5c19c6cdee33eff | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/779cec4d20907cbccb26fbf5f5c19c6cdee33eff | 2015-06-08 12:12:11+01:00 |
tap: Improve -netdev/netdev_add/-net/... tap error reporting
When -netdev tap fails, it first reports a specific error, then a
generic one, like this:
$ qemu-system-x86_64 -netdev tap,id=foo
qemu-system-x86_64: -netdev tap,id=foo: could not configure /dev/net/tun: Operation not permitted
qemu-system-x86_64: -netdev tap,id=foo: Device 'tap' could not be initialized
With the command line, the messages go to stderr. In HMP, they go to
the monitor. In QMP, the second one becomes the error reply, and the
first one goes to stderr.
Convert net_init_tap() to Error. This suppresses the unwanted second
message, and makes the specific error the QMP error reply.
[Dropped duplicate "and" from error message as suggested by Eric Blake:
"ifname=, script=, downscript=, and vnet_hdr=, "
"queues=, and vhostfds= are invalid with helper="
--Stefan]
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| a308817743be5cc051d3379477f54027deb0befb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a308817743be5cc051d3379477f54027deb0befb | 2015-05-27 10:34:07+01:00 |
tap: Improve -netdev/netdev_add/-net/... bridge error reporting
When -netdev bridge fails, it first reports a specific error, then a
generic one, like this:
$ qemu-system-x86_64 -netdev bridge,id=foo
failed to launch bridge helper
qemu-system-x86_64: -netdev bridge,id=foo: Device 'bridge' could not be initialized
The first message goes to stderr. Wrong for HMP, because errors need
to go to the monitor there.
The second message goes to stderr for -netdev, to the monitor for HMP
netdev_add, and becomes the error reply for QMP netdev_add.
Convert net_bridge_run_helper() to Error, and propagate its errors
through net_init_bridge(). This ensures the error gets reported where
the user is, and suppresses the unwanted second message.
While there, improve the error messages a bit.
The above example becomes:
$ qemu-system-x86_64 -netdev bridge,id=foo
qemu-system-x86_64: -netdev bridge,id=foo: bridge helper failed
net_init_tap() also uses net_bridge_run_helper(). Propagate its
errors there as well. Improves reporting these errors with -netdev
tap & friends.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| a8a21be9855e0bb0947a7325d0d1741a8814f21e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a8a21be9855e0bb0947a7325d0d1741a8814f21e | 2015-05-27 09:51:05+01:00 |
target-alpha: Fix integer overflow checking insns
We need to write the result to the destination register before
raising any exception. Thus inline the code for each insn, and
check for any exception after we're done.
Reported-by: Al Viro <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| 4d1628e832dfc6ec02b0d196f6cc250aaa7bf3b3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4d1628e832dfc6ec02b0d196f6cc250aaa7bf3b3 | 2015-05-18 13:03:47-07:00 |
target-alpha: Raise IOV from CVTTQ
Floating-point overflow is a different bit from integer overflow.
Reported-by: Al Viro <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| c24a8a0b6dad5a33d84f5fb846edb28c43312c71 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c24a8a0b6dad5a33d84f5fb846edb28c43312c71 | 2015-05-18 13:03:46-07:00 |
kvm: Silence warning from valgrind
valgrind complains here about uninitialized bytes with the following message:
==17814== Syscall param ioctl(generic) points to uninitialised byte(s)
==17814== at 0x466A780: ioctl (in /usr/lib64/power8/libc-2.17.so)
==17814== by 0x100735B7: kvm_vm_ioctl (kvm-all.c:1920)
==17814== by 0x10074583: kvm_set_ioeventfd_mmio (kvm-all.c:574)
Let's fix it by using a proper struct initializer in kvm_set_ioeventfd_mmio().
Signed-off-by: Thomas Huth <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 2ed0c3dad769ab747e1f5448b70eeaf134c76982 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2ed0c3dad769ab747e1f5448b70eeaf134c76982 | 2015-04-30 16:06:17+03:00 |
hw/intc/arm_gic_kvm.c: Save and restore GICD_IGROUPRn state
Now that the GIC base class has state fields for the GICD_IGROUPRn
registers, make kvm_arm_gic_get() and kvm_arm_gic_put() write and
read them. This allows us to remove the check that made us
fail migration if the guest had set any of the group register bits.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
| eb8b9530b0c618d4f2e728eae10d89239d35b0c0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/eb8b9530b0c618d4f2e728eae10d89239d35b0c0 | 2015-05-12 11:57:17+01:00 |
mips: fix broken fulong2e machine
After commit 5312bd8 the bonito_readl() and bonito_writel() have been
accessing incorrect addresses. Consequently QEMU is crashing when trying
to boot Linux kernel on fulong2e machine.
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
| 0ca4f94195cce77b624edc6d9abcf14a3bf01f06 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0ca4f94195cce77b624edc6d9abcf14a3bf01f06 | 2015-04-17 12:11:48+01:00 |
hw/arm/highbank: Fix resource leak and wrong image loading
Coverity reports a resource leak for sysboot_filename which is allocated
by qemu_find_file.
In addition, that name is used to get the size of the image, but a
different image name was used to load it.
In addition, instead of passing the maximum allowed image size the actual
image size was passed to load_image_targphys.
Fix all three issues.
Signed-off-by: Stefan Weil <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 60ff4e63e2ea4738f114cbaf1f17e6e0184fc09c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/60ff4e63e2ea4738f114cbaf1f17e6e0184fc09c | 2015-04-01 17:57:29+01:00 |
nbd: fix resource leak
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 9d0b65e6e8f255dd86630a6873b3859fb6a5477f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9d0b65e6e8f255dd86630a6873b3859fb6a5477f | 2015-03-10 08:15:34+03:00 |
blkdebug: fix "once" rule
Background:
The blkdebug scripts are currently engineered so that when a debug
event occurs, a prefilter browses a master list of parsed rules for a
certain event and adds them to an "active list" of rules to be used for
the forthcoming action, provided the events and state numbers match.
Then, once the request is received, the last active rule is used to
inject an error if certain parameters match.
This active list is cleared every time the prefilter injects a new
rule for the first time during a debug event.
The "once" rule currently causes the error injection, if it is
triggered, to only clear the active list. This is insufficient for
preventing future injections of the same rule.
Remedy:
This patch /deletes/ the rule from the list that the prefilter
browses, so it is gone for good. In V2, we remove only the rule of
interest from the active list instead of allowing the "once" rule to
clear the entire list of active rules.
Impact:
This affects iotests 026. Several ENOSPC tests that used "once" can
be seen to have output that shows multiple failure messages. After
this patch, the error messages tend to be smaller and less severe, but
the injection can still be seen to be working. I have patched the
expected output to expect the smaller error messages.
Signed-off-by: John Snow <[email protected]>
Message-id: [email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| a069e2f1372a0a823ab506fc019852a2a652aa54 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a069e2f1372a0a823ab506fc019852a2a652aa54 | 2015-03-10 14:02:21+01:00 |
bootdevice: add check in restore_boot_order()
qemu_boot_set() can't fail in restore_boot_order(),
then simply assert it doesn't fail, by passing
&error_abort if boot_set_handler set.
Suggested-by: Markus Armbruster <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| 76349f5ba8f4e2f0b8c93c12ec0950a8bc77408a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/76349f5ba8f4e2f0b8c93c12ec0950a8bc77408a | 2015-03-03 13:13:21+08:00 |
bootdevice: check boot order argument validation before vm running
Either 'once' option or 'order' option can take effect for -boot at
the same time, that is say initial startup processing can check only
one. And pc.c's set_boot_dev() fails when its boot order argument
is invalid. This patch provide a solution fix this problem:
1. If "once" is given, register reset handler to restore boot order.
2. Pass the normal boot order to machine creation. Should fail when
the normal boot order is invalid.
3. If "once" is given, set it with qemu_boot_set(). Fails when the
once boot order is invalid.
4. Start the machine.
5. On reset, the reset handler calls qemu_boot_set() to restore boot
order. Should never fail.
Suggested-by: Markus Armbruster <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| f05f47bb5f07ca32a23edf1df3dd75f5004f9325 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f05f47bb5f07ca32a23edf1df3dd75f5004f9325 | 2015-03-03 13:13:21+08:00 |
seabios: update to 1.8.0 release
'git shortlog 8936dbb2..4c59f5d8' for seabios repo:
David Woodhouse (4):
Update EFI_COMPATIBILITY16_TABLE to match 0.98 spec update
build: use -m16 where available instead of asm(".code16gcc")
romlayout: Use .code16 not .code16gcc
vgabios: Use .code16 not .code16gcc
Gerd Hoffmann (2):
add scripts/tarball.sh
build: set LC_ALL=C
Hannes Reinecke (1):
megasas: read addional PCI I/O bar
Ian Campbell (1):
romlayout: Use "rep ; nop" not "rep nop".
Kevin O'Connor (139):
vgabios: Return from handle_1011() if handler found.
edd: Move EDD get drive parameters (int 1348) logic from disk.c to block.c.
edd: Use sectors==-1 to detect removable media.
edd: Separate out ATA and virtio specific parts of fill_edd().
cdemu: store internal cdemu fields in standard "el-torito" spec format.
Move cdemu call interface and disk_ret helper code to disk.c.
smm: Replace SMI assembler code with C code.
smm: Use a C struct to define the layout of the SMM area.
smp: Replace QEMU SMP init assembler code with C; run only in 32bit mode.
Don't enable thread preemption during S3 resume vga option rom execution.
Remove old Bochs bios fixed address string at 0xfff00.
Move most of the VAR16FIXED() defs to misc.c.
build: Avoid absolute paths during "whole-program" compiling.
Make sure handle_smi() and handle_smp() are compiled out if not enabled.
Remove the TODO file.
Abstract reset call (and possible 16bit mode switch) into reset() function.
build: Remove unused function getSectionsStart() from layoutrom.py.
build: Extract section visiting logic in layoutrom.py.
build: Refactor layoutrom.py gc() function.
build: Use customized entry point for each type of build.
build: Refactor findInit() function.
build: Rework getRelocs() to use a hash instead of categories in layoutrom.py
build: Keep segmented sections separate until final link step.
build: Use fileid instead of category to write sections in layoutrom.py.
build: Only export needed fields in LayoutInfo in layoutrom.py.
build: Get fixed address variables from 32bit compile pass (not 16bit)
build: Minor - fix comments referring to old tools/ directory.
xhci: Update the times for usb command timeouts.
ehci: Update usb command timeouts to use usb_xfer_time()
uhci: Update usb command timeouts to use usb_xfer_time()
ohci: Update usb command timeouts to use usb_xfer_time()
vgabios: Fix broken build resulting from e5749978.
boot: Change ":rom%d" boot order rom instance to ":rom%x"
Minor - remove stray tab from src/fw/smm.c.
build: Update kconfig to version in Linux 3.16.
usb: Fix usb_xfer_time() to work when called in 16bit mode.
xhci: Call usb_desc2pipe() on xhci_update_pipe().
xhci: Remove 16bit code wrappers.
xhci: Use high memory instead of low memory for internal storage.
xhci: Move root hub and setup code to top of file.
xhci: Add xhci_check_ports() and xhci_free_pipes() functions.
ehci: Move port power up from ehci_hub_detect() to check_ehci_ports().
usb-hub: Enable power to all ports prior to calling usb_enumerate().
xhci: Change xhci_hub_detect() to use connect status instead of link state.
uhci: Repeatedly poll for device detect for 100ms.
ohci: Repeatedly poll for device detect for 100ms.
ehci: Stall uhci/ohci init only until default port routing is done.
usb: Perform device detect polling on all usb controllers.
ehci: Fix bug in hub port assignment
Revert "Use the extra stack for 16bit USB and PS2 keyboard/mouse commands."
pmm: Fix entry point to support non-zero %ss
Move stack hop code below call32/call16 code in stacks.c
Add need_hop_back() call that determines if stack_hop_back is needed
Update invoke_mouse_handler() to use need_hop_back()
Update stack_hop_back() to jump to 16bit mode if called in 32bit mode.
Track when entering via call32() and use the same mode for stack_hop_back()
Simplify farcall16 code
Update reset() to use call16_back()
build: Support declaring 32bit C functions that must reside in the f-segment
Move call16() functions from romlayout.S to inline assembler in stacks.c
Break up call32() into call32() and call32_sloppy()
Fully restore 16bit state during call16_sloppy()
Implement call32 mechanism using SMIs.
Move a20 code from system.c and ps2port.h to x86.h
Backup and restore a20 on call32_sloppy()
usb: Rename ?hci_control() to ?hci_send_control()
usb: Rename usb_getFrameExp() to usb_get_period()
usb: Rename findEndPointDesc() to usb_find_desc()
usb: Rename send_default_control() to usb_send_default_control()
usb: Rename free_pipe() to usb_free_pipe()
usb: Clarify usb freelist manipulations
xhci: Change xhci_update_pipe() to xhci_realloc_pipe() and use for alloc too
uhci: Export uhci_realloc_pipe() instead of uhci_alloc_pipe()
ohci: Export ohci_realloc_pipe() instead of ohci_alloc_pipe()
ehci: Export ehci_realloc_pipe() instead of ehci_alloc_pipe()
usb: Use usb_realloc_pipe for pipe alloc, update, and free.
Use 32bit memcpy in int1587 when applicable
Don't clobber %ax on ENTRY_INTO32 macro
Create assembler macros for saving and restoring 'struct bregs'
Do full BREGS backup/restore for pmm, pnp, and irqentry_extrastack
Remove unused macro ENTRY_ST
vgabios: Don't declare custom internal BDA storage in std/bda.h
vgabios: Cache a pointer to the current mode struct in the BDA
vgabios: Don't pass vmode_g to vgafb_move_chars() / vgafb_clear_chars()
vgabios: Rename vbe_flags to flags
vgabios: Set cursor shape fixes
vgabios: Refactor get/set_cursor_shape() code
vgabios: Only init BDA device details in init_bios_area()
vgabios: Only set the dcc_index=8 if stdvga ports are available
vgabios: Move standard table definitions to std/vga.h
vgabios: Fill in available legacy modes in video_func_static at runtime
vgabios: Add support for reading framebuffer in "direct" mode
Fix PNP regression introduced in 99cb8f3e due to missed conversion
Minor - move PORT_PS2_CTRLB from hw/ps2port.h to hw/timer.c
vgabios: Support emulating text mode attributes while in graphics mode
vgabios: Add software cursor capability
Use an aligned stack offset when entering on the extra stack
Minor - comment updates in romlayout.S
Fix build issue on gcc34
pciinit: Fix build warning in mch_pci_slot_get_irq()
floppy: Make sure to yield() during floppy PIO
Minor - be consistent in placement of .code16/32 in romlayout.S
Use macros for .code16/32 mode switches in inline asm in stacks.c
Eliminate FUNCFSEG - only force portions of inline asm to f-segment
usb: Update USB hub code to support super speed hubs
Simplify README files - point to online documentation instead
sdcard: Initial support for SD cards on PCI SDHCI controllers on QEMU
Add wiki documentation to repository
docs: Don't point to repo README files
docs: Add info on MODE16/MODESEGMENT compile time flags
docs: Add page describing SeaBIOS final object linking
scsi: Move cdb_* functions above scsi_* functions
scsi: Move process_scsi_op() to hw/blockcmd.c and rename
cdrom: call scsi_process_op() instead of cdb_read()
scsi: Don't export cdb_* functions
cdrom: Break up very large read requests into smaller requests
block: Check for read/write requests over 64K
usb: Add support for OHCI bulk transfers
readserial: Enhance pipe support
docs: Add documentation on using readserial.py script
uhci: Enable "depth" tree traversal for bulk transfers
uhci: Increase bulk transfer STACKTDS to 16
vgabios: Support emulated text in gfx_read_char()
ehci: No need to support td array wrapping
ehci: Simplify fillTDbuffer() and rename
ehci: Merge ehci_send_control with ehci_send_bulk
ohci: Merge ohci_send_control with ohci_send_bulk
uhci: Merge uhci_send_control with uhci_send_bulk
xhci: Merge xhci_send_control with xhci_send_bulk
usb: Use usb_send_pipe() now that all drivers have x_send_pipe()
xhci: Move xhci_xfer_x() functions together
xhci: Merge some xhci_xfer_x() functions into xhci_send_pipe()
usb: Control transfers always have an 8 byte command size
usb: Minor - properly free memory on get_device_config() error path
checkstack: Handle callw instruction
docs: Document why v1.6.3 release came after v0.6.2
docs: Update release history with dates of stable releases
docs: There is only one VAR16 flag now
docs: Note v1.8.0 release
Marcel Apfelbaum (1):
hw/pci: reserve IO and mem for pci express downstream ports with no devices attached
Markus Armbruster (1):
boot: Fix boot order for SCSI target, lun > 9
Paolo Bonzini (5):
piix: add and use dev-piix.h
smm: complete SMM setup
smm: unify SMM handlers
vgabios: fix graphics operation with Bochs VGA in non-DISPI modes
vgabios: implement read char in graphics mode
zhanghailiang (1):
acpi: use specified macro instead of magic-number
Signed-off-by: Gerd Hoffmann <[email protected]>
| 21f5826a04d38e19488f917e1eef22751490c769 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/21f5826a04d38e19488f917e1eef22751490c769 | 2015-02-19 09:33:03+01:00 |
nbd: fix the co_queue multi-adding bug
When we tested the VM migartion between different hosts with NBD
devices, we found if we sent a cancel command after the drive_mirror
was just started, a coroutine re-enter error would occur. The stack
was as follow:
(gdb) bt
00) 0x00007fdfc744d885 in raise () from /lib64/libc.so.6
01) 0x00007fdfc744ee61 in abort () from /lib64/libc.so.6
02) 0x00007fdfca467cc5 in qemu_coroutine_enter (co=0x7fdfcaedb400, opaque=0x0)
at qemu-coroutine.c:118
03) 0x00007fdfca467f6c in qemu_co_queue_run_restart (co=0x7fdfcaedb400) at
qemu-coroutine-lock.c:59
04) 0x00007fdfca467be5 in coroutine_swap (from=0x7fdfcaf3c4e8,
to=0x7fdfcaedb400) at qemu-coroutine.c:96
05) 0x00007fdfca467cea in qemu_coroutine_enter (co=0x7fdfcaedb400, opaque=0x0)
at qemu-coroutine.c:123
06) 0x00007fdfca467f6c in qemu_co_queue_run_restart (co=0x7fdfcaedbdc0) at
qemu-coroutine-lock.c:59
07) 0x00007fdfca467be5 in coroutine_swap (from=0x7fdfcaf3c4e8,
to=0x7fdfcaedbdc0) at qemu-coroutine.c:96
08) 0x00007fdfca467cea in qemu_coroutine_enter (co=0x7fdfcaedbdc0, opaque=0x0)
at qemu-coroutine.c:123
09) 0x00007fdfca4a1fa4 in nbd_recv_coroutines_enter_all (s=0x7fdfcaef7dd0) at
block/nbd-client.c:41
10) 0x00007fdfca4a1ff9 in nbd_teardown_connection (client=0x7fdfcaef7dd0) at
block/nbd-client.c:50
11) 0x00007fdfca4a20f0 in nbd_reply_ready (opaque=0x7fdfcaef7dd0) at
block/nbd-client.c:92
12) 0x00007fdfca45ed80 in aio_dispatch (ctx=0x7fdfcae15e90) at aio-posix.c:144
13) 0x00007fdfca45ef1b in aio_poll (ctx=0x7fdfcae15e90, blocking=false) at
aio-posix.c:222
14) 0x00007fdfca448c34 in aio_ctx_dispatch (source=0x7fdfcae15e90, callback=0x0,
user_data=0x0) at async.c:212
15) 0x00007fdfc8f2f69a in g_main_context_dispatch () from
/usr/lib64/libglib-2.0.so.0
16) 0x00007fdfca45c391 in glib_pollfds_poll () at main-loop.c:190
17) 0x00007fdfca45c489 in os_host_main_loop_wait (timeout=1483677098) at
main-loop.c:235
18) 0x00007fdfca45c57b in main_loop_wait (nonblocking=0) at main-loop.c:484
19) 0x00007fdfca25f403 in main_loop () at vl.c:2249
20) 0x00007fdfca266fc2 in main (argc=42, argv=0x7ffff517d638,
envp=0x7ffff517d790) at vl.c:4814
We find the nbd_recv_coroutines_enter_all function (triggered by a cancel
command or a network connection breaking down) will enter a coroutine which
is waiting for the sending lock. If the lock is still held by another coroutine,
the entering coroutine will be added into the co_queue again. Latter, when the
lock is released, a coroutine re-enter error will occur.
This bug can be fixed simply by delaying the setting of recv_coroutine as
suggested by paolo. After applying this patch, we have tested the cancel
operation in mirror phase looply for more than 5 hous and everything is fine.
Without this patch, a coroutine re-enter error will occur in 5 minutes.
Signed-off-by: Bn Wu <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 141cabe6f144a1acb128186caf686f8fbde0a7e4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/141cabe6f144a1acb128186caf686f8fbde0a7e4 | 2015-02-16 15:07:17+00:00 |
linux-user: correct stat structure in MIPS N32
Simple "hello world" MIPS N32 userland program crashes with segfault due to
incorrectly defined stat structure in QEMU.
Correct "target_stat" definition to match kernel's "stat64" as in MIPS N32
there are only plain "stat" syscalls using 64-bit structure.
Reported-by: Daniel Sanders <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
Tested-by: Daniel Sanders <[email protected]>
Reviewed-by: James Hogan <[email protected]>
| 1ab2aea2489f34a05dabfe5bd91a76d89dd8c922 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1ab2aea2489f34a05dabfe5bd91a76d89dd8c922 | 2015-02-13 14:11:29+00:00 |
qemu-sockets: Fix buffer overflow in inet_parse()
The size of the stack allocated host[] array didn't account for the
terminating '\0' byte that sscanf() writes. Fix the array size.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 55a10996034cb2e633f0437cedd97f345183c0ec | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/55a10996034cb2e633f0437cedd97f345183c0ec | 2015-02-10 09:27:20+03:00 |
scsi: Clean up duplicated error in legacy if=scsi code
Commit a818a4b changed scsi_bus_legacy_handle_cmdline() to report
errors from scsi_bus_legacy_add_drive() with error_report() in
addition to returning them. That's inappropriate.
Two kinds of callers:
1. realize methods (devices "esp", "virtio-scsi-device" and
"spapr-vscsi")
The error object gets passed up the call chain until it gets
reported again and freed.
Example:
$ qemu-system-arm -M virt -S -display none \
> -drive if=scsi,id=foo,bus=1,file=tmp.qcow2 \
> -device nec-usb-xhci -device usb-storage,drive=foo \
> -device virtio-scsi-pci
qemu-system-arm: -drive if=scsi,id=foo,bus=1,file=tmp.qcow2: Property 'scsi-disk.drive' can't take value 'foo', it's in use
qemu-system-arm: -drive if=scsi,id=foo,bus=1,file=tmp.qcow2: Setting drive property failed
qemu-system-arm: -device virtio-scsi-pci: Setting drive property failed
qemu-system-arm: -device virtio-scsi-pci: Device initialization failed
qemu-system-arm: -device virtio-scsi-pci: Device 'virtio-scsi-pci' could not be initialized
The second message in this error cascade comes from
scsi_bus_legacy_handle_cmdline(). The error object then gets
passed up to the qdev_init() called from
virtio_scsi_pci_init_pci(), which reports it again.
2. init methods (devices "am53c974", "dc390", "lsi53c895a",
"lsi53c810", "megasas", "megasas-gen2")
init methods need to report their errors with qerror_report().
These don't. The inappropriate error_report() papers over the bug.
error_report() isn't the same as qerror_report() in QMP context,
but this can't actually happen: QMP can still only hot-plug, and
callers call scsi_bus_legacy_handle_cmdline() only on cold-plug.
Except for sysbus_esp_realize(), but that can't be hot-plugged at
all, as far as I can tell.
Fix the init methods and drop the inappropriate error_report() in
scsi_bus_legacy_handle_cmdline().
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| fa617181839741727d0067ea68807133f498f29b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fa617181839741727d0067ea68807133f498f29b | 2015-03-10 11:18:23+01:00 |
qemu-iotests: Add 093 for IO throttling
This case utilizes qemu-io command "aio_{read,write} -q" to verify the
effectiveness of IO throttling options.
It's implemented by driving the vm timer from qtest protocol, so the
throttling timers are signaled with determinied time duration. Then we
verify the completed IO requests are within 10% error of bps and iops
limits.
"null" protocol is used as the disk backend so that no actual disk IO is
performed on host, this will make the blockstats much more
deterministic. Both "null-aio" and "null-co" are covered, which is also
a simple cross validation test for the driver code.
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| fb13bbf2fd5292d0aab617709017a4032f328730 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fb13bbf2fd5292d0aab617709017a4032f328730 | 2015-02-16 15:07:18+00:00 |
qemu-iotests: Add "_supported_os Linux" to 058
Other cases have this, and this test is not portable as well, as we want
to add "make check-block" to "make check", it shouldn't fail on Mac OS
X.
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 9c8ab1ae0d7c4a135c832c784f088ae5e2140585 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9c8ab1ae0d7c4a135c832c784f088ae5e2140585 | 2015-01-13 13:43:28+00:00 |
qmp: Add command 'blockdev-backup'
Similar to drive-backup, but this command uses a device id as target
instead of creating/opening an image file.
Also add blocker on target bs, since the target is also a named device
now.
Add check and report error for bs == target which became possible but is
an illegal case with introduction of blockdev-backup.
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: John Snow <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
Signed-off-by: Max Reitz <[email protected]>
| c29c1dd312f39ec18a3c6177c6da09a75e095d70 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c29c1dd312f39ec18a3c6177c6da09a75e095d70 | 2015-01-13 11:47:56+00:00 |
serial: clean up THRE/TEMT handling
- assert TEMT is cleared before sending a character; we'll get one from
TSR if tsr_retry > 0, from the FIFO or THR otherwise
- assert THRE cleared and FIFO not empty (if enabled) before fetching a
character to send. This effectively reverts dffacd46, but the check
makes no sense and commit f702e62 (serial: change retry logic to avoid
concurrency, 2014-07-11) must have made it unnecessary. The commit
message for f702e62 talks about multiple calls to qemu_chr_fe_add_watch
triggering s->tsr_retry >= MAX_XMIT_RETRY, but other failures were
possible. For example, if you have multiple calls, the subsequent ones
will see s->tsr_retry == 0 and will find THRE and/or TEMT on entry.
- for clarity, raise THRI immediately after the code sets THRE
- check THRE to see if another character has to be sent. This makes
the assertions more obvious and also means TEMT has to be set as soon as
the loop ends. It makes the loop send both TSR and THR if flow-control
happens in non-FIFO mode. Previously, THR would be lost.
- clear TEMT together with THRE even in the non-FIFO case
The last two items are bugfixes, but they were just found by inspection
and do not squash known bugs.
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 0d931d706266d6ada3bf22d3afca1afdc8d12fa9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0d931d706266d6ada3bf22d3afca1afdc8d12fa9 | 2014-12-15 17:33:37+01:00 |
iotests: Fix test 039
Test 039 used qemu-io -c abort for simulating a qemu crash; however,
abort() generally results in a core dump and ulimit -c 0 is no reliable
way of preventing that. Use "sigraise $(kill -l KILL)" instead to have
it crash without a core dump.
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 3f394472c5bca59de5cab9baafdff1984b0213a3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3f394472c5bca59de5cab9baafdff1984b0213a3 | 2014-12-12 15:48:26+00:00 |
Start migrating migration code into a migration directory
The migration code now occupies a fair chunk of the top level .c
files, it seems time to give it it's own directory.
I've not touched:
arch_init.c - that's mostly RAM migration but has a few random other
bits
savevm.c - because it's built target specific
This is purely a code move; no code has changed.
- it fails checkpatch because of old violations, it feels safer
to keep this as purely a move and fix those at some mythical future
date.
The xbzrle and vmstate tests are now only run for softmmu builds
since they require files in the migrate/ directory which is only built
for softmmu.
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
| 60fe637bf0e4d7989e21e50f52526444765c63b4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/60fe637bf0e4d7989e21e50f52526444765c63b4 | 2014-12-16 17:47:36+05:30 |
dump: Fix dump-guest-memory termination and use-after-close
dump_iterate() dumps blocks in a loop. Eventually, get_next_block()
returns "no more". We then call dump_completed(). But we neglect to
break the loop! Broken in commit 4c7e251a.
Because of that, we dump the last block again. This attempts to write
to s->fd, which fails if we're lucky. The error makes dump_iterate()
return failure. It's the only way it can ever return.
Theoretical: if we're not so lucky, something else has opened something
for writing and got the same fd. dump_iterate() then keeps looping,
messing up the something else's output, until a write fails, or the
process mercifully terminates.
The obvious fix is to restore the return lost in commit 4c7e251a. But
the root cause of the bug is needlessly opaque loop control. Replace it
by a clean do ... while loop.
This makes the badly chosen return values of get_next_block() more
visible. Cleaning that up is outside the scope of this bug fix.
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 08a655be71d0a130a5d9bf7816d096ec31c4f055 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/08a655be71d0a130a5d9bf7816d096ec31c4f055 | 2014-11-02 10:04:34+03:00 |
qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard
When the Qcow2DiscardRegion is adjacent to another one referenced by "d",
free this Qcow2DiscardRegion metadata referenced by "p" after
it was removed from s->discards queue.
Signed-off-by: Zhang Haoyu <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| d8bb71b6227366c188595b91c24a58c9b06e46dd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d8bb71b6227366c188595b91c24a58c9b06e46dd | 2014-10-20 13:41:26+02:00 |
block/migration: Disable cache invalidate for incoming migration
When migrated using libvirt with "--copy-storage-all", at the end of
migration there is race between NBD mirroring task trying to do flush
and migration completion, both end up invalidating cache. Since qcow2
driver does not handle this situation very well, random crashes happen.
This disables the BDRV_O_INCOMING flag for the block device being migrated
once the cache has been invalidated.
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
--
fixed parens by hand
Signed-off-by: Juan Quintela <[email protected]>
| 7ea2d269cb84ca7a2f4b7c3735634176f7c1dc35 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7ea2d269cb84ca7a2f4b7c3735634176f7c1dc35 | 2014-10-14 09:35:21+02:00 |
virtio-scsi: fix use-after-free of VirtIOSCSIReq
scsi_req_continue can complete the request and cause the VirtIOSCSIReq
to be freed. Fetch req->sreq just once to avoid the bug.
Reported-by: Richard Jones <[email protected]>
Tested-by: Richard Jones <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 35e4e96c4d5bfcf8a22930d8e99f7c8c44420062 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/35e4e96c4d5bfcf8a22930d8e99f7c8c44420062 | 2014-10-09 15:36:15+02:00 |
block/raw-posix: Fix disk corruption in try_fiemap
Using fiemap without FIEMAP_FLAG_SYNC is a known corrupter.
Add the FIEMAP_FLAG_SYNC flag to the FS_IOC_FIEMAP ioctl. This has
the downside of significantly reducing performance.
Reported-By: Michael Steffens <[email protected]>
Signed-off-by: Tony Breeds <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: Markus Armbruster <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Cc: Max Reitz <[email protected]>
Cc: Pádraig Brady <[email protected]>
Cc: Eric Blake <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 38c4d0aea3e1264c86e282d99560330adf2b6e25 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/38c4d0aea3e1264c86e282d99560330adf2b6e25 | 2014-10-20 13:41:26+02:00 |
libqos: use microseconds instead of iterations for virtio timeout
Some hosts are slow or overloaded so test execution takes a long time.
Test cases use timeouts to protect against an infinite loop stalling the
test forever (especially important in automated test setups).
Commit 6cd14054b67774cc58a51fca6660cfa1d3c08059 ("libqos virtio:
Increase ISR timeout") increased the clock_step() value in an attempt to
lengthen the virtio interrupt wait timeout, but timeout failures are
still occuring on the Travis automated testing platform.
This is because clock_step() only affects the guest's virtual time.
Virtio requests can be bottlenecked on host disk I/O latency - which
cannot be improved by stepping the clock, so the fix was ineffective.
This patch changes the qvirtio_wait_queue_isr() and
qvirtio_wait_config_isr() timeout mechanism from loop iterations to
microseconds. This way the test case can specify an absolute 30 second
timeout. Number of loop iterations is not a reliable timeout mechanism
since the speed depends on many factors including host performance.
Tests should no longer timeout on overloaded Travis instances.
Cc: Marc Marí <[email protected]>
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 70556264a89a268efba1d7e8e341adcdd7881eb4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/70556264a89a268efba1d7e8e341adcdd7881eb4 | 2014-09-29 17:31:11+01:00 |
blockdev: Refuse to drive_del something added with blockdev-add
For some device models, the guest can prevent unplug. Some users need a
way to forcibly revoke device model access to the block backend then, so
the underlying images can be safely used for something else.
drive_del lets you do that. Unfortunately, it conflates revoking access
with destroying the backend.
Commit 9063f81 made drive_del immediately destroy the root BDS. Nice:
the device name becomes available for reuse immediately. Not so nice:
the device model's pointer to the root BDS dangles, and we're prone to
crash when the memory gets reused.
Commit d22b2f4 fixed that by hiding the root BDS instead of destroying
it. Destruction only happens on unplug. "Hiding" means removing it
from bdrv_states and graph_bdrv_states; see bdrv_make_anon().
This "destroy on revoke" is a misfeature we don't want to carry
forward to blockdev-add, just like "destroy on unplug" (commit
2d246f0). So make drive_del fail on anything added with blockdev-add.
We'll add separate QMP commands to revoke device model access and to
destroy backends.
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 48f364dd0ba8d6323ee9ac2b35996eef667bac39 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/48f364dd0ba8d6323ee9ac2b35996eef667bac39 | 2014-09-11 17:14:24+02:00 |
pty: Fix byte loss bug when connecting to pty
When trying to print data to the pty, we first check if it is connected.
If not, we try to reconnect, but we drop the pending data even if we
have successfully reconnected; this makes us lose the first byte of the very
first transmission.
This small fix addresses the issue by checking once more if the pty is connected
after having tried to reconnect.
Signed-off-by: Sebastian Tanase <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| cf7330c759345de2efe9c0df7921189ac5ff11d3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cf7330c759345de2efe9c0df7921189ac5ff11d3 | 2014-09-05 13:27:10+02:00 |
qdev: Use NULL instead of local_err for qbus_child unrealize
Forcefully unrealize all children regardless of errors in earlier
iterations (if any). We should keep going with cleanup operation
rather than report an error immediately. Therefore store the first
child unrealization failure and propagate it at the end. We also
forcefully unregister vmsd and unrealize actual object, too.
Signed-off-by: Gonglei <[email protected]>
Reviewed-by: Peter Crosthwaite <[email protected]>
Cc: [email protected]
Signed-off-by: Andreas Färber <[email protected]>
| cd4520adcab70dbac8db3fe4d41836dca63715a4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cd4520adcab70dbac8db3fe4d41836dca63715a4 | 2014-09-04 19:15:06+02:00 |
quorum: Fix leak of opts in quorum_open
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Benoît Canet <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 8df3abfceef557551f00adac1618ddd6fe46f85c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8df3abfceef557551f00adac1618ddd6fe46f85c | 2014-08-29 17:10:18+01:00 |
linux-user: fix file descriptor leaks
Handle variable "fd_orig" going out of scope leaks the handle.
Signed-off-by: zhanghailiang <[email protected]>
Reviewed-by: Gonglei <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 680dfde91981516942ec557ef1c27753db24cbe8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/680dfde91981516942ec557ef1c27753db24cbe8 | 2014-08-24 13:18:28+04:00 |
qcow2: Catch !*host_offset for data allocation
qcow2_alloc_cluster_offset() uses host_offset == 0 as "no preferred
offset" for the (data) cluster range to be allocated. However, this
offset is actually valid and may be allocated on images with a corrupted
refcount table or first refcount block.
In this case, the corruption prevention should normally catch that
write anyway (because it would overwrite the image header). But since 0
is a special value here, the function assumes that nothing has been
allocated at all which it asserts against.
Because this condition is not qemu's fault but rather that of a broken
image, it shouldn't throw an assertion but rather mark the image corrupt
and show an appropriate message, which this patch does by calling the
corruption check earlier than it would be called normally (before the
assertion).
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| ff52aab2df5c5e10f231481961b88d25a3021724 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ff52aab2df5c5e10f231481961b88d25a3021724 | 2014-08-15 15:07:16+02:00 |
cloop: Handle failure for potentially large allocations
Some code in the block layer makes potentially huge allocations. Failure
is not completely unexpected there, so avoid aborting qemu and handle
out-of-memory situations gracefully.
This patch addresses the allocations in the cloop block driver.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
| 4ae7a52e435e4e50a27e0ccc441da80a7fccbc21 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4ae7a52e435e4e50a27e0ccc441da80a7fccbc21 | 2014-08-15 15:07:15+02:00 |
image-fuzzer: Add generators of L1/L2 tables
Entries in L1/L2 entries are based on a portion of random guest clusters.
L2 entries contain offsets to host image clusters filled with random data.
Clusters for L1/L2 tables and guest data are selected randomly.
Signed-off-by: Maria Kustova <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 38eb193b8b14844a5d5ef65b54a4926e931ac311 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/38eb193b8b14844a5d5ef65b54a4926e931ac311 | 2014-08-15 18:03:14+01:00 |
target-mips: Ignore unassigned accesses with KVM
MIPS registers an unassigned access handler which raises a guest bus
error exception. However this causes QEMU to crash when KVM is enabled
as it isn't called from the main execution loop so longjmp() gets called
without a corresponding setjmp().
Until the KVM API can be updated to trigger a guest exception in
response to an MMIO exit, prevent the bus error exception being raised
from mips_cpu_unassigned_access() if KVM is enabled.
The check is at run time since the do_unassigned_access callback is
initialised before it is known whether KVM will be enabled.
The problem can be triggered with Malta emulation by making the guest
write to the reset region at physical address 0x1bf00000, since it is
marked read-only which is treated as unassigned for writes.
Signed-off-by: James Hogan <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Gleb Natapov <[email protected]>
Cc: Christoffer Dall <[email protected]>
Cc: Sanjay Lal <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| eddedd546a68f6ac864b71d50dd8d39b939b724b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/eddedd546a68f6ac864b71d50dd8d39b939b724b | 2014-08-07 15:09:48+02:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.