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
⌀ |
---|---|---|---|---|---|---|---|
qcow2: Fix error handling during metadata preallocation
People were wondering why qemu-img check failed after they tried to preallocate
a large qcow2 file and ran out of disk space.
Signed-off-by: Kevin Wolf <[email protected]>
|
19dbcbf7cc1892f5130b4edd5a4bb4ca800ef7d8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/19dbcbf7cc1892f5130b4edd5a4bb4ca800ef7d8
|
2010-07-02 13:18:01+02:00
|
Add cache=unsafe parameter to -drive
Usually the guest can tell the host to flush data to disk. In some cases we
don't want to flush though, but try to keep everything in cache.
So let's add a new cache value to -drive that allows us to set the cache
policy to most aggressive, disabling flushes. We call this mode "unsafe",
as guest data is not guaranteed to survive host crashes anymore.
This patch also adds a noop function for aio, so we can do nothing in AIO
fashion.
Signed-off-by: Alexander Graf <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
|
016f5cf6ff465411733878a17c8f8febb7668321
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/016f5cf6ff465411733878a17c8f8febb7668321
|
2010-05-26 20:05:14+02:00
|
vmstate: fix breakage by 7e72abc382b700a72549e8147bdea413534eeedc
cirrus_post_load() will be executed twice when loading vm states and then the
wrong physical memory will be registered. This issue may lead to crash qemu.
Signed-off-by: TeLeMan <[email protected]>
Acked-by: Juan Quintela <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
|
ae6b2c4ed956c17456e70efefe13ad0ab7db31de
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ae6b2c4ed956c17456e70efefe13ad0ab7db31de
|
2010-05-22 08:39:13+00:00
|
scsi-disk: fix buffer overflow
In case s->version is shorter than 4 bytes we overflow the memcpy src
buffer. Fix it by clearing the target buffer, then copy only the
amount of bytes we actually have.
Signed-off-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
|
314b1811c15f4e982e4667d9b845aee4b5a63d91
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/314b1811c15f4e982e4667d9b845aee4b5a63d91
|
2010-03-17 11:17:05-05:00
|
qemu-img: use the heap instead of the huge stack array for win32
The default stack size of PE is 1MB on win32 and IO_BUF_SIZE in
img_convert() & img_rebase() is 2MB, so qemu-img will crash when doing
"convert" & "rebase" on win32.
Although we can improve the stack size of PE to resolve it, I think we
should avoid using the huge stack variables.
Signed-off-by: TeLeMan <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
|
d6771bfa52744eb4f959198b4b0e59451463eebf
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d6771bfa52744eb4f959198b4b0e59451463eebf
|
2010-02-10 14:00:53-06:00
|
workaround for cmd646 bmdma register access while no dma is active
This is a workaround only, and is a partial revert
of a few changes to BMDMAState which removed pci_dev
field on the way.
- cmd646 pci_from_bm() expects bm->unit value to
correspond with bm data being passed to callback
as opaque pointer. This breaks when write to dma
control register of second channel happens when no
dma operation is in progress, so bm->unit is zero
for second channel, and pci_from_bm() returns garbage
pointer. Crash happens shortly after that while
dereferencing that pointer.
v0->v1: cleaned up dead code from pci_from_bm.
Signed-off-by: Igor V. Kovalenko <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
|
90228ee395b71cdd64e6bc844e3d553eb9ef643f
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/90228ee395b71cdd64e6bc844e3d553eb9ef643f
|
2009-12-13 19:03:31+00:00
|
qcow2: Rewrite alloc_refcount_block/grow_refcount_table
The current implementation of alloc_refcount_block and grow_refcount_table has
fundamental problems regarding error handling. There are some places where an
I/O error means that the image is going to be corrupted. I have found that the
only way to fix this is to completely rewrite the thing.
In detail, the problem is that the refcount blocks itself are allocated using
alloc_refcount_noref (to avoid endless recursion when updating the refcount of
the new refcount block, which migh access just the same refcount block but its
allocation is not yet completed...). Only at the end of the refcount allocation
the refcount of the refcount block is increased. If an error happens in
between, the refcount block is in use, but has a refcount of zero and will
likely be overwritten later.
The new approach is explained in comments in the code. The trick is basically
to let new refcount blocks describe their own refcount, so their refcount will
be automatically changed when they are hooked up in the refcount table.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
|
92dcb59fd4e1491afa0756ee9c2594869b487d23
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/92dcb59fd4e1491afa0756ee9c2594869b487d23
|
2010-02-23 13:23:29-06:00
|
slirp: fix use-after-free
460fec67ee introduced a use-after free in slirp.
Cc: Jan Kiszka <[email protected]>
Signed-off-by: Mark McLoughlin <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
|
e0cf6d15e374c8db39acda551845ecc62f5205a3
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/e0cf6d15e374c8db39acda551845ecc62f5205a3
|
2009-11-21 00:34:04+01:00
|
target-arm: cleanup internal resource leaks
Revised patch for getting rid of tcg temporary variable leaks in
target-arm/translate.c. This version also includes the leak patch for
gen_set_cpsr macro, now converted as a static inline function, which I
sent earlier as a separate patch on top of this patch.
Signed-off-by: Juha Riihimäki <[email protected]>
Acked-by: Laurent Desnogues <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
|
b75263d6533c2ffa60bee16525d9908249e79541
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/b75263d6533c2ffa60bee16525d9908249e79541
|
2009-10-23 17:11:43+02:00
|
linux-user: zero fstat buffer to initialize nsec fields
The fstat implementation does not initialize the nanosecond fields in the
stat buffer; this caused funny values to turn up there, preventing, for
instance, cp -p from preserving timestamps because utimensat rejected
the out-of-bounds nanosecond values. Resetting the entire structure
to zero fixes that.
Signed-off-by: Ulrich Hecht <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
|
12727917db45aebb809e4b09c51e883c09a6366f
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/12727917db45aebb809e4b09c51e883c09a6366f
|
2009-08-25 17:15:35+03:00
|
qemu-io: fix memory leak
qemu-io leaks the request buffer whenever the read or write function isn't
executed completely down the "normal" code path.
[hch: also fix the aio and vectored variants the same way]
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
|
7d8abfcb50a33aed369bbd267852cf04009c49e9
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/7d8abfcb50a33aed369bbd267852cf04009c49e9
|
2009-07-10 12:25:36-05:00
|
Sparc64: replace tsptr with helper routine
tl and tsptr of members sparc64 cpu state must be changed
simultaneously to keep trap state window in sync with current
trap level. Currently translation of store to tl does not change
tsptr, which leads to corrupt trap state on corresponding
trap level.
This patch removes tsptr from sparc64 cpu state and replaces
all uses with call to helper routine.
Changes v0->v1:
- reimplemented helper routine with tcg generator
- on cpu reset trap type and pstate are populated with power-on reset
values, including tl=maxtl
Signed-off-by: [email protected]
Signed-off-by: Blue Swirl <[email protected]>
|
8194f35a0c71a3bf169459bf715bea53b7bbc904
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8194f35a0c71a3bf169459bf715bea53b7bbc904
|
2009-08-04 20:22:10+00:00
|
Fix disassembler memory accesses
Sparc disassembler wants to check previous addresses for some stuff
and this may actually cause faults to be generated to the guest if the
address is close to page start, because of the function used for the
memory access.
Fix by changing ldub_code to cpu_memory_rw_debug, which doesn't trigger
exceptions.
Signed-off-by: Blue Swirl <[email protected]>
|
e612a1f7256bb3546cf3e9ae6cad3997c4153663
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/e612a1f7256bb3546cf3e9ae6cad3997c4153663
|
2009-05-07 17:14:07+00:00
|
MIPS signal handling fixes.
Also fixes a register corruption bug in do_sigreturn. When "returning"
from sigreturn we are actually restoring the virtual cpu state from the
signal frame. This is actually surprisingly hard to observe in practice.
Typically an thread be blocked in a FUTEX_WAIT call when the signal arrives,
so the effect is a spurious syscall success and the introduction of a
subtle race condition.
On x86/arm a syscall modifies a single word sized register, so
do_sigreturn can just return that value. On MIPS a syscall clobbers
multiple registers, so we need additional smarts. My solution is to
invent a magic errno value that means "don't touch CPU state".
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7194 c046a42c-6fe2-441c-8c8c-71466251a162
|
0b1bcb00fb2baf5f3227dd9cd849fa69bf50d7a8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/0b1bcb00fb2baf5f3227dd9cd849fa69bf50d7a8
|
2009-04-21 01:41:10+00:00
|
Add host_device support to qemu-img. (Nolan Leake)
This patch allows the use a host_device as the destination for "qemu-img
convert".
I added a ->bdrv_create function host_device. It merely verifies that
the device exists and is large enough.
A check is needed in the qemu-img convert loop to ensure that we write
out all 0 sectors to the host_device. Otherwise they end up with stale
garbage where all zero sectors were expected.
I also made the check against bdrv_is_allocated enabled for everything
_except_ host devices, since there is no point in making the block
backend write a bunch of zeros just so that we can memcmp them
immediately afterwards. Host devices can't benefit from this because
there is no way to differentiate between a sector being unallocated
because it was never written, or because it was written with all zeros
and then made a trip through qemu-img convert.
Finally, there is an unrelated fix for a typo in the error message
printed if the destination device does not support ->bdrv_create.
Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6978 c046a42c-6fe2-441c-8c8c-71466251a162
|
93c65b47a6fb9ba0e2b89269a751ba3433a33427
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/93c65b47a6fb9ba0e2b89269a751ba3433a33427
|
2009-04-05 17:40:43+00:00
|
Fix monitor command (screendump) (Stefan Weil)
starting with r6839, the monitor command 'screendump'
raises a nullpointer memory access which crashs Qemu.
Fix crash when calling screendump from monitor.
This was a regression introduced with r6839:
DisplayAllocator interface (Stefano Stabellini)
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6900 c046a42c-6fe2-441c-8c8c-71466251a162
|
81f099ad3266eede194bcb80f44e9ffe1772f257
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/81f099ad3266eede194bcb80f44e9ffe1772f257
|
2009-03-28 17:29:02+00:00
|
qemu-io: Verify read data by patterns (Kevin Wolf)
This patch adds a -P option to read and readv which allows to compare the read
data to a given pattern. This can be used to verify data written by write -P.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7182 c046a42c-6fe2-441c-8c8c-71466251a162
|
c48101ae92c5ac6f2412ca345d9cc3557add8e47
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/c48101ae92c5ac6f2412ca345d9cc3557add8e47
|
2009-04-18 15:36:23+00:00
|
kvm: improve handling of overlapping slots (Jan Kiszka)
This reworks the slot management to handle more patterns of
cpu_register_physical_memory*, finally allowing to reset KVM guests (so
far address remapping on reset broke the slot management).
We could actually handle all possible ones without failing, but a KVM
kernel bug in older versions would force us to track all previous
fragmentations and maintain them (as that bug prevents registering
larger slots that overlap also deleted ones). To remain backward
compatible but avoid overly complicated workarounds, we apply a simpler
workaround that covers all currently used patterns.
Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7139 c046a42c-6fe2-441c-8c8c-71466251a162
|
6152e2ae4344ec8c849393da3f76f2263cc55766
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6152e2ae4344ec8c849393da3f76f2263cc55766
|
2009-04-17 14:26:33+00:00
|
check SCSI read/write requests against max LBA (Rik van Riel)
The bdrv layer uses a signed offset. Furthermore, block-raw-posix
only seeks when that offset is positive. Passing a negative offset
to block-raw-posix can result in data being written at the current
seek cursor's position.
It may be possible to exploit this to seek to the end of the disk
and extend the virtual disk by writing data to a negative sector
offset. After a reboot, this could lead to the guest having a
larger disk than it had before.
Close the hole by sanity checking the lba against the size of the
disk.
Signed-off-by: Rik van Riel <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6475 c046a42c-6fe2-441c-8c8c-71466251a162
|
274fb0e1ed962e9ae43ab05e7939499cebb39d26
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/274fb0e1ed962e9ae43ab05e7939499cebb39d26
|
2009-01-29 19:59:04+00:00
|
qcow2: free old snapshots array upon creation of a new one (Uri Lublin)
Don't leak memory
Rebased for qemu tree.
Signed-off-by: Uri Lublin <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6245 c046a42c-6fe2-441c-8c8c-71466251a162
|
54c16572a03e3c9c5694653361f9bfa3959fcb59
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/54c16572a03e3c9c5694653361f9bfa3959fcb59
|
2009-01-08 19:32:20+00:00
|
kvm-x86: Remove eflags conversion into emulator format (Jan Kiszka)
It seems that the conversion of the kernel-delivered eflags state into
qemu's internal split representation was once needed in an older kvm
design (register read-back may have taken place from inside cpu_exec).
Today it is plain wrong and causes incorrect cpu state reporting (gdb,
monitor) and should also corrupt its saving (savevm, migration). Drop
the related lines.
Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6461 c046a42c-6fe2-441c-8c8c-71466251a162
|
8c6c919e281231dc3c77191b5a8c3c427ff17be8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8c6c919e281231dc3c77191b5a8c3c427ff17be8
|
2009-01-26 20:32:22+00:00
|
target-ppc: Fix use of uninitialized TCG variable in tlbiva
Silences a warning about possible unitialized use of t0.
Signed-off-by: Andreas Faerber <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5915 c046a42c-6fe2-441c-8c8c-71466251a162
|
ec72e276c5e1805206bef3ba06e13da3d9eb87bf
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ec72e276c5e1805206bef3ba06e13da3d9eb87bf
|
2008-12-07 15:45:15+00:00
|
SCSI: Handle inquiry commands of varying length (Justin Chevrier).
Openserver 5.0.5 sends an Inquiry command to the emulated SCSI disk
expecting a response length of 40 bytes. Currently the response to an
Inquiry command is hardcoded to 36 bytes. When receiving a response of
length 36 instead of 40 Openserver panics.
Modifications to original patch based on feedback from Ryan Harper and Paul
Brook. Thanks guys.
Signed-off-by: Justin Chevrier <address@hidden>
Signed-off-by: Andrzej Zaborowski <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5903 c046a42c-6fe2-441c-8c8c-71466251a162
|
575750581c6ea70e89a7889cb6028f234f9d2ee9
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/575750581c6ea70e89a7889cb6028f234f9d2ee9
|
2008-12-07 03:12:54+00:00
|
Silence some warnings about uninitialized variables
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5362 c046a42c-6fe2-441c-8c8c-71466251a162
|
98448f58c10033a0f7fcd0673cce4626506403fa
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/98448f58c10033a0f7fcd0673cce4626506403fa
|
2008-09-30 18:16:09+00:00
|
Fix SS-2 crash
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5357 c046a42c-6fe2-441c-8c8c-71466251a162
|
ada24f846650ad2e64c92178d233e380db141427
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ada24f846650ad2e64c92178d233e380db141427
|
2008-09-29 18:24:38+00:00
|
Fix handling of disk-only snapshots (Kevin Wolf)
When creating a snapshot with multiple qcow2 disks attached, the current
behaviour is that qemu creates a disk snapshot on all of them and
chooses one to write the VM state to.
Despite having the state only in one image, loadvm tries to restore the
VM state from the middle of nowhere if you run qemu a second time with
only one of the other images attached. In the lucky case it will fail
because there simply is no state, but it also can happen that it loads
the state of a different snapshot (the one this new one is based upon).
The fix is to write a zero VM state size to the images which don't
contain the state, and check this in loadvm.
I agree that you probably have to provoke such things intentionally to
get in a state like this with qemu itself. However, with my second patch
that adds snapshot support to qemu-img it could become a reasonable use
case to have snapshots with and without VM states on the same image.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5985 c046a42c-6fe2-441c-8c8c-71466251a162
|
2d22b18f77ab0a488762e9216575b8582f1adb7d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/2d22b18f77ab0a488762e9216575b8582f1adb7d
|
2008-12-11 21:06:49+00:00
|
Fix 32 bit address overflow
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5019 c046a42c-6fe2-441c-8c8c-71466251a162
|
90cbed4656108fec86d157ced39192e0774a6615
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/90cbed4656108fec86d157ced39192e0774a6615
|
2008-08-17 16:13:02+00:00
|
Fix off-by-one unwinding error.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4570 c046a42c-6fe2-441c-8c8c-71466251a162
|
9b7b85d26006af61b69dbabe2354d73a8c67cc6c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9b7b85d26006af61b69dbabe2354d73a8c67cc6c
|
2008-05-25 00:36:06+00:00
|
Avoid host FPE for overflowing division on MIPS, by Richard Sandiford.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3856 c046a42c-6fe2-441c-8c8c-71466251a162
|
306ab3e86a94b7547883ca9dac0c86122bb8622c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/306ab3e86a94b7547883ca9dac0c86122bb8622c
|
2007-12-25 03:18:19+00:00
|
Make it safe to use 64 bits GPR and/or 64 bits host registers.
For "symetry", add 64 bits versions of all modified functions.
As a side effect, add a lot of code provision for PowerPC 64 support.
Move overflow and carry checks in common routines for simple cases.
Add isel and popcntb instructions from PowerPC 2.03 specification.
Remove remaining micro-operations helpers prototypes from op.c.
Fix XER_BC field to be 7 bits long.
Add power management support for PowerPC 603 & 604.
Fix compilation warnings.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2482 c046a42c-6fe2-441c-8c8c-71466251a162
|
d9bce9d99f4656ae0b0127f7472db9067b8f84ab
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d9bce9d99f4656ae0b0127f7472db9067b8f84ab
|
2007-03-17 14:02:15+00:00
|
signal fix: update the host signal 'signal ignored' state to avoid unexpected -EINTR values (ash fix)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@503 c046a42c-6fe2-441c-8c8c-71466251a162
|
773b93ee0684a9b9d1f0029a936a251411289027
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/773b93ee0684a9b9d1f0029a936a251411289027
|
2004-01-04 17:15:59+00:00
|
page_unprotect(): handle calls to pages that are PAGE_WRITE
If multiple guest threads in user-mode emulation write to a
page which QEMU has marked read-only because of cached TCG
translations, the threads can race in page_unprotect:
* threads A & B both try to do a write to a page with code in it at
the same time (ie which we've made non-writeable, so SEGV)
* they race into the signal handler with this faulting address
* thread A happens to get to page_unprotect() first and takes the
mmap lock, so thread B sits waiting for it to be done
* A then finds the page, marks it PAGE_WRITE and mprotect()s it writable
* A can then continue OK (returns from signal handler to retry the
memory access)
* ...but when B gets the mmap lock it finds that the page is already
PAGE_WRITE, and so it exits page_unprotect() via the "not due to
protected translation" code path, and wrongly delivers the signal
to the guest rather than just retrying the access
In particular, this meant that trying to run 'javac' in user-mode
emulation would fail with a spurious guest SIGSEGV.
Handle this by making page_unprotect() assume that a call for a page
which is already PAGE_WRITE is due to a race of this sort and return
a "fault handled" indication.
Since this would cause an infinite loop if we ever called
page_unprotect() for some other kind of fault than "write failed due
to bad access permissions", tighten the condition in
handle_cpu_signal() to check the signal number and si_code, and add a
comment so that if somebody does ever find themselves debugging an
infinite loop of faults they have some clue about why.
(The trick for identifying the correct setting for
current_tb_invalidated for thread B (needed to handle the precise-SMC
case) is due to Richard Henderson. Paolo Bonzini suggested just
relying on si_code rather than trying anything more complicated.)
Signed-off-by: Peter Maydell <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
|
9c4bbee9e3b83544257e82566342c29e15a88637
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9c4bbee9e3b83544257e82566342c29e15a88637
|
2018-01-23 14:20:53+01:00
|
crypto: introduce new module for computing hash digests
Introduce a new crypto/ directory that will (eventually) contain
all the cryptographic related code. This initially defines a
wrapper for initializing gnutls and for computing hashes with
gnutls. The former ensures that gnutls is guaranteed to be
initialized exactly once in QEMU regardless of CLI args. The
block quorum code currently fails to initialize gnutls so it
only works by luck, if VNC server TLS is not requested. The
hash APIs avoids the need to litter the rest of the code with
preprocessor checks and simplifies callers by allocating the
correct amount of memory for the requested hash.
Signed-off-by: Daniel P. Berrange <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
ddbb0d09661f5fce21b335ba9aea8202d189b98e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ddbb0d09661f5fce21b335ba9aea8202d189b98e
|
2015-07-07 12:04:07+02:00
|
migration: calculate vCPU blocktime on dst side
This patch provides blocktime calculation per vCPU,
as a summary and as a overlapped value for all vCPUs.
This approach was suggested by Peter Xu, as an improvements of
previous approch where QEMU kept tree with faulted page address and cpus bitmask
in it. Now QEMU is keeping array with faulted page address as value and vCPU
as index. It helps to find proper vCPU at UFFD_COPY time. Also it keeps
list for blocktime per vCPU (could be traced with page_fault_addr)
Blocktime will not calculated if postcopy_blocktime field of
MigrationIncomingState wasn't initialized.
Signed-off-by: Alexey Perevalov <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
|
3be98be4e9f59055afb5f2b27f9296c7093b4e75
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3be98be4e9f59055afb5f2b27f9296c7093b4e75
|
2018-01-15 12:48:01+01:00
|
migration: fix analyze-migration.py script with radix table
Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
the HTAB migration stream contains a header set to "-1", meaning there
is no HPT. Teach analyze-migration.py to ignore the section in this case.
Without this fix, the script fails with a dump from a POWER9 guest:
Traceback (most recent call last):
File "./qemu/scripts/analyze-migration.py", line 602, in <module>
dump.read(dump_memory = args.memory)
File "./qemu/scripts/analyze-migration.py", line 539, in read
section.read()
File "./qemu/scripts/analyze-migration.py", line 250, in read
self.file.readvar(n_valid * self.HASH_PTE_SIZE_64)
File "./qemu/scripts/analyze-migration.py", line 64, in readvar
raise Exception("Unexpected end of %s at 0x%x" % (self.filename, self.file.tell()))
Exception: Unexpected end of migrate.dump at 0x1d4763ba
Fixes: 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream")
Signed-off-by: Laurent Vivier <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
|
029ff892e1049ca4f93f9d8f0059bc02fffd6e32
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/029ff892e1049ca4f93f9d8f0059bc02fffd6e32
|
2018-01-15 12:47:58+01:00
|
checkpatch: volatile with a comment or sig_atomic_t is okay
This assumes that the comment gives some justification;
"volatile sig_atomic_t" is also self-explanatory and usually
correct.
Discussed in:
'[Qemu-devel] [PATCH] dump-guest-memory.py: fix "You can't do that without a process to debug"'
Suggested-by: Fam Zheng <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
6b012d2311e5ba0a952c2dcfe4327a73353c9fdb
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6b012d2311e5ba0a952c2dcfe4327a73353c9fdb
|
2017-12-21 09:30:32+01:00
|
target/arm: Handle page table walk load failures correctly
Instead of ignoring the response from address_space_ld*()
(indicating an attempt to read a page table descriptor from
an invalid physical address), use it to report the failure
correctly.
Since this is another couple of locations where we need to
decide the value of the ARMMMUFaultInfo ea bit based on a
MemTxResult, we factor out that operation into a helper
function.
Signed-off-by: Peter Maydell <[email protected]>
|
3b39d734141a71296d08af3d4c32f872fafd782e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3b39d734141a71296d08af3d4c32f872fafd782e
|
2018-01-16 13:28:11+00:00
|
spapr: Capabilities infrastructure
Because PAPR is a paravirtual environment access to certain CPU (or other)
facilities can be blocked by the hypervisor. PAPR provides ways to
advertise in the device tree whether or not those features are available to
the guest.
In some places we automatically determine whether to make a feature
available based on whether our host can support it, in most cases this is
based on limitations in the available KVM implementation.
Although we correctly advertise this to the guest, it means that host
factors might make changes to the guest visible environment which is bad:
as well as generaly reducing reproducibility, it means that a migration
between different host environments can easily go bad.
We've mostly gotten away with it because the environments considered mature
enough to be well supported (basically, KVM on POWER8) have had consistent
feature availability. But, it's still not right and some limitations on
POWER9 is going to make it more of an issue in future.
This introduces an infrastructure for defining "sPAPR capabilities". These
are set by default based on the machine version, masked by the capabilities
of the chosen cpu, but can be overriden with machine properties.
The intention is at reset time we verify that the requested capabilities
can be supported on the host (considering TCG, KVM and/or host cpu
limitations). If not we simply fail, rather than silently modifying the
advertised featureset to the guest.
This does mean that certain configurations that "worked" may now fail, but
such configurations were already more subtly broken.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
|
33face6b8981add8eba1f7cdaf4cf6cede415d2e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/33face6b8981add8eba1f7cdaf4cf6cede415d2e
|
2018-01-17 09:35:24+11:00
|
blockjob: do not allow coroutine double entry or entry-after-completion
When block_job_sleep_ns() is called, the co-routine is scheduled for
future execution. If we allow the job to be re-entered prior to the
scheduled time, we present a race condition in which a coroutine can be
entered recursively, or even entered after the coroutine is deleted.
The job->busy flag is used by blockjobs when a coroutine is busy
executing. The function 'block_job_enter()' obeys the busy flag,
and will not enter a coroutine if set. If we sleep a job, we need to
leave the busy flag set, so that subsequent calls to block_job_enter()
are prevented.
This changes the prior behavior of block_job_cancel() being able to
immediately wake up and cancel a job; in practice, this should not be an
issue, as the coroutine sleep times are generally very small, and the
cancel will occur the next time the coroutine wakes up.
This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1508708
Signed-off-by: Jeff Cody <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
|
4afeffc8572f40d8844b946a30c00b10da4442b1
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/4afeffc8572f40d8844b946a30c00b10da4442b1
|
2017-11-21 11:51:18-05:00
|
accel/tcg: Handle atomic accesses to notdirty memory correctly
To do a write to memory that is marked as notdirty, we need
to invalidate any TBs we have cached for that memory, and
update the cpu physical memory dirty flags for VGA and migration.
The slowpath code in notdirty_mem_write() does all this correctly,
but the new atomic handling code in atomic_mmu_lookup() doesn't
do anything at all, it just clears the dirty bit in the TLB.
The effect of this bug is that if the first write to a notdirty
page for which we have cached TBs is by a guest atomic access,
we fail to invalidate the TBs and subsequently will execute
incorrect code. This can be seen by trying to run 'javac' on AArch64.
Use the new notdirty_call_before() and notdirty_call_after()
functions to correctly handle the update to notdirty memory
in the atomic codepath.
Cc: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: [email protected]
|
34d49937e480edfa173d71e8c17972ad866b56c6
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/34d49937e480edfa173d71e8c17972ad866b56c6
|
2017-11-21 12:09:25+00:00
|
pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN when rebooting
When rebooting a guest that has a virtio-scsi disk, the s390-ccw
bios sometimes bails out with an error message like this:
! SCSI cannot report LUNs: STATUS=02 RSPN=70 KEY=05 CODE=25 QLFR=00, sure !
Enabling the scsi_req* tracing in QEMU shows that the ccw bios is
trying to execute the REPORT LUNS SCSI command with a LUN != 0, and
this causes the SCSI command to fail.
Looks like we neither clear the BSS of the s390-ccw bios during reboot,
nor do we explicitly set the default_scsi_device.lun value to 0, so
this variable can contain random values from the OS after the reboot.
By setting this variable explicitly to 0, the problem is fixed and
the reboots always succeed.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1514352
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
Acked-by: Christian Borntraeger <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
|
8775d91a0f42d016833330881bb587982db88a3c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8775d91a0f42d016833330881bb587982db88a3c
|
2017-11-20 10:35:12+01:00
|
iotests: 077: Filter out 'resume' lines
In the "Overlapping multiple requests" cases, the 3rd reqs (the break
point B) doesn't wait for the 2nd, and once resumed the I/O will just
continue. This is because the 2nd is already waiting for the 1st, and
in wait_serialising_requests() there is:
/* If the request is already (indirectly) waiting for us, or
* will wait for us as soon as it wakes up, then just go on
* (instead of producing a deadlock in the former case). */
if (!req->waiting_for) {
/* actually break */
...
}
Consequently, the following "sleep 100; resume A" command races with the
completion of that request, and sometimes results in an unexpected
order of output:
> @@ -56,9 +56,9 @@
> wrote XXX/XXX bytes at offset XXX
> XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> blkdebug: Resuming request 'B'
> +blkdebug: Resuming request 'A'
> wrote XXX/XXX bytes at offset XXX
> XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> -blkdebug: Resuming request 'A'
> wrote XXX/XXX bytes at offset XXX
> XXX bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
> wrote XXX/XXX bytes at offset XXX
Filter out the "Resuming request" lines to make the output
deterministic.
Reported-by: Patchew <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
|
d04c1555031196a51ea79a29b97a61450c02a1fb
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/d04c1555031196a51ea79a29b97a61450c02a1fb
|
2017-11-14 18:06:25+01:00
|
ui: fix crash with sendkey and raw key numbers
Previously we enforced that all key events are using QKeyCodes
at time they are sent:
commit af07e5ff02ae6d4258fc5331007811d0b1c4d35a
Author: Daniel P. Berrange <[email protected]>
Date: Fri Sep 29 11:12:00 2017 +0100
ui: convert key events to QKeyCodes immediately
This commit forget to fix the code for the legacy 'sendkey'
command which still accepts key numbers from the user, which
then need converting to QKeyCodes
Signed-off-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
|
1d5b8d770d1215b41ae32c881984b1d048b2f932
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/1d5b8d770d1215b41ae32c881984b1d048b2f932
|
2017-10-23 10:50:02+02:00
|
s390x: improve error handling for SSCH and RSCH
Simplify the error handling of the SSCH and RSCH handler avoiding
arbitrary and cryptic error codes being used to tell how the instruction
is supposed to end. Let the code detecting the condition tell how it's
to be handled in a less ambiguous way. It's best to handle SSCH and RSCH
in one go as the emulation of the two shares a lot of code.
For passthrough this change isn't pure refactoring, but changes the way
kernel reported EFAULT is handled. After clarifying the kernel interface
we decided that EFAULT shall be mapped to unit exception. Same goes for
unexpected error codes and absence of required ORB flags.
Signed-off-by: Halil Pasic <[email protected]>
Message-Id: <[email protected]>
Tested-by: Dong Jia Shi <[email protected]>
[CH: cosmetic changes]
Reviewed-by: Dong Jia Shi <[email protected]>
Signed-off-by: Cornelia Huck <[email protected]>
|
66dc50f7057b9a0191f54e55764412202306858d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/66dc50f7057b9a0191f54e55764412202306858d
|
2017-10-20 13:32:10+02:00
|
spapr_pci: fail gracefully with non-pseries machine types
QEMU currently crashes when the user tries to add an spapr-pci-host-bridge
on a non-pseries machine:
$ qemu-system-ppc64 -M ppce500 -device spapr-pci-host-bridge,index=1
hw/ppc/spapr_pci.c:1535:spapr_phb_realize:
Object 0x1003dacae60 is not an instance of type spapr-machine
Aborted (core dumped)
The same thing happens with the deprecated but still available child type
spapr-pci-vfio-host-bridge.
Fix both by checking the machine type with object_dynamic_cast().
Reviewed-by: Daniel Henrique Barboza <[email protected]>
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
f7d6bfcdc0fe49040aac3ac131a319cb5427957e
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/f7d6bfcdc0fe49040aac3ac131a319cb5427957e
|
2017-10-17 10:34:01+11:00
|
io: Small updates in preparation for websocket changes
Gets rid of unnecessary bit shifting and performs proper EOF checking to
avoid a large number of repeated calls to recvmsg() when a client
abruptly terminates a connection (bug fix).
Signed-off-by: Brandon Carpenter <[email protected]>
Signed-off-by: Daniel P. Berrange <[email protected]>
|
eefa3d8ef649f9055611361e2201cca49f8c3433
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/eefa3d8ef649f9055611361e2201cca49f8c3433
|
2017-10-04 13:21:53+01:00
|
ppc4xx: Add more PLB registers
These registers are present in 440 SoCs (and maybe in others too) and
U-Boot accesses them when printing register info. We don't emulate
these but add them to avoid crashing when they are read or written.
Signed-off-by: BALATON Zoltan <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
4c46f372b01cdc4045e25ba1283824ba95b1942c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/4c46f372b01cdc4045e25ba1283824ba95b1942c
|
2017-09-27 13:05:41+10:00
|
migration: check pre_save return in vmstate_save_state
Check the return value of pre_save state and fail vmstate_save_state
if the pre_save failed.
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
|
551dbd0846d23e94dbc22dcfd9cf1f8dbbf403ad
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/551dbd0846d23e94dbc22dcfd9cf1f8dbbf403ad
|
2017-09-27 11:36:31+01:00
|
xics: add unrealize handler
Now that ICPState objects get finalized on CPU unplug, we should unregister
reset handlers as well to avoid a QEMU crash at machine reset time.
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
62f94fc94f98095173146e753a1f03d7c2cc7ba3
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/62f94fc94f98095173146e753a1f03d7c2cc7ba3
|
2017-05-25 11:31:33+10:00
|
qemu-iotests/063: Fix leaked image
qemu-iotests 063 left t.raw.raw1 behind in the scratch directory because
it used the wrong suffix. Make sure to clean it up after completing the
test.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
|
1803f3f6cfcc900e185a7b94652b7f0f026038f9
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/1803f3f6cfcc900e185a7b94652b7f0f026038f9
|
2017-08-01 18:09:33+02:00
|
qemu-iotests/153: Fix leaked scratch images
qemu-iotests 153 left t.qcow2.c behind in the scratch directory. Make
sure to clean it up after completing the tests.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
|
6a1e9096206f65525d1fec418b91d5ac82c77934
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6a1e9096206f65525d1fec418b91d5ac82c77934
|
2017-08-01 18:09:33+02:00
|
fix qemu-system-unicore32 crashing when calling without -kernel
Starting qemu-system-unicore32 without the -kernel parameter results in
an assert() returns false and aborts qemu. This patch replaces it with a
proper error message followed by exit(1).
Signed-off-by: Eduardo Otubo <[email protected]>
Tested-by: Thomas Huth <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
|
36bed541ca886da735bef1e8d76d09f8849ed5dd
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/36bed541ca886da735bef1e8d76d09f8849ed5dd
|
2017-07-31 13:05:49+03:00
|
target/ppc: Add stub implementation of the PSSCR
The PSSCR register added in POWER9 controls certain power saving mode
behaviours. Mostly, it's not relevant to TCG, however because qemu
doesn't know about it yet, it doesn't synchronize the state with KVM,
and thus it doesn't get migrated.
To fix that, this adds a minimal stub implementation of the register.
This isn't complete, even to the extent that an implementation is
possible in TCG, just enough to get migration working. We need to
come back later and at least properly filter the various fields in the
register based on privilege level.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Greg Kurz <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
|
b8af5b2d5f67b0e1b274f8532f42a47bfe46ea3b
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/b8af5b2d5f67b0e1b274f8532f42a47bfe46ea3b
|
2017-08-09 11:46:44+10:00
|
pseries: Update SLOF firmware image
The main changes are:
- fixes in PCI bridges code;
- LUN>255 are allowed not in virtio-scsi.
The full list is:
> pci-scan: Fix pci-bridge-set-mem-base and pci-bridge-set-mem-limit
> pci: Avoid 32-bit prefetchable memory area if possible
> Remove unused functions ishexdigit and $cat-comma
> pci: Translate PCI addresses to host addresses at the end of map-in
> Define 'open' and 'close' words of the /aliases nodes right from the start
> virtio-scsi: Allow LUNs bigger than 255
> paflof: Silence gcc's -Warray-bounds warning for stack pointers
> board_qemu: move code out of fdt-fix-node-phandle
> board_qemu: drop unused values early in fdt-fix-node-phandle
> pci: Improve the pci-var-out debug function
> libhvcall: drop unused KVMPPC_H_REPORT_MC_ERR and KVMPPC_H_NMI_MCE defines
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
86844c213348a596ea716a44a6f337555e07ad09
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/86844c213348a596ea716a44a6f337555e07ad09
|
2017-07-25 14:35:42+10:00
|
qcow2: Fix sector calculation in qcow2_measure()
We used MAX() instead of the intended MIN() when computing how many
sectors to view in the current loop iteration of qcow2_measure(),
and passed in a value of INT_MAX sectors instead of our more usual
limit of BDRV_REQUEST_MAX_SECTORS (the latter avoids 32-bit overflow
on conversion to bytes). For small files, the bug is harmless:
bdrv_get_block_status_above() clamps its *pnum answer to the BDS
size, regardless of any insanely larger input request. However, for
any file at least 2T in size, we can very easily end up going into an
infinite loop (the maximum of 0x100000000 sectors and INT_MAX is a
64-bit quantity, which becomes 0 when assigned to int; once nb_sectors
is 0, we never make progress).
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
24bae02b197d152c2b3e4e0ba95f7942a63bad32
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/24bae02b197d152c2b3e4e0ba95f7942a63bad32
|
2017-07-24 15:06:04+02:00
|
target/i386: Don't use x86_cpu_load_def() on "max" CPU model
When commit 0bacd8b3046f ('i386: Don't set CPUClass::cpu_def on
"max" model') removed the CPUClass::cpu_def field, we kept using
the x86_cpu_load_def() helper directly in max_x86_cpu_initfn(),
emulating the previous behavior when CPUClass::cpu_def was set.
However, x86_cpu_load_def() is intended to help initialization of
CPU models from the builtin_x86_defs table, and does lots of
other steps that are not necessary for "max".
One of the things x86_cpu_load_def() do is to set the properties
listed at tcg_default_props/kvm_default_props. We must not do
that on the "max" CPU model, otherwise under KVM we will
incorrectly report all KVM features as always available, and the
"svm" feature as always unavailable. The latter caused the bug
reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1467599
("Unable to start domain: the CPU is incompatible with host CPU:
Host CPU does not provide required features: svm")
Replace x86_cpu_load_def() with simple object_property_set*()
calls. In addition to fixing the above bug, this makes the KVM
branch in max_x86_cpu_initfn() very similar to the existing TCG
branch.
For reference, the full list of steps performed by
x86_cpu_load_def() is:
* Setting min-level and min-xlevel. Already done by
max_x86_cpu_initfn().
* Setting family/model/stepping/model-id. Done by the code added
to max_x86_cpu_initfn() in this patch.
* Copying def->features. Wrong because "-cpu max" features need to
be calculated at realize time. This was not a problem in the
current code because host_cpudef.features was all zeroes.
* x86_cpu_apply_props() calls. This causes the bug above, and
shouldn't be done.
* Setting CPUID_EXT_HYPERVISOR. Not needed because it is already
reported by x86_cpu_get_supported_feature_word(), and because
"-cpu max" features need to be calculated at realize time.
* Setting CPU vendor to host CPU vendor if on KVM mode.
Redundant, because max_x86_cpu_initfn() already sets it to the
host CPU vendor.
Signed-off-by: Eduardo Habkost <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
|
bd1820227ecc0c77cc2aeba7c7c25b2d0a72ff3c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/bd1820227ecc0c77cc2aeba7c7c25b2d0a72ff3c
|
2017-07-26 14:55:12-03:00
|
target/sh4: Unify code for CHECK_PRIVILEGED
We do not need to emit N copies of raising an exception.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Aurelien Jarno <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
|
6b98213da9b025dad0f1bd307928a4f30e96a50d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6b98213da9b025dad0f1bd307928a4f30e96a50d
|
2017-07-18 23:39:17+02:00
|
qdev: fix the order compat and global properties are applied
The current code recursively applies global properties from child up to
parent types. This can cause properties passed with the -global option to
be silently overridden by internal compat properties.
This is exactly what happened with virtio-*-pci drivers since commit:
"9a4c0e220d8a hw/virtio-pci: fix virtio behaviour"
Passing -device virtio-blk-pci.disable-modern=off had no effect on 2.6
machine types because the internal virtio-pci.disable-modern=on compat
property always prevailed.
A workaround for this was included with commit 0bcba41f ("machine:
Convert abstract typename on compat_props to subclass names").
This patch fixes the issue properly by reversing the logic: we now go
through the global property list and, for each property, we check if it
is applicable to the device.
This results in compat properties being applied first, in the order they
appear in the HW_COMPAT_* macros, followed by global properties, in the
order they appear on the command line.
Signed-off-by: Greg Kurz <[email protected]>
Message-Id: <148103887228.22326.478406873609299999.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Signed-off-by: Eduardo Habkost <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Reviewed-by: Halil Pasic <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
|
5eb6a3c50185e101f87382f41fb66eed5784e7ac
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/5eb6a3c50185e101f87382f41fb66eed5784e7ac
|
2017-07-17 15:41:29-03:00
|
vvfat: fix qemu-img map and qemu-img convert
- bs->total_sectors is the number of sectors of the whole disk
- s->sector_count is the number of sectors of the FAT partition
This fixes the following assert in qemu-img map:
qemu-img.c:2641: get_block_status: Assertion `nb_sectors' failed.
This also fixes an infinite loop in qemu-img convert.
Fixes: 4480e0f924a42e1db8b8cfcac4d0634dd1bb27a0
Fixes: https://bugs.launchpad.net/qemu/+bug/1599539
Cc: [email protected]
Signed-off-by: Hervé Poussineau <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
139921aaa77c435104308ad53b631a00c3b65ae8
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/139921aaa77c435104308ad53b631a00c3b65ae8
|
2017-07-10 13:18:05+02:00
|
block: Guarantee that *file is set on bdrv_get_block_status()
We document that *file is valid if the return is not an error and
includes BDRV_BLOCK_OFFSET_VALID, but forgot to obey this contract
when a driver (such as blkdebug) lacks a callback. Messed up in
commit 67a0fd2 (v2.6), when we added the file parameter.
Enhance qemu-iotest 177 to cover this, using a sequence that would
print garbage or even SEGV, because it was dererefencing through
uninitialized memory. [The resulting test output shows that we
have less-than-ideal block status from the blkdebug driver, but
that's a separate fix coming up soon.]
Setting *file on all paths that return BDRV_BLOCK_OFFSET_VALID is
enough to fix the crash, but we can go one step further: always
setting *file, even on error, means that a broken caller that
blindly dereferences file without checking for error is now more
likely to get a reliable SEGV instead of randomly acting on garbage,
making it easier to diagnose such buggy callers. Adding an
assertion that file is set where expected doesn't hurt either.
CC: [email protected]
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: John Snow <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
81c219ac6ce0d6182e35f3976f2caa4cefcaf9f0
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/81c219ac6ce0d6182e35f3976f2caa4cefcaf9f0
|
2017-07-10 13:18:05+02:00
|
hw/intc/exynos4210_gic: Use more meaningful name for local variable
There are to SysBusDevice variables in exynos4210_gic_realize()
function: one for the device itself and second for arm_gic device. Add
a prefix "gic" to the second one so it will be easier to understand the
code.
While at it, put local uninitialized 'i' variable at the end, next to
other uninitialized ones.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
|
ee78356eba8df05043bac392c263450db5e7eed6
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ee78356eba8df05043bac392c263450db5e7eed6
|
2017-06-13 14:56:56+01:00
|
9pfs: local: fix unlink of alien files in mapped-file mode
When trying to remove a file from a directory, both created in non-mapped
mode, the file remains and EBADF is returned to the guest.
This is a regression introduced by commit "df4938a6651b 9pfs: local:
unlinkat: don't follow symlinks" when fixing CVE-2016-9602. It changed the
way we unlink the metadata file from
ret = remove("$dir/.virtfs_metadata/$name");
if (ret < 0 && errno != ENOENT) {
/* Error out */
}
/* Ignore absence of metadata */
to
fd = openat("$dir/.virtfs_metadata")
unlinkat(fd, "$name")
if (ret < 0 && errno != ENOENT) {
/* Error out */
}
/* Ignore absence of metadata */
If $dir was created in non-mapped mode, openat() fails with ENOENT and
we pass -1 to unlinkat(), which fails in turn with EBADF.
We just need to check the return of openat() and ignore ENOENT, in order
to restore the behaviour we had with remove().
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
[groug: rewrote the comments as suggested by Eric]
|
6a87e7929f97b86c5823d4616fa1aa7636b2f116
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/6a87e7929f97b86c5823d4616fa1aa7636b2f116
|
2017-05-25 10:30:13+02:00
|
spapr_cpu_core: drop reference on ICP object during CPU realization
When a piece of code allocates an object, it implicitely gets a reference
on it. If it then makes that object a child property of another object, it
should drop its own reference at some point otherwise the child object can
never be finalized. The current code hence leaks one ICP object per CPU
when hot-removing a core.
Failing to add a newly allocated ICP object to the CPU is a bug. While here,
let's ensure QEMU aborts if this ever happens.
Signed-off-by: Greg Kurz <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
249127d0dfeb2cf5e24d9353b6d54c91c1666ddc
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/249127d0dfeb2cf5e24d9353b6d54c91c1666ddc
|
2017-05-24 11:39:53+10:00
|
e1000e: Fix ICR "Other" causes clear logic
This commit fixes a bug which causes the guest to hang. The bug was
observed upon a "receive overrun" (bit #6 of the ICR register)
interrupt which could be triggered post migration in a heavy traffic
environment. Even though the "receive overrun" bit (#6) is masked out
by the IMS register (refer to the log below) the driver still receives
an interrupt as the "receive overrun" bit (#6) causes the "Other" -
bit #24 of the ICR register - bit to be set as documented below. The
driver handles the interrupt and clears the "Other" bit (#24) but
doesn't clear the "receive overrun" bit (#6) which leads to an
infinite loop. Apparently the Windows driver expects that the "receive
overrun" bit and other ones - documented below - to be cleared when
the "Other" bit (#24) is cleared.
So to sum that up:
1. Bit #6 of the ICR register is set by heavy traffic
2. As a results of setting bit #6, bit #24 is set
3. The driver receives an interrupt for bit 24 (it doesn't receieve an
interrupt for bit #6 as it is masked out by IMS)
4. The driver handles and clears the interrupt of bit #24
5. Bit #6 is still set.
6. 2 happens all over again
The Interrupt Cause Read - ICR register:
The ICR has the "Other" bit - bit #24 - that is set when one or more
of the following ICR register's bits are set:
LSC - bit #2, RXO - bit #6, MDAC - bit #9, SRPD - bit #16, ACK - bit
#17, MNG - bit #18
This bug can occur with any of these bits depending on the driver's
behaviour and the way it configures the device. However, trying to
reproduce it with any bit other than RX0 is challenging and came to
failure as the drivers don't implement most of these bits, trying to
reproduce it with LSC (Link Status Change - bit #2) bit didn't succeed
too as it seems that Windows handles this bit differently.
Log sample of the storm:
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x1000000 (ICR: 0x815000c2, IMS: 0x1a00004)
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x0 (ICR: 0x815000c2, IMS: 0xa00004)
[email protected]:e1000e_irq_pending_interrupts ICR PENDING: 0x1000000 (ICR: 0x815000c2, IMS: 0x1a00004)
* This bug behaviour wasn't observed with the Linux driver.
This commit solves:
https://bugzilla.redhat.com/show_bug.cgi?id=1447935
https://bugzilla.redhat.com/show_bug.cgi?id=1449490
Cc: [email protected]
Signed-off-by: Sameeh Jubran <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
|
82342e91b60a4a078811df4e1a545e57abffa11d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/82342e91b60a4a078811df4e1a545e57abffa11d
|
2017-05-23 10:10:38+08:00
|
egl-helpers: add missing error check
Code didn't check for qemu_egl_init_dpy_mesa() failures, add it.
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: [email protected]
|
151c8e608efc29e4dde4a0dbc2e79ebbc86c319c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/151c8e608efc29e4dde4a0dbc2e79ebbc86c319c
|
2017-05-12 12:02:48+02:00
|
arm: Use different ARMMMUIdx values for M profile
Make M profile use completely separate ARMMMUIdx values from
those that A profile CPUs use. This is a prelude to adding
support for the MPU and for v8M, which together will require
6 MMU indexes which don't map cleanly onto the A profile
uses:
non secure User
non secure Privileged
non secure Privileged, execution priority < 0
secure User
secure Privileged
secure Privileged, execution priority < 0
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
|
e7b921c2d9efc249f99b9feb0e7dca82c96aa5c4
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/e7b921c2d9efc249f99b9feb0e7dca82c96aa5c4
|
2017-06-02 11:51:47+01:00
|
qcow2: Discard unaligned tail when wiping image
There is a subtle difference between the fast (qcow2v3 with no
extra data) and slow path (qcow2v2 format [aka 0.10], or when a
snapshot is present) of qcow2_make_empty(). The slow path fails
to discard the final (partial) cluster of an unaligned image.
The problem stems from the fact that qcow2_discard_clusters() was
silently ignoring sub-cluster head and tail on unaligned requests.
A quick audit of all callers shows that qcow2_snapshot_create() has
always passed a cluster-aligned request since the call was added
in commit 1ebf561; qcow2_co_pdiscard() has passed a cluster-aligned
request since commit ecdbead taught the block layer about preferred
discard alignment; and qcow2_make_empty() was fixed to pass an
aligned start (but not necessarily end) in commit a3e1505.
Asserting that the start is always aligned also points out that we
now have a dead check: rounding the end offset down can never result
in a value less than the aligned start offset (the check was rendered
dead with commit ecdbead). Meanwhile, we do not want to round the
end cluster down in the one case of the end offset matching the
(unaligned) file size - that final partial cluster should still be
discarded.
With those fixes in place, the fast and slow paths are back in sync
at discarding an entire image; the next patch will update
qemu-iotests to ensure we don't regress.
Note that bdrv_co_pdiscard ignores ALL partial cluster requests,
including the partial cluster at the end of an image; it can be
argued that the partial cluster at the end should be special-cased
so that a guest issuing discard requests at proper alignments
everywhere else can likewise empty the entire image. But that
optimization is left for another day.
Signed-off-by: Eric Blake <[email protected]>
Message-id: [email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
|
0c1bd4692f9a19fb4d4bb3afe45439a09c37ab4c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/0c1bd4692f9a19fb4d4bb3afe45439a09c37ab4c
|
2017-04-03 17:11:40+02:00
|
qapi: Fix QemuOpts visitor regression on unvisited input
An off-by-one in commit 15c2f669e meant that we were failing to
check for unparsed input in all QemuOpts visitors. Recent testsuite
additions show that fixing the obvious bug with bogus fields will
also fix the case of an incomplete list visit; update the tests to
match the new behavior.
Simple testcase:
./x86_64-softmmu/qemu-system-x86_64 -nodefaults -nographic -qmp stdio -numa node,size=1g
failed to diagnose that 'size' is not a valid argument to -numa, and
now once again reports:
qemu-system-x86_64: -numa node,size=1g: Invalid parameter 'size'
See also https://bugzilla.redhat.com/show_bug.cgi?id=1434666
CC: [email protected]
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Michael Roth <[email protected]>
Tested-by: Laurent Vivier <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
|
21f88d021d0d2b4ecee8f6cd6ca63a943a3ce71d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/21f88d021d0d2b4ecee8f6cd6ca63a943a3ce71d
|
2017-03-22 19:24:34+01:00
|
Revert "hostmem: fix QEMU crash by 'info memdev'"
This reverts commit 1454d33f0507cb54d62ed80f494884157c9e7130.
The string input visitor regression fixed in the previous commit made
visit_type_uint16List() fail on empty input. query_memdev() calls it
via object_property_get_uint16List(). Because it doesn't expect it to
fail, it passes &error_abort, and duly crashes.
Commit 1454d33 "fixes" this crash by making
host_memory_backend_get_host_nodes() return a list containing just
MAX_NODES instead of the empty list. Papers over the regression, and
leads to bogus "info memdev" output, as shown below; revert.
I suspect that if we had bisected the crash back then, we would have
found and fixed the actual bug instead of papering over it.
To reproduce, run HMP command "info memdev" with
$ qemu-system-x86_64 --nodefaults -S -display none -monitor stdio -object memory-backend-ram,id=mem1,size=4k
With this commit, "info memdev" prints
memory backend: mem1
size: 4096
merge: true
dump: true
prealloc: false
policy: default
host nodes:
exactly like before commit 74f24cb.
Between commit 1454d33 and this commit, it prints
memory backend: mem1
size: 4096
merge: true
dump: true
prealloc: false
policy: default
host nodes: 128
The last line is bogus.
Between commit 74f24cb and 1454d33, it crashes like this:
Unexpected error in parse_str() at /work/armbru/tmp/qemu/qapi/string-input-visitor.c:126:
Parameter 'null' expects an int64 value or range
Aborted (core dumped)
Cc: Xiao Guangrong <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael Roth <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
|
658ae5a7b90139a6a296cd4cd83643d843964796
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/658ae5a7b90139a6a296cd4cd83643d843964796
|
2017-03-21 10:43:28+01:00
|
block: Document -drive problematic code and bugs
-blockdev and blockdev_add convert their arguments via QObject to
BlockdevOptions for qmp_blockdev_add(), which converts them back to
QObject, then to a flattened QDict. The QDict's members are typed
according to the QAPI schema.
-drive converts its argument via QemuOpts to a (flat) QDict. This
QDict's members are all QString.
Thus, the QType of a flat QDict member depends on whether it comes
from -drive or -blockdev/blockdev_add, except when the QAPI type maps
to QString, which is the case for 'str' and enumeration types.
The block layer core extracts generic configuration from the flat
QDict, and the block driver extracts driver-specific configuration.
Both commonly do so by converting (parts of) the flat QDict to
QemuOpts, which turns all values into strings. Not exactly elegant,
but correct.
However, A few places access the flat QDict directly:
* Most of them access members that are always QString. Correct.
* bdrv_open_inherit() accesses a boolean, carefully. Correct.
* nfs_config() uses a QObject input visitor. Correct only because the
visited type contains nothing but QStrings.
* nbd_config() and ssh_config() use a QObject input visitor, and the
visited types contain non-QStrings: InetSocketAddress members
@numeric, @to, @ipv4, @ipv6. -drive works as long as you don't try
to use them (they're all optional). @to is ignored anyway.
Reproducer:
-drive driver=ssh,server.host=h,server.port=22,server.ipv4,path=p
-drive driver=nbd,server.type=inet,server.data.host=h,server.data.port=22,server.data.ipv4
both fail with "Invalid parameter type for 'data.ipv4', expected: boolean"
Add suitable comments to all these places. Mark the buggy ones FIXME.
"Fortunately", -drive's driver-specific options are entirely
undocumented.
Signed-off-by: Markus Armbruster <[email protected]>
Message-id: [email protected]
[mreitz: Fixed two typos]
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
|
129c7d1c536d0c67a8781cb09fb5bdb3d0f6a2d0
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/129c7d1c536d0c67a8781cb09fb5bdb3d0f6a2d0
|
2017-04-03 17:11:39+02:00
|
sockets: Fix socket_address_to_string() hostname truncation
We first snprintf() to a fixed buffer, then g_strdup() the result
*boggle*.
Worse, the size of the fixed buffer INET6_ADDRSTRLEN + 5 + 4 is bogus:
the 4 correctly accounts for '[', ']', ':' and '\0', but
INET6_ADDRSTRLEN is not a suitable limit for inet->host, and 5 is not
one for inet->port! They are for host and port in *numeric* form
(exploiting that INET6_ADDRSTRLEN > INET_ADDRSTRLEN), but inet->host
can also be a hostname, and inet->port can be a service name, to be
resolved with getaddrinfo().
Fortunately, the only user so far is the "socket" network backend's
net_socket_connected(), which uses it to initialize a NetSocketState's
info_str[]. info_str[] has considerable more space: 256 instead of
55. So the bug's impact appears to be limited to truncated "info
networks" with the "socket" network backend.
The fix is obvious: use g_strdup_printf().
Signed-off-by: Markus Armbruster <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
|
44fdc764550e048a2810955da7cabbfaf636231a
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/44fdc764550e048a2810955da7cabbfaf636231a
|
2017-03-28 18:50:38+02:00
|
arm: Enforce should-be-1 bits in MRS decoding
The MRS instruction requires that bits [19..16] are all 1s, and for
A/R profile also that bits [7..0] are all 0s. At this point in the
decode tree we have checked all of the rest of the instruction but
were allowing these to be any value. If these bits are not set then
the result is architecturally UNPREDICTABLE, but choosing to UNDEF is
more helpful to the user and avoids unexpected odd behaviour if the
encodings are used for some purpose in future architecture versions.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Message-id: [email protected]
|
3d54026fb06d1aea7ebb4e9825970b06bebcacac
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3d54026fb06d1aea7ebb4e9825970b06bebcacac
|
2017-03-20 12:41:44+00:00
|
kvmclock: Don't crash QEMU if KVM is disabled
Most machines don't allow sysbus devices like "kvmclock" to be
created from the command-line, but some of them do (the ones with
has_dynamic_sysbus=true). In those cases, it's possible to
manually create a kvmclock device without KVM being enabled,
making QEMU crash:
$ qemu-system-x86_64 -machine q35,accel=tcg -device kvmclock
Segmentation fault (core dumped)
This changes kvmclock's realize method to return an error if KVM
is disabled, to ensure it won't crash QEMU.
Signed-off-by: Eduardo Habkost <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ca2edcd35cd1a8589dfa0533c19ff232fec7b4b5
|
2017-03-14 13:26:36+01:00
|
check-qjson: Test errors from qobject_from_json()
Pass &error_abort with known-good input. Else pass &err and check
what comes back. This demonstrates that the parser fails silently for
many errors.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Message-Id: <[email protected]>
|
aec4b054ea36c53c8b887da99f20010133b84378
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/aec4b054ea36c53c8b887da99f20010133b84378
|
2017-03-07 16:07:47+01:00
|
file-posix: Consider max_segments for BlockLimits.max_transfer
BlockLimits.max_transfer can be too high without this fix, guest will
encounter I/O error or even get paused with werror=stop or rerror=stop. The
cause is explained below.
Linux has a separate limit, /sys/block/.../queue/max_segments, which in
the worst case can be more restrictive than the BLKSECTGET which we
already consider (note that they are two different things). So, the
failure scenario before this patch is:
1) host device has max_sectors_kb = 4096 and max_segments = 64;
2) guest learns max_sectors_kb limit from QEMU, but doesn't know
max_segments;
3) guest issues e.g. a 512KB request thinking it's okay, but actually
it's not, because it will be passed through to host device as an
SG_IO req that has niov > 64;
4) host kernel doesn't like the segmenting of the request, and returns
-EINVAL;
This patch checks the max_segments sysfs entry for the host device and
calculates a "conservative" bytes limit using the page size, which is
then merged into the existing max_transfer limit. Guest will discover
this from the usual virtual block device interfaces. (In the case of
scsi-generic, it will be done in the INQUIRY reply interception in
device model.)
The other possibility is to actually propagate it as a separate limit,
but it's not better. On the one hand, there is a big complication: the
limit is per-LUN in QEMU PoV (because we can attach LUNs from different
host HBAs to the same virtio-scsi bus), but the channel to communicate
it in a per-LUN manner is missing down the stack; on the other hand,
two limits versus one doesn't change much about the valid size of I/O
(because guest has no control over host segmenting).
Also, the idea to fall back to bounce buffering in QEMU, upon -EINVAL,
was explored. Unfortunately there is no neat way to ensure the bounce
buffer is less segmented (in terms of DMA addr) than the guest buffer.
Practically, this bug is not very common. It is only reported on a
Emulex (lpfc), so it's okay to get it fixed in the easier way.
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
9103f1ceb46614b150bcbc3c9a4fbc72b47fedcc
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9103f1ceb46614b150bcbc3c9a4fbc72b47fedcc
|
2017-03-13 12:49:33+01:00
|
net/colo: fix memory double free error
The 'primary_list' and 'secondary_list' members of struct Connection
is not allocated through dynamically g_queue_new(), but we free it by using
g_queue_free(), which will lead to a double-free bug.
Reviewed-by: Zhang Chen <[email protected]>
Signed-off-by: zhanghailiang <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
|
0e79668e1ffcfabb259bea6c2a2bae00a6b27252
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/0e79668e1ffcfabb259bea6c2a2bae00a6b27252
|
2017-03-06 11:46:02+08:00
|
9pfs: fix bogus fd check in local_remove()
This was spotted by Coverity as a fd leak. This is certainly true, but also
local_remove() would always return without doing anything, unless the fd is
zero, which is very unlikely.
(Coverity issue CID1371732)
Signed-off-by: Greg Kurz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
|
b7361d46e75f12d8d943ca8d33ef82cafce39920
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/b7361d46e75f12d8d943ca8d33ef82cafce39920
|
2017-03-06 17:34:01+01:00
|
sheepdog: Fix error handling sd_create()
As a bdrv_create() method, sd_create() must set an error and return
negative errno on failure. It prints the error instead of setting it
when connect_to_sdog() fails. Fix that.
While there, return the value of connect_to_sdog() like we do
elsewhere, instead of -EIO. No functional change, as
connect_to_sdog() returns no other error code.
Many more suspicious uses of error_report() and error_report_err()
remain in other functions. Left for another day.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
|
48d7c4af06393b974b0a515ac9d1cc7346dbae23
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/48d7c4af06393b974b0a515ac9d1cc7346dbae23
|
2017-03-07 14:53:28+01:00
|
replay: add record/replay for audio passthrough
This patch adds recording and replaying audio data. Is saves synchronization
information for audio out and inputs from the microphone.
v2: removed unneeded whitespace change
Signed-off-by: Pavel Dovgalyuk <[email protected]>
Message-id: [email protected]
[ kraxel: add qemu/error-report.h include to fix osx build failure ]
Signed-off-by: Gerd Hoffmann <[email protected]>
|
3d4d16f4dc101e16f643acc44dfffdbaf2a8f01c
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3d4d16f4dc101e16f643acc44dfffdbaf2a8f01c
|
2017-03-01 15:11:44+01:00
|
migrate: Introduce a 'dc->vmsd' check to avoid segfault for --only-migratable
Commit a3a3d8c7 introduced a segfault bug while checking for
'dc->vmsd->unmigratable' which caused QEMU to crash when trying to add
devices which do no set their 'dc->vmsd' yet while initialization.
Place a 'dc->vmsd' check prior to it so that we do not segfault for
such devices.
NOTE: This doesn't compromise the functioning of --only-migratable
option as all the unmigratable devices do set their 'dc->vmsd'.
Introduce a new function check_migratable() and move the
only_migratable check inside it, also use stubs to avoid user-mode qemu
build failures.
Signed-off-by: Ashijeet Acharya <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
|
7562f90707aa1f409ba2312569cb791241fca045
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/7562f90707aa1f409ba2312569cb791241fca045
|
2017-02-28 11:30:22+00:00
|
target-arm/powerctl: defer cpu reset work to CPU context
When switching a new vCPU on we want to complete a bunch of the setup
work before we start scheduling the vCPU thread. To do this cleanly we
defer vCPU setup to async work which will run the vCPUs execution
context as the thread is woken up. The scheduling of the work will kick
the vCPU awake.
This avoids potential races in MTTCG system emulation.
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
|
062ba099e01ff1474be98c0a4f3da351efab5d9d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/062ba099e01ff1474be98c0a4f3da351efab5d9d
|
2017-02-24 10:32:46+00:00
|
tcg: drop global lock during TCG code execution
This finally allows TCG to benefit from the iothread introduction: Drop
the global mutex while running pure TCG CPU code. Reacquire the lock
when entering MMIO or PIO emulation, or when leaving the TCG loop.
We have to revert a few optimization for the current TCG threading
model, namely kicking the TCG thread in qemu_mutex_lock_iothread and not
kicking it in qemu_cpu_kick. We also need to disable RAM block
reordering until we have a more efficient locking mechanism at hand.
Still, a Linux x86 UP guest and my Musicpal ARM model boot fine here.
These numbers demonstrate where we gain something:
20338 jan 20 0 331m 75m 6904 R 99 0.9 0:50.95 qemu-system-arm
20337 jan 20 0 331m 75m 6904 S 20 0.9 0:26.50 qemu-system-arm
The guest CPU was fully loaded, but the iothread could still run mostly
independent on a second core. Without the patch we don't get beyond
32206 jan 20 0 330m 73m 7036 R 82 0.9 1:06.00 qemu-system-arm
32204 jan 20 0 330m 73m 7036 S 21 0.9 0:17.03 qemu-system-arm
We don't benefit significantly, though, when the guest is not fully
loading a host CPU.
Signed-off-by: Jan Kiszka <[email protected]>
Message-Id: <[email protected]>
[FK: Rebase, fix qemu_devices_reset deadlock, rm address_space_* mutex]
Signed-off-by: KONRAD Frederic <[email protected]>
[EGC: fixed iothread lock for cpu-exec IRQ handling]
Signed-off-by: Emilio G. Cota <[email protected]>
[AJB: -smp single-threaded fix, clean commit msg, BQL fixes]
Signed-off-by: Alex Bennée <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Pranith Kumar <[email protected]>
[PM: target-arm changes]
Acked-by: Peter Maydell <[email protected]>
|
8d04fb55dec381bc5105cb47f29d918e579e8cbd
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/8d04fb55dec381bc5105cb47f29d918e579e8cbd
|
2017-02-24 10:32:45+00:00
|
monitor: Fix crashes when using HMP commands without CPU
When running certain HMP commands ("info registers", "info cpustats",
"info tlb", "nmi", "memsave" or dumping virtual memory) with the "none"
machine, QEMU crashes with a segmentation fault. This happens because the
"none" machine does not have any CPUs by default, but these HMP commands
did not check for a valid CPU pointer yet. Add such checks now, so we get
an error message about the missing CPU instead.
Signed-off-by: Thomas Huth <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Acked-by: David Gibson <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
|
854e67fea6a6f181163a5467fc9ba04de8d181bb
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/854e67fea6a6f181163a5467fc9ba04de8d181bb
|
2017-02-21 18:29:01+00:00
|
vl: log available guest crash information
There is a suitable log mask for the purpose.
Signed-off-by: Anton Nefedov <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
f47291b7a7ffa8854300283d4773ed17d5d581c1
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/f47291b7a7ffa8854300283d4773ed17d5d581c1
|
2017-02-16 15:30:49+01:00
|
net: e1000e: fix an infinite loop issue
This issue is like the issue in e1000 network card addressed in
this commit:
e1000: eliminate infinite loops on out-of-bounds transfer start.
Signed-off-by: Li Qiang <[email protected]>
Reviewed-by: Dmitry Fleytman <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
|
4154c7e03fa55b4cf52509a83d50d6c09d743b77
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/4154c7e03fa55b4cf52509a83d50d6c09d743b77
|
2017-02-15 11:18:57+08:00
|
target/openrisc: Put SR[OVE] in TB flags
Removes a call at execution time for overflow exceptions.
Signed-off-by: Richard Henderson <[email protected]>
|
0c53d7342b4e8412f3b81eed67f053304813dc5d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/0c53d7342b4e8412f3b81eed67f053304813dc5d
|
2017-02-14 08:14:59+11:00
|
target/openrisc: Streamline arithmetic and OVE
Fix incorrect overflow calculation. Move overflow exception check
to a helper function, to eliminate inline branches. Remove some
incorrect special casing of R0. Implement multiply inline.
Reviewed-by: Bastian Koppelmann <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
|
9ecaa27e7123211f45ca723a736ffae14f6c1f42
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/9ecaa27e7123211f45ca723a736ffae14f6c1f42
|
2017-02-14 08:14:59+11:00
|
cirrus: fix oob access issue (CVE-2017-2615)
When doing bitblt copy in backward mode, we should minus the
blt width first just like the adding in the forward mode. This
can avoid the oob access of the front of vga's vram.
Signed-off-by: Li Qiang <[email protected]>
{ kraxel: with backward blits (negative pitch) addr is the topmost
address, so check it as-is against vram size ]
Cc: [email protected]
Cc: P J P <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Wolfgang Bumiller <[email protected]>
Fixes: d3532a0db02296e687711b8cdc7791924efccea0 (CVE-2014-8106)
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id: [email protected]
Reviewed-by: Laszlo Ersek <[email protected]>
|
62d4c6bd5263bb8413a06c80144fc678df6dfb64
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/62d4c6bd5263bb8413a06c80144fc678df6dfb64
|
2017-02-02 15:58:23+01:00
|
hcd-xhci: check & correct param before using it
usb_xhci_realize() corrects invalid values of property "intrs"
automatically, but the uncorrected value is passed to msi_init(),
which chokes on invalid values. Delay that until after the
correction.
Resources allocated by usb_xhci_init() are leaked when msi_init()
fails. Fix by calling it after msi_init().
CC: Gerd Hoffmann <[email protected]>
CC: Markus Armbruster <[email protected]>
CC: Marcel Apfelbaum <[email protected]>
CC: Michael S. Tsirkin <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Acked-by: Marcel Apfelbaum <[email protected]>
Signed-off-by: Cao jin <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
20729dbd0109b9d9065447dba354f10bcf78d0d6
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/20729dbd0109b9d9065447dba354f10bcf78d0d6
|
2017-02-01 03:37:18+02:00
|
qemu-io: don't allow I/O operations larger than BDRV_REQUEST_MAX_BYTES
Passing a request size larger than BDRV_REQUEST_MAX_BYTES to any of the
I/O commands results in an error. While 'read' and 'write' handle the
error correctly, 'aio_read' and 'aio_write' hit an assertion:
blk_aio_read_entry: Assertion `rwco->qiov->size == acb->bytes' failed.
The reason is that the QEMU I/O code cannot handle request sizes
larger than BDRV_REQUEST_MAX_BYTES, so this patch makes qemu-io check
that all values are within range.
Signed-off-by: Alberto Garcia <[email protected]>
Message-id: 79f66648c685929a144396bda24d13a207131dcf.1485878688.git.berto@igalia.com
[mreitz: Use BDRV_REQUEST_MAX_BYTES instead of INT_MAX]
Signed-off-by: Max Reitz <[email protected]>
|
3026c4688ca80d9c5cc1606368c4a1009a6f507d
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/3026c4688ca80d9c5cc1606368c4a1009a6f507d
|
2017-02-12 00:47:43+01:00
|
qemu-io: Return non-zero exit code on failure
The result of openfile was not checked, leading to failure deep in the
actual command with confusing error message, and exiting with exit code 0.
Here is a simple example - trying to read with the wrong format:
$ touch file
$ qemu-io -f qcow2 -c 'read -P 1 0 1024' file; echo $?
can't open device file: Image is not in qcow2 format
no file open, try 'help open'
0
With this patch, we fail earlier with exit code 1:
$ ./qemu-io -f qcow2 -c 'read -P 1 0 1024' file; echo $?
can't open device file: Image is not in qcow2 format
1
Failing earlier, we don't log this error now:
no file open, try 'help open'
But some tests expected it; the line was removed from the test output.
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Message-id: [email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
|
b7aa1315198de1bd2c5f457d2e2c6cd007b3f430
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/b7aa1315198de1bd2c5f457d2e2c6cd007b3f430
|
2017-02-12 00:47:42+01:00
|
ppc: switch to constants within BUILD_BUG_ON
We are switching BUILD_BUG_ON to verify that it's parameter is a
compile-time constant, and it turns out that some gcc versions
(specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are
not smart enough to figure it out for expressions involving local
variables. This is harmless but means that the check is ineffective for
these platforms. To fix, replace the variable with macros.
Reported-by: Peter Maydell <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
|
32f825dece6482297fc1b9b0e3bf31424529688a
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/32f825dece6482297fc1b9b0e3bf31424529688a
|
2017-02-01 03:37:17+02:00
|
io: fix possible double free of task error object
If a QIOTask has an error set and the calling code uses
qio_task_propagate_error() to steal the reference to
that Error object, the task would not clear its own
reference. This would lead to a double-free when
qio_task_free runs, if the caller had (correctly) freed
the Error object they now owned.
Signed-off-by: Daniel P. Berrange <[email protected]>
|
80fb34eda099e7cc519a91e9701ab3c0262717b3
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/80fb34eda099e7cc519a91e9701ab3c0262717b3
|
2017-01-26 10:26:18+00:00
|
hw/display/framebuffer.c: Avoid overflow for framebuffers > 4GB
Coverity points out that calculating src_len by multiplying
src_width by rows could overflow. This can only happen in
the implausible case of a framebuffer larger than 4GB, but
we may as well fix it, placating Coverity. (CID1005515)
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
|
ba56e4cad41ea2b2fb68d18a632ebc7d4e4b1051
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/ba56e4cad41ea2b2fb68d18a632ebc7d4e4b1051
|
2017-01-24 23:26:53+03:00
|
bugfix: vm halt when in reset looping
reset mc146818rtc device when RESET event happens.
Fix the problem:
1. Guest boot the second cpu, set CMOS_RESET_CODE 0x0a to protect selfboot;
2. VM being reset by others, hmp_system_reset;
3. seabios resume check the CMOS_RESET_CODE, if 0x0a, jump to the BDA
resume execution by jump via 40h:0067h;
4. Guest halt;
Signed-off-by: hangaohuai <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
|
bf7bb91e3c998f80d72b69707f3f6050587eddc0
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/bf7bb91e3c998f80d72b69707f3f6050587eddc0
|
2017-01-16 17:52:34+01:00
|
ppc: Clean up and QOMify hypercall emulation
The pseries machine type is a bit unusual in that it runs a paravirtualized
guest. The guest expects to interact with a hypervisor, and qemu
emulates the functions of that hypervisor directly, rather than executing
hypervisor code within the emulated system.
To implement this in TCG, we need to intercept hypercall instructions and
direct them to the machine's hypercall handlers, rather than attempting to
perform a privilege change within TCG. This is controlled by a global
hook - cpu_ppc_hypercall.
This cleanup makes the handling a little cleaner and more extensible than
a single global variable. Instead, each CPU to have hypercalls intercepted
has a pointer set to a QOM object implementing a new virtual hypervisor
interface. A method in that interface is called by TCG when it sees a
hypercall instruction. It's possible we may want to add other methods in
future.
Signed-off-by: David Gibson <[email protected]>
Reviewed-by: Alexey Kardashevskiy <[email protected]>
|
1d1be34d26b66069e20cbbcd798ea57763a0f152
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/1d1be34d26b66069e20cbbcd798ea57763a0f152
|
2017-01-31 10:10:13+11:00
|
aio: self-tune polling time
This patch is based on the algorithm for the kvm.ko halt_poll_ns
parameter in Linux. The initial polling time is zero.
If the event loop is woken up within the maximum polling time it means
polling could be effective, so grow polling time.
If the event loop is woken up beyond the maximum polling time it means
polling is not effective, so shrink polling time.
If the event loop makes progress within the current polling time then
the sweet spot has been reached.
This algorithm adjusts the polling time so it can adapt to variations in
workloads. The goal is to reach the sweet spot while also recognizing
when polling would hurt more than help.
Two new trace events, poll_grow and poll_shrink, are added for observing
polling time adjustment.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
|
82a41186941c419afde977f477f19c545b40c1c5
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/82a41186941c419afde977f477f19c545b40c1c5
|
2017-01-03 16:38:50+00:00
|
target-sparc: on UA2005 don't deliver Interrupt_level_n IRQs in hypervisor mode
As described in Chapter 5.7.6 of the UltraSPARC Architecture 2005,
outstanding disrupting exceptions that are destined for privileged mode can only
cause a trap when the virtual processor is in nonprivileged or privileged mode and
PSTATE.ie = 1. At all other times, they are held pending.
Signed-off-by: Artyom Tarasenko <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
|
1a2aefae6627170fdee689b394a65f76080c068a
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/1a2aefae6627170fdee689b394a65f76080c068a
|
2017-01-18 22:03:44+01:00
|
spapr: migration support for CAS-negotiated option vectors
With the additional of the OV5_HP_EVT option vector, we now have
certain functionality (namely, memory unplug) that checks at run-time
for whether or not the guest negotiated the option via CAS. Because
we don't currently migrate these negotiated values, we are unable
to unplug memory from a guest after it's been migrated until after
the guest is rebooted and CAS-negotiation is repeated.
This patch fixes this by adding CAS-negotiated options to the
migration stream. We do this using a subsection, since the
negotiated value of OV5_HP_EVT is the only option currently needed
to maintain proper functionality for a running guest.
Signed-off-by: Michael Roth <[email protected]>
Signed-off-by: David Gibson <[email protected]>
|
62ef3760d4e400849fc663474227bb4668244455
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/62ef3760d4e400849fc663474227bb4668244455
|
2016-11-23 12:00:48+11:00
|
block-backend: Always notify on blk_eject
blk_eject is only used by scsi-disk and atapi, and in both cases we
only attempt to invoke blk_eject if we have a bona-fide change in
tray state.
The "issue" here is that the tray state does not generate a QMP event
unless there is a medium/BDS attached to the device, so if libvirt et al
are waiting for a tray event to occur from an empty-but-closed drive,
software opening that drive will not emit an event and libvirt will
wait forever.
Change this by modifying blk_eject to always emit an event, instead of
conditionally on a "real" backend eject.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1373264
Reported-by: Peter Krempa <[email protected]>
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Message-id: [email protected]
Signed-off-by: John Snow <[email protected]>
|
c47ee043dc2cc85da710e87524144a720598c096
|
qemu
|
devign
| 1 |
https://github.com/qemu/qemu
|
https://github.com/qemu/qemu/commit/c47ee043dc2cc85da710e87524144a720598c096
|
2016-11-14 11:15:54-05:00
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.