Re: [PATCH 0/2] use helper when using abstract QOM parent functions

2020-06-17 Thread maozy
Hi, On 10/14/19 5:12 PM, Auger Eric wrote: Hi, On 10/12/19 11:43 AM, Mao Zhongyi wrote: Philippe introduced a series of helpers to make the device class_init() easier to understand when a device class change the parent hooks, some devices in the source tree missed helper, so convert it. Cc:

Re: [PATCH 9/9] migration/ram: calculate un/encoded_size only whenneeded.

2020-06-11 Thread maozy
On 6/12/20 3:05 AM, Dr. David Alan Gilbert wrote: * Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: Signed-off-by: Mao Zhongyi --- migration/ram.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

Re: [PATCH v2] migration: use "" instead of (null) for tls-authz

2020-03-30 Thread maozy
Hi Markus, On 3/30/20 3:18 PM, Markus Armbruster wrote: "Dr. David Alan Gilbert" writes: * Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: run: (qemu) info migrate_parameters announce-initial: 50 ms ... announce-max: 550 ms multifd-compression: none xbzrle-cache-size: 4194304

Re: [PATCH v2] monitor/hmp-cmds: add units for migrate_parameters.

2020-03-27 Thread maozy
On 3/28/20 2:02 AM, Dr. David Alan Gilbert wrote: * Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: When running: (qemu) info migrate_parameters announce-initial: 50 ms announce-max: 550 ms announce-step: 100 ms compress-wait-thread: on ... max-bandwidth: 33554432 bytes/second

Re: [PATCH] migration: fix bad indentation in error_report()

2020-03-27 Thread maozy
On 3/27/20 7:41 PM, Dr. David Alan Gilbert wrote: * Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: bad indentation conflicts with CODING_STYLE doc. Signed-off-by: Mao Zhongyi --- migration/migration.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-)

Re: [PATCH] monitor/hmp-cmds: add units for mirate_parameters.

2020-03-27 Thread maozy
On 3/27/20 9:21 PM, Dr. David Alan Gilbert wrote: * Stefano Garzarella (sgarz...@redhat.com) wrote: On Fri, Mar 27, 2020 at 11:28:14AM +, Dr. David Alan Gilbert wrote: * Stefano Garzarella (sgarz...@redhat.com) wrote: Hi Mao, On Fri, Mar 27, 2020 at 03:32:10PM +0800, Mao Zhongyi

Re: [PATCH] monitor/hmp-cmds: fix bad indentation in 'info migrate_parameters' cmd output

2020-03-21 Thread maozy
On 3/21/20 3:14 PM, Markus Armbruster wrote: "Dr. David Alan Gilbert" writes: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, Mar 20, 2020 at 05:31:17PM +, Dr. David Alan Gilbert wrote: (Rearranging the text a bit) * Markus Armbruster (arm...@redhat.com) wrote: David

Re: [Qemu-devel] [PATCH] pci_bridge: fix a typo in comment

2019-10-22 Thread maozy
ping... On 11/8/18 9:12 PM, Philippe Mathieu-Daudé wrote: Cc'ing qemu-trivial@ On 8/11/18 13:21, Mao Zhongyi wrote: Signed-off-by: Mao Zhongyi Reviewed-by: Philippe Mathieu-Daudé ---   hw/pci/pci_bridge.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v4 0/3] some fix in tests/migration

2019-10-22 Thread maozy
Hi, patch2 has been merged into the master by Laurent Vivier. patch3 is still not reviewed. So ping... Thanks, Mao On 10/5/19 1:32 AM, Mao Zhongyi wrote: This patchset mainly fixes memory leak, typo and return value of stress function in stress test. v4-v3: p1: - remove redundant g_malloc

Re: [PATCH v1 5/5] contrib/gitdm: add China Mobile to the domain map

2019-10-14 Thread maozy
On 10/14/19 9:59 PM, Alex Bennée wrote: We've had a number of contributions from this domain. I think they are from the company rather than customers using the email address but it's hard for me to tell. Please confirm. Acked-by: Mao Zhongyi Signed-off-by: Alex Bennée Cc: Mao Zhongyi

Re: [PATCH v1 5/5] contrib/gitdm: add China Mobile to the domain map

