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
⌀ |
---|---|---|---|---|---|---|---|
lm32: fix build breakage due to uninitialized variable 'r'
gcc 4.5.2 correctly complains that r is potentially uninitialized in this
function.
Signed-off-by: Anthony Liguori <[email protected]>
| 7f7454ec296b3403b4accec55349a8f0232d3576 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7f7454ec296b3403b4accec55349a8f0232d3576 | 2011-04-13 07:41:19-05:00 |
e1000: check buffer availability
Reduce spurious packet drops on RX ring empty
by verifying that we have at least 1 buffer
ahead of the time.
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 6cdfab2868dd593902e2b7db3ba9f49f2cc03e3f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6cdfab2868dd593902e2b7db3ba9f49f2cc03e3f | 2011-03-28 18:34:23+02:00 |
tcg: Add support for debugging leakage of temporaries
Add support (if CONFIG_DEBUG_TCG is defined) for debugging leakage
of temporary variables. Generally any temporaries created by
a target while it is translating an instruction should be freed
by the end of that instruction; otherwise carefully crafted
guest code could cause TCG to run out of temporaries and assert.
By calling tcg_check_temp_count() after each instruction we can
check that we are not leaking temporaries in this way.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| 27bfd83c336283d1f7a5345ee386c4cd7b80db61 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/27bfd83c336283d1f7a5345ee386c4cd7b80db61 | 2011-03-07 09:26:06+01:00 |
check-qdict: Fix possible crash
This warning is reported by cppcheck:
check-qdict.c:270: warning: scanf without field width limits can crash with huge input data
Fix it by limiting the field widths to 127 (both key and value take
127 characters + a terminating '\0' byte).
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| 7464f0587b2938a3e10e9f995f384df8a5f298ac | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7464f0587b2938a3e10e9f995f384df8a5f298ac | 2011-02-20 18:45:09+01:00 |
qed: Images with backing file do not require QED_F_NEED_CHECK
The consistency check on open is necessary in order to fix inconsistent
table offsets left as a result of a crash mid-operation. Images with a
backing file actually flush before updating table offsets and are
therefore guaranteed to be consistent. Do not mark these images dirty.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 0d09c7970063ecdabdc2841ffa32e1cf3e032336 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0d09c7970063ecdabdc2841ffa32e1cf3e032336 | 2011-01-31 10:03:00+01:00 |
Implement hcall based RTAS for pSeries machines
On pSeries machines, operating systems can instantiate "RTAS" (Run-Time
Abstraction Services), a runtime component of the firmware which implements
a number of low-level, infrequently used operations. On logical partitions
under a hypervisor, many of the RTAS functions require hypervisor
privilege. For simplicity, therefore, hypervisor systems typically
implement the in-partition RTAS as just a tiny wrapper around a hypercall
which actually implements the various RTAS functions.
This patch implements such a hypercall based RTAS for our emulated pSeries
machine. A tiny in-partition "firmware" calls a new hypercall, which
looks up available RTAS services in a table.
Signed-off-by: David Gibson <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 39ac8455106af1ed669b8e10223420cf1ac5b190 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/39ac8455106af1ed669b8e10223420cf1ac5b190 | 2011-04-01 18:34:56+02:00 |
vvfat: fix a file descriptor leak
Fix a file descriptor leak, reported by cppcheck:
[/src/qemu/block/vvfat.c:759]: (error) Resource leak: dir
Signed-off-by: Blue Swirl <[email protected]>
| 08089edcd25b2105a7599309afd0225e839debc6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/08089edcd25b2105a7599309afd0225e839debc6 | 2011-01-12 19:48:58+00:00 |
kvm: x86: Remove obsolete SS.RPL/DPL aligment
This seems to date back to the days KVM didn't support real mode. The
check is no longer needed and, even worse, is corrupting the guest state
in case SS.RPL != DPL.
Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
| 3980e3024b2d1677a9910de5e35d22d5d8392522 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3980e3024b2d1677a9910de5e35d22d5d8392522 | 2011-01-21 14:05:22-02:00 |
usb-bsd: fix a file descriptor leak
Fix a file descriptor leak reported by cppcheck:
[/src/qemu/usb-bsd.c:392]: (error) Resource leak: bfd
[/src/qemu/usb-bsd.c:388]: (error) Resource leak: dfd
Rearrange the code to avoid descriptor leaks. Also add braces as
needed.
Signed-off-by: Blue Swirl <[email protected]>
| 1a20a032ccbb5800bfdfc75accfcff2ac67f5bcb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1a20a032ccbb5800bfdfc75accfcff2ac67f5bcb | 2011-01-09 14:43:33+00:00 |
qcow2: Invalidate cache after failed read
The cache content may be destroyed after a failed read, better not use it any
more.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 1c02e2a17104fe7fc11893125864dc0daf1e6d5b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1c02e2a17104fe7fc11893125864dc0daf1e6d5b | 2010-11-04 13:54:37+01:00 |
Fix segfault in mmio subpage handling code.
It is possible that subpage mmio is registered over existing memory
page. When this happens "memory" will have real memory address and not
index into io_mem array so next access to the page will generate
segfault. It is uncommon to have some part of a page to be accessed as
memory and some as mmio, but qemu shouldn't crash even when guest does
stupid things. So lets just pretend that the rest of the page is
unassigned if guest configure part of the memory page as mmio.
Signed-off-by: Gleb Natapov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
| 95c318f5e1f88d7e5bcc6deac17330fd4806a2d3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/95c318f5e1f88d7e5bcc6deac17330fd4806a2d3 | 2010-08-28 08:47:23+00:00 |
Introduce qemu_madvise()
vl.c has a Sun-specific hack to supply a prototype for madvise(),
but the call site has apparently moved to arch_init.c.
Haiku doesn't implement madvise() in favor of posix_madvise().
OpenBSD and Solaris 10 don't implement posix_madvise() but madvise().
MinGW implements neither.
Check for madvise() and posix_madvise() in configure and supply qemu_madvise()
as wrapper. Prefer madvise() over posix_madvise() due to flag availability.
Convert all callers to use qemu_madvise() and QEMU_MADV_*.
Note that on Solaris the warning is fixed by moving the madvise() prototype,
not by qemu_madvise() itself. It helps with porting though, and it simplifies
most call sites.
v7 -> v8:
* Some versions of MinGW have no sys/mman.h header. Reported by Blue Swirl.
v6 -> v7:
* Adopt madvise() rather than posix_madvise() semantics for returning errors.
* Use EINVAL in place of ENOTSUP.
v5 -> v6:
* Replace two leftover instances of POSIX_MADV_NORMAL with QEMU_MADV_INVALID.
Spotted by Blue Swirl.
v4 -> v5:
* Introduce QEMU_MADV_INVALID, suggested by Alexander Graf.
Note that this relies on -1 not being a valid advice value.
v3 -> v4:
* Eliminate #ifdefs at qemu_advise() call sites. Requested by Blue Swirl.
This will currently break the check in kvm-all.c by calling madvise() with
a supported flag, which will not fail. Ideas/patches welcome.
v2 -> v3:
* Reuse the *_MADV_* defines for QEMU_MADV_*. Suggested by Alexander Graf.
* Add configure check for madvise(), too.
Add defines to Makefile, not QEMU_CFLAGS.
Convert all callers, untested. Suggested by Blue Swirl.
* Keep Solaris' madvise() prototype around. Pointed out by Alexander Graf.
* Display configure check results.
v1 -> v2:
* Don't rely on posix_madvise() availability, add qemu_madvise().
Suggested by Blue Swirl.
Signed-off-by: Andreas Färber <[email protected]>
Cc: Blue Swirl <[email protected]>
Cc: Alexander Graf <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
| e78815a554adaa551d62a71be10ee2fcf128e473 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e78815a554adaa551d62a71be10ee2fcf128e473 | 2010-09-25 11:26:05+00:00 |
Initialize a variable in all cases
Commit d167f9bc06a577d6c85b8ed6991c1efe175aae7d missed this one:
/src/qemu/ui/vnc-enc-tight.c:1483: warning: 'ret' may be used uninitialized in this function
Signed-off-by: Blue Swirl <[email protected]>
| ad7ee4ad6c3a5388acf94dd532d291ea6d3a5972 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ad7ee4ad6c3a5388acf94dd532d291ea6d3a5972 | 2010-07-31 19:43:37+00:00 |
Fix cpu_unlink_tb race
If a signal hit after the env->exit_request check but before cpu_exec
updated env->current_tb, cpu_unlink_tb called from the signal hander
will not unlink the current TB. This may leave us stuck in a guest loop
if no further unlink is invoked.
Fix this by reordering current_tb update and exit_request check,
additionally enforcing the correct order via a compiler barrier.
Signed-off-by: Jan Kiszka <[email protected]>
Acked-by: Paolo Bonzini <[email protected]>
Reviewed-by: Marcelo Tosatti <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| b0052d15315f672d30da5f0ea0a57b1a7c232a03 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b0052d15315f672d30da5f0ea0a57b1a7c232a03 | 2010-07-22 05:52:09+02:00 |
scsi: scsi_bus_legacy_handle_cmdline() can fail, fix callers
None of its callers checks for failure. scsi_hot_add() can crash
because of that:
(qemu) drive_add 4 if=scsi,format=host_device,file=/dev/sg1
scsi-generic: scsi generic interface too old
Segmentation fault (core dumped)
Fix all callers, not just scsi_hot_add().
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| fa66b909f382619da15f8c7e323145adfa94fdac | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fa66b909f382619da15f8c7e323145adfa94fdac | 2010-07-02 13:18:01+02:00 |
qdev: Don't leak string property value on hot unplug
parse_string() qemu_strdup()s the property value. It is never freed.
It needs to be freed along with the device. Otherwise, the value of
scsi-disk property "ver" gets leaked when hot-unplugging the disk, for
instance.
Call new PropertyInfo method free() from qdev_free(). Implement it
for qdev_prop_string.
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| d21357df9a2a6b7e6bb2f579d04877f3bd65c557 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d21357df9a2a6b7e6bb2f579d04877f3bd65c557 | 2010-06-04 11:43:39+02:00 |
qcow2: Fix corruption after error in update_refcount
After it is done with updating refcounts in the cache, update_refcount writes
all changed entries to disk. If a refcount block allocation fails, however,
there was no change yet and therefore first_index = last_index = -1. Don't
treat -1 as a normal sector index (resulting in a 512 byte write!) but return
without updating anything in this case.
Signed-off-by: Kevin Wolf <[email protected]>
| 86fa8da83771238de55dc44819a1a27bafef5353 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/86fa8da83771238de55dc44819a1a27bafef5353 | 2010-05-28 13:29:16+02:00 |
sparc64: fix pstate privilege bits
- refactor code to handle hpstate only if available for current cpu
- conditionally set hypervisor bit in hpstate register
- reorder softmmu indices so user accessable ones go first, translation context
macros supervisor() and hypervisor() adjusted as well
- disable sparcv8 registers for TARGET_SPARC64
- fix cpu_mmu_index to use sparcv9 bits only
Signed-off-by: Igor V. Kovalenko <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
| 2aae2b8e0abd58e76d616bcbe93c6966d06d0188 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2aae2b8e0abd58e76d616bcbe93c6966d06d0188 | 2010-05-22 12:48:52+00:00 |
pci: cleanly backout of pci_qdev_init()
If the init function of a device fails, as might happen with device
assignment, we never undo the work done by do_pci_register_device().
This not only causes a bit of a memory leak, but also leaves a bogus
pointer in the bus devices array that can cause a segfault or
garbage data from 'info pci'.
Signed-off-by: Alex Williamson <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 925fe64ae7b487fdb7bd56fcab63e2f87653c226 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/925fe64ae7b487fdb7bd56fcab63e2f87653c226 | 2010-05-12 01:59:11+03:00 |
sparc64: implement global translation table entries v1
- match global tte against any context
- show global tte in MMU dump
v0->v1: added default case to switch statement in demap_tlb
- should fix gcc warning about uninitialized context variable
Signed-off-by: Igor V. Kovalenko <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
| 299b520cd4092be3c53f8380b81315c33927d9d3 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/299b520cd4092be3c53f8380b81315c33927d9d3 | 2010-05-06 20:13:36+00:00 |
Check for invalid initrd file
When qemu is invoked with an invalid initrd file, it crashes. Following
patch prints a error message and exits if an invalid initrd is
specified. Includes changes suggested by JV.
Signed-off-by: M. Mohan Kumar <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| d6fa4b77fb8f27ac84cf23fb1e15016673d98a47 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d6fa4b77fb8f27ac84cf23fb1e15016673d98a47 | 2010-04-19 00:07:10+02:00 |
virtio-blk: Fix use after free in error case
virtio_blk_req_complete frees the request, so we can't access it any more when
calling bdrv_mon_event. Use the pointer that was copied earlier.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
| 908bb9497bcb5543930cc345326afff939a6ffa4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/908bb9497bcb5543930cc345326afff939a6ffa4 | 2010-04-18 23:55:19+02:00 |
block: Fix multiwrite error handling
When two requests of the same multiwrite batch fail, the callback of all
requests in that batch were called twice. This could have any kind of nasty
effects, in my case it lead to use after free and eventually a segfault.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| cb6d3ca07b8f62b47ef30c6a92caa3e8bd71248b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cb6d3ca07b8f62b47ef30c6a92caa3e8bd71248b | 2010-04-10 00:14:23+02:00 |
Fix arm-softmmu compile
cc1: warnings being treated as errors
/src/qemu/hw/pl181.c: In function 'pl181_fifo_run':
/src/qemu/hw/pl181.c:185: error: 'value' may be used uninitialized in this function
Signed-off-by: Blue Swirl <[email protected]>
| f21126df5f81797486eb3bd628da8e2ad5fae12e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f21126df5f81797486eb3bd628da8e2ad5fae12e | 2010-02-22 20:42:51+00:00 |
QError: Don't abort on multiple faults
Ideally, Monitor code should report an error only once and
return the error information up the call chain.
To assure that this happens as expected and that no error is
lost, we have an assert() in qemu_error_internal().
However, we still have not fully converted handlers using
monitor_printf() to report errors. As there can be multiple
monitor_printf() calls on an error, the assertion is easily
triggered when debugging is enabled; and we will get a memory
leak if it's not.
The solution to this problem is to allow multiple faults by only
reporting the first one, and to release the additional error objects.
A better mechanism to report multiple errors to programmers is
underway.
Signed-off-by: Luiz Capitulino <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| 27a749fb733dc64b7a215998be7f228a09bb27a7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/27a749fb733dc64b7a215998be7f228a09bb27a7 | 2010-02-10 13:46:17-06:00 |
qcow2: Fix image creation regression
When checking for errors, commit db89119d compares with the wrong values,
failing image creation even when there was no error. Additionally, if an
error has occured, we can't preallocate the image (it's likely broken).
This unbreaks test 023 of qemu-iotests.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| 6f745bdaac26bcbdd7e2ffa2a6ea29aabbbc54e1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6f745bdaac26bcbdd7e2ffa2a6ea29aabbbc54e1 | 2010-02-23 13:23:29-06:00 |
pci: typedef pcibus_t as uint64_t instead of uint32_t.
This patch is preliminary for 64bit bar.
For 64bit bar support, change pcibus_t which represents
pci bus addr/size from uint32_t to uint64_t.
And also change FMT_pcibus for printf.
In pci_update_mapping() checks 32bit overflow.
So the check must be updated too.
Signed-off-by: Isaku Yamahata <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| 4f8589e11558f1151d95a4a3e9fce902f042df3d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4f8589e11558f1151d95a4a3e9fce902f042df3d | 2009-11-09 08:43:08-06:00 |
target-arm: fix incorrect temporary variable freeing
tmp4 and tmp5 temporary variables are allocated using tcg_const_i32
but incorrectly released using dead_tmp which will cause resource
leak tracking to report false leaks.
Signed-off-by: Juha Riihimäki <[email protected]>
Acked-by: Laurent Desnogues <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| 25aeb69b8d3cca341007a2f63d068885b3d4802b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/25aeb69b8d3cca341007a2f63d068885b3d4802b | 2009-10-26 20:36:47+01:00 |
usb-linux.c: fix buffer overflow
In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and
length to the kernel. However, the length was provided by the caller
of dev->handle_packet, and is not checked, so the kernel might provide
too much data and overflow our buffer.
For example, hw/usb-uhci.c could set the length to 2047.
hw/usb-ohci.c looks like it might go up to 4096 or 8192.
This causes a qemu crash, as reported here:
http://www.mail-archive.com/[email protected]/msg18447.html
This patch increases the usb-linux.c buffer size to 2048 to fix the
specific device reported, and adds a check to avoid the overflow in
any case.
Signed-off-by: Jim Paris <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| c4c0e236beabb9de5ff472f77aeb811ec5484615 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c4c0e236beabb9de5ff472f77aeb811ec5484615 | 2009-09-11 10:19:42-05:00 |
fix stack buffer overflows in eepro100.c tx
Hello,
the real world issue is that the hardware allows sends up to 2600 bytes,
and for some reason FreeBSD sometimes sends frames larger than the
ethernet frame size (102+1460 is the maximum I have seen so far),
overflowing the on-stack tx buffer of the driver.
Independent of that, the code should avoid allowing the guest to
overwrite the stack.
This is a minimal patch to fix the issue (you could leave out the size
change of the buf array as well, networking still seems to work either
way). Obviously there are better ways to handle it, but a proper fix IMO
would involve first getting rid of the code duplication and given the
number of patches pending for that code I see no point in working on that now.
Signed-off-by: Reimar Döffinger <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| 24e6f3551f3c8ea7cc7524a3e64e84beca59618f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/24e6f3551f3c8ea7cc7524a3e64e84beca59618f | 2009-08-27 20:35:30-05:00 |
virtio-net: Fix MAC filter overflow handling
Overloading the promisc and allmulti flags for indicating filter
table overflow makes it difficult to track the actual requested
operating mode. Split these out into separate flags.
Signed-off-by: Alex Williamson <[email protected]>
Signed-off-by: Mark McLoughlin <[email protected]>
| 8fd2a2f1a9048b9e37a898c2a5e9ef59d0c1a095 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8fd2a2f1a9048b9e37a898c2a5e9ef59d0c1a095 | 2009-06-09 11:38:50+01:00 |
hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)
While Intel's spec is not that clear here, latest changes to Linux' HPET
code (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stop
HPET_COUNTER when programming periodic mode") strongly suggest that
HPET_TN_SETVAL rather means: Set _both_ the comparator value and
register.
With this patch applied, I'm again able to boot 2.6.30-rc kernels as
they no longer panic like this (which was due to the comparator
register remaining 0):
ENABLING IO-APIC IRQs
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
..MP-BIOS bug: 8254 timer not connected to IO-APIC
...trying to set up timer (IRQ0) through the 8259A ...
..... (found apic 0 pin 2) ...
....... failed.
...trying to set up timer as Virtual Wire IRQ...
..... failed.
...trying to set up timer as ExtINT IRQ...
..... failed :(.
Kernel panic - not syncing: IO-APIC + timer doesn't work! [...]
Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7168 c046a42c-6fe2-441c-8c8c-71466251a162
| 3787324101bbc68c0d13a6aca51e6a90d1f7ce06 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3787324101bbc68c0d13a6aca51e6a90d1f7ce06 | 2009-04-17 20:50:58+00:00 |
Fix vectored aio bounce handling immediate errors (Avi Kivity)
If a bounced vectored aio fails immediately (the inner aio submission
returning NULL) then the bounce handler erronously returns an aio
request which will never be completed (and which crashes when cancelled).
Fix by detecting that the inner request has failed and propagating the
error.
Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6892 c046a42c-6fe2-441c-8c8c-71466251a162
| c240b9af599d20e06a58090366be682684bd8555 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c240b9af599d20e06a58090366be682684bd8555 | 2009-03-28 16:11:20+00:00 |
kvm: Fix cpuid initialization (Jan Kiszka)
Fix (more or less) spurious guest boot failures due to corrupted cpuid
states. The reason was insufficient initialization of cpuid entries
before passing them to the kernel.
At this chance also fix improper entry pointer progression and simplify
the code a bit.
Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7167 c046a42c-6fe2-441c-8c8c-71466251a162
| a33609cae0d57a7574608145f553cc5279221c31 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a33609cae0d57a7574608145f553cc5279221c31 | 2009-04-17 20:50:54+00:00 |
qcow2: Fix cluster allocation (Kevin Wolf)
When allocating multiple clusters at once, the qcow2 implementation
tries to find as many physically contiguous clusters as possible to
allow larger writes. This search includes allocated clusters which are
in the right place and still free clusters. If the range to allocate
spans clusters in patterns like "10 allocated, then 10 free, then again
10 allocated" it is only checked that the chunks of allocated clusters
are contiguous for themselves.
However, what is actually needed is to have _all_ allocated clusters
contiguous, starting at the first cluster of the allocation and spanning
multiple such chunks. This patch changes the check so that each offset
is not compared to the offset of the first cluster in its own chunk but
to the first cluster in the whole allocation.
I haven't seen it happen, but without this fix data corruption on qcow2
images is possible.
Signed-off-by: Kevin Wolf <[email protected]>
Acked-by: Gleb Natapov <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6213 c046a42c-6fe2-441c-8c8c-71466251a162
| ff4b91c2f7e51dab148aba4bf43c2f39f219e495 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ff4b91c2f7e51dab148aba4bf43c2f39f219e495 | 2009-01-07 17:22:19+00:00 |
KVM: Coalesced MMIO support
MMIO exits are more expensive in KVM or Xen than in QEMU because they
involve, at least, privilege transitions. However, MMIO write
operations can be effectively batched if those writes do not have side
effects.
Good examples of this include VGA pixel operations when in a planar
mode. As it turns out, we can get a nice boost in other areas too.
Laurent mentioned a 9.7% performance boost in iperf with the coalesced
MMIO changes for the e1000 when he originally posted this work for KVM.
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5961 c046a42c-6fe2-441c-8c8c-71466251a162
| f65ed4c1529f29a7d62d6733eaa50bed24a4b2ed | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f65ed4c1529f29a7d62d6733eaa50bed24a4b2ed | 2008-12-09 20:09:57+00:00 |
CVE-2008-4539: fix a heap overflow in Cirrus emulation
The code in hw/cirrus_vga.c has changed a lot between CVE-2007-1320 has
been announced and the patch has been applied. As a consequence it has
wrongly applied and QEMU is still vulnerable to this bug if using VNC.
(noticed by Jan Niehusmann)
Signed-off-by: Aurelien Jarno <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5587 c046a42c-6fe2-441c-8c8c-71466251a162
| 65d35a09979e63541afc5bfc595b9f1b1b4ae069 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/65d35a09979e63541afc5bfc595b9f1b1b4ae069 | 2008-11-01 00:53:39+00:00 |
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow
I have just noticed that patch for CVE-2007-1320 has never been applied
to the QEMU CVS. Please find it below.
| Multiple heap-based buffer overflows in the cirrus_invalidate_region
| function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and
| possibly other products, might allow local users to execute arbitrary
| code via unspecified vectors related to "attempting to mark
| non-existent regions as dirty," aka the "bitblt" heap overflow.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4340 c046a42c-6fe2-441c-8c8c-71466251a162
| b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef | 2008-05-05 21:26:31+00:00 |
Fix crash due to invalid env->current_tb (Adam Lackorzynski, Paul Brook, me)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4317 c046a42c-6fe2-441c-8c8c-71466251a162
| b5fc09ae52e3d19e01126715c998eb6587795b56 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b5fc09ae52e3d19e01126715c998eb6587795b56 | 2008-05-04 06:38:18+00:00 |
Add SASL authentication support ("Daniel P. Berrange")
This patch adds the new SASL authentication protocol to the VNC server.
It is enabled by setting the 'sasl' flag when launching VNC. SASL can
optionally provide encryption via its SSF layer, if a suitable mechanism
is configured (eg, GSSAPI/Kerberos, or Digest-MD5). If an SSF layer is
not available, then it should be combined with the x509 VNC authentication
protocol which provides encryption.
eg, if using GSSAPI
qemu -vnc localhost:1,sasl
eg if using TLS/x509 for encryption
qemu -vnc localhost:1,sasl,tls,x509
By default the Cyrus SASL library will look for its configuration in
the file /etc/sasl2/qemu.conf. For non-root users, this can be overridden
by setting the SASL_CONF_PATH environment variable, eg to make it look in
$HOME/.sasl2. NB unprivileged users may not have access to the full range
of SASL mechanisms, since some of them require some administrative privileges
to configure. The patch includes an example SASL configuration file which
illustrates config for GSSAPI and Digest-MD5, though it should be noted that
the latter is not really considered secure any more.
Most of the SASL authentication code is located in a separate source file,
vnc-auth-sasl.c. The main vnc.c file only contains minimal integration
glue, specifically parsing of command line flags / setup, and calls to
start the SASL auth process, to do encoding/decoding for data.
There are several possible stacks for reading & writing of data, depending
on the combo of VNC authentication methods in use
- Clear. read/write straight to socket
- TLS. read/write via GNUTLS helpers
- SASL. encode/decode via SASL SSF layer, then read/write to socket
- SASL+TLS. encode/decode via SASL SSF layer, then read/write via GNUTLS
Hence, the vnc_client_read & vnc_client_write methods have been refactored
a little.
vnc_client_read: main entry point for reading, calls either
- vnc_client_read_plain reading, with no intermediate decoding
- vnc_client_read_sasl reading, with SASL SSF decoding
These two methods, then call vnc_client_read_buf(). This decides
whether to write to the socket directly or write via GNUTLS.
The situation is the same for writing data. More extensive comments
have been added in the code / patch. The vnc_client_read_sasl and
vnc_client_write_sasl method implementations live in the separate
vnc-auth-sasl.c file.
The state required for the SASL auth mechanism is kept in a separate
VncStateSASL struct, defined in vnc-auth-sasl.h and included in the
main VncState.
The configure script probes for SASL and automatically enables it
if found, unless --disable-vnc-sasl was given to override it.
Makefile | 7
Makefile.target | 5
b/qemu.sasl | 34 ++
b/vnc-auth-sasl.c | 626 ++++++++++++++++++++++++++++++++++++++++++++++++++++
b/vnc-auth-sasl.h | 67 +++++
configure | 34 ++
qemu-doc.texi | 97 ++++++++
vnc-auth-vencrypt.c | 12
vnc.c | 249 ++++++++++++++++++--
vnc.h | 31 ++
10 files changed, 1129 insertions(+), 33 deletions(-)
Signed-off-by: Daniel P. Berrange <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6724 c046a42c-6fe2-441c-8c8c-71466251a162
| 2f9606b3736c3be4dbd606c46525c7b770ced119 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2f9606b3736c3be4dbd606c46525c7b770ced119 | 2009-03-06 20:27:28+00:00 |
Simplify guess_disk_lchs - should fix Windows stack corruption spotted by TeLeMan (patch by Tristan Gingold).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3953 c046a42c-6fe2-441c-8c8c-71466251a162
| c717d8bf13d4c24372c4885eefa821ec76378d2b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c717d8bf13d4c24372c4885eefa821ec76378d2b | 2008-02-03 03:37:46+00:00 |
Watchpoint support (previous commit got eaten by Savannah server crash).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2479 c046a42c-6fe2-441c-8c8c-71466251a162
| 6658ffb81ee56a510d7d77025872a508a9adce3a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6658ffb81ee56a510d7d77025872a508a9adce3a | 2007-03-16 23:58:11+00:00 |
buffer overflow fix - printf format fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@931 c046a42c-6fe2-441c-8c8c-71466251a162
| 95ce326e5b47b4b841849f8a2ac7b96d6e204dfb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/95ce326e5b47b4b841849f8a2ac7b96d6e204dfb | 2004-06-19 17:22:53+00:00 |
Update Sparc32 OpenBIOS image to SVN revision 149. Changes:
r145: Fix power-management location for SS-10
r146: Fix overallocation
r147: NetBSD and OpenBSD fixes:
- Correct timer and interrupt controller mappings
- Add ESP clock frequency to avoid division by zero
- CS4231 exists only in SS5
- Disable BPP for now, it's not emulated by Qemu anyway
With these fixes, one NetBSD kernel even got to root device prompt on SS5.
r148: Update vsprintf.c from Linux to get 64-bit output
r149: Use full 36-bit physical address space on SS10
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2831 c046a42c-6fe2-441c-8c8c-71466251a162
| 642b043a9eb85ee98636b44935aa39006f6d3643 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/642b043a9eb85ee98636b44935aa39006f6d3643 | 2007-05-19 13:12:09+00:00 |
fixed case where SS != USER_DS (fixes dosemu DPMI emulation)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@256 c046a42c-6fe2-441c-8c8c-71466251a162
| a52c757c9f98311c3ba22744d609caa767b899e1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a52c757c9f98311c3ba22744d609caa767b899e1 | 2003-06-21 13:14:12+00:00 |
fixed float to int overflow bug - added ARM host correct roundings for float rounding
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@237 c046a42c-6fe2-441c-8c8c-71466251a162
| 1e5ffbedded7ded797f5042d82b70109a712b4c0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1e5ffbedded7ded797f5042d82b70109a712b4c0 | 2003-06-15 19:49:16+00:00 |
coroutine: abort if we try to schedule or enter a pending coroutine
The previous patch fixed a race condition, in which there were
coroutines being executing doubly, or after coroutine deletion.
We can detect common scenarios when this happens, and print an error
message and abort before we corrupt memory / data, or segfault.
This patch will abort if an attempt to enter a coroutine is made while
it is currently pending execution, either in a specific AioContext bh,
or pending execution via a timer. It will also abort if a coroutine
is scheduled, before a prior scheduled run has occurred.
We cannot rely on the existing co->caller check for recursive re-entry
to catch this, as the coroutine may run and exit with
COROUTINE_TERMINATE before the scheduled coroutine executes.
(This is the scenario that was occurring and fixed in the previous
patch).
This patch also re-orders the Coroutine struct elements in an attempt to
optimize caching.
Signed-off-by: Jeff Cody <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 6133b39f3c36623425a6ede9e89d93175fde15cd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6133b39f3c36623425a6ede9e89d93175fde15cd | 2017-11-21 11:58:07-05:00 |
irq: fix memory leak
entry is moved from list but is not freed.
Signed-off-by: linzhecheng <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 01960e6d21dcfbfc8a03d8fd6284c448cf75865b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/01960e6d21dcfbfc8a03d8fd6284c448cf75865b | 2018-01-16 14:54:51+01:00 |
qemu-iotests: Fix locking issue in 102
102 truncates a qcow2 file (the raw file) on purpose while a VM is
running. However, image locking will usually prevent exactly this.
The fact that most people have not noticed until now (I suppose you may
have seen sporadic failures, but not taken them too seriously, like me)
further shows that this truncation is actually not really done
concurrently, but that the VM is still starting up by this point and has
not yet opened the image. Remedy this by waiting for the monitor shell
to appear before the qemu-img invocation so we know the VM is up.
Signed-off-by: Max Reitz <[email protected]>
Message-id: [email protected]
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
| 6bfc907deed83af7c2df371ffa3508427c6de52f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6bfc907deed83af7c2df371ffa3508427c6de52f | 2018-01-23 12:34:42+01:00 |
vhost: restore avail index from vring used index on disconnection
vhost_virtqueue_stop() gets avail index value from the backend,
except if the backend is not responding.
It happens when the backend crashes, and in this case, internal
state of the virtio queue is inconsistent, making packets
to corrupt the vring state.
With a Linux guest, it results in following error message on
backend reconnection:
[ 22.444905] virtio_net virtio0: output.0:id 0 is not a head!
[ 22.446746] net enp0s3: Unexpected TXQ (0) queue failure: -5
[ 22.476360] net enp0s3: Unexpected TXQ (0) queue failure: -5
Fixes: 283e2c2adcb8 ("net: virtio-net discards TX data after link down")
Cc: [email protected]
Signed-off-by: Maxime Coquelin <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 2ae39a113af311cb56a0c35b7f212dafcef15303 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2ae39a113af311cb56a0c35b7f212dafcef15303 | 2017-12-01 19:05:58+02:00 |
sockets: avoid crash when cleaning up sockets for an invalid FD
If socket_listen_cleanup is passed an invalid FD, then querying the socket
local address will fail. We must thus be prepared for the returned addr to
be NULL
Reported-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
| 2d7ad7c05e762d5b10a57eba9af1bb6b41700854 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2d7ad7c05e762d5b10a57eba9af1bb6b41700854 | 2017-11-28 10:48:04+00:00 |
qcow2: fix image corruption on commit with persistent bitmap
If an image contains persistent bitmaps, we cannot use the
fast path of bdrv_make_empty() to clear the image during
qemu-img commit, because that will lose the clusters related
to the bitmaps.
Also leave a comment in qcow2_read_extensions to remind future
feature additions to think about fast-path removal, since we
just barely fixed the same bug for LUKS encryption.
It's a pain that qemu-img has not yet been taught to manipulate,
or even at a very minimum display, information about persistent
bitmaps; instead, we have to use QMP commands. It's also a
pain that only qeury-block and x-debug-block-dirty-bitmap-sha256
will allow bitmap introspection; but the former requires the
node to be hooked to a block device, and the latter is experimental.
Signed-off-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 4096974e1885913dfe2931863be47bd35b266521 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4096974e1885913dfe2931863be47bd35b266521 | 2017-11-17 18:21:01+01:00 |
qcow2: Don't open images with header.refcount_table_clusters == 0
qcow2_do_open() is checking that header.refcount_table_clusters is not
too large, but it doesn't check that it's greater than zero. Apart
from the fact that an image like that is obviously corrupted, trying
to use it crashes QEMU since we end up with a null s->refcount_table
after qcow2_refcount_init().
These images can however be repaired, so allow opening them if the
BDRV_O_CHECK flag is set.
Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: f9750f50c80359babba11062e88f5075a47e8e16.1509718618.git.berto@igalia.com
Signed-off-by: Max Reitz <[email protected]>
| 951053a9ec1c47edf4b2549ef58d82aee8a42a7f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/951053a9ec1c47edf4b2549ef58d82aee8a42a7f | 2017-11-14 18:06:25+01:00 |
net: fix check for number of parameters to -netdev socket
Since commit 0f8c289ad "net: fix -netdev socket,fd= for UDP sockets"
we allow more than one parameter for -netdev socket. But now
we run into an assert when no parameter at all is specified
> qemu-system-x86_64 -netdev socket
socket.c:729: net_init_socket: Assertion `sock->has_udp' failed.
Fix this by reverting the change of the if condition done in 0f8c289ad.
Cc: Jason Wang <[email protected]>
Cc: [email protected]
Fixes: 0f8c289ad539feb5135c545bea947b310a893f4b
Reported-by: Mao Zhongyi <[email protected]>
Signed-off-by: Jens Freimann <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
| ff86d5762552787f1fcb7da695ec4f8c1be754b4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ff86d5762552787f1fcb7da695ec4f8c1be754b4 | 2017-11-13 15:46:37+08:00 |
linux-user: return EINVAL from prctl(PR_*_SECCOMP)
If an application tries to install a seccomp filter using
prctl(PR_SET_SECCOMP), the filter is likely for the target instead of the host
architecture. This will probably cause qemu to be immediately killed when it
executes another syscall.
Prevent this from happening by returning EINVAL from both seccomp prctl
calls. This is the error returned by the kernel when seccomp support is
disabled.
Fixes: https://bugs.launchpad.net/qemu/+bug/1726394
Reviewed-by: Laurent Vivier <[email protected]>
Signed-off-by: James Cowgill <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
| a8b154a637b586441bad42259a8a9b9619cd117c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a8b154a637b586441bad42259a8a9b9619cd117c | 2017-11-07 21:58:13+02:00 |
tcg: convert tb->cflags reads to tb_cflags(tb)
Convert all existing readers of tb->cflags to tb_cflags, so that we
use atomic_read and therefore avoid undefined behaviour in C11.
Note that the remaining setters/getters of the field are protected
by tb_lock, and therefore do not need conversion.
Luckily all readers access the field via 'tb->cflags' (so no foo.cflags,
bar->cflags in the code base), which makes the conversion easily
scriptable:
FILES=$(git grep 'tb->cflags' target include/exec/gen-icount.h \
accel/tcg/translator.c | cut -f1 -d':' | sort | uniq)
perl -pi -e 's/([^.>])tb->cflags/$1tb_cflags(tb)/g' $FILES
perl -pi -e 's/([a-z->.]*)(->|\.)tb->cflags/tb_cflags($1$2tb)/g' $FILES
Then manually fixed the few errors that checkpatch reported.
Compile-tested for all targets.
Suggested-by: Richard Henderson <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Emilio G. Cota <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| c5a49c63fa26e8825ad101dfe86339ae4c216539 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c5a49c63fa26e8825ad101dfe86339ae4c216539 | 2017-10-24 13:53:41-07:00 |
memory: fix off-by-one error in memory_region_notify_one()
This patch fixes an off-by-one error that could lead to the
notifyee to receive notifications for ranges it is not
registered to.
The bug has been spotted by code review.
Fixes: bd2bfa4c52e5 ("memory: introduce memory_region_notify_one()")
Cc: [email protected]
Cc: Peter Xu <[email protected]>
Signed-off-by: Maxime Coquelin <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| b021d1c04452276f4926eed2d104ccbd1037a6e1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b021d1c04452276f4926eed2d104ccbd1037a6e1 | 2017-10-12 12:10:38+02:00 |
s390x/tcg: fix checking for invalid memory check
It should have been a >=, but let's directly perform a proper access
check to also be able to deal with hotplugged memory later.
Signed-off-by: David Hildenbrand <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| 0bd695a960bf05f27ad6d710d2b64059037574ce | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0bd695a960bf05f27ad6d710d2b64059037574ce | 2017-10-06 10:53:02+02:00 |
iothread: export iothread_stop()
So that internal iothread users can explicitly stop one iothread without
destroying it.
Since at it, fix iothread_stop() to allow it to be called multiple
times. Before this patch we may call iothread_stop() more than once on
single iothread, while that may not be correct since qemu_thread_join()
is not allowed to run twice. From manual of pthread_join():
Joining with a thread that has previously been joined results in
undefined behavior.
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 82d90705fe203cc6e150c10bd61f0dbe6979e8f4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/82d90705fe203cc6e150c10bd61f0dbe6979e8f4 | 2017-10-03 14:36:16-04:00 |
xics: fix several error leaks
If object_property_get_link() fails then it allocates an error, which
must be freed before returning. The error_get_pretty() function is
merely an accessor to the error message and doesn't free anything.
The error.h header indicates how to do it right:
* Pass an existing error to the caller with the message modified:
* error_propagate(errp, err);
* error_prepend(errp, "Could not frobnicate '%s': ", name);
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| a1a6bbde4f6a29368f8f605cea2e73630ec1bc7c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a1a6bbde4f6a29368f8f605cea2e73630ec1bc7c | 2017-09-15 10:29:48+10:00 |
hw/misc/ivshmem: Fix ivshmem_recv_msg() to also work on big endian systems
The "slow" ivshmem-tests currently fail when they are running on a
big endian host:
$ uname -m
ppc64
$ V=1 QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/ivshmem-test -m slow
/x86_64/ivshmem/single: OK
/x86_64/ivshmem/hotplug: OK
/x86_64/ivshmem/memdev: OK
/x86_64/ivshmem/pair: OK
/x86_64/ivshmem/server-msi: qemu-system-x86_64:
-device ivshmem-doorbell,chardev=chr0,vectors=2: server sent invalid ID message
Broken pipe
The problem is that the server side code in ivshmem_server_send_one_msg()
correctly translates all messages IDs into little endian 64-bit values,
but the client side code in the ivshmem_recv_msg() function does not swap
the byte order back. Fix it by passing the value through le64_to_cpu().
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
Tested-by: Cornelia Huck <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| 51af0ec9fa7269f0c69aa50a1a24748b4edc4b44 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/51af0ec9fa7269f0c69aa50a1a24748b4edc4b44 | 2017-09-19 18:21:33+02:00 |
spapr_pci: use the common _FDT() helper
All other users in hw/ppc already consider an error when building
the FDT to be fatal, even on hotplug paths. There's no valid reason
for spapr_pci to behave differently. So let's used the common _FDT()
helper which terminates QEMU when libfdt fails.
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
| 99372e785efe9fe6a4e30cab4e33b79b227dc28d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/99372e785efe9fe6a4e30cab4e33b79b227dc28d | 2017-09-15 10:29:48+10:00 |
vhost-user-bridge: fix resume regression (since 2.9)
Commit e10e798c85c2331 switched to libvhost-user which lacked support
for resuming the avail_idx based on used_idx.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1485867
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 672339f7eff5e9226f302037290e84e783d2b5cd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/672339f7eff5e9226f302037290e84e783d2b5cd | 2017-09-08 16:15:17+03:00 |
block: Update open_flags after ->inactivate() callback
In the ->inactivate() callbacks, permissions are updated, which
typically involves a recursive check of the whole graph. Setting
BDRV_O_INACTIVE right before doing that creates a state that
bdrv_is_writable() returns false, which causes permission update
failure.
Reorder them so the flag is updated after calling the function. Note
that this doesn't break the assert in bdrv_child_cb_inactivate() because
for any specific BDS, we still update its flags first before calling
->inactivate() on it one level deeper in the recursion.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Message-Id: <[email protected]>
Tested-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
| 7d5b5261104235cd6cc86930ab0d0a7372bfe04b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7d5b5261104235cd6cc86930ab0d0a7372bfe04b | 2017-08-23 10:21:55-05:00 |
hw/misc/mmio_interface: Return after error_setg() to avoid crash
QEMU currently abort()s if the user tries to specify the mmio_interface
device without parameters:
x86_64-softmmu/qemu-system-x86_64 -nographic -device mmio_interface
qemu-system-x86_64: /home/thuth/devel/qemu/util/error.c:57: error_setv:
Assertion `*errp == ((void *)0)' failed.
Aborted (core dumped)
This happens because the realize function is trying to set the errp
twice in this case. After setting an error, the realize function
should immediately return instead.
Signed-off-by: Thomas Huth <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| a808c0865b720e22ca2929ec3d362d4610fbad51 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a808c0865b720e22ca2929ec3d362d4610fbad51 | 2017-08-14 13:06:54+03:00 |
net: fix -netdev socket,fd= for UDP sockets
This patch fixes -netdev socket,fd= for UDP sockets
Currently -netdev socket,fd=<...> results in
qemu: error: specified mcastaddr "127.0.0.1" (0x7f000001) does not
contain a multicast address
qemu-system-x86_64: -netdev
socket,id=n1,fd=3: Device 'socket' could not be initialized
To fix these we need to allow specifying multicast and fd arguments
for the same netdev. With this the user can specify "-netdev
fd=3,mcast=<IP:port>"
Cc: Jason Wang <[email protected]>
Fixes: 3d830459b1eccdb61b75e2712fd364012ce5a115
Signed-off-by: Jens Freimann <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 0f8c289ad539feb5135c545bea947b310a893f4b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0f8c289ad539feb5135c545bea947b310a893f4b | 2017-08-09 04:22:13+03:00 |
rcu: completely disable pthread_atfork callbacks as soon as possible
Because of -daemonize, system mode QEMU sometimes needs to fork() and
keep RCU enabled in the child. However, there is a possible deadlock
with synchronize_rcu:
- the CPU thread is inside a RCU critical section and wants to take
the BQL in order to do MMIO
- the monitor thread, which is owning the BQL, calls rcu_init_lock
which tries to take the rcu_sync_lock
- the call_rcu thread has taken rcu_sync_lock in synchronize_rcu, but
synchronize_rcu needs the CPU thread to end the critical section
before returning.
This cannot happen for user-mode emulation, because it does not have
a BQL.
To fix it, assume that system mode QEMU only forks in preparation for
exec (except when daemonizing) and disable pthread_atfork as soon as
the double fork has happened.
Reported-by: Dr. David Alan Gilbert <[email protected]>
Tested-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 73c6e4013b4cd92d3d531bc22cc29e6036ef42e0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/73c6e4013b4cd92d3d531bc22cc29e6036ef42e0 | 2017-08-08 10:40:09+02:00 |
slirp: fill error when failing to initialize user network
With "-netdev user,id=net0,dns=1.2.3.4"
error was:
qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: Device 'user' could not be initialized
Error is now:
qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: DNS doesn't belong to network
Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Samuel Thibault <[email protected]>
| 5c843af22604edecda10d4bb89d4eede9e1bd3d0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5c843af22604edecda10d4bb89d4eede9e1bd3d0 | 2017-08-03 00:24:31+02:00 |
bt: stop the sdp memory allocation craziness
Clang static analyzer reports a memory leak. Actually, the allocated
memory escapes here:
record->attribute_list[record->attributes].pair = data;
but clang is correct that the memory might leak if len is zero. We
know it isn't; assert that it is the case.
The craziness doesn't end there. The memory is freed by
bt_l2cap_sdp_close_ch:
g_free(sdp->service_list[i].attribute_list->pair);
which actually should have been written like this:
g_free(sdp->service_list[i].attribute_list[0].pair);
The attribute_list is sorted with qsort; but indeed the first
entry of attribute_list should point to "data" even after the qsort,
because the first record has id SDP_ATTR_RECORD_HANDLE, whose
numeric value is zero.
But hang on. The qsort function is
static int sdp_attributeid_compare(
const struct sdp_service_attribute_s *a,
const struct sdp_service_attribute_s *b)
{
return (int) b->attribute_id - a->attribute_id;
}
but no one ever writes attribute_id. So it only works if qsort is
stable, and who knows what else is broken, but we can fix it by
setting attribute_id in the while loop.
Signed-off-by: Paolo Bonzini <[email protected]>
| 393c13b940be8f2e5b126cd9f442c12e7ecb4cac | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/393c13b940be8f2e5b126cd9f442c12e7ecb4cac | 2017-08-01 17:27:33+02:00 |
syscall: check inotify() and eventfd() return value
linux-user/syscall.c:555:25: warning: Out of bound memory access (accessed memory precedes memory block)
target_fd_trans[fd] = trans;
~~~~~~~~~~~~~~~~~~~~^~~~~~~
Reported-by: Clang Static Analyzer
Suggested-by: Laurent Vivier <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| b929f7e56f505d18bea32b08b57a8b84c6b28f30 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b929f7e56f505d18bea32b08b57a8b84c6b28f30 | 2017-07-31 13:06:39+03:00 |
syscall: fix use of uninitialized values
linux-user/syscall.c:1627:35: warning: 1st function call argument is an uninitialized value
target_saddr->sa_family = tswap16(addr->sa_family);
^~~~~~~~~~~~~~~~~~~~~~~~
linux-user/syscall.c:1629:25: warning: The left operand of '==' is a garbage value
if (addr->sa_family == AF_NETLINK && len >= sizeof(struct sockaddr_nl)) {
~~~~~~~~~~~~~~~ ^
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 6860710cc3864382a898c847d722f950b5e01a6e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6860710cc3864382a898c847d722f950b5e01a6e | 2017-07-31 13:06:39+03:00 |
block: Skip implicit nodes in query-block/blockstats
Commits 0db832f and 6cdbceb introduced the automatic insertion of filter
nodes above the top layer of mirror and commit block jobs. The
assumption made there was that since libvirt doesn't do node-level
management of the block layer yet, it shouldn't be affected by added
nodes.
This is true as far as commands issued by libvirt are concerned. It only
uses BlockBackend names to address nodes, so any operations it performs
still operate on the root of the tree as intended.
However, the assumption breaks down when you consider query commands,
which return data for the wrong node now. These commands also return
information on some child nodes (bs->file and/or bs->backing), which
libvirt does make use of, and which refer to the wrong nodes, too.
One of the consequences is that oVirt gets wrong information about the
image size and stops the VM in response as long as a mirror or commit
job is running:
https://bugzilla.redhat.com/show_bug.cgi?id=1470634
This patch fixes the problem by hiding the implicit nodes created
automatically by the mirror and commit block jobs in the output of
query-block and BlockBackend-based query-blockstats as long as the user
doesn't indicate that they are aware of those nodes by providing a node
name for them in the QMP command to start the block job.
The node-based commands query-named-block-nodes and query-blockstats
with query-nodes=true still show all nodes, including implicit ones.
This ensures that users that are capable of node-level management can
still access the full information; users that only know BlockBackends
won't use these commands.
Cc: [email protected]
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Peter Krempa <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Tested-by: Eric Blake <[email protected]>
| d3c8c67469ee70fcae116d5abc277a7ebc8a19fd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d3c8c67469ee70fcae116d5abc277a7ebc8a19fd | 2017-07-24 15:06:04+02:00 |
util/oslib-posix.c: Avoid warning on NetBSD
On NetBSD the compiler warns:
util/oslib-posix.c: In function 'sigaction_invoke':
util/oslib-posix.c:589:5: warning: missing braces around initializer [-Wmissing-braces]
siginfo_t si = { 0 };
^
util/oslib-posix.c:589:5: warning: (near initialization for 'si.si_pad') [-Wmissing-braces]
because on this platform siginfo_t is defined as
typedef union siginfo {
char si_pad[128]; /* Total size; for future expansion */
struct _ksiginfo _info;
} siginfo_t;
Avoid this warning by initializing the struct with {} instead;
this is a GCC extension but we use it all over the codebase already.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
| 02ffa034fb747f09a4f5658ed64871dcee4aaca2 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/02ffa034fb747f09a4f5658ed64871dcee4aaca2 | 2017-07-21 10:32:19+01:00 |
qemu-iotests: step clock after each test iteration
The 093 throttling test submits twice as many requests as the throttle
limit in order to ensure that we reach the limit. The remaining
requests are left in-flight at the end of each test iteration.
Commit 452589b6b47e8dc6353df257fc803dfc1383bed8 ("vl.c/exit: pause cpus
before closing block devices") exposed a hang in 093. This happens
because requests are still in flight when QEMU terminates but
QEMU_CLOCK_VIRTUAL time is frozen. bdrv_drain_all() hangs forever since
throttled requests cannot complete.
Step the clock at the end of each test iteration so in-flight requests
actually finish. This solves the hang and is cleaner than leaving tests
in-flight.
Note that this could also be "fixed" by disabling throttling when drives
are closed in QEMU. That approach has two issues:
1. We must drain requests before disabling throttling, so the hang
cannot be easily avoided!
2. Any time QEMU disables throttling internally there is a chance that
malicious users can abuse the code path to bypass throttling limits.
Therefore it makes more sense to fix the test case than to modify QEMU.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
| cbaddb25b20060fa0b0a2a46d5ccca65cffd1a6f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cbaddb25b20060fa0b0a2a46d5ccca65cffd1a6f | 2017-08-15 10:03:27-05:00 |
migration/rdma: Fix race on source
Fix a race where the destination might try and send the source a
WRID_READY before the source has done a post-recv for it.
rdma_post_recv has to happen after the qp exists, and we're
OK since we've already called qemu_rdma_source_init that calls
qemu_alloc_qp.
This corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=1285044
The race can be triggered by adding a few ms wait before this
post_recv_control (which was originally due to me turning on loads of
debug).
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| 9cf2bab2edca1e651eef49f2417f8f67bdfe49bb | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9cf2bab2edca1e651eef49f2417f8f67bdfe49bb | 2017-07-18 17:36:14+02:00 |
tcg: consistently access cpu->tb_jmp_cache atomically
Some code paths can lead to atomic accesses racing with memset()
on cpu->tb_jmp_cache, which can result in torn reads/writes
and is undefined behaviour in C11.
These torn accesses are unlikely to show up as bugs, but from code
inspection they seem possible. For example, tb_phys_invalidate does:
/* remove the TB from the hash list */
h = tb_jmp_cache_hash_func(tb->pc);
CPU_FOREACH(cpu) {
if (atomic_read(&cpu->tb_jmp_cache[h]) == tb) {
atomic_set(&cpu->tb_jmp_cache[h], NULL);
}
}
Here atomic_set might race with a concurrent memset (such as the
ones scheduled via "unsafe" async work, e.g. tlb_flush_page) and
therefore we might end up with a torn pointer (or who knows what,
because we are under undefined behaviour).
This patch converts parallel accesses to cpu->tb_jmp_cache to use
atomic primitives, thereby bringing these accesses back to defined
behaviour. The price to pay is to potentially execute more instructions
when clearing cpu->tb_jmp_cache, but given how infrequently they happen
and the small size of the cache, the performance impact I have measured
is within noise range when booting debian-arm.
Note that under "safe async" work (e.g. do_tb_flush) we could use memset
because no other vcpus are running. However I'm keeping these accesses
atomic as well to keep things simple and to avoid confusing analysis
tools such as ThreadSanitizer.
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Emilio G. Cota <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
| f3ced3c59287dabc253f83f0c70aa4934470c15e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f3ced3c59287dabc253f83f0c70aa4934470c15e | 2017-06-30 11:40:59-07:00 |
coroutine-lock: do not touch coroutine after another one has been entered
Submission of requests on linux aio is a bit tricky and can lead to
requests completions on submission path:
44713c9e8547 ("linux-aio: Handle io_submit() failure gracefully")
0ed93d84edab ("linux-aio: process completions from ioq_submit()")
That means that any coroutine which has been yielded in order to wait
for completion can be resumed from submission path and be eventually
terminated (freed).
The following use-after-free crash was observed when IO throttling
was enabled:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f5813dff700 (LWP 56417)]
virtqueue_unmap_sg (elem=0x7f5804009a30, len=1, vq=<optimized out>) at virtio.c:252
(gdb) bt
#0 virtqueue_unmap_sg (elem=0x7f5804009a30, len=1, vq=<optimized out>) at virtio.c:252
^^^^^^^^^^^^^^
remember the address
#1 virtqueue_fill (vq=0x5598b20d21b0, elem=0x7f5804009a30, len=1, idx=0) at virtio.c:282
#2 virtqueue_push (vq=0x5598b20d21b0, elem=elem@entry=0x7f5804009a30, len=<optimized out>) at virtio.c:308
#3 virtio_blk_req_complete (req=req@entry=0x7f5804009a30, status=status@entry=0 '\000') at virtio-blk.c:61
#4 virtio_blk_rw_complete (opaque=<optimized out>, ret=0) at virtio-blk.c:126
#5 blk_aio_complete (acb=0x7f58040068d0) at block-backend.c:923
#6 coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at coroutine-ucontext.c:78
(gdb) p * elem
$8 = {index = 77, out_num = 2, in_num = 1,
in_addr = 0x7f5804009ad8, out_addr = 0x7f5804009ae0,
in_sg = 0x0, out_sg = 0x7f5804009a50}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'in_sg' and 'out_sg' are invalid.
e.g. it is impossible that 'in_sg' is zero,
instead its value must be equal to:
(gdb) p/x 0x7f5804009ad8 + sizeof(elem->in_addr[0]) + 2 * sizeof(elem->out_addr[0])
$26 = 0x7f5804009af0
Seems 'elem' was corrupted. Meanwhile another thread raised an abort:
Thread 12 (Thread 0x7f57f2ffd700 (LWP 56426)):
#0 raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 qemu_coroutine_enter (co=0x7f5804009af0) at qemu-coroutine.c:113
#3 qemu_co_queue_run_restart (co=0x7f5804009a30) at qemu-coroutine-lock.c:60
#4 qemu_coroutine_enter (co=0x7f5804009a30) at qemu-coroutine.c:119
^^^^^^^^^^^^^^^^^^
WTF?? this is equal to elem from crashed thread
#5 qemu_co_queue_run_restart (co=0x7f57e7f16ae0) at qemu-coroutine-lock.c:60
#6 qemu_coroutine_enter (co=0x7f57e7f16ae0) at qemu-coroutine.c:119
#7 qemu_co_queue_run_restart (co=0x7f5807e112a0) at qemu-coroutine-lock.c:60
#8 qemu_coroutine_enter (co=0x7f5807e112a0) at qemu-coroutine.c:119
#9 qemu_co_queue_run_restart (co=0x7f5807f17820) at qemu-coroutine-lock.c:60
#10 qemu_coroutine_enter (co=0x7f5807f17820) at qemu-coroutine.c:119
#11 qemu_co_queue_run_restart (co=0x7f57e7f18e10) at qemu-coroutine-lock.c:60
#12 qemu_coroutine_enter (co=0x7f57e7f18e10) at qemu-coroutine.c:119
#13 qemu_co_enter_next (queue=queue@entry=0x5598b1e742d0) at qemu-coroutine-lock.c:106
#14 timer_cb (blk=0x5598b1e74280, is_write=<optimized out>) at throttle-groups.c:419
Crash can be explained by access of 'co' object from the loop inside
qemu_co_queue_run_restart():
while ((next = QSIMPLEQ_FIRST(&co->co_queue_wakeup))) {
QSIMPLEQ_REMOVE_HEAD(&co->co_queue_wakeup, co_queue_next);
^^^^^^^^^^^^^^^^^^^^
on each iteration 'co' is accessed,
but 'co' can be already freed
qemu_coroutine_enter(next);
}
When 'next' coroutine is resumed (entered) it can in its turn resume
'co', and eventually free it. That's why we see 'co' (which was freed)
has the same address as 'elem' from the first backtrace.
The fix is obvious: use temporary queue and do not touch coroutine after
first qemu_coroutine_enter() is invoked.
The issue is quite rare and happens every ~12 hours on very high IO
and CPU load (building linux kernel with -j512 inside guest) when IO
throttling is enabled. With the fix applied guest is running ~35 hours
and is still alive so far.
Signed-off-by: Roman Pen <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-id: [email protected]
Cc: Paolo Bonzini <[email protected]>
Cc: Fam Zheng <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Cc: Kevin Wolf <[email protected]>
Cc: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 528f449f590829b53ea01ed91817a695b540421d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/528f449f590829b53ea01ed91817a695b540421d | 2017-06-07 14:39:00+01:00 |
kvm: irqchip: skip update msi when disabled
It's possible that one device kept its irqfd/virq there even when
MSI/MSIX was disabled globally for that device. One example is
virtio-net-pci (see commit f1d0f15a6 and virtio_pci_vq_vector_mask()).
It is used as a fast path to avoid allocate/release irqfd/virq
frequently when guest enables/disables MSIX.
However, this fast path brought a problem to msi_route_list, that the
device MSIRouteEntry is still dangling there even if MSIX disabled -
then we cannot know which message to fetch, even if we can, the messages
are meaningless. In this case, we can just simply ignore this entry.
It's safe, since when MSIX is enabled again, we'll rebuild them no
matter what.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1448813
Signed-off-by: Peter Xu <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| fd563564222f308e1d86847efdec8555fb472536 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fd563564222f308e1d86847efdec8555fb472536 | 2017-06-06 20:18:35+02:00 |
curl: avoid recursive locking of BDRVCURLState mutex
The curl driver has a ugly hack where, if it cannot find an empty CURLState,
it just uses aio_poll to wait for one to be empty. This is probably
buggy when used together with dataplane, and the simplest way to fix it
is to use coroutines instead.
A more immediate effect of the bug however is that it can cause a
recursive call to curl_readv_bh_cb and recursively taking the
BDRVCURLState mutex. This causes a deadlock.
The fix is to unlock the mutex around aio_poll, but for cleanliness we
should also take the mutex around all calls to curl_init_state, even if
reaching the unlock/lock pair is impossible. The same is true for
curl_clean_state.
Reported-by: Kun Wei <[email protected]>
Tested-by: Richard W.M. Jones <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Cc: [email protected]
Cc: Jeff Cody <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Jeff Cody <[email protected]>
| 456af346297ebef86aa097b3609534d34f3d2f75 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/456af346297ebef86aa097b3609534d34f3d2f75 | 2017-05-16 10:34:17-04:00 |
qemu-iotests: Test streaming with missing job ID
This adds a small test for the image streaming error path for failing
block_job_create(), which would have found the null pointer dereference
in commit a170a91f.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Reviewed-by: Kashyap Chamarthy <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
| 0bb0aea4bac2332389a9b481f650a2a9df80ea0c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0bb0aea4bac2332389a9b481f650a2a9df80ea0c | 2017-05-26 16:48:21+02:00 |
container: don't leak container reference
object_property_add_child() references the child, unref it after to
avoid ref leaks.
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
| f8df5f922152a47b3889921d249e00dab766d950 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f8df5f922152a47b3889921d249e00dab766d950 | 2017-05-04 15:34:41+04:00 |
hw/s390x/ipl: Fix crash with virtio-scsi-pci device
qemu-system-s390x currently crashes when it is started with a
virtio-scsi-pci device, e.g.:
qemu-system-s390x -nographic -enable-kvm -device virtio-scsi-pci \
-drive file=/tmp/disk.dat,if=none,id=d1,format=raw \
-device scsi-cd,drive=d1,bootindex=1
The problem is that the code in s390_gen_initial_iplb() currently assumes
that all SCSI devices are also CCW devices, which is not the case for
virtio-scsi-pci of course. Fix it by adding an appropriate check for
TYPE_CCW_DEVICE here.
Signed-off-by: Thomas Huth <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Christian Borntraeger <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
| 99efaa2696caaf6182958e27d553449674894b27 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/99efaa2696caaf6182958e27d553449674894b27 | 2017-05-02 15:08:54+02:00 |
QMP: include CpuInstanceProperties into query_cpus output output
if board supports CpuInstanceProperties, report them for
each CPU thread listed. Main motivation for this is to
provide these properties introspection via QMP interface
for using in test cases to verify numa node to cpu mapping,
which includes not only boards that support cpu hotplug
and have this info in query-hotpluggable-cpus (pc/spapr)
but also for boards that don't not support hotpluggable-cpus
but support numa mapping (virt-arm).
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: David Gibson <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| afed5a5a7030a074a181d2a0ce8202de71a6ada4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/afed5a5a7030a074a181d2a0ce8202de71a6ada4 | 2017-05-11 16:08:49-03:00 |
target/arm: Add assertion about FSC format for syndrome registers
In tlb_fill() we construct a syndrome register value from a
fault status register value which is filled in by arm_tlb_fill().
arm_tlb_fill() returns FSR values which might be in the format
used with short-format page descriptors, or the format used
with long-format (LPAE) descriptors. The syndrome register
always uses LPAE-format FSR status codes.
It isn't actually possible to end up delivering a syndrome
register value to the guest for a fault which is reported
with a short-format FSR (that kind of stage 1 fault will only
happen for an AArch32 translation regime which doesn't have
a syndrome register, and can never be redirected to an AArch64
or Hyp exception level). Add an assertion which checks this,
and adjust the code so that we construct a syndrome with
an invalid status code, rather than allowing set bits in
the FSR input to randomly corrupt other fields in the syndrome.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Edgar E. Iglesias <[email protected]>
Message-id: [email protected]
| 65ed2ed90d9d81fd4b639029be850ea5651f919f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/65ed2ed90d9d81fd4b639029be850ea5651f919f | 2017-04-20 17:39:17+01:00 |
block: Ignore guest dev permissions during incoming migration
Usually guest devices don't like other writers to the same image, so
they use blk_set_perm() to prevent this from happening. In the migration
phase before the VM is actually running, though, they don't have a
problem with writes to the image. On the other hand, storage migration
needs to be able to write to the image in this phase, so the restrictive
blk_set_perm() call of qdev devices breaks it.
This patch flags all BlockBackends with a qdev device as
blk->disable_perm during incoming migration, which means that the
requested permissions are stored in the BlockBackend, but not actually
applied to its root node yet.
Once migration has finished and the VM should be resumed, the
permissions are applied. If they cannot be applied (e.g. because the NBD
server used for block migration hasn't been shut down), resuming the VM
fails.
Signed-off-by: Kevin Wolf <[email protected]>
Tested-by: Kashyap Chamarthy <[email protected]>
| d35ff5e6b3aa3a706b0aa3bcf11400fac945b67a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d35ff5e6b3aa3a706b0aa3bcf11400fac945b67a | 2017-04-07 14:44:05+02:00 |
boot-serial-test: use -no-shutdown
a qemu with an empty s390 guest will exit very quickly. This races
against the testsuite reading from the console pipe leading to
intermittent test suite failures. Using -no-shutdown will keep
the guest running.
Fixes: 864111f422ba (vl: exit qemu on guest panic if -no-shutdown is not set)
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
Message-id: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 7150d34a1d60851d73d6ab6783b12b1d25e68f86 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7150d34a1d60851d73d6ab6783b12b1d25e68f86 | 2017-03-24 13:39:50+00:00 |
qga: don't fail if mount doesn't have slave devices
In some cases the slave devices of a virtual block device are tracked
by the parent in the corresponding sysfs node. For instance, if we
have a loop-back mount of the form:
/dev/loop3p1 on /home/mdroth/mnt type ext4 (rw,relatime,data=ordered)
this will be reflected in sysfs as:
/sys/devices/virtual/block/loop3/
...
/sys/devices/virtual/block/loop3/slaves
/sys/devices/virtual/block/loop3/loop3p1
The current code however assumes the mounted virtual block device,
loop3p1 in this case, contains the slaves directory, and reports an
error otherwise. This breaks 'make check' in certain environments.
Fix this by simply skipping attempts to generate disk topology
information in these cases. Since this information is documented
in QAPI as optionally-reported, this should be ok from an API
perspective.
In the future, this can possibly be improved upon by collecting
topology information from the parent in these cases.
Reported-by: Peter Maydell <[email protected]>
Cc: Peter Maydell <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
Tested-by: Peter Maydell <[email protected]>
| 8251a72f8bb8764c13dd5ba627e7d9e6d35d188e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8251a72f8bb8764c13dd5ba627e7d9e6d35d188e | 2017-03-30 14:12:57-05:00 |
block: Initial implementation of -blockdev
The new command line option -blockdev works like QMP command
blockdev-add.
The option argument may be given in JSON syntax, exactly as in QMP.
Example usage:
-blockdev '{"node-name": "foo", "driver": "raw", "file": {"driver": "file", "filename": "foo.img"} }'
The JSON argument doesn't exactly blend into the existing option
syntax, so the traditional KEY=VALUE,... syntax is also supported,
using dotted keys to do the nesting:
-blockdev node-name=foo,driver=raw,file.driver=file,file.filename=foo.img
This does not yet support lists, but that will be addressed shortly.
Note that calling qmp_blockdev_add() (say via qmp_marshal_block_add())
right away would crash. We need to stash the configuration for later
instead. This is crudely done, and bypasses QemuOpts, even though
storing configuration is what QemuOpts is for. Need to revamp option
infrastructure to support QAPI types like BlockdevOptions.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
| 42e5f39378c6e7a0ada563779bbb6f470f7c03ff | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/42e5f39378c6e7a0ada563779bbb6f470f7c03ff | 2017-03-07 16:07:47+01:00 |
disas/i386: Avoid NULL pointer dereference in error case
In a code path where we hit an internal disassembler error, execution
would subsequently attempt to dereference a NULL pointer. This
should never happen, but avoid the crash.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
| 3f168b5d353fa68baab55ea0c6ba791f0df027dc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3f168b5d353fa68baab55ea0c6ba791f0df027dc | 2017-03-07 14:33:51+00:00 |
qom: Make object_property_set_qobject()'s input visitor strict
Commit 240f64b made all qobject input visitors created outside tests
strict, except for the one in object_property_set_qobject(). That one
was left behind only because Eric couldn't spare the time to figure
out whether making it strict would break anything, with a TODO
comment. Time to resolve it.
Strict makes a difference only for otherwise successful visits of QAPI
structs or unions. Let's examine what the callers of
object_property_set_qobject() visit:
* object_property_set_str(), object_property_set_bool(),
object_property_set_int() visit a QString, QBool, QInt,
respectively. Strictness can't matter.
* qmp_qom_set visits its @value argument. Comes straight from QMP and
can be anything ('any' in the QAPI schema). Strictness matters when
the property's set() method visits a struct or union QAPI type.
No such methods exist, thus switching to strict can't break
anything.
If we acquire such methods in the future, we'll *want* the visitor
to be strict, so that unexpected members get rejected as they should
be.
Switch to strict.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
| 05601ed2de60df0e344d6b783a6bc0c1ff2b5d1f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/05601ed2de60df0e344d6b783a6bc0c1ff2b5d1f | 2017-03-05 09:14:19+01:00 |
keyval: New keyval_parse()
keyval_parse() parses KEY=VALUE,... into a QDict. Works like
qemu_opts_parse(), except:
* Returns a QDict instead of a QemuOpts (d'oh).
* Supports nesting, unlike QemuOpts: a KEY is split into key
fragments at '.' (dotted key convention; the block layer does
something similar on top of QemuOpts). The key fragments are QDict
keys, and the last one's value is updated to VALUE.
* Each key fragment may be up to 127 bytes long. qemu_opts_parse()
limits the entire key to 127 bytes.
* Overlong key fragments are rejected. qemu_opts_parse() silently
truncates them.
* Empty key fragments are rejected. qemu_opts_parse() happily
accepts empty keys.
* It does not store the returned value. qemu_opts_parse() stores it
in the QemuOptsList.
* It does not treat parameter "id" specially. qemu_opts_parse()
ignores all but the first "id", and fails when its value isn't
id_wellformed(), or duplicate (a QemuOpts with the same ID is
already stored). It also screws up when a value contains ",id=".
* Implied value is not supported. qemu_opts_parse() desugars "foo" to
"foo=on", and "nofoo" to "foo=off".
* An implied key's value can't be empty, and can't contain ','.
I intend to grow this into a saner replacement for QemuOpts. It'll
take time, though.
Note: keyval_parse() provides no way to do lists, and its key syntax
is incompatible with the __RFQDN_ prefix convention for downstream
extensions, because it blindly splits at '.', even in __RFQDN_. Both
issues will be addressed later in the series.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
| d454dbe0ee3ca7bee8a0bb185e4be0534b1d1544 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d454dbe0ee3ca7bee8a0bb185e4be0534b1d1544 | 2017-03-07 16:07:46+01:00 |
tests: fix virtio-9p-test leaks
Spotted by ASAN.
Cc: "Aneesh Kumar K.V" <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
| 2b880bcdbeb87b9cb4e325dd6e872373458f82d9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2b880bcdbeb87b9cb4e325dd6e872373458f82d9 | 2017-03-01 11:51:28+04:00 |
9pfs: local: open2: don't follow symlinks
The local_open2() callback is vulnerable to symlink attacks because it
calls:
(1) open() which follows symbolic links for all path elements but the
rightmost one
(2) local_set_xattr()->setxattr() which follows symbolic links for all
path elements
(3) local_set_mapped_file_attr() which calls in turn local_fopen() and
mkdir(), both functions following symbolic links for all path
elements but the rightmost one
(4) local_post_create_passthrough() which calls in turn lchown() and
chmod(), both functions also following symbolic links
This patch converts local_open2() to rely on opendir_nofollow() and
mkdirat() to fix (1), as well as local_set_xattrat(),
local_set_mapped_file_attrat() and local_set_cred_passthrough() to
fix (2), (3) and (4) respectively. Since local_open2() already opens
a descriptor to the target file, local_set_cred_passthrough() is
modified to reuse it instead of opening a new one.
The mapped and mapped-file security modes are supposed to be identical,
except for the place where credentials and file modes are stored. While
here, we also make that explicit by sharing the call to openat().
This partly fixes CVE-2016-9602.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| a565fea56546e254b7610305b07711f0a3bda0c7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a565fea56546e254b7610305b07711f0a3bda0c7 | 2017-02-28 11:21:15+01:00 |
qapi: Improve qobject input visitor error reporting
Error messages refer to nodes of the QObject being visited by name.
Trouble is the names are sometimes less than helpful:
* The name of the root QObject is whatever @name argument got passed
to the visitor, except NULL gets mapped to "null". We commonly pass
NULL. Not good.
Avoiding errors "at the root" mitigates. For instance,
visit_start_struct() can only fail when the visited object is not a
dictionary, and we commonly ensure it is beforehand.
* The name of a QDict's member is the member key. Good enough only
when this happens to be unique.
* The name of a QList's member is "null". Not good.
Improve error messages by referring to nodes by path instead, as
follows:
* The path of the root QObject is whatever @name argument got passed
to the visitor, except NULL gets mapped to "<anonymous>".
* The path of a root QDict's member is the member key.
* The path of a root QList's member is "[%u]", where %u is the list
index, starting at zero.
* The path of a non-root QDict's member is the path of the QDict
concatenated with "." and the member key.
* The path of a non-root QList's member is the path of the QList
concatenated with "[%u]", where %u is the list index.
For example, the incorrect QMP command
{ "execute": "blockdev-add", "arguments": { "node-name": "foo", "driver": "raw", "file": {"driver": "file" } } }
now fails with
{"error": {"class": "GenericError", "desc": "Parameter 'file.filename' is missing"}}
instead of
{"error": {"class": "GenericError", "desc": "Parameter 'filename' is missing"}}
and
{ "execute": "input-send-event", "arguments": { "device": "bar", "events": [ [] ] } }
now fails with
{"error": {"class": "GenericError", "desc": "Invalid parameter type for 'events[0]', expected: object"}}
instead of
{"error": {"class": "GenericError", "desc": "Invalid parameter type for 'null', expected: QDict"}}
Aside: calling the thing "parameter" is suboptimal for QMP, because
the root object is "arguments" there.
The qobject output visitor doesn't have this problem because it should
not fail. Same for dealloc and clone visitors.
The string visitors don't have this problem because they visit just
one value, whose name needs to be passed to the visitor as @name. The
string output visitor shouldn't fail anyway.
The options visitor uses QemuOpts names. Their name space is flat, so
the use of QDict member keys as names is fine. NULL names used with
roots and lists could conceivably result in bad error messages. Left
for another day.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-Id: <[email protected]>
| a9fc37f6bc3f2ab90585cb16493da9f6dcfbfbcf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a9fc37f6bc3f2ab90585cb16493da9f6dcfbfbcf | 2017-03-05 09:14:19+01:00 |
9pfs: local: mknod: don't follow symlinks
The local_mknod() callback is vulnerable to symlink attacks because it
calls:
(1) mknod() which follows symbolic links for all path elements but the
rightmost one
(2) local_set_xattr()->setxattr() which follows symbolic links for all
path elements
(3) local_set_mapped_file_attr() which calls in turn local_fopen() and
mkdir(), both functions following symbolic links for all path
elements but the rightmost one
(4) local_post_create_passthrough() which calls in turn lchown() and
chmod(), both functions also following symbolic links
This patch converts local_mknod() to rely on opendir_nofollow() and
mknodat() to fix (1), as well as local_set_xattrat() and
local_set_mapped_file_attrat() to fix (2) and (3) respectively.
A new local_set_cred_passthrough() helper based on fchownat() and
fchmodat_nofollow() is introduced as a replacement to
local_post_create_passthrough() to fix (4).
The mapped and mapped-file security modes are supposed to be identical,
except for the place where credentials and file modes are stored. While
here, we also make that explicit by sharing the call to mknodat().
This partly fixes CVE-2016-9602.
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| d815e7219036d6911fce12efe3e59906264c8536 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d815e7219036d6911fce12efe3e59906264c8536 | 2017-02-28 11:21:15+01:00 |
tcg: handle EXCP_ATOMIC exception for system emulation
The patch enables handling atomic code in the guest. This should be
preferably done in cpu_handle_exception(), but the current assumptions
regarding when we can execute atomic sections cause a deadlock.
The current mechanism discards the flags which were set in atomic
execution. We ensure they are properly saved by calling the
cc->cpu_exec_enter/leave() functions around the loop.
As we are running cpu_exec_step_atomic() from the outermost loop we
need to avoid an abort() when single stepping over atomic code since
debug exception longjmp will point to the the setlongjmp in
cpu_exec(). We do this by setting a new jmp_env so that it jumps back
here on an exception.
Signed-off-by: Pranith Kumar <[email protected]>
[AJB: tweak title, merge with new patches, add mmap_lock]
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
CC: Paolo Bonzini <[email protected]>
| 08e73c48b053566bfe0c994f154f73991cd0ff0e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/08e73c48b053566bfe0c994f154f73991cd0ff0e | 2017-02-24 10:32:45+00:00 |
qdict: Make qdict_get_qlist() safe like qdict_get_qdict()
Commit 89cad9f changed qdict_get_qdict() to return NULL instead of
crash when the key doesn't exist or its value isn't a QDict.
Commit 2d6421a neglected to do the same for qdict_get_qlist().
Correct that, and update the function comments.
qdict_get_obj() is now unused, remove.
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| b25f23e7dbc6bc0dcda010222a4f178669d1aedc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b25f23e7dbc6bc0dcda010222a4f178669d1aedc | 2017-02-22 19:51:37+01:00 |
hw/mips: MIPS Boston board support
Introduce support for emulating the MIPS Boston development board. The
Boston board is built around an FPGA & 3 PCIe controllers, one of which
is connected to an Intel EG20T Platform Controller Hub. It is used
during the development & debug of new CPUs and the software intended to
run on them, and is essentially the successor to the older MIPS Malta
board.
This patch does not implement the EG20T, instead connecting an already
supported ICH-9 AHCI controller. Whilst this isn't accurate it's enough
for typical stock Boston software (eg. Linux kernels) to work with hard
disks given that both the ICH-9 & EG20T implement the AHCI
specification.
Boston boards typically boot kernels in the FIT image format, and this
patch will treat kernels provided to QEMU as such. When loading a kernel
directly, the board code will generate minimal firmware much as the
Malta board code does. This firmware will set up the CM, CPC & GIC
register base addresses then set argument registers & jump to the kernel
entry point. Alternatively, bootloader code may be loaded using the bios
argument in which case no firmware will be generated & execution will
proceed from the start of the boot code at the default MIPS boot
exception vector (offset 0x1fc00000 into (c)kseg1).
Currently real Boston boards are always used with FPGA bitfiles that
include a Global Interrupt Controller (GIC), so the interrupt
configuration is only defined for such cases. Therefore the board will
only allow use of CPUs which implement the CPS components, including the
GIC, and will otherwise exit with a message.
Signed-off-by: Paul Burton <[email protected]>
Reviewed-by: Yongbok Kim <[email protected]>
[[email protected]:
isolated boston machine support for mips64el.
updated for recent Chardev changes.
ignore missing bios/kernel for qtest.
added default -drive to if=ide explicitly.
changed default memory size into 1G due to make check failure
on 32-bit hosts]
Signed-off-by: Yongbok Kim <[email protected]>
| df1d8a1f29f567567b9d20be685a4241282e7005 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/df1d8a1f29f567567b9d20be685a4241282e7005 | 2017-02-24 10:37:21+00:00 |
linux-user: fix tcg/mmap test
tests/tcg/mmap test fails with values other than default target page
size. When creating a map beyond EOF, extra anonymous pages are added up
to the target page boundary. Currently, this operation is performed only
when qemu_real_host_page_size < TARGET_PAGE_SIZE, but it should be
performed if the configured page size (qemu -p) is larger than
qemu_real_host_page_size too.
Signed-off-by: Marc-André Lureau <[email protected]>
[pranith: dropped checkpatch changes]
Signed-off-by: Pranith Kumar <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
| 35f2fd04ce8bd3eaad4b7790abb19fa2a56d7314 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/35f2fd04ce8bd3eaad4b7790abb19fa2a56d7314 | 2017-02-16 15:29:30+01:00 |
wdt: Add Aspeed watchdog device model
The Aspeed SoC includes a set of watchdog timers using 32-bit
decrement counters, which can be based either on the APB clock or
a 1 MHz clock.
The watchdog timer is designed to prevent system deadlock and, in
general, it should be restarted before timeout. When a timeout occurs,
different types of signals can be generated, ARM reset, SOC reset,
System reset, CPU Interrupt, external signal or boot from alternate
block. The current model only performs the system reset function as
this is used by U-Boot and Linux.
Signed-off-by: Joel Stanley <[email protected]>
Message-id: [email protected]
[clg: - fixed compile breakage
- fixed io region size
- added watchdog_perform_action() on timer expiry
- wrote a commit log
- merged fixes from Andrew Jeffery to scale the reload value ]
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
| 854123bf8d4b8f4dcedcb03d0201e4305da45fe8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/854123bf8d4b8f4dcedcb03d0201e4305da45fe8 | 2017-02-07 18:29:59+00:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.