[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 5d3b4e: qapi: add x-debug-query-block-graph
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 5d3b4e: qapi: add x-debug-query-block-graph |
Date: |
Fri, 01 Feb 2019 02:27:53 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 5d3b4e99463642b226d1a37433d0e4b376162468
https://github.com/qemu/qemu/commit/5d3b4e99463642b226d1a37433d0e4b376162468
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M block.c
M block/block-backend.c
M blockdev.c
M include/block/block.h
M include/sysemu/block-backend.h
M qapi/block-core.json
Log Message:
-----------
qapi: add x-debug-query-block-graph
Add a new command, returning block nodes (and their users) graph.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: dc2b651a0bcf0e2c2dc225567bbf3c7295d38d77
https://github.com/qemu/qemu/commit/dc2b651a0bcf0e2c2dc225567bbf3c7295d38d77
Author: Vladimir Sementsov-Ogievskiy <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
A scripts/render_block_graph.py
Log Message:
-----------
scripts: add render_block_graph function for QEMUMachine
Render block nodes graph with help of graphviz. This new function is
for debugging, so there is no sense to put it into qemu.py as a method
of QEMUMachine. Let's instead put it separately.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Acked-by: Eduardo Habkost <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 023908a24de4f264dbcd22352e8a304424005bd4
https://github.com/qemu/qemu/commit/023908a24de4f264dbcd22352e8a304424005bd4
Author: Laurent Vivier <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M block/ssh.c
M block/trace-events
Log Message:
-----------
block/ssh: Convert from DPRINTF() macro to trace events
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Richard W.M. Jones <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
[mreitz: Fixed type of ssh_{read,write}_return's parameter to be ssize_t
instead of size_t]
Signed-off-by: Max Reitz <address@hidden>
Commit: ed2a66deb99c1ee81ad0d7d49e296b911178e520
https://github.com/qemu/qemu/commit/ed2a66deb99c1ee81ad0d7d49e296b911178e520
Author: Laurent Vivier <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M block/curl.c
M block/trace-events
Log Message:
-----------
block/curl: Convert from DPRINTF() macro to trace events
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Richard W.M. Jones <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 4f7d28d7382962b2f1996cf307082ccb9f7be6d1
https://github.com/qemu/qemu/commit/4f7d28d7382962b2f1996cf307082ccb9f7be6d1
Author: Laurent Vivier <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M block/file-posix.c
M block/trace-events
Log Message:
-----------
block/file-posix: Convert from DPRINTF() macro to trace events
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 70018a149c4bb14f60e6954e0d42311f305fe2c7
https://github.com/qemu/qemu/commit/70018a149c4bb14f60e6954e0d42311f305fe2c7
Author: Laurent Vivier <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M block/sheepdog.c
M block/trace-events
Log Message:
-----------
block/sheepdog: Convert from DPRINTF() macro to trace events
Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
[mreitz: Fixed sheepdog_snapshot_create_inode's format string to use
PRIx32 for uint32_ts]
Signed-off-by: Max Reitz <address@hidden>
Commit: d339d766d1e52157e487bc412822e60c0a44e692
https://github.com/qemu/qemu/commit/d339d766d1e52157e487bc412822e60c0a44e692
Author: Richard W.M. Jones <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M configure
M include/qemu/osdep.h
M qemu-img.c
M qemu-io-cmds.c
Log Message:
-----------
qemu-io: Add generic function for reinitializing optind.
On FreeBSD 11.2:
$ nbdkit memory size=1M --run './qemu-io -f raw -c "aio_write 0 512" $nbd'
Parsing error: non-numeric argument, or extraneous/unrecognized suffix --
aio_write
After main option parsing, we reinitialize optind so we can parse each
command. However reinitializing optind to 0 does not work on FreeBSD.
What happens when you do this is optind remains 0 after the option
parsing loop, and the result is we try to parse argv[optind] ==
argv[0] == "aio_write" as if it was the first parameter.
The FreeBSD manual page says:
In order to use getopt() to evaluate multiple sets of arguments, or to
evaluate a single set of arguments multiple times, the variable optreset
must be set to 1 before the second and each additional set of calls to
getopt(), and the variable optind must be reinitialized.
(From the rest of the man page it is clear that optind must be
reinitialized to 1).
The glibc man page says:
A program that scans multiple argument vectors, or rescans the same
vector more than once, and wants to make use of GNU extensions such as
'+' and '-' at the start of optstring, or changes the value of
POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting
optind to 0, rather than the traditional value of 1. (Resetting to 0
forces the invocation of an internal initialization routine that
rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)
This commit introduces an OS-portability function called
qemu_reset_optind which provides a way of resetting optind that works
on FreeBSD and platforms that use optreset, while keeping it the same
as now on other platforms.
Note that the qemu codebase sets optind in many other places, but in
those other places it's setting a local variable and not using getopt.
This change is only needed in places where we are using getopt and the
associated global variable optind.
Signed-off-by: Richard W.M. Jones <address@hidden>
Message-id: address@hidden
Reviewed-by: Daniel P. Berrangé <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 08db59e18834ef64b14cc6b401ad4824a3ce82cf
https://github.com/qemu/qemu/commit/08db59e18834ef64b14cc6b401ad4824a3ce82cf
Author: Li Qiang <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M hw/block/nvme.c
Log Message:
-----------
nvme: use TYPE_NVME instead of constant string
Signed-off-by: Li Qiang <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: 2410e133ec41468e2961ade3e0190487c5d8c142
https://github.com/qemu/qemu/commit/2410e133ec41468e2961ade3e0190487c5d8c142
Author: Li Qiang <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M hw/block/nvme.c
Log Message:
-----------
nvme: ensure the num_queues is not zero
When it is zero, it causes segv.
Using following command:
"-drive file=//home/test/test1.img,if=none,id=id0
-device nvme,drive=id0,serial=test,num_queues=0"
causes following Backtrack:
Thread 4 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe9735700 (LWP 30952)]
0x0000555555a7a77c in nvme_start_ctrl (n=0x5555577473f0) at hw/block/nvme.c:825
825 if (unlikely(n->cq[0])) {
(gdb) bt
0 0x0000555555a7a77c in nvme_start_ctrl (n=0x5555577473f0)
at hw/block/nvme.c:825
1 0x0000555555a7af7f in nvme_write_bar (n=0x5555577473f0, offset=20,
data=4587521, size=4) at hw/block/nvme.c:969
2 0x0000555555a7b81a in nvme_mmio_write (opaque=0x5555577473f0, addr=20,
data=4587521, size=4) at hw/block/nvme.c:1163
3 0x0000555555869236 in memory_region_write_accessor (mr=0x555557747cd0,
addr=20, value=0x7fffe97320f8, size=4, shift=0, mask=4294967295, attrs=...)
at /home/test/qemu1/qemu/memory.c:502
4 0x0000555555869446 in access_with_adjusted_size (addr=20,
value=0x7fffe97320f8, size=4, access_size_min=2, access_size_max=8,
access_fn=0x55555586914d <memory_region_write_accessor>,
mr=0x555557747cd0, attrs=...) at /home/test/qemu1/qemu/memory.c:568
5 0x000055555586c479 in memory_region_dispatch_write (mr=0x555557747cd0,
addr=20, data=4587521, size=4, attrs=...)
at /home/test/qemu1/qemu/memory.c:1499
6 0x00005555558030af in flatview_write_continue (fv=0x7fffe0061130,
addr=4273930260, attrs=..., buf=0x7ffff7ff0028 "\001", len=4, addr1=20,
l=4, mr=0x555557747cd0) at /home/test/qemu1/qemu/exec.c:3234
7 0x00005555558031f9 in flatview_write (fv=0x7fffe0061130, addr=4273930260,
attrs=..., buf=0x7ffff7ff0028 "\001", len=4)
at /home/test/qemu1/qemu/exec.c:3273
8 0x00005555558034ff in address_space_write (
---Type <return> to continue, or q <return> to quit---
as=0x555556758480 <address_space_memory>, addr=4273930260, attrs=...,
buf=0x7ffff7ff0028 "\001", len=4) at /home/test/qemu1/qemu/exec.c:3363
9 0x0000555555803550 in address_space_rw (
as=0x555556758480 <address_space_memory>, addr=4273930260, attrs=...,
buf=0x7ffff7ff0028 "\001", len=4, is_write=true)
at /home/test/qemu1/qemu/exec.c:3374
10 0x00005555558884a1 in kvm_cpu_exec (cpu=0x555556920e40)
at /home/test/qemu1/qemu/accel/kvm/kvm-all.c:2031
11 0x000055555584cd9d in qemu_kvm_cpu_thread_fn (arg=0x555556920e40)
at /home/test/qemu1/qemu/cpus.c:1281
12 0x0000555555dbaf6d in qemu_thread_start (args=0x5555569438a0)
at util/qemu-thread-posix.c:502
13 0x00007ffff5dc86db in start_thread (arg=0x7fffe9735700)
at pthread_create.c:463
14 0x00007ffff5af188f in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Signed-off-by: Li Qiang <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: a3d25ddd6f08d9edb17cc1164d7b10049ca3561b
https://github.com/qemu/qemu/commit/a3d25ddd6f08d9edb17cc1164d7b10049ca3561b
Author: Li Qiang <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M hw/block/nvme.c
Log Message:
-----------
nvme: use pci_dev directly in nvme_realize
There is no need to make another reference.
Signed-off-by: Li Qiang <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Commit: e1e6eccd497683b5c2fc2a4219f7737e875fb6b3
https://github.com/qemu/qemu/commit/e1e6eccd497683b5c2fc2a4219f7737e875fb6b3
Author: Max Reitz <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M tests/qemu-iotests/iotests.py
Log Message:
-----------
iotests.py: Add qemu_nbd_pipe()
In some cases, we may want to deal with qemu-nbd errors (e.g. by
launching it in a different configuration until it no longer throws
any). In that case, we do not want its output ending up in the test
output.
It may still be useful for handling the error, though, so add a new
function that works basically like qemu_nbd(), only that it returns the
qemu-nbd output instead of making it end up in the log. In contrast to
qemu_img_pipe(), it does still return the exit code as well, though,
because that is even more important for error handling.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: dfadac9a37a7d1e8e891f347f77702f97856c227
https://github.com/qemu/qemu/commit/dfadac9a37a7d1e8e891f347f77702f97856c227
Author: Max Reitz <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M tests/qemu-iotests/147
Log Message:
-----------
iotests: Bind qemu-nbd to localhost in 147
By default, qemu-nbd binds to 0.0.0.0. However, we then proceed to
connect to "localhost". Usually, this works out fine; but if this test
is run concurrently, some other test function may have bound a different
server to ::1 (on the same port -- you can bind different serves to the
same port, as long as one is on IPv4 and the other on IPv6).
So running qemu-nbd works, it can bind to 0.0.0.0:NBD_PORT. But
potentially a concurrent test has successfully taken [::1]:NBD_PORT. In
this case, trying to connect to "localhost" will lead us to the IPv6
instance, where we do not want to end up.
Fix this by just binding to "localhost". This will make qemu-nbd error
out immediately and not give us cryptic errors later.
(Also, it will allow us to just try a different port as of a future
patch.)
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: 908b30164bbffad7430d551b2a03a8fbcaa631ef
https://github.com/qemu/qemu/commit/908b30164bbffad7430d551b2a03a8fbcaa631ef
Author: Max Reitz <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M tests/qemu-iotests/147
Log Message:
-----------
iotests: Allow 147 to be run concurrently
To do this, we need to allow creating the NBD server on various ports
instead of a single one (which may not even work if you run just one
instance, because something entirely else might be using that port).
So we just pick a random port in [32768, 32768 + 1024) and try to create
a server there. If that fails, we just retry until something sticks.
For the IPv6 test, we need a different range, though (just above that
one). This is because "localhost" resolves to both 127.0.0.1 and ::1.
This means that if you bind to it, it will bind to both, if possible, or
just one if the other is already in use. Therefore, if the IPv6 test
has already taken [::1]:some_port and we then try to take
localhost:some_port, that will work -- only the second server will be
bound to 127.0.0.1:some_port alone and not [::1]:some_port in addition.
So we have two different servers on the same port, one for IPv4 and one
for IPv6.
But when we then try to connect to the server through
localhost:some_port, we will always end up at the IPv6 one (as long as
it is up), and this may not be the one we want.
Thus, we must make sure not to create an IPv6-only NBD server on the
same port as a normal "dual-stack" NBD server -- which is done by using
distinct port ranges, as explained above.
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Reviewed-by: John Snow <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
Commit: cfe6c547690b06fbce54a6d0f7b05dd7f18e36ea
https://github.com/qemu/qemu/commit/cfe6c547690b06fbce54a6d0f7b05dd7f18e36ea
Author: Peter Maydell <address@hidden>
Date: 2019-01-31 (Thu, 31 Jan 2019)
Changed paths:
M block.c
M block/block-backend.c
M block/curl.c
M block/file-posix.c
M block/sheepdog.c
M block/ssh.c
M block/trace-events
M blockdev.c
M configure
M hw/block/nvme.c
M include/block/block.h
M include/qemu/osdep.h
M include/sysemu/block-backend.h
M qapi/block-core.json
M qemu-img.c
M qemu-io-cmds.c
A scripts/render_block_graph.py
M tests/qemu-iotests/147
M tests/qemu-iotests/iotests.py
Log Message:
-----------
Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2019-01-31'
into staging
Block patches:
- New debugging QMP command to explore block graphs
- Converted DPRINTF()s to trace events
- Fixed qemu-io's use of getopt() for systems with optreset
- Minor NVMe emulation fixes
- An iotest fix
# gpg: Signature made Thu 31 Jan 2019 00:51:46 GMT
# gpg: using RSA key F407DB0061D5CF40
# gpg: Good signature from "Max Reitz <address@hidden>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
* remotes/xanclic/tags/pull-block-2019-01-31:
iotests: Allow 147 to be run concurrently
iotests: Bind qemu-nbd to localhost in 147
iotests.py: Add qemu_nbd_pipe()
nvme: use pci_dev directly in nvme_realize
nvme: ensure the num_queues is not zero
nvme: use TYPE_NVME instead of constant string
qemu-io: Add generic function for reinitializing optind.
block/sheepdog: Convert from DPRINTF() macro to trace events
block/file-posix: Convert from DPRINTF() macro to trace events
block/curl: Convert from DPRINTF() macro to trace events
block/ssh: Convert from DPRINTF() macro to trace events
scripts: add render_block_graph function for QEMUMachine
qapi: add x-debug-query-block-graph
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/e8977901b79f...cfe6c547690b
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 5d3b4e: qapi: add x-debug-query-block-graph,
Peter Maydell <=