1
The following changes since commit 0b5e750bea635b167eb03d86c3d9a09bbd43bc06:
1
The following changes since commit ef9f8fcbec6276414921dcd042575129a6331a2d:
2
2
3
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2019-02-12 10:53:37 +0000)
3
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2020-03-04-2' into staging (2020-03-05 19:39:47 +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/stefanha/qemu.git tags/block-pull-request
7
https://github.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to 42824b4d16da56a50ff4027f6cd22378e0e2666e:
9
for you to fetch changes up to 1f40ace7b5634f93801c8474b9eb77fe2e00289c:
10
10
11
virtio-blk: set correct config size for the host driver (2019-02-13 16:18:17 +0800)
11
tests: Fix a bug with count variables (2020-03-06 10:35:15 +0000)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request
15
15
16
Fix a virtio-blk migration regression.
16
These patches would have gone through Thomas Huth but he is away on leave.
17
17
18
----------------------------------------------------------------
18
----------------------------------------------------------------
19
19
20
Changpeng Liu (1):
20
Alexander Bulekov (2):
21
virtio-blk: set correct config size for the host driver
21
fuzz: fix style/typos in linker-script comments
22
qtest: fix fuzzer-related 80-char limit violations
22
23
23
hw/block/virtio-blk.c | 13 +++++++++----
24
Tianjia Zhang (1):
24
1 file changed, 9 insertions(+), 4 deletions(-)
25
tests: Fix a bug with count variables
26
27
qtest.c | 3 ++-
28
tests/qtest/fuzz/fork_fuzz.ld | 16 ++++++++++------
29
tests/qtest/fuzz/qos_fuzz.c | 5 ++++-
30
tests/test-rcu-list.c | 2 +-
31
4 files changed, 17 insertions(+), 9 deletions(-)
25
32
26
--
33
--
27
2.20.1
34
2.24.1
28
35
29
diff view generated by jsdifflib
New patch
1
From: Alexander Bulekov <alxndr@bu.edu>
1
2
3
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
4
Reviewed-by: Eric Blake <eblake@redhat.com>
5
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
6
Message-id: 20200227031439.31386-2-alxndr@bu.edu
7
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8
---
9
tests/qtest/fuzz/fork_fuzz.ld | 16 ++++++++++------
10
1 file changed, 10 insertions(+), 6 deletions(-)
11
12
diff --git a/tests/qtest/fuzz/fork_fuzz.ld b/tests/qtest/fuzz/fork_fuzz.ld
13
index XXXXXXX..XXXXXXX 100644
14
--- a/tests/qtest/fuzz/fork_fuzz.ld
15
+++ b/tests/qtest/fuzz/fork_fuzz.ld
16
@@ -XXX,XX +XXX,XX @@
17
-/* We adjust linker script modification to place all of the stuff that needs to
18
- * persist across fuzzing runs into a contiguous seciton of memory. Then, it is
19
+/*
20
+ * We adjust linker script modification to place all of the stuff that needs to
21
+ * persist across fuzzing runs into a contiguous section of memory. Then, it is
22
* easy to re-map the counter-related memory as shared.
23
-*/
24
+ */
25
26
SECTIONS
27
{
28
@@ -XXX,XX +XXX,XX @@ SECTIONS
29
}
30
.data.fuzz_ordered :
31
{
32
- /* Coverage counters. They're not necessary for fuzzing, but are useful
33
+ /*
34
+ * Coverage counters. They're not necessary for fuzzing, but are useful
35
* for analyzing the fuzzing performance
36
*/
37
__start___llvm_prf_cnts = .;
38
@@ -XXX,XX +XXX,XX @@ SECTIONS
39
__FUZZ_COUNTERS_END = .;
40
}
41
}
42
-/* Dont overwrite the SECTIONS in the default linker script. Instead insert the
43
- * above into the default script */
44
+/*
45
+ * Don't overwrite the SECTIONS in the default linker script. Instead insert the
46
+ * above into the default script
47
+ */
48
INSERT AFTER .data;
49
--
50
2.24.1
51
diff view generated by jsdifflib
1
From: Changpeng Liu <changpeng.liu@intel.com>
1
From: Alexander Bulekov <alxndr@bu.edu>
2
2
3
Commit caa1ee43 "vhost-user-blk: add discard/write zeroes features
3
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
4
support" added fields to struct virtio_blk_config. This changes
4
Reviewed-by: Eric Blake <eblake@redhat.com>
5
the size of the config space and breaks migration from QEMU 3.1
5
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
6
and older:
6
Message-id: 20200227031439.31386-3-alxndr@bu.edu
7
8
qemu-system-ppc64: get_pci_config_device: Bad config data: i=0x10 read: 41 device: 1 cmask: ff wmask: 80 w1cmask:0
9
qemu-system-ppc64: Failed to load PCIDevice:config
10
qemu-system-ppc64: Failed to load virtio-blk:virtio
11
qemu-system-ppc64: error while loading state for instance 0x0 of device 'pci@800000020000000:01.0/virtio-blk'
12
qemu-system-ppc64: load of migration failed: Invalid argument
13
14
Since virtio-blk doesn't support the "discard" and "write zeroes"
15
features, it shouldn't even expose the associated fields in the
16
config space actually. Just include all fields up to num_queues to
17
match QEMU 3.1 and older.
18
19
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
20
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
21
Message-id: 1550022537-27565-1-git-send-email-changpeng.liu@intel.com
22
Message-Id: <1550022537-27565-1-git-send-email-changpeng.liu@intel.com>
23
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
7
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
24
---
8
---
25
hw/block/virtio-blk.c | 13 +++++++++----
9
qtest.c | 3 ++-
26
1 file changed, 9 insertions(+), 4 deletions(-)
10
tests/qtest/fuzz/qos_fuzz.c | 5 ++++-
11
2 files changed, 6 insertions(+), 2 deletions(-)
27
12
28
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
13
diff --git a/qtest.c b/qtest.c
29
index XXXXXXX..XXXXXXX 100644
14
index XXXXXXX..XXXXXXX 100644
30
--- a/hw/block/virtio-blk.c
15
--- a/qtest.c
31
+++ b/hw/block/virtio-blk.c
16
+++ b/qtest.c
32
@@ -XXX,XX +XXX,XX @@
17
@@ -XXX,XX +XXX,XX @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error **
33
#include "hw/virtio/virtio-bus.h"
18
}
34
#include "hw/virtio/virtio-access.h"
19
}
35
20
36
+/* We don't support discard yet, hide associated config fields. */
21
-void qtest_server_set_send_handler(void (*send)(void*, const char*), void *opaque)
37
+#define VIRTIO_BLK_CFG_SIZE offsetof(struct virtio_blk_config, \
22
+void qtest_server_set_send_handler(void (*send)(void*, const char*),
38
+ max_discard_sectors)
23
+ void *opaque)
39
+
40
static void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
41
VirtIOBlockReq *req)
42
{
24
{
43
@@ -XXX,XX +XXX,XX @@ static void virtio_blk_update_config(VirtIODevice *vdev, uint8_t *config)
25
qtest_server_send = send;
44
blkcfg.alignment_offset = 0;
26
qtest_server_send_opaque = opaque;
45
blkcfg.wce = blk_enable_write_cache(s->blk);
27
diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c
46
virtio_stw_p(vdev, &blkcfg.num_queues, s->conf.num_queues);
28
index XXXXXXX..XXXXXXX 100644
47
- memcpy(config, &blkcfg, sizeof(struct virtio_blk_config));
29
--- a/tests/qtest/fuzz/qos_fuzz.c
48
+ memcpy(config, &blkcfg, VIRTIO_BLK_CFG_SIZE);
30
+++ b/tests/qtest/fuzz/qos_fuzz.c
49
+ QEMU_BUILD_BUG_ON(VIRTIO_BLK_CFG_SIZE > sizeof(blkcfg));
31
@@ -XXX,XX +XXX,XX @@ static void walk_path(QOSGraphNode *orig_path, int len)
50
}
32
QOSGraphNode *path;
51
33
QOSGraphEdge *edge;
52
static void virtio_blk_set_config(VirtIODevice *vdev, const uint8_t *config)
34
53
@@ -XXX,XX +XXX,XX @@ static void virtio_blk_set_config(VirtIODevice *vdev, const uint8_t *config)
35
- /* etype set to QEDGE_CONSUMED_BY so that machine can add to the command line */
54
VirtIOBlock *s = VIRTIO_BLK(vdev);
36
+ /*
55
struct virtio_blk_config blkcfg;
37
+ * etype set to QEDGE_CONSUMED_BY so that machine can add to the command
56
38
+ * line
57
- memcpy(&blkcfg, config, sizeof(blkcfg));
39
+ */
58
+ memcpy(&blkcfg, config, VIRTIO_BLK_CFG_SIZE);
40
QOSEdgeType etype = QEDGE_CONSUMED_BY;
59
+ QEMU_BUILD_BUG_ON(VIRTIO_BLK_CFG_SIZE > sizeof(blkcfg));
41
60
42
/* twice QOS_PATH_MAX_ELEMENT_SIZE since each edge can have its arg */
61
aio_context_acquire(blk_get_aio_context(s->blk));
62
blk_set_enable_write_cache(s->blk, blkcfg.wce != 0);
63
@@ -XXX,XX +XXX,XX @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp)
64
return;
65
}
66
67
- virtio_init(vdev, "virtio-blk", VIRTIO_ID_BLOCK,
68
- sizeof(struct virtio_blk_config));
69
+ virtio_init(vdev, "virtio-blk", VIRTIO_ID_BLOCK, VIRTIO_BLK_CFG_SIZE);
70
71
s->blk = conf->conf.blk;
72
s->rq = NULL;
73
--
43
--
74
2.20.1
44
2.24.1
75
45
76
diff view generated by jsdifflib
New patch
1
From: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
1
2
3
The counting code here should use the local variable n_nodes_local.
4
Otherwise, the variable n_nodes is counting incorrectly, causing the
5
counting logic of the code to be wrong.
6
7
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9
Link: https://lore.kernel.org/r/20200207115433.118254-1-tianjia.zhang@linux.alibaba.com
10
Message-Id: <20200207115433.118254-1-tianjia.zhang@linux.alibaba.com>
11
---
12
tests/test-rcu-list.c | 2 +-
13
1 file changed, 1 insertion(+), 1 deletion(-)
14
15
diff --git a/tests/test-rcu-list.c b/tests/test-rcu-list.c
16
index XXXXXXX..XXXXXXX 100644
17
--- a/tests/test-rcu-list.c
18
+++ b/tests/test-rcu-list.c
19
@@ -XXX,XX +XXX,XX @@ static void *rcu_q_updater(void *arg)
20
j++;
21
if (target_el == j) {
22
struct list_element *new_el = g_new(struct list_element, 1);
23
- n_nodes += n_nodes_local;
24
+ n_nodes_local++;
25
TEST_LIST_INSERT_AFTER_RCU(el, new_el, entry);
26
break;
27
}
28
--
29
2.24.1
30
diff view generated by jsdifflib