2019-10-14 Thread maozy
Hi, Alex On 10/14/19 9:59 PM, Alex Bennée wrote: We've had a number of contributions from this domain. I think they are from the company rather than customers using the email address but it's hard for me to tell. Please confirm. Yes, this domain comes from a china company, not an individual,

Re: _[PATCH_v2_3/3]_tests/migration:fix_unreachable_path_in_stress_test

2019-10-03 Thread maozy
On 10/3/19 5:23 PM, Laurent Vivier wrote: Le 03/10/2019 à 09:17, maozy a écrit : Hi,  Laurent On 10/1/19 11:46 PM, Laurent Vivier wrote: Le 11/09/2019 à 05:31, Mao Zhongyi a écrit : if stress function always return 0, the path 'if (stress(ramsizeGB, ncpus) < 0)' is nerver unreachable,

Re: _[PATCH_v2_3/3]_tests/migration:fix_unreachable_path_in_stress_test

2019-10-03 Thread maozy
Hi,  Laurent On 10/1/19 11:46 PM, Laurent Vivier wrote: Le 11/09/2019 à 05:31, Mao Zhongyi a écrit : if stress function always return 0, the path 'if (stress(ramsizeGB, ncpus) < 0)' is nerver unreachable, so fix it to allow the test failed. Cc: arm...@redhat.com Cc: laur...@vivier.eu Cc:

Re: [PATCH v2 1/3] tests/migration: mem leak fix

2019-10-02 Thread maozy
On 10/1/19 11:31 PM, Laurent Vivier wrote: Le 11/09/2019 à 05:31, Mao Zhongyi a écrit : ‘data’ has the possibility of memory leaks, so use the glic macros g_autofree recommended by CODING_STYLE.rst to automatically release the memory that returned from g_malloc(). Cc: arm...@redhat.com Cc:

Re: [PATCH v2 3/3] tests/migration:fix unreachable path in stress test

2019-10-01 Thread maozy
ping... On 9/11/19 11:31 AM, Mao Zhongyi wrote: if stress function always return 0, the path 'if (stress(ramsizeGB, ncpus) < 0)' is nerver unreachable, so fix it to allow the test failed. Cc: arm...@redhat.com Cc: laur...@vivier.eu Cc: tony.ngu...@bt.com Signed-off-by: Mao Zhongyi ---

Re: [Qemu-devel] [PATCH 1/3] tests/migration: mem leak fix

2019-09-10 Thread maozy
On 9/11/19 2:52 AM, Alex Bennée wrote: Mao Zhongyi writes: Cc: arm...@redhat.com Cc: laur...@vivier.eu Cc: tony.ngu...@bt.com Signed-off-by: Mao Zhongyi --- tests/migration/stress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/migration/stress.c

Re: [Qemu-devel] [PATCH] riscv/cpu: use device_class_set_parent_realize

2018-11-27 Thread maozy
Hi, Palmer On 11/28/18 8:34 AM, Palmer Dabbelt wrote: On Mon, 26 Nov 2018 01:06:33 PST (-0800), Bastian Koppelmann wrote: On 11/26/18 4:20 AM, Mao Zhongyi wrote: Signed-off-by: Mao Zhongyi ---   target/riscv/cpu.c | 4 ++--   1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by:

Re: [Qemu-devel] [PATCH v2 15/21] pci-bridge/dec: Convert sysbus initfunction to realize function

