1 | The following changes since commit 36f87b4513373b3cd79c87c9197d17face95d4ac: | 1 | The following changes since commit 15ef89d2a1a7b93845a6b09c2ee8e1979f6eb30b: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.10-20170630' into staging (2017-06-30 11:58:49 +0100) | 3 | Update version for v7.0.0-rc1 release (2022-03-22 22:58:44 +0000) |
4 | 4 | ||
5 | are available in the git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | git://github.com/famz/qemu.git tags/block-pull-request | 7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to c61e684e44272f2acb2bef34cf2aa234582a73a9: | 9 | for you to fetch changes up to 2539eade4f689eda7e9fe45486f18334bfbafaf0: |
10 | 10 | ||
11 | block: Exploit BDRV_BLOCK_EOF for larger zero blocks (2017-06-30 21:48:06 +0800) | 11 | hw: Fix misleading hexadecimal format (2022-03-24 10:38:42 +0000) |
12 | |||
13 | ---------------------------------------------------------------- | ||
14 | Pull request | ||
15 | |||
16 | Philippe found cases where the 0x%d format string was used, leading to | ||
17 | misleading output. The patches look harmless and could save people time, so I | ||
18 | think it's worth including them in 7.0. | ||
12 | 19 | ||
13 | ---------------------------------------------------------------- | 20 | ---------------------------------------------------------------- |
14 | 21 | ||
15 | Hi Peter, | 22 | Philippe Mathieu-Daudé (2): |
23 | block: Fix misleading hexadecimal format | ||
24 | hw: Fix misleading hexadecimal format | ||
16 | 25 | ||
17 | Here are Eric Blake's enhancement to block layer API. Thanks! | 26 | block/parallels-ext.c | 2 +- |
18 | 27 | hw/i386/sgx.c | 2 +- | |
19 | ---------------------------------------------------------------- | 28 | hw/i386/trace-events | 6 +++--- |
20 | 29 | hw/misc/trace-events | 4 ++-- | |
21 | Eric Blake (2): | 30 | hw/scsi/trace-events | 4 ++-- |
22 | block: Add BDRV_BLOCK_EOF to bdrv_get_block_status() | 31 | 5 files changed, 9 insertions(+), 9 deletions(-) |
23 | block: Exploit BDRV_BLOCK_EOF for larger zero blocks | ||
24 | |||
25 | block/io.c | 42 +++++++++++++++++++++++++++++++++--------- | ||
26 | include/block/block.h | 2 ++ | ||
27 | tests/qemu-iotests/154 | 4 ---- | ||
28 | tests/qemu-iotests/154.out | 12 ++++++------ | ||
29 | 4 files changed, 41 insertions(+), 19 deletions(-) | ||
30 | 32 | ||
31 | -- | 33 | -- |
32 | 2.9.4 | 34 | 2.35.1 |
33 | 35 | ||
34 | diff view generated by jsdifflib |
1 | From: Eric Blake <eblake@redhat.com> | 1 | From: Philippe Mathieu-Daudé <f4bug@amsat.org> |
---|---|---|---|
2 | 2 | ||
3 | When we have a BDS with unallocated clusters, but asking the status | 3 | "0x%u" format is very misleading, replace by "0x%x". |
4 | of its underlying bs->file or backing layer encounters an end-of-file | ||
5 | condition, we know that the rest of the unallocated area will read as | ||
6 | zeroes. However, pre-patch, this required two separate calls to | ||
7 | bdrv_get_block_status(), as the first call stops at the point where | ||
8 | the underlying file ends. Thanks to BDRV_BLOCK_EOF, we can now widen | ||
9 | the results of the primary status if the secondary status already | ||
10 | includes BDRV_BLOCK_ZERO. | ||
11 | 4 | ||
12 | In turn, this fixes a TODO mentioned in iotest 154, where we can now | 5 | Found running: |
13 | see that all sectors in a partial cluster at the end of a file read | ||
14 | as zero when coupling the shorter backing file's status along with our | ||
15 | knowledge that the remaining sectors came from an unallocated cluster. | ||
16 | 6 | ||
17 | Also, note that the loop in bdrv_co_get_block_status_above() had an | 7 | $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/ |
18 | inefficent exit: in cases where the active layer sets BDRV_BLOCK_ZERO | ||
19 | but does NOT set BDRV_BLOCK_ALLOCATED (namely, where we know we read | ||
20 | zeroes merely because our unallocated clusters lie beyond the backing | ||
21 | file's shorter length), we still ended up probing the backing layer | ||
22 | even though we already had a good answer. | ||
23 | 8 | ||
24 | Signed-off-by: Eric Blake <eblake@redhat.com> | 9 | Inspired-by: Richard Henderson <richard.henderson@linaro.org> |
25 | Message-Id: <20170505021500.19315-3-eblake@redhat.com> | 10 | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
26 | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> | 11 | Reviewed-by: Hanna Reitz <hreitz@redhat.com> |
27 | Signed-off-by: Fam Zheng <famz@redhat.com> | 12 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
13 | Reviewed-by: Denis V. Lunev <den@openvz.org> | ||
14 | Message-id: 20220323114718.58714-2-philippe.mathieu.daude@gmail.com | ||
15 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
28 | --- | 16 | --- |
29 | block/io.c | 27 ++++++++++++++++++++++----- | 17 | block/parallels-ext.c | 2 +- |
30 | tests/qemu-iotests/154 | 4 ---- | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
31 | tests/qemu-iotests/154.out | 12 ++++++------ | ||
32 | 3 files changed, 28 insertions(+), 15 deletions(-) | ||
33 | 19 | ||
34 | diff --git a/block/io.c b/block/io.c | 20 | diff --git a/block/parallels-ext.c b/block/parallels-ext.c |
35 | index XXXXXXX..XXXXXXX 100644 | 21 | index XXXXXXX..XXXXXXX 100644 |
36 | --- a/block/io.c | 22 | --- a/block/parallels-ext.c |
37 | +++ b/block/io.c | 23 | +++ b/block/parallels-ext.c |
38 | @@ -XXX,XX +XXX,XX @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, | 24 | @@ -XXX,XX +XXX,XX @@ static int parallels_parse_format_extension(BlockDriverState *bs, |
39 | /* Ignore errors. This is just providing extra information, it | ||
40 | * is useful but not necessary. | ||
41 | */ | ||
42 | - if (!file_pnum) { | ||
43 | - /* !file_pnum indicates an offset at or beyond the EOF; it is | ||
44 | - * perfectly valid for the format block driver to point to such | ||
45 | - * offsets, so catch it and mark everything as zero */ | ||
46 | + if (ret2 & BDRV_BLOCK_EOF && | ||
47 | + (!file_pnum || ret2 & BDRV_BLOCK_ZERO)) { | ||
48 | + /* | ||
49 | + * It is valid for the format block driver to read | ||
50 | + * beyond the end of the underlying file's current | ||
51 | + * size; such areas read as zero. | ||
52 | + */ | ||
53 | ret |= BDRV_BLOCK_ZERO; | ||
54 | } else { | ||
55 | /* Limit request to the range reported by the protocol driver */ | ||
56 | @@ -XXX,XX +XXX,XX @@ static int64_t coroutine_fn bdrv_co_get_block_status_above(BlockDriverState *bs, | ||
57 | { | ||
58 | BlockDriverState *p; | ||
59 | int64_t ret = 0; | ||
60 | + bool first = true; | ||
61 | |||
62 | assert(bs != base); | ||
63 | for (p = bs; p != base; p = backing_bs(p)) { | ||
64 | ret = bdrv_co_get_block_status(p, sector_num, nb_sectors, pnum, file); | ||
65 | - if (ret < 0 || ret & BDRV_BLOCK_ALLOCATED) { | ||
66 | + if (ret < 0) { | ||
67 | + break; | ||
68 | + } | ||
69 | + if (ret & BDRV_BLOCK_ZERO && ret & BDRV_BLOCK_EOF && !first) { | ||
70 | + /* | ||
71 | + * Reading beyond the end of the file continues to read | ||
72 | + * zeroes, but we can only widen the result to the | ||
73 | + * unallocated length we learned from an earlier | ||
74 | + * iteration. | ||
75 | + */ | ||
76 | + *pnum = nb_sectors; | ||
77 | + } | ||
78 | + if (ret & (BDRV_BLOCK_ZERO | BDRV_BLOCK_DATA)) { | ||
79 | break; | 25 | break; |
26 | |||
27 | default: | ||
28 | - error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic); | ||
29 | + error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic); | ||
30 | goto fail; | ||
80 | } | 31 | } |
81 | /* [sector_num, pnum] unallocated on this layer, which could be only | 32 | |
82 | * the first part of [sector_num, nb_sectors]. */ | ||
83 | nb_sectors = MIN(nb_sectors, *pnum); | ||
84 | + first = false; | ||
85 | } | ||
86 | return ret; | ||
87 | } | ||
88 | diff --git a/tests/qemu-iotests/154 b/tests/qemu-iotests/154 | ||
89 | index XXXXXXX..XXXXXXX 100755 | ||
90 | --- a/tests/qemu-iotests/154 | ||
91 | +++ b/tests/qemu-iotests/154 | ||
92 | @@ -XXX,XX +XXX,XX @@ $QEMU_IO -c "alloc $size 2048" "$TEST_IMG" | _filter_qemu_io | ||
93 | $QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map | ||
94 | |||
95 | # Repeat with backing file holding unallocated cluster. | ||
96 | -# TODO: Note that this forces an allocation, because we aren't yet able to | ||
97 | -# quickly detect that reads beyond EOF of the backing file are always zero | ||
98 | CLUSTER_SIZE=2048 TEST_IMG="$TEST_IMG.base" _make_test_img $((size + 1024)) | ||
99 | |||
100 | # Write at the front: sector-wise, the request is: | ||
101 | @@ -XXX,XX +XXX,XX @@ $QEMU_IO -c "alloc $size 2048" "$TEST_IMG" | _filter_qemu_io | ||
102 | $QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map | ||
103 | |||
104 | # Repeat with backing file holding zero'd cluster | ||
105 | -# TODO: Note that this forces an allocation, because we aren't yet able to | ||
106 | -# quickly detect that reads beyond EOF of the backing file are always zero | ||
107 | $QEMU_IO -c "write -z $size 512" "$TEST_IMG.base" | _filter_qemu_io | ||
108 | |||
109 | # Write at the front: sector-wise, the request is: | ||
110 | diff --git a/tests/qemu-iotests/154.out b/tests/qemu-iotests/154.out | ||
111 | index XXXXXXX..XXXXXXX 100644 | ||
112 | --- a/tests/qemu-iotests/154.out | ||
113 | +++ b/tests/qemu-iotests/154.out | ||
114 | @@ -XXX,XX +XXX,XX @@ wrote 512/512 bytes at offset 134217728 | ||
115 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
116 | 2048/2048 bytes allocated at offset 128 MiB | ||
117 | [{ "start": 0, "length": 134217728, "depth": 1, "zero": true, "data": false}, | ||
118 | -{ "start": 134217728, "length": 2048, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] | ||
119 | +{ "start": 134217728, "length": 2048, "depth": 0, "zero": true, "data": false}] | ||
120 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134219776 backing_file=TEST_DIR/t.IMGFMT.base | ||
121 | wrote 512/512 bytes at offset 134219264 | ||
122 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
123 | 2048/2048 bytes allocated at offset 128 MiB | ||
124 | [{ "start": 0, "length": 134217728, "depth": 1, "zero": true, "data": false}, | ||
125 | -{ "start": 134217728, "length": 2048, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] | ||
126 | +{ "start": 134217728, "length": 2048, "depth": 0, "zero": true, "data": false}] | ||
127 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134219776 backing_file=TEST_DIR/t.IMGFMT.base | ||
128 | wrote 1024/1024 bytes at offset 134218240 | ||
129 | 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
130 | 2048/2048 bytes allocated at offset 128 MiB | ||
131 | [{ "start": 0, "length": 134217728, "depth": 1, "zero": true, "data": false}, | ||
132 | -{ "start": 134217728, "length": 2048, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] | ||
133 | +{ "start": 134217728, "length": 2048, "depth": 0, "zero": true, "data": false}] | ||
134 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134219776 backing_file=TEST_DIR/t.IMGFMT.base | ||
135 | wrote 2048/2048 bytes at offset 134217728 | ||
136 | 2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
137 | @@ -XXX,XX +XXX,XX @@ wrote 512/512 bytes at offset 134217728 | ||
138 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
139 | 2048/2048 bytes allocated at offset 128 MiB | ||
140 | [{ "start": 0, "length": 134217728, "depth": 1, "zero": true, "data": false}, | ||
141 | -{ "start": 134217728, "length": 2048, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] | ||
142 | +{ "start": 134217728, "length": 2048, "depth": 0, "zero": true, "data": false}] | ||
143 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134219776 backing_file=TEST_DIR/t.IMGFMT.base | ||
144 | wrote 512/512 bytes at offset 134219264 | ||
145 | 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
146 | 2048/2048 bytes allocated at offset 128 MiB | ||
147 | [{ "start": 0, "length": 134217728, "depth": 1, "zero": true, "data": false}, | ||
148 | -{ "start": 134217728, "length": 2048, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] | ||
149 | +{ "start": 134217728, "length": 2048, "depth": 0, "zero": true, "data": false}] | ||
150 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134219776 backing_file=TEST_DIR/t.IMGFMT.base | ||
151 | wrote 1024/1024 bytes at offset 134218240 | ||
152 | 1 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
153 | 2048/2048 bytes allocated at offset 128 MiB | ||
154 | [{ "start": 0, "length": 134217728, "depth": 1, "zero": true, "data": false}, | ||
155 | -{ "start": 134217728, "length": 2048, "depth": 0, "zero": false, "data": true, "offset": OFFSET}] | ||
156 | +{ "start": 134217728, "length": 2048, "depth": 0, "zero": true, "data": false}] | ||
157 | Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134219776 backing_file=TEST_DIR/t.IMGFMT.base | ||
158 | wrote 2048/2048 bytes at offset 134217728 | ||
159 | 2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
160 | -- | 33 | -- |
161 | 2.9.4 | 34 | 2.35.1 |
162 | 35 | ||
163 | 36 | diff view generated by jsdifflib |
1 | From: Eric Blake <eblake@redhat.com> | 1 | From: Philippe Mathieu-Daudé <f4bug@amsat.org> |
---|---|---|---|
2 | 2 | ||
3 | Just as the block layer already sets BDRV_BLOCK_ALLOCATED as a | 3 | "0x%u" format is very misleading, replace by "0x%x". |
4 | shortcut for subsequent operations, there are also some optimizations | ||
5 | that are made easier if we can quickly tell that *pnum will advance | ||
6 | us to the end of a file, via a new BDRV_BLOCK_EOF which gets set | ||
7 | by the block layer. | ||
8 | 4 | ||
9 | This just plumbs up the new bit; subsequent patches will make use | 5 | Found running: |
10 | of it. | ||
11 | 6 | ||
12 | Signed-off-by: Eric Blake <eblake@redhat.com> | 7 | $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' hw/ |
13 | Message-Id: <20170505021500.19315-2-eblake@redhat.com> | 8 | |
14 | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> | 9 | Inspired-by: Richard Henderson <richard.henderson@linaro.org> |
15 | Signed-off-by: Fam Zheng <famz@redhat.com> | 10 | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
11 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
12 | Message-id: 20220323114718.58714-3-philippe.mathieu.daude@gmail.com | ||
13 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
16 | --- | 14 | --- |
17 | block/io.c | 15 +++++++++++---- | 15 | hw/i386/sgx.c | 2 +- |
18 | include/block/block.h | 2 ++ | 16 | hw/i386/trace-events | 6 +++--- |
19 | 2 files changed, 13 insertions(+), 4 deletions(-) | 17 | hw/misc/trace-events | 4 ++-- |
18 | hw/scsi/trace-events | 4 ++-- | ||
19 | 4 files changed, 8 insertions(+), 8 deletions(-) | ||
20 | 20 | ||
21 | diff --git a/block/io.c b/block/io.c | 21 | diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c |
22 | index XXXXXXX..XXXXXXX 100644 | 22 | index XXXXXXX..XXXXXXX 100644 |
23 | --- a/block/io.c | 23 | --- a/hw/i386/sgx.c |
24 | +++ b/block/io.c | 24 | +++ b/hw/i386/sgx.c |
25 | @@ -XXX,XX +XXX,XX @@ typedef struct BdrvCoGetBlockStatusData { | 25 | @@ -XXX,XX +XXX,XX @@ void pc_machine_init_sgx_epc(PCMachineState *pcms) |
26 | * Drivers not implementing the functionality are assumed to not support | ||
27 | * backing files, hence all their sectors are reported as allocated. | ||
28 | * | ||
29 | - * If 'sector_num' is beyond the end of the disk image the return value is 0 | ||
30 | - * and 'pnum' is set to 0. | ||
31 | + * If 'sector_num' is beyond the end of the disk image the return value is | ||
32 | + * BDRV_BLOCK_EOF and 'pnum' is set to 0. | ||
33 | * | ||
34 | * 'pnum' is set to the number of sectors (including and immediately following | ||
35 | * the specified sector) that are known to be in the same | ||
36 | * allocated/unallocated state. | ||
37 | * | ||
38 | * 'nb_sectors' is the max value 'pnum' should be set to. If nb_sectors goes | ||
39 | - * beyond the end of the disk image it will be clamped. | ||
40 | + * beyond the end of the disk image it will be clamped; if 'pnum' is set to | ||
41 | + * the end of the image, then the returned value will include BDRV_BLOCK_EOF. | ||
42 | * | ||
43 | * If returned value is positive and BDRV_BLOCK_OFFSET_VALID bit is set, 'file' | ||
44 | * points to the BDS which the sector range is allocated in. | ||
45 | @@ -XXX,XX +XXX,XX @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, | ||
46 | |||
47 | if (sector_num >= total_sectors) { | ||
48 | *pnum = 0; | ||
49 | - return 0; | ||
50 | + return BDRV_BLOCK_EOF; | ||
51 | } | 26 | } |
52 | 27 | ||
53 | n = total_sectors - sector_num; | 28 | if ((sgx_epc->base + sgx_epc->size) < sgx_epc->base) { |
54 | @@ -XXX,XX +XXX,XX @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, | 29 | - error_report("Size of all 'sgx-epc' =0x%"PRIu64" causes EPC to wrap", |
55 | if (!bs->drv->bdrv_co_get_block_status) { | 30 | + error_report("Size of all 'sgx-epc' =0x%"PRIx64" causes EPC to wrap", |
56 | *pnum = nb_sectors; | 31 | sgx_epc->size); |
57 | ret = BDRV_BLOCK_DATA | BDRV_BLOCK_ALLOCATED; | 32 | exit(EXIT_FAILURE); |
58 | + if (sector_num + nb_sectors == total_sectors) { | 33 | } |
59 | + ret |= BDRV_BLOCK_EOF; | 34 | diff --git a/hw/i386/trace-events b/hw/i386/trace-events |
60 | + } | ||
61 | if (bs->drv->protocol_name) { | ||
62 | ret |= BDRV_BLOCK_OFFSET_VALID | (sector_num * BDRV_SECTOR_SIZE); | ||
63 | } | ||
64 | @@ -XXX,XX +XXX,XX @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, | ||
65 | |||
66 | out: | ||
67 | bdrv_dec_in_flight(bs); | ||
68 | + if (ret >= 0 && sector_num + *pnum == total_sectors) { | ||
69 | + ret |= BDRV_BLOCK_EOF; | ||
70 | + } | ||
71 | return ret; | ||
72 | } | ||
73 | |||
74 | diff --git a/include/block/block.h b/include/block/block.h | ||
75 | index XXXXXXX..XXXXXXX 100644 | 35 | index XXXXXXX..XXXXXXX 100644 |
76 | --- a/include/block/block.h | 36 | --- a/hw/i386/trace-events |
77 | +++ b/include/block/block.h | 37 | +++ b/hw/i386/trace-events |
78 | @@ -XXX,XX +XXX,XX @@ typedef struct HDGeometry { | 38 | @@ -XXX,XX +XXX,XX @@ vtd_fault_disabled(void) "Fault processing disabled for context entry" |
79 | * BDRV_BLOCK_OFFSET_VALID: an associated offset exists for accessing raw data | 39 | vtd_replay_ce_valid(const char *mode, uint8_t bus, uint8_t dev, uint8_t fn, uint16_t domain, uint64_t hi, uint64_t lo) "%s: replay valid context device %02"PRIx8":%02"PRIx8".%02"PRIx8" domain 0x%"PRIx16" hi 0x%"PRIx64" lo 0x%"PRIx64 |
80 | * BDRV_BLOCK_ALLOCATED: the content of the block is determined by this | 40 | vtd_replay_ce_invalid(uint8_t bus, uint8_t dev, uint8_t fn) "replay invalid context device %02"PRIx8":%02"PRIx8".%02"PRIx8 |
81 | * layer (short for DATA || ZERO), set by block layer | 41 | vtd_page_walk_level(uint64_t addr, uint32_t level, uint64_t start, uint64_t end) "walk (base=0x%"PRIx64", level=%"PRIu32") iova range 0x%"PRIx64" - 0x%"PRIx64 |
82 | + * BDRV_BLOCK_EOF: the returned pnum covers through end of file for this layer | 42 | -vtd_page_walk_one(uint16_t domain, uint64_t iova, uint64_t gpa, uint64_t mask, int perm) "domain 0x%"PRIu16" iova 0x%"PRIx64" -> gpa 0x%"PRIx64" mask 0x%"PRIx64" perm %d" |
83 | * | 43 | +vtd_page_walk_one(uint16_t domain, uint64_t iova, uint64_t gpa, uint64_t mask, int perm) "domain 0x%"PRIx16" iova 0x%"PRIx64" -> gpa 0x%"PRIx64" mask 0x%"PRIx64" perm %d" |
84 | * Internal flag: | 44 | vtd_page_walk_one_skip_map(uint64_t iova, uint64_t mask, uint64_t translated) "iova 0x%"PRIx64" mask 0x%"PRIx64" translated 0x%"PRIx64 |
85 | * BDRV_BLOCK_RAW: used internally to indicate that the request was | 45 | vtd_page_walk_one_skip_unmap(uint64_t iova, uint64_t mask) "iova 0x%"PRIx64" mask 0x%"PRIx64 |
86 | @@ -XXX,XX +XXX,XX @@ typedef struct HDGeometry { | 46 | vtd_page_walk_skip_read(uint64_t iova, uint64_t next) "Page walk skip iova 0x%"PRIx64" - 0x%"PRIx64" due to unable to read" |
87 | #define BDRV_BLOCK_OFFSET_VALID 0x04 | 47 | vtd_page_walk_skip_reserve(uint64_t iova, uint64_t next) "Page walk skip iova 0x%"PRIx64" - 0x%"PRIx64" due to rsrv set" |
88 | #define BDRV_BLOCK_RAW 0x08 | 48 | vtd_switch_address_space(uint8_t bus, uint8_t slot, uint8_t fn, bool on) "Device %02x:%02x.%x switching address space (iommu enabled=%d)" |
89 | #define BDRV_BLOCK_ALLOCATED 0x10 | 49 | vtd_as_unmap_whole(uint8_t bus, uint8_t slot, uint8_t fn, uint64_t iova, uint64_t size) "Device %02x:%02x.%x start 0x%"PRIx64" size 0x%"PRIx64 |
90 | +#define BDRV_BLOCK_EOF 0x20 | 50 | -vtd_translate_pt(uint16_t sid, uint64_t addr) "source id 0x%"PRIu16", iova 0x%"PRIx64 |
91 | #define BDRV_BLOCK_OFFSET_MASK BDRV_SECTOR_MASK | 51 | -vtd_pt_enable_fast_path(uint16_t sid, bool success) "sid 0x%"PRIu16" %d" |
92 | 52 | +vtd_translate_pt(uint16_t sid, uint64_t addr) "source id 0x%"PRIx16", iova 0x%"PRIx64 | |
93 | typedef QSIMPLEQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) BlockReopenQueue; | 53 | +vtd_pt_enable_fast_path(uint16_t sid, bool success) "sid 0x%"PRIx16" %d" |
54 | vtd_irq_generate(uint64_t addr, uint64_t data) "addr 0x%"PRIx64" data 0x%"PRIx64 | ||
55 | vtd_reg_read(uint64_t addr, uint64_t size) "addr 0x%"PRIx64" size 0x%"PRIx64 | ||
56 | vtd_reg_write(uint64_t addr, uint64_t size, uint64_t val) "addr 0x%"PRIx64" size 0x%"PRIx64" value 0x%"PRIx64 | ||
57 | diff --git a/hw/misc/trace-events b/hw/misc/trace-events | ||
58 | index XXXXXXX..XXXXXXX 100644 | ||
59 | --- a/hw/misc/trace-events | ||
60 | +++ b/hw/misc/trace-events | ||
61 | @@ -XXX,XX +XXX,XX @@ | ||
62 | # See docs/devel/tracing.rst for syntax documentation. | ||
63 | |||
64 | # allwinner-cpucfg.c | ||
65 | -allwinner_cpucfg_cpu_reset(uint8_t cpu_id, uint32_t reset_addr) "id %u, reset_addr 0x%" PRIu32 | ||
66 | +allwinner_cpucfg_cpu_reset(uint8_t cpu_id, uint32_t reset_addr) "id %u, reset_addr 0x%" PRIx32 | ||
67 | allwinner_cpucfg_read(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32 | ||
68 | allwinner_cpucfg_write(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32 | ||
69 | |||
70 | @@ -XXX,XX +XXX,XX @@ imx7_gpr_write(uint64_t offset, uint64_t value) "addr 0x%08" PRIx64 "value 0x%08 | ||
71 | |||
72 | # mos6522.c | ||
73 | mos6522_set_counter(int index, unsigned int val) "T%d.counter=%d" | ||
74 | -mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64 | ||
75 | +mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRIx64 " delta_next=0x%"PRIx64 | ||
76 | mos6522_set_sr_int(void) "set sr_int" | ||
77 | mos6522_write(uint64_t addr, const char *name, uint64_t val) "reg=0x%"PRIx64 " [%s] val=0x%"PRIx64 | ||
78 | mos6522_read(uint64_t addr, const char *name, unsigned val) "reg=0x%"PRIx64 " [%s] val=0x%x" | ||
79 | diff --git a/hw/scsi/trace-events b/hw/scsi/trace-events | ||
80 | index XXXXXXX..XXXXXXX 100644 | ||
81 | --- a/hw/scsi/trace-events | ||
82 | +++ b/hw/scsi/trace-events | ||
83 | @@ -XXX,XX +XXX,XX @@ lsi_bad_phase_interrupt(void) "Phase mismatch interrupt" | ||
84 | lsi_bad_selection(uint32_t id) "Selected absent target %"PRIu32 | ||
85 | lsi_do_dma_unavailable(void) "DMA no data available" | ||
86 | lsi_do_dma(uint64_t addr, int len) "DMA addr=0x%"PRIx64" len=%d" | ||
87 | -lsi_queue_command(uint32_t tag) "Queueing tag=0x%"PRId32 | ||
88 | +lsi_queue_command(uint32_t tag) "Queueing tag=0x%"PRIx32 | ||
89 | lsi_add_msg_byte_error(void) "MSG IN data too long" | ||
90 | lsi_add_msg_byte(uint8_t data) "MSG IN 0x%02x" | ||
91 | lsi_reselect(int id) "Reselected target %d" | ||
92 | @@ -XXX,XX +XXX,XX @@ lsi_do_msgout_noop(void) "MSG: No Operation" | ||
93 | lsi_do_msgout_extended(uint8_t msg, uint8_t len) "Extended message 0x%x (len %d)" | ||
94 | lsi_do_msgout_ignored(const char *msg) "%s (ignored)" | ||
95 | lsi_do_msgout_simplequeue(uint8_t select_tag) "SIMPLE queue tag=0x%x" | ||
96 | -lsi_do_msgout_abort(uint32_t tag) "MSG: ABORT TAG tag=0x%"PRId32 | ||
97 | +lsi_do_msgout_abort(uint32_t tag) "MSG: ABORT TAG tag=0x%"PRIx32 | ||
98 | lsi_do_msgout_clearqueue(uint32_t tag) "MSG: CLEAR QUEUE tag=0x%"PRIx32 | ||
99 | lsi_do_msgout_busdevicereset(uint32_t tag) "MSG: BUS DEVICE RESET tag=0x%"PRIx32 | ||
100 | lsi_do_msgout_select(int id) "Select LUN %d" | ||
94 | -- | 101 | -- |
95 | 2.9.4 | 102 | 2.35.1 |
96 | 103 | ||
97 | 104 | diff view generated by jsdifflib |