Re: [PATCH] tests: fix a memory in test_socket_unix_abstract_good

2020-06-03 Thread xiaoqiang zhao
ts.c index 2ca1e99f17..ca6671f9bf 100644 --- a/tests/test-util-sockets.c +++ b/tests/test-util-sockets.c @@ -312,6 +312,7 @@ static void test_socket_unix_abstract_good(void) g_thread_join(serv); g_free(abstract_sock_name); +g_rand_free(r); } #endif Reviewed-by:  xiaoqiang zhao

Re: [PATCH v6 3/3] qemu-options: updates for abstract unix sockets

2020-05-15 Thread xiaoqiang zhao
在 2020/5/16 上午11:13, xiaoqiang zhao 写道: add options documents changes for -chardev Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- qemu-options.hx | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index

[PATCH v6 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-15 Thread xiaoqiang zhao
add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- tests/test-util-sockets.c | 92 +++ 1 file changed, 92 insertions(+) diff --git a/tests/test-util-sockets.c b/tests/test-util

[PATCH v6 3/3] qemu-options: updates for abstract unix sockets

2020-05-15 Thread xiaoqiang zhao
add options documents changes for -chardev Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- qemu-options.hx | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e2dca8a4e9..4ee7e6c772 100644 --- a/qemu-options.hx

[PATCH v6 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-15 Thread xiaoqiang zhao
: -monitor unix:/tmp/unix.socket,abstract,tight=off OR -chardev socket,path=/tmp/unix.socket,id=unix1,abstract,tight=on Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- chardev/char-socket.c | 4 chardev/char.c| 7 +++ qapi/sockets.json | 8 +++- util

[PATCH v6 0/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-15 Thread xiaoqiang zhao
cument statement * use random names to avoid name clash in unit test Xiaoqiang Zhao (3): qemu-sockets: add abstract UNIX domain socket support tests/util-sockets: add abstract unix socket cases qemu-options: updates for abstract unix sockets chardev/char-socket.c | 4 ++ chardev/

Re: [PATCH v4 3/3] qemu-options: updates for abstract unix sockets

2020-05-15 Thread xiaoqiang zhao
在 2020/5/16 上午1:37, Eric Blake 写道: On 5/14/20 11:32 PM, xiaoqiang zhao wrote: add options documents changes for -chardev Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé ---   qemu-options.hx | 9 +++--   1 file changed, 7 insertions(+), 2 deletions(-) I'd suggest listing

[PATCH v5 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-15 Thread xiaoqiang zhao
: -monitor unix:/tmp/unix.socket,abstract,tight=off OR -chardev socket,path=/tmp/unix.socket,id=unix1,abstract,tight=on Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- chardev/char-socket.c | 4 chardev/char.c| 7 +++ qapi/sockets.json | 8 +++- util

[PATCH v5 0/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-15 Thread xiaoqiang zhao
nit test Xiaoqiang Zhao (3): qemu-sockets: add abstract UNIX domain socket support tests/util-sockets: add abstract unix socket cases qemu-options: updates for abstract unix sockets chardev/char-socket.c | 4 ++ chardev/char.c| 7 +++ qapi/sockets.json | 8 +++- q

[PATCH v5 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-15 Thread xiaoqiang zhao
add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao --- tests/test-util-sockets.c | 92 +++ 1 file changed, 92 insertions(+) diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index 5fd947c7bf

[PATCH v5 3/3] qemu-options: updates for abstract unix sockets

2020-05-15 Thread xiaoqiang zhao
add options documents changes for -chardev Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- qemu-options.hx | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e2dca8a4e9..e63cc1b4b4 100644 --- a/qemu-options.hx

[PATCH v4 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-14 Thread xiaoqiang zhao
add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao --- tests/test-util-sockets.c | 91 +++ 1 file changed, 91 insertions(+) diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index 5fd947c7bf

[PATCH v4 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-14 Thread xiaoqiang zhao
: -monitor unix:/tmp/unix.socket,abstract,tight=off OR -chardev socket,path=/tmp/unix.socket,id=unix1,abstract,tight=on Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- chardev/char-socket.c | 4 chardev/char.c| 7 +++ qapi/sockets.json | 8 +++- util

[PATCH v4 3/3] qemu-options: updates for abstract unix sockets

2020-05-14 Thread xiaoqiang zhao
add options documents changes for -chardev Signed-off-by: xiaoqiang zhao Reviewed-by: Daniel P. Berrangé --- qemu-options.hx | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e2dca8a4e9..e63cc1b4b4 100644 --- a/qemu-options.hx

[PATCH v4 0/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-14 Thread xiaoqiang zhao
qemu does not support abstract UNIX domain socket address. Add this ability to make qemu handy when abstract address is needed. Changes since v3: * rebase on master * refine qapi document statement * use random names to avoid name clash in unit test Xiaoqiang Zhao (3): qemu-sockets: add

Re: [PATCH v3 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-13 Thread xiaoqiang zhao
在 2020/5/13 下午11:49, Daniel P. Berrangé 写道: On Sun, May 10, 2020 at 02:14:21PM +0800, xiaoqiang zhao wrote: add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao --- tests/test-util-sockets.c | 83 +++ 1 file

[PATCH RESEND v3 0/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-10 Thread xiaoqiang zhao
* add test cases and update qemu-options documents Xiaoqiang Zhao (3): qemu-sockets: add abstract UNIX domain socket support tests/util-sockets: add abstract unix socket cases qemu-options: updates for abstract unix sockets chardev/char-socket.c | 4 ++ chardev/char.c| 7

[PATCH RESEND v3 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-10 Thread xiaoqiang zhao
add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao --- tests/test-util-sockets.c | 83 +++ 1 file changed, 83 insertions(+) diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index 5fd947c7bf

[PATCH RESEND v3 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-10 Thread xiaoqiang zhao
: -monitor unix:/tmp/unix.socket,abstract,tight=off OR -chardev socket,path=/tmp/unix.socket,id=unix1,abstract,tight=on Signed-off-by: xiaoqiang zhao --- chardev/char-socket.c | 4 chardev/char.c| 7 +++ qapi/sockets.json | 9 - util/qemu-sockets.c | 39

[PATCH RESEND v3 3/3] qemu-options: updates for abstract unix sockets

2020-05-10 Thread xiaoqiang zhao
add options documents changes for -chardev Signed-off-by: xiaoqiang zhao --- qemu-options.hx | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 292d4e7c0c..ce73014f8e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2930,7

[PATCH v3 0/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-10 Thread xiaoqiang zhao
By default qemu does not support abstract UNIX domain socket address. Add this ability to make qemu handy when abstract address is needed. Changes since v2: * reorganize code to cover both connect and listen * qapi related changes * add test cases and update qemu-options documents Xiaoqiang

[PATCH v3 1/3] qemu-sockets: add abstract UNIX domain socket support

2020-05-10 Thread xiaoqiang zhao
: -monitor unix:/tmp/unix.socket,abstract,tight=off OR -chardev socket,path=/tmp/unix.socket,id=unix1,abstract,tight=on Signed-off-by: xiaoqiang zhao --- chardev/char-socket.c | 4 chardev/char.c| 7 +++ qapi/sockets.json | 9 - util/qemu-sockets.c | 39

[PATCH v3 2/3] tests/util-sockets: add abstract unix socket cases

2020-05-10 Thread xiaoqiang zhao
add cases to test tight and non-tight for abstract address type Signed-off-by: xiaoqiang zhao --- tests/test-util-sockets.c | 83 +++ 1 file changed, 83 insertions(+) diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c index 5fd947c7bf

[PATCH v3 3/3] qemu-options: updates for abstract unix sockets

2020-05-10 Thread xiaoqiang zhao
add options documents changes for -chardev Signed-off-by: xiaoqiang zhao --- qemu-options.hx | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 292d4e7c0c..ce73014f8e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2930,7

[PATCH v2] qemu-sockets: add abstract UNIX domain socket support

2020-04-22 Thread xiaoqiang zhao
unix_connect_saddr now support abstract address type By default qemu does not support abstract UNIX domain socket address. Add this ability to make qemu handy when abstract address is needed. Abstract address is marked by prefixing the address name with a '@'. Signed-off-by: xiaoqiang zhao

[PATCH] qemu-sockets: add abstract UNIX domain socket support

2020-04-22 Thread xiaoqiang zhao
unix_connect_saddr now support abstract address type By default qemu does not support abstract UNIX domain socket address. Add this ability to make qemu handy when abstract address is needed. Abstract address is marked by prefixing the address name with a '@'. Signed-off-by: xiaoqiang zhao

Re: [PATCH v5 07/37] serial: register vmsd with DeviceClass

2019-12-22 Thread xiaoqiang zhao
nit(MemoryRegion *address_space, qemu_chr_fe_init(>chr, chr, _abort); serial_realize_core(s, _fatal); -vmstate_register(NULL, base, _serial, s); +qdev_set_legacy_instance_id(dev, base, 2); qdev_init_nofail(dev); memory_region_init_io(>io, NULL, _mm_ops[end], s, Resend, cc peter Reviewed-by: xiaoqiang zhao

Re: [PATCH v5 04/37] chardev: generate an internal id when none given

2019-12-22 Thread xiaoqiang zhao
il/id.c @@ -34,6 +34,7 @@ bool id_wellformed(const char *id) static const char *const id_subsys_str[ID_MAX] = { [ID_QDEV] = "qdev", [ID_BLOCK] = "block", +[ID_CHR] = "chr", }; /* Looks good to me. Reviewed-by: xiaoqiang zhao

Re: [PATCH v5 07/37] serial: register vmsd with DeviceClass

2019-12-22 Thread xiaoqiang zhao
nit(MemoryRegion *address_space, qemu_chr_fe_init(>chr, chr, _abort); serial_realize_core(s, _fatal); -vmstate_register(NULL, base, _serial, s); +qdev_set_legacy_instance_id(dev, base, 2); qdev_init_nofail(dev); memory_region_init_io(>io, NULL, _mm_ops[end], s, Reviewed-by: xiaoqiang zhao

Re: [Qemu-devel] [PATCH 51/88] hw/timer: use g_new() family of functions

2017-10-06 Thread xiaoqiang zhao
size; > char timer_name[20]; > > -tc = g_malloc0(sizeof(TimerContext)); > +tc = g_new0(TimerContext, 1); > tc->s = s; > tc->timer_index = i; > > -- > 2.14.2 Resend due to email blocks. Reviewed-by: xiaoqiang zhao <zxq_yx_...@163.com>

Re: [Qemu-devel] [PATCH 51/88] hw/timer: use g_new() family of functions

2017-10-06 Thread xiaoqiang zhao
size; > char timer_name[20]; > > -tc = g_malloc0(sizeof(TimerContext)); > +tc = g_new0(TimerContext, 1); > tc->s = s; > tc->timer_index = i; > > -- > 2.14.2 Reviewed-by: xiaoqiang zhao <zxq_yx_...@163.com>

[Qemu-devel] [PATCH v3 7/8] hw/sparc: QOM'ify sun4m.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/sparc/sun4m.c | 54 +++--- 1 file

[Qemu-devel] [PATCH v3 8/8] hw/sparc64: QOM'ify sun4u.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/sparc64/sun4u.c | 20 +--- 1 file changed, 9 insertions(+),

[Qemu-devel] [PATCH v3 0/8] QOM'ify work for sparc

2017-05-25 Thread xiaoqiang zhao
This patch set aims for QOM'ifying code relate with sparc. It is part of my QOM'ify work of qemu code base. Changes: v2 -> v3: * rebased on the latest master * squash two patches about m48txx_sysbus into one v1 -> v2: * rebased on the latest master xiaoqiang zhao (8): hw/misc: Q

[Qemu-devel] [PATCH v3 3/8] hw/dma: QOM'ify sun4m_iommu.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/dma/sun4m_iommu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/dma/sun4m_iomm

[Qemu-devel] [PATCH v3 1/8] hw/misc: QOM'ify eccmemctl.c

2017-05-25 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/misc/eccm

[Qemu-devel] [PATCH v3 2/8] hw/dma: QOM'ify sparc32_dma.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init and an realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/dma/sparc32_dma.c | 25 +++-- 1 file changed, 15 insertions(+),

[Qemu-devel] [PATCH v3 5/8] hw/timer: QOM'ify m48txx_sysbus

2017-05-25 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init * assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Ph

[Qemu-devel] [PATCH v3 6/8] hw/timer: QOM'ify slavio_timer

2017-05-25 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/timer/slavio_timer.c | 12 +---

[Qemu-devel] [PATCH v3 4/8] hw/misc: QOM'ify slavio_misc.c

2017-05-25 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/misc/slavio_misc.c | 43 +-- 1 file changed, 17 insertions(+), 26 deleti

[Qemu-devel] [PATCH v2 9/9] hw/sparc64: QOM'ify sun4u.c

2017-04-29 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/sparc64/sun4u.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/s

[Qemu-devel] [PATCH v2 2/9] hw/dma: QOM'ify sparc32_dma.c

2017-04-29 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init and an realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/dma/sparc32_dma.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32

[Qemu-devel] [PATCH v2 4/9] hw/misc: QOM'ify slavio_misc.c

2017-04-29 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/misc/slavio_misc.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/hw/misc/slavio_misc.c b/hw/misc/slavio_

[Qemu-devel] [PATCH v2 7/9] hw/timer: QOM'ify slavio_timer

2017-04-29 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/slavio_timer.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff

[Qemu-devel] [PATCH v2 8/9] hw/sparc: QOM'ify sun4m.c

2017-04-29 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/sparc/sun4m.c | 54 +++--- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v2 1/9] hw/misc: QOM'ify eccmemctl.c

2017-04-29 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/misc/eccmemctl.c | 25 - 1 file changed, 16 insertions

[Qemu-devel] [PATCH v2 6/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2017-04-29 Thread xiaoqiang zhao
assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/m48t59.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index eff259ef96..3a9f541c9b 100644 --

[Qemu-devel] [PATCH v2 0/9] QOM'ify work for sparc

2017-04-29 Thread xiaoqiang zhao
This patch set aims for QOM'ifying code relate with sparc. It is part of my QOM'ify work of qemu code base. changes since v1: * rebased on the latest master xiaoqiang zhao (9): hw/misc: QOM'ify eccmemctl.c hw/dma: QOM'ify sparc32_dma.c hw/dma: QOM'ify sun4m_iommu.c hw/misc: QOM'ify

[Qemu-devel] [PATCH v2 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 1)

2017-04-29 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/m48t59.c | 35 ++- 1 file chang

[Qemu-devel] [PATCH v2 3/9] hw/dma: QOM'ify sun4m_iommu.c

2017-04-29 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/dma/sun4m_iommu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/dma/sun4m_iommu.c b/hw/dma/sun4m_iommu.c index b3cbc54c23..335ef63cbc

[Qemu-devel] [RESEND PATCH 2/9] hw/dma: QOM'ify sparc32_dma.c

2017-02-05 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init and an realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/dma/sparc32_dma.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32

[Qemu-devel] [RESEND PATCH 3/9] hw/dma: QOM'ify sun4m_iommu.c

2017-02-05 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/dma/sun4m_iommu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/dma/sun4m_iommu.c b/hw/dma/sun4m_iommu.c index b3cbc54c23..335ef63cbc

[Qemu-devel] [RESEND PATCH 4/9] hw/misc: QOM'ify slavio_misc.c

2017-02-05 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/misc/slavio_misc.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/hw/misc/slavio_misc.c b/hw/misc/slavio_

[Qemu-devel] [RESEND PATCH 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 1)

2017-02-05 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/m48t59.c | 35 ++- 1 file chang

[Qemu-devel] [RESEND PATCH 7/9] hw/timer: QOM'ify slavio_timer

2017-02-05 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/slavio_timer.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff

[Qemu-devel] [RESEND PATCH 9/9] hw/sparc64: QOM'ify sun4u.c

2017-02-05 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/sparc64/sun4u.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/s

[Qemu-devel] [RESEND PATCH 6/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2017-02-05 Thread xiaoqiang zhao
assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/m48t59.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index 39e4

[Qemu-devel] [RESEND PATCH 0/9] QOM'ify work for sparc

2017-02-05 Thread xiaoqiang zhao
Rebased on the latest master. This patch set aims for QOM'ifying code relate with sparc. It is part of my QOM'ify work of qemu code base. xiaoqiang zhao (9): hw/misc: QOM'ify eccmemctl.c hw/dma: QOM'ify sparc32_dma.c hw/dma: QOM'ify sun4m_iommu.c hw/misc: QOM'ify slavio_misc.c hw/timer

[Qemu-devel] [RESEND PATCH 1/9] hw/misc: QOM'ify eccmemctl.c

2017-02-05 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/misc/eccmemctl.c | 25 - 1 file changed, 16 insertions

[Qemu-devel] [RESEND PATCH 8/9] hw/sparc: QOM'ify sun4m.c

2017-02-05 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/sparc/sun4m.c | 54 +++--- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v2] hw/display: QOM'ify g364fb.c

2017-01-05 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/display/g364fb.c | 40 +--- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/hw/display/g364fb.

[Qemu-devel] [PATCH v2 3/4] hw/ppc: QOM'ify ppce500_spin.c

2017-01-05 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/ppc/ppce500_spin.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c index cf958a9e00..9585

[Qemu-devel] [PATCH v2 1/4] hw/gpio: QOM'ify mpc8xxx.c

2017-01-05 Thread xiaoqiang zhao
* Drop the old SysBus init function and use instance_init * Change mpc8xxx_gpio_reset to a DeviceClass::reset function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/gpio/mpc8xxx.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/h

[Qemu-devel] [PATCH v2 0/4] QOM'ify work for ppc

2017-01-05 Thread xiaoqiang zhao
This is some QOM'ify work relate with ppc. See each commit message for details. changes in v2: remove empty function 'spapr_vio_bridge_init' xiaoqiang zhao (4): hw/gpio: QOM'ify mpc8xxx.c hw/ppc: QOM'ify e500.c hw/ppc: QOM'ify ppce500_spin.c hw/ppc: QOM'ify spapr_vio.c hw/gpio

[Qemu-devel] [PATCH v2 4/4] hw/ppc: QOM'ify spapr_vio.c

2017-01-05 Thread xiaoqiang zhao
Drop the old and empty SysBus init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/ppc/spapr_vio.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index cc1e09c568..8bfc5f971f 100644 --- a/hw/ppc/spapr_vio.c +++ b/

[Qemu-devel] [PATCH v2 2/4] hw/ppc: QOM'ify e500.c

2017-01-05 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/ppc/e500.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index cf8b122afe..792bd79d39 100644 --- a/hw/pp

[Qemu-devel] [PATCH 1/4] hw/gpio: QOM'ify mpc8xxx.c

2016-12-30 Thread xiaoqiang zhao
* Drop the old SysBus init function and use instance_init * Change mpc8xxx_gpio_reset to a DeviceClass::reset function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/gpio/mpc8xxx.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/h

[Qemu-devel] [PATCH 3/4] hw/ppc: QOM'ify ppce500_spin.c

2016-12-30 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/ppc/ppce500_spin.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c index cf958a9e00..9585

[Qemu-devel] [PATCH 0/4] QOM'ify work for ppc

2016-12-30 Thread xiaoqiang zhao
This is some QOM'ify work relate with ppc. See each commit message for details. xiaoqiang zhao (4): hw/gpio: QOM'ify mpc8xxx.c hw/ppc: QOM'ify e500.c hw/ppc: QOM'ify ppce500_spin.c hw/ppc: QOM'ify spapr_vio.c hw/gpio/mpc8xxx.c | 20 +++- hw/ppc/e500.c | 17

[Qemu-devel] [PATCH 4/4] hw/ppc: QOM'ify spapr_vio.c

2016-12-30 Thread xiaoqiang zhao
Drop the old and empty SysBus init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/ppc/spapr_vio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index cc1e09c568..1739b73a13 100644 --- a/hw/ppc/spapr_vio.c +++ b/hw/ppc/spapr

[Qemu-devel] [PATCH 1/5] hw/misc: QOM'ify milkymist-hpdmc.c

2016-12-30 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/misc/milkymist-hpdmc.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/misc/milkymist-hpdmc.c b/hw/misc/milkymist-hpdmc.c index e614

[Qemu-devel] [PATCH 2/4] hw/ppc: QOM'ify e500.c

2016-12-30 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/ppc/e500.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index cf8b122afe..792bd79d39 100644 --- a/hw/pp

[Qemu-devel] [PATCH 0/2] QOM'ify work for char devices

2016-12-30 Thread xiaoqiang zhao
This patch set finish QOM'ify work of char devices. See each commit message for details. xiaoqiang zhao (2): hw/char: QOM'ify exynos4210_uart.c hw/char: QOM'ify grlib_apbuart.c hw/char/exynos4210_uart.c | 16 ++-- hw/char/grlib_apbuart.c | 26 +++--- 2

[Qemu-devel] [PATCH 3/5] hw/sd: QOM'ify milkymist-memcard.c

2016-12-30 Thread xiaoqiang zhao
split the old SysBus init function into an instance_init and Device realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/sd/milkymist-memcard.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/sd/milkymist-memcard.c b

[Qemu-devel] [PATCH 2/2] hw/audio: QOM'ify pl041.c

2016-12-30 Thread xiaoqiang zhao
split the old SysBus init function into an instance_init and Device realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/audio/pl041.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c

[Qemu-devel] [PATCH 2/5] hw/misc: QOM'ify milkymist-pfpu.c

2016-12-30 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/misc/milkymist-pfpu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c index 3ca2

[Qemu-devel] [PATCH 5/5] hw/input: QOM'ify milkymist-softusb.c

2016-12-30 Thread xiaoqiang zhao
split the old SysBus init function into an instance_init and Device realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/input/milkymist-softusb.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/input/milkymist-softusb.

[Qemu-devel] [PATCH 2/2] hw/char: QOM'ify grlib_apbuart.c

2016-12-30 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/char/grlib_apbuart.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/hw/char/grlib_apbuart.c b/h

[Qemu-devel] [PATCH 0/2] QOM'ify audio devices code

2016-12-30 Thread xiaoqiang zhao
This patch set QOM'ify code about audio devices. See each commit message for deatils. xiaoqiang zhao (2): hw/audio: QOM'ify marvell_88w8618.c hw/audio: QOM'ify pl041.c hw/audio/marvell_88w8618.c | 18 +++--- hw/audio/pl041.c | 25 ++--- 2 files

[Qemu-devel] [PATCH 4/5] hw/net: QOM'ify milkymist-minimac2.c

2016-12-30 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/net/milkymist-minimac2.c | 21 - 1 file changed, 12 insertions

[Qemu-devel] [PATCH 0/5] QOM'ify work for milkymist

2016-12-30 Thread xiaoqiang zhao
This patch series continues QOM'ify work for milkymist. See each commit message for details. xiaoqiang zhao (5): hw/misc: QOM'ify milkymist-hpdmc.c hw/misc: QOM'ify milkymist-pfpu.c hw/sd: QOM'ify milkymist-memcard.c hw/net: QOM'ify milkymist-minimac2.c hw/input: QOM'ify milkymist

[Qemu-devel] [PATCH 1/2] hw/char: QOM'ify exynos4210_uart.c

2016-12-30 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/char/exynos4210_uart.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/char/exynos4210_uart.c b/h

[Qemu-devel] [PATCH 1/2] hw/audio: QOM'ify marvell_88w8618.c

2016-12-30 Thread xiaoqiang zhao
split the old SysBus init function into an instance_init and Device realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/audio/marvell_88w8618.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/audio/marvell_88w8618.c b/hw

[Qemu-devel] [PATCH] hw/display: QOM'ify g364fb.c

2016-12-25 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/display/g364fb.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c

[Qemu-devel] [PATCH 4/4] hw/display: QOM'ify pl110.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/display/pl110.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/display/pl110.c b/hw/display/pl110.c index c069c0b..e

[Qemu-devel] [PATCH 2/4] hw/arm: QOM'ify pxa2xx_gpio.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/arm/pxa2xx_gpio.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/arm/pxa2xx_gpio.c b/hw/arm/pxa2xx_

[Qemu-devel] [PATCH 1/4] hw/arm: QOM'ify musicpal.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/arm/musicpal.c | 88 --- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/hw/arm/musi

[Qemu-devel] [PATCH 3/4] hw/arm: QOM'ify strongarm.c

2016-10-23 Thread xiaoqiang zhao
Drop the old Sysbus init and use instance_init and DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/arm/strongarm.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/arm/strongarm.c b/hw/arm/strongarm.c index 0

[Qemu-devel] [PATCH 0/4] QOM'ify work for arm

2016-10-23 Thread xiaoqiang zhao
Here is my QOM'ify work relate with arm. See each commit for details. xiaoqiang zhao (4): hw/arm: QOM'ify musicpal.c hw/arm: QOM'ify pxa2xx_gpio.c hw/arm: QOM'ify strongarm.c hw/display: QOM'ify pl110.c hw/arm/musicpal.c| 88 +++- hw

[Qemu-devel] [PATCH 0/2] QOM'ify work for etraxfs

2016-10-23 Thread xiaoqiang zhao
This is some QOM'ify work relate with etraxfs. See each commit for details. xiaoqiang zhao (2): hw/timer: QOM'ify etraxfs_timer hw/net: QOM'ify etraxfs_eth.c hw/net/etraxfs_eth.c | 34 +++--- hw/timer/etraxfs_timer.c | 18 +- 2 files changed

[Qemu-devel] [PATCH 2/2] hw/net: QOM'ify etraxfs_eth.c

2016-10-23 Thread xiaoqiang zhao
* Split the old SysBus init into an instance_init and a DeviceClass::realize function * Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/net/etraxfs_eth.c | 34 +++--- 1 file changed, 19 inse

[Qemu-devel] [PATCH 1/2] hw/timer: QOM'ify etraxfs_timer

2016-10-23 Thread xiaoqiang zhao
assign etraxfs_timer_init to etraxfs_timer_info.instance_init and drop the SysBusDeviceClass::init Reviewed-by: Edgar E. Iglesias <edgar.igles...@xilinx.com> Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/etraxfs_timer.c | 18 +- 1 file changed,

[Qemu-devel] [PATCH 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 1)

2016-10-23 Thread xiaoqiang zhao
* split the old SysBus init function into an instance_init and a Device realize function * use DeviceClass::realize instead of SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/m48t59.c | 35 ++- 1 file chang

[Qemu-devel] [PATCH 7/9] hw/timer: QOM'ify slavio_timer

2016-10-23 Thread xiaoqiang zhao
rename slavio_timer_init1 to slavio_timer_init and assign it to slavio_timer_info.instance_init, then we drop the SysBusDeviceClass::init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/slavio_timer.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff

[Qemu-devel] [PATCH 4/9] hw/misc: QOM'ify slavio_misc.c

2016-10-23 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/misc/slavio_misc.c | 43 +-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/hw/misc/slavio_misc.c b/hw/misc/slavio_

[Qemu-devel] [PATCH 2/9] hw/dma: QOM'ify sparc32_dma.c

2016-10-23 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init and an realize function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/dma/sparc32_dma.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32

[Qemu-devel] [PATCH 9/9] hw/sparc64: QOM'ify sun4u.c

2016-10-23 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/sparc64/sun4u.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/s

[Qemu-devel] [PATCH 3/9] hw/dma: QOM'ify sun4m_iommu.c

2016-10-23 Thread xiaoqiang zhao
Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/dma/sun4m_iommu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/dma/sun4m_iommu.c b/hw/dma/sun4m_iommu.c index b3cbc54..335ef63 100644 --

[Qemu-devel] [PATCH 6/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)

2016-10-23 Thread xiaoqiang zhao
assign DeviceClass::vmsd instead of using vmstate_register function Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/timer/m48t59.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index 3

[Qemu-devel] [PATCH 8/9] hw/sparc: QOM'ify sun4m.c

2016-10-23 Thread xiaoqiang zhao
Drop the old SysBusDeviceClass::init and use instance_init or DeviceClass::realize instead Signed-off-by: xiaoqiang zhao <zxq_yx_...@163.com> --- hw/sparc/sun4m.c | 54 +++--- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/hw

  1   2   3   4   >