2018-11-24 Thread maozy
Hi, Philippe On 11/24/18 12:37 AM, Philippe Mathieu-Daudé wrote: Hi Mao, On 23/11/18 16:30, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in pci_dec_21154_device_class_init(). Cc: da...@gibson.dropbear.id.au Cc: m...@redhat.com Cc: marcel.apfelb...@gmail.com Cc:

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-24 Thread maozy
On 11/24/18 2:19 AM, Peter Maydell wrote: On Fri, 23 Nov 2018 at 18:16, Eduardo Habkost wrote: I think this is good enough for now (as long as there's a comment like Peter suggested). Allowing parent_realize to be NULL would be inconvenient to all code that uses parent_realize today. It

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-23 Thread maozy
On 11/23/18 5:02 PM, Peter Maydell wrote: On 23 November 2018 at 03:10, maozy wrote: In order to void the subclasses whose parent_realize field is set to NULL, the k->realize function must be retained even though it doesn't do anything practical. Just like this: -/* TODO remove once

Re: [Qemu-devel] [PATCH 06/22] dma/puv3_dma: Convert sysbus initfunction to realize function

2018-11-22 Thread maozy
On 11/20/18 10:46 PM, Peter Maydell wrote: On 19 November 2018 at 12:08, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in puv3_dma_class_init(). Cc: g...@mprc.pku.edu.cn Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju --- hw/dma/puv3_dma.c | 10 --

Re: [Qemu-devel] [PATCH 22/22] core/sysbus: remove the SysBusDeviceClass::initpath

2018-11-22 Thread maozy
Hi, Eduardo On 11/20/18 7:31 AM, Eduardo Habkost wrote: On Mon, Nov 19, 2018 at 08:08:20PM +0800, Mao Zhongyi wrote: Currently, all sysbus devices have been converted to realize(), so remove this path. Cc: ehabk...@redhat.com Cc: th...@redhat.com Cc: pbonz...@redhat.com Cc: arm...@redhat.com

Re: [Qemu-devel] [PATCH 07/22] gpio/puv3_gpio: Convert sysbus initfunction to realize function

2018-11-19 Thread maozy
On 11/19/18 10:31 PM, Peter Maydell wrote: On 19 November 2018 at 12:08, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in puv3_gpio_class_init(). Cc: g...@mprc.pku.edu.cn Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju --- hw/gpio/puv3_gpio.c | 28

Re: [Qemu-devel] [qemu-s390x] [PATCH 21/22] event-facility: ChangeSysBusDeviceClass *sbdc to SysBusDeviceClass *sbc

2018-11-19 Thread maozy
On 11/19/18 10:10 PM, Thomas Huth wrote: On 2018-11-19 13:25, Cornelia Huck wrote: On Mon, 19 Nov 2018 20:08:19 +0800 Mao Zhongyi wrote: Most of the SysBusDeviceClass variables are named sbc, and sbdc here is a bit weird, so changing sbdc to keep it consistent with others might look good.

Re: [Qemu-devel] [PATCH v2 2/3] qemu-iotests: remove unused variablehere

2018-10-25 Thread maozy
Hi, Philippe On 10/25/18 7:26 AM, Philippe Mathieu-Daudé wrote: Hi Mao, On 24/10/18 11:40, Mao Zhongyi wrote: run git grep '\$here' tests/qemu-iotests This command doesn't look correct, I believe you have to use either - git grep '$here' or - git grep \$here Yeah, it should be '$here'

Re: [Qemu-devel] [PATCH] qemu-iotests: convert `pwd` and $(pwd) to $PWD

2018-10-24 Thread maozy
Hi, Eric On 10/23/18 4:21 PM, Eric Blake wrote: On 10/22/18 2:48 PM, Mao Zhongyi wrote: The subject line says "what", but the commit body should say "why".  My suggestion: POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX. 

Re: [Qemu-devel] [PATCH v3 2/2] po/Makefile: Modern shell scripting (use $()instead of ``)

2018-10-22 Thread maozy
On 10/22/18 6:59 PM, Thomas Huth wrote: On 2018-10-22 09:48, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: phi...@redhat.com Cc: peter.mayd...@linaro.org Cc: th...@redhat.com Cc:

Re: [Qemu-devel] [PATCH v3 0/3] use object link instead of qdev property

2018-10-22 Thread maozy
Hi, Gerd On 10/19/18 4:04 PM, Gerd Hoffmann wrote: On Mon, Oct 15, 2018 at 11:26:39AM +0800, Mao Zhongyi wrote: According to qdev-properties.h, properties of pointer type should be avoid, so convert qdev property to link, Whilst we are here, also update some hardcoded strings with already

Re: [Qemu-devel] [PATCH v2 1/3] qemu-iotests: Modern shellscripting(use $() instead of ``)

2018-10-18 Thread maozy
Hi, Eric On 10/18/18 11:28 AM, Eric Blake wrote: On 10/17/18 10:17 PM, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. `pwd` and `basename $0` are in 231 files under directory tests/qemu-iotests, so

Re: [Qemu-devel] [PATCH 3/3] po/Makefile: Modern shell scripting (use $() insteadof ``)

2018-10-17 Thread maozy
On 10/17/18 5:54 PM, Thomas Huth wrote: On 2018-10-17 11:44, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); It would be nice to convert to using $() everywhere. Cc: phi...@redhat.com Cc: peter.mayd...@linaro.org Cc: th...@redhat.com Cc:

