1
The following changes since commit 285278ca785f5fa9a570927e1c0958a2ca2b2150:
1
The following changes since commit ca61fa4b803e5d0abaf6f1ceb690f23bb78a4def:
2
2
3
Merge remote-tracking branch 'remotes/famz/tags/testing-pull-request' into staging (2018-10-27 19:55:08 +0100)
3
Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20211006' into staging (2021-10-06 12:11:14 -0700)
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://gitlab.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to bd54b11062c4baa7d2e4efadcf71b8cfd55311fd:
9
for you to fetch changes up to 1cc7eada97914f090125e588497986f6f7900514:
10
10
11
nvdimm: Add docs hint for Linux driver name (2018-10-29 13:35:22 +0000)
11
iothread: use IOThreadParamInfo in iothread_[set|get]_param() (2021-10-07 15:29:50 +0100)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request
15
15
16
No changelog-worthy entries, just small tweaks.
17
18
----------------------------------------------------------------
16
----------------------------------------------------------------
19
17
20
Kees Cook (1):
18
Stefano Garzarella (2):
21
nvdimm: Add docs hint for Linux driver name
19
iothread: rename PollParamInfo to IOThreadParamInfo
20
iothread: use IOThreadParamInfo in iothread_[set|get]_param()
22
21
23
Li Qiang (1):
22
iothread.c | 28 +++++++++++++++-------------
24
util: aio-posix: fix a typo
23
1 file changed, 15 insertions(+), 13 deletions(-)
25
26
docs/nvdimm.txt | 5 +++--
27
util/aio-posix.c | 2 +-
28
2 files changed, 4 insertions(+), 3 deletions(-)
29
24
30
--
25
--
31
2.17.2
26
2.31.1
32
27
33
28
29
diff view generated by jsdifflib
1
From: Kees Cook <keescook@chromium.org>
1
From: Stefano Garzarella <sgarzare@redhat.com>
2
2
3
I spent way too much time trying to figure out why the emulated NVDIMM
3
Commit 1793ad0247 ("iothread: add aio-max-batch parameter") added
4
was missing under Linux. In an effort to help others who might be looking
4
a new parameter (aio-max-batch) to IOThread and used PollParamInfo
5
for these kinds of things in the future, include a hint.
5
structure to handle it.
6
6
7
Signed-off-by: Kees Cook <keescook@chromium.org>
7
Since it is not a parameter of the polling mechanism, we rename the
8
Message-id: 20181018201351.GA25286@beast
8
structure to a more generic IOThreadParamInfo.
9
10
Suggested-by: Kevin Wolf <kwolf@redhat.com>
11
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
12
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
13
Message-id: 20210727145936.147032-2-sgarzare@redhat.com
9
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
14
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
10
---
15
---
11
docs/nvdimm.txt | 5 +++--
16
iothread.c | 14 +++++++-------
12
1 file changed, 3 insertions(+), 2 deletions(-)
17
1 file changed, 7 insertions(+), 7 deletions(-)
13
18
14
diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
19
diff --git a/iothread.c b/iothread.c
15
index XXXXXXX..XXXXXXX 100644
20
index XXXXXXX..XXXXXXX 100644
16
--- a/docs/nvdimm.txt
21
--- a/iothread.c
17
+++ b/docs/nvdimm.txt
22
+++ b/iothread.c
18
@@ -XXX,XX +XXX,XX @@ Multiple vNVDIMM devices can be created if multiple pairs of "-object"
23
@@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp)
19
and "-device" are provided.
24
typedef struct {
20
25
const char *name;
21
For above command line options, if the guest OS has the proper NVDIMM
26
ptrdiff_t offset; /* field's byte offset in IOThread struct */
22
-driver, it should be able to detect a NVDIMM device which is in the
27
-} PollParamInfo;
23
-persistent memory mode and whose size is $NVDIMM_SIZE.
28
+} IOThreadParamInfo;
24
+driver (e.g. "CONFIG_ACPI_NFIT=y" under Linux), it should be able to
29
25
+detect a NVDIMM device which is in the persistent memory mode and whose
30
-static PollParamInfo poll_max_ns_info = {
26
+size is $NVDIMM_SIZE.
31
+static IOThreadParamInfo poll_max_ns_info = {
27
32
"poll-max-ns", offsetof(IOThread, poll_max_ns),
28
Note:
33
};
34
-static PollParamInfo poll_grow_info = {
35
+static IOThreadParamInfo poll_grow_info = {
36
"poll-grow", offsetof(IOThread, poll_grow),
37
};
38
-static PollParamInfo poll_shrink_info = {
39
+static IOThreadParamInfo poll_shrink_info = {
40
"poll-shrink", offsetof(IOThread, poll_shrink),
41
};
42
-static PollParamInfo aio_max_batch_info = {
43
+static IOThreadParamInfo aio_max_batch_info = {
44
"aio-max-batch", offsetof(IOThread, aio_max_batch),
45
};
46
47
@@ -XXX,XX +XXX,XX @@ static void iothread_get_param(Object *obj, Visitor *v,
48
const char *name, void *opaque, Error **errp)
49
{
50
IOThread *iothread = IOTHREAD(obj);
51
- PollParamInfo *info = opaque;
52
+ IOThreadParamInfo *info = opaque;
53
int64_t *field = (void *)iothread + info->offset;
54
55
visit_type_int64(v, name, field, errp);
56
@@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v,
57
const char *name, void *opaque, Error **errp)
58
{
59
IOThread *iothread = IOTHREAD(obj);
60
- PollParamInfo *info = opaque;
61
+ IOThreadParamInfo *info = opaque;
62
int64_t *field = (void *)iothread + info->offset;
63
int64_t value;
29
64
30
--
65
--
31
2.17.2
66
2.31.1
32
67
33
68
diff view generated by jsdifflib
1
From: Li Qiang <liq3ea@gmail.com>
1
From: Stefano Garzarella <sgarzare@redhat.com>
2
2
3
Cc: qemu-trivial@nongnu.org
3
Commit 0445409d74 ("iothread: generalize
4
Signed-off-by: Li Qiang <liq3ea@gmail.com>
4
iothread_set_param/iothread_get_param") moved common code to set and
5
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
5
get IOThread parameters in two new functions.
6
Reviewed-by: Fam Zheng <famz@redhat.com>
6
7
Message-id: 1538964972-3223-1-git-send-email-liq3ea@gmail.com
7
These functions are called inside callbacks, so we don't need to use an
8
opaque pointer. Let's replace `void *opaque` parameter with
9
`IOThreadParamInfo *info`.
10
11
Suggested-by: Kevin Wolf <kwolf@redhat.com>
12
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
13
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
14
Message-id: 20210727145936.147032-3-sgarzare@redhat.com
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
15
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9
---
16
---
10
util/aio-posix.c | 2 +-
17
iothread.c | 18 ++++++++++--------
11
1 file changed, 1 insertion(+), 1 deletion(-)
18
1 file changed, 10 insertions(+), 8 deletions(-)
12
19
13
diff --git a/util/aio-posix.c b/util/aio-posix.c
20
diff --git a/iothread.c b/iothread.c
14
index XXXXXXX..XXXXXXX 100644
21
index XXXXXXX..XXXXXXX 100644
15
--- a/util/aio-posix.c
22
--- a/iothread.c
16
+++ b/util/aio-posix.c
23
+++ b/iothread.c
17
@@ -XXX,XX +XXX,XX @@ struct AioHandler
24
@@ -XXX,XX +XXX,XX @@ static IOThreadParamInfo aio_max_batch_info = {
18
25
};
19
#ifdef CONFIG_EPOLL_CREATE1
26
20
27
static void iothread_get_param(Object *obj, Visitor *v,
21
-/* The fd number threashold to switch to epoll */
28
- const char *name, void *opaque, Error **errp)
22
+/* The fd number threshold to switch to epoll */
29
+ const char *name, IOThreadParamInfo *info, Error **errp)
23
#define EPOLL_ENABLE_THRESHOLD 64
30
{
24
31
IOThread *iothread = IOTHREAD(obj);
25
static void aio_epoll_disable(AioContext *ctx)
32
- IOThreadParamInfo *info = opaque;
33
int64_t *field = (void *)iothread + info->offset;
34
35
visit_type_int64(v, name, field, errp);
36
}
37
38
static bool iothread_set_param(Object *obj, Visitor *v,
39
- const char *name, void *opaque, Error **errp)
40
+ const char *name, IOThreadParamInfo *info, Error **errp)
41
{
42
IOThread *iothread = IOTHREAD(obj);
43
- IOThreadParamInfo *info = opaque;
44
int64_t *field = (void *)iothread + info->offset;
45
int64_t value;
46
47
@@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v,
48
static void iothread_get_poll_param(Object *obj, Visitor *v,
49
const char *name, void *opaque, Error **errp)
50
{
51
+ IOThreadParamInfo *info = opaque;
52
53
- iothread_get_param(obj, v, name, opaque, errp);
54
+ iothread_get_param(obj, v, name, info, errp);
55
}
56
57
static void iothread_set_poll_param(Object *obj, Visitor *v,
58
const char *name, void *opaque, Error **errp)
59
{
60
IOThread *iothread = IOTHREAD(obj);
61
+ IOThreadParamInfo *info = opaque;
62
63
- if (!iothread_set_param(obj, v, name, opaque, errp)) {
64
+ if (!iothread_set_param(obj, v, name, info, errp)) {
65
return;
66
}
67
68
@@ -XXX,XX +XXX,XX @@ static void iothread_set_poll_param(Object *obj, Visitor *v,
69
static void iothread_get_aio_param(Object *obj, Visitor *v,
70
const char *name, void *opaque, Error **errp)
71
{
72
+ IOThreadParamInfo *info = opaque;
73
74
- iothread_get_param(obj, v, name, opaque, errp);
75
+ iothread_get_param(obj, v, name, info, errp);
76
}
77
78
static void iothread_set_aio_param(Object *obj, Visitor *v,
79
const char *name, void *opaque, Error **errp)
80
{
81
IOThread *iothread = IOTHREAD(obj);
82
+ IOThreadParamInfo *info = opaque;
83
84
- if (!iothread_set_param(obj, v, name, opaque, errp)) {
85
+ if (!iothread_set_param(obj, v, name, info, errp)) {
86
return;
87
}
88
26
--
89
--
27
2.17.2
90
2.31.1
28
91
29
92
diff view generated by jsdifflib