Re: [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shellscripting (use $() instead of ``)

2018-10-16 Thread maozy
Hi, Eric On 10/15/18 11:44 PM, Eric Blake wrote: On 10/15/18 1:51 AM, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); use of `` is only required when using /bin/sh on Solaris. It would be nice to convert to using $() everywhere, or at least in all bash

Re: [Qemu-devel] [PATCH 1/3] archive-source.sh: Modern shellscripting (use $() instead of ``)

2018-10-15 Thread maozy
On 10/15/18 3:07 PM, Thomas Huth wrote: On 2018-10-15 08:51, Mao Zhongyi wrote: Various shell files contain a mix between obsolete `` and modern $(); use of `` is only required when using /bin/sh on Solaris. It would be nice to convert to using $() everywhere, or at least in all bash

Re: [Qemu-devel] [PATCH v2 2/3] audio: use object link instead ofqdevproperty to pass wm8750 reference

2018-10-14 Thread maozy
Hi, Philippe On 10/13/18 2:40 AM, Philippe Mathieu-Daudé wrote: Hi Mao, On 12/10/2018 14:30, Philippe Mathieu-Daudé wrote: Cc'ing Eduardo and Thomas. On 12/10/2018 13:51, maozy wrote: Hi, Philippe On 10/12/18 5:53 PM, Philippe Mathieu-Daudé wrote: Hi Mao, On 12/10/2018 10:30, Mao Zhongyi

Re: [Qemu-devel] [PATCH v2 2/3] audio: use object link instead ofqdev property to pass wm8750 reference

2018-10-12 Thread maozy
Hi, Philippe On 10/12/18 5:53 PM, Philippe Mathieu-Daudé wrote: Hi Mao, On 12/10/2018 10:30, Mao Zhongyi wrote: According to qdev-properties.h, properties of pointer type should be avoided, it seems a link type property is a good substitution. Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd

Re: [Qemu-devel] [PATCH v2 1/3] audio: use TYPE_WM8750 instead of ahardcoded string

2018-10-12 Thread maozy
Hi, Philippe On 10/12/18 5:50 PM, Philippe Mathieu-Daudé wrote: On 12/10/2018 10:30, Mao Zhongyi wrote: Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann To: qemu-...@nongnu.org "To: qemu-...@nongnu.org" is probably not relevant in the commit message. The Linux kernel describes the

Re: [Qemu-devel] [PATCH v2 3/3] audio: use TYPE_MV88W8618_AUDIO instead of hardcoded string

2018-10-12 Thread maozy
Sorry for the noise, there is something wrong with this patch, I will fix it and resend this patchset. Thanks, Mao On 10/12/18 4:30 PM, Mao Zhongyi wrote: Cc: Jan Kiszka Cc: Philippe Mathieu-Daudé Cc: Peter Maydell To: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi --- hw/arm/musicpal.c

Re: [Qemu-devel] [PATCH 4/4] audio: use existing macros istead ofhardcoded strings

2018-10-11 Thread maozy
On 10/11/18 7:05 PM, Peter Maydell wrote: On 11 October 2018 at 11:45, Philippe Mathieu-Daudé wrote: On 11/10/2018 11:00, Mao Zhongyi wrote: Cc: Jan Kiszka Cc: Peter Maydell Cc: Gerd Hoffmann To: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi --- hw/arm/musicpal.c | 16

Re: [Qemu-devel] [PATCH 1/4] wm8750: remove duplicate macro

2018-10-11 Thread maozy
On 10/11/18 6:39 PM, Philippe Mathieu-Daudé wrote: Hi Mao, On 11/10/2018 11:00, Mao Zhongyi wrote: The header file wm8750.h contains '#define TYPE_WM8750 "wm8750"' macro, but '#define CODEC "wm8750"' macro is redefined in wm8750.c, just remove the local CODEC macro and replace it with