Re: [PATCH 4/4] qobject: braces {} are necessary for all arms of this statement

2020-12-28 Thread Philippe Mathieu-Daudé
On 12/28/20 8:11 AM, Zhang Han wrote: > Add braces {} for arms of if/for statement > > Signed-off-by: Zhang Han > --- > qobject/qdict.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v13 5/7] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-12-28 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c

[PATCH v14 5/7] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-12-28 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c

[PATCH v14 7/7] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-12-28 Thread Lukas Straub
A connecting chardev object has an additional reference by the connecting thread, so if the chardev is still connecting by the end of the test, then the chardev object won't be freed. This in turn means that the yank instance won't be unregistered and when running the next test-case

Re: [PATCH 0/2] bsd-user, FreeBSD update

2020-12-28 Thread Warner Losh
Yes. I've picked 4 changes to make sure that I've got the size and groupings of patches right for this project. I've heard nothing back on them, so I'll try again after the first of the year. I'd thought about just removing it all and pushing up the current state, but I think even that might be

[Question] VNC CA certificate update live

2020-12-28 Thread zihao chang
Hi all:The VNC of QEMU suppots TLS encryption. The client & server can use arbitrary certificates from CA certificates the running VM loaded(user can use new certificates immediately), but if the CA certificate is changed to a new one,the running VM still use the old CA. Is it reasonable to

[PATCH v14 3/7] chardev/char-socket.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index

Re: [PATCH v12 1/7] Introduce yank feature

2020-12-28 Thread Lukas Straub
On Tue, 22 Dec 2020 12:00:29 +0400 Marc-André Lureau wrote: > On Sun, Dec 13, 2020 at 3:48 PM Lukas Straub wrote: > > > The yank feature allows to recover from hanging qemu by "yanking" > > at various parts. Other qemu systems can register themselves and > > multiple yank functions. Then all

[PATCH v13 7/7] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-12-28 Thread Lukas Straub
A connecting chardev object has an additional reference by the connecting thread, so if the chardev is still connecting by the end of the test, then the chardev object won't be freed. This in turn means that the yank instance won't be unregistered and when running the next test-case

[PATCH v14 6/7] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-12-28 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4

[PATCH v13 1/7] Introduce yank feature

2020-12-28 Thread Lukas Straub
The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register themselves and multiple yank functions. Then all yank functions for selected instances can be called by the 'yank' out-of-band qmp command. Available instances can be queried by a

[PATCH v13 6/7] io: Document qmp oob suitability of qio_channel_shutdown and io_shutdown

2020-12-28 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe and can be called from qmp oob handler. Document this after checking the code. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé --- include/io/channel.h | 5 - 1 file changed, 4

[PATCH v14 4/7] migration: Add yank feature

2020-12-28 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 22 ++ migration/multifd.c | 10

Re: [PATCH 1/4] qobject: open brace '{' following struct go on the same line

2020-12-28 Thread Philippe Mathieu-Daudé
On 12/28/20 8:11 AM, Zhang Han wrote: > Put open brace '{' on the same line of struct. > > Signed-off-by: Zhang Han > --- > qobject/json-parser.c | 3 +-- > qobject/qjson.c | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 1/3] spapr_pci: Fix memory leak of vmstate_spapr_pci

2020-12-28 Thread Michael S. Tsirkin
On Mon, Dec 28, 2020 at 05:00:51PM +0800, g00517791 wrote: > From: Jinhao Gao > > When VM migrate VMState of spapr_pci, the field(msi_devs) of spapr_pci > having a flag of VMS_ALLOC need to allocate memory. If the src doesn't free > memory of msi_devs in SaveStateEntry of spapr_pci after

[PATCH] meson: fix ncurses detection on macOS

2020-12-28 Thread Chris Hofstaedtler
Without this, meson fails with "curses package not usable" when using ncurses 6.2. Apparently the wide functions (addwstr, etc) are hidden behind the extra define, and meson does not define it at that detection stage. Signed-off-by: Chris Hofstaedtler --- meson.build | 2 +- 1 file changed, 1

[PATCH] meson: fix Cocoa option in summary

2020-12-28 Thread Chris Hofstaedtler
From: Chris Hofstaedtler Regression introduced in f9332757898. Signed-off-by: Chris Hofstaedtler --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e864cdd155..9c152a85bd 100644 --- a/meson.build +++ b/meson.build @@ -2112,7

Re: [PATCH v2 03/10] vt82c686b: Rename VT82C686B to VT82C686B_ISA

2020-12-28 Thread Philippe Mathieu-Daudé
On 12/28/20 3:08 AM, BALATON Zoltan via wrote: > This is really the ISA bridge part so name the type accordingly. > > Signed-off-by: BALATON Zoltan > --- > hw/isa/vt82c686.c | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 2/3] savevm: Fix memory leak of vmstate_configuration

2020-12-28 Thread Michael S. Tsirkin
On Mon, Dec 28, 2020 at 05:00:52PM +0800, g00517791 wrote: > From: Jinhao Gao > > When VM migrate VMState of configuration, the fields(name and capabilities) > of configuration having a flag of VMS_ALLOC need to allocate memory. If the > src doesn't free memory of capabilities in SaveState after

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread Jiaxun Yang
在 2020/12/28 上午6:13, BALATON Zoltan 写道: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulating

[PATCH v13 2/7] block/nbd.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/nbd.c | 153 +++-

[PATCH v13 3/7] chardev/char-socket.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index

[PATCH v13 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-12-28 Thread Lukas Straub
Hello Everyone, So here is v13. Changes: v13: -Address Marc-André Lureau comments: -make yank_register_instance return bool -rename yank_compare_instances to yank_instance_equal -remove breaks -use g_str_equal instead of strcmp -use g_new0 instead of g_slice_new -use

[PATCH v14 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-12-28 Thread Lukas Straub
Hello Everyone, So here is v14. Changes: v14: -fix checkpatch.pl warning v13: -Address Marc-André Lureau comments: -make yank_register_instance return bool -rename yank_compare_instances to yank_instance_equal -remove breaks -use g_str_equal instead of strcmp -use g_new0 instead of

Re: [PATCH 0/2] bsd-user, FreeBSD update

2020-12-28 Thread Warner Losh
On Mon, Dec 28, 2020 at 1:15 AM David CARLIER wrote: > From 10b13162949debdbbd8394bc1047511d1a900176 Mon Sep 17 00:00:00 2001 > From: David Carlier > Date: Mon, 28 Dec 2020 08:10:43 + > Subject: [PATCH 0/2] *** SUBJECT HERE *** > > bsd-user, FreeBSD update. > > David Carlier (2): >

Re: [PATCH 0/2] bsd-user, FreeBSD update

2020-12-28 Thread David CARLIER
Oh good to know I understand better why syscalls not updated for so long. To upstream I would suggest not to push straight all these changes in one shot and focus on FreeBSD at first, much less to review and so on. Regards. On Mon, 28 Dec 2020 at 16:21, Warner Losh wrote: > > > > On Mon, Dec

Re: [PATCH v2 10/10] vt82c686: Remove unneeded includes and defines

2020-12-28 Thread Philippe Mathieu-Daudé
On 12/28/20 3:08 AM, BALATON Zoltan via wrote: > These are not used or not needed. > > Signed-off-by: BALATON Zoltan > --- > v2: Added back a few that we get indirectly but keep it explicit > > hw/isa/vt82c686.c | 5 - > 1 file changed, 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v13 4/7] migration: Add yank feature

2020-12-28 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Acked-by: Dr. David Alan Gilbert --- migration/channel.c | 13 + migration/migration.c | 22 ++ migration/multifd.c | 10

[PATCH v14 1/7] Introduce yank feature

2020-12-28 Thread Lukas Straub
The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register themselves and multiple yank functions. Then all yank functions for selected instances can be called by the 'yank' out-of-band qmp command. Available instances can be queried by a

[PATCH v14 2/7] block/nbd.c: Add yank feature

2020-12-28 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- block/nbd.c | 153 +++-

Re: [PATCH] meson: fix ncurses detection on macOS

2020-12-28 Thread Philippe Mathieu-Daudé
On 12/28/20 4:16 PM, Chris Hofstaedtler wrote: > Without this, meson fails with "curses package not usable" > when using ncurses 6.2. Apparently the wide functions > (addwstr, etc) are hidden behind the extra define, and > meson does not define it at that detection stage. Seems reasonable, but

Re: [PATCH] meson: fix Cocoa option in summary

2020-12-28 Thread Philippe Mathieu-Daudé
Hi Chris, On 12/28/20 4:09 PM, Chris Hofstaedtler wrote: > From: Chris Hofstaedtler > > Regression introduced in f9332757898. Isn't it commit b4e312e953b? If so you could add: Fixes: b4e312e953b ("configure: move cocoa option to Meson") > Signed-off-by: Chris Hofstaedtler > --- >

[PATCH v3 1/2] ide: Make room for flags in PCIIDEState and add one for legacy mode

2020-12-28 Thread BALATON Zoltan via
We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for further flags if needed in the future. This patch changes the "secondary" field to "flags" and change CMD646 and its

Re: [PATCH] meson: fix ncurses detection on macOS

2020-12-28 Thread Samuel Thibault
Philippe Mathieu-Daudé, le lun. 28 déc. 2020 18:20:13 +0100, a ecrit: > On 12/28/20 4:16 PM, Chris Hofstaedtler wrote: > > Without this, meson fails with "curses package not usable" > > when using ncurses 6.2. Apparently the wide functions > > (addwstr, etc) are hidden behind the extra define, and

Re: Problems with irq mapping in qemu v5.2

2020-12-28 Thread Mark Cave-Ayland
On 24/12/2020 08:11, BALATON Zoltan via wrote: On Wed, 23 Dec 2020, Guenter Roeck wrote: On Thu, Dec 24, 2020 at 02:34:07AM +0100, BALATON Zoltan wrote: [ ... ] If we need legacy mode then we may be able to emulate that by setting BARs to legacy ports ignoring what values are written to them

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread Mark Cave-Ayland
On 27/12/2020 22:13, BALATON Zoltan via wrote: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only

Re: [PATCH v3] gitlab-ci.yml: Add openSUSE Leap 15.2 for gitlab CI/CD

2020-12-28 Thread Wainer dos Santos Moschetta
Hi, On 12/24/20 5:59 AM, Cho, Yu-Chen wrote: Add build-system-opensuse jobs and opensuse-leap.docker dockerfile. Use openSUSE Leap 15.2 container image in the gitlab-CI. Signed-off-by: Cho, Yu-Chen --- v3: Drop the "acceptance-system-opensuse" job part of the patch for now to get at least the

Re: [PATCH v2 1/2] ide: Make room for flags in PCIIDEState and add one for legacy mode

2020-12-28 Thread BALATON Zoltan via
On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: On 27/12/2020 22:13, BALATON Zoltan wrote: We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for further flags if needed

Re: Problems with irq mapping in qemu v5.2

2020-12-28 Thread BALATON Zoltan via
On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: On 24/12/2020 08:11, BALATON Zoltan via wrote: On Wed, 23 Dec 2020, Guenter Roeck wrote: On Thu, Dec 24, 2020 at 02:34:07AM +0100, BALATON Zoltan wrote: [ ... ] If we need legacy mode then we may be able to emulate that by setting BARs to

Question: How to change backing file ?

2020-12-28 Thread Kevin Nguetchouang
Hello everyone, in a class project, i would like to change the backing file of the current image opened with a particular path file. I try differents functions i saw in the source code - bdrv_change_backing_file - bdrv_open - bdrv_open_child but no one work... from segmentation fault error to

Re: [PATCH v2 1/2] ide: Make room for flags in PCIIDEState and add one for legacy mode

2020-12-28 Thread Mark Cave-Ayland
On 27/12/2020 22:13, BALATON Zoltan wrote: We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for further flags if needed in the future. This patch changes the

[Bug 1908551] Re: aarch64 SVE emulation breaks strnlen and strrchr

2020-12-28 Thread Richard Henderson
** Changed in: qemu Status: New => Confirmed ** Changed in: qemu Assignee: (unassigned) => Richard Henderson (rth) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1908551 Title: aarch64

Re: [PATCH] meson: fix ncurses detection on macOS

2020-12-28 Thread Yonggang Luo
On Mon, Dec 28, 2020 at 11:51 PM Chris Hofstaedtler wrote: > > Without this, meson fails with "curses package not usable" > when using ncurses 6.2. Apparently the wide functions > (addwstr, etc) are hidden behind the extra define, and > meson does not define it at that detection stage. > >

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread BALATON Zoltan via
On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: On 27/12/2020 22:13, BALATON Zoltan via wrote: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config)

[PATCH v3 0/2] Fix via-ide for fuloong2e

2020-12-28 Thread BALATON Zoltan via
v3 with review comments from Mark addressed BALATON Zoltan (1): ide: Make room for flags in PCIIDEState and add one for legacy mode Guenter Roeck (1): via-ide: Fix fuloong2e support hw/ide/cmd646.c | 6 +++--- hw/ide/via.c | 19 +-- hw/mips/fuloong2e.c | 4

[PATCH v3 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread BALATON Zoltan via
From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulating native mode did not turn out feasible. Add

RFC: Start-time Device Addition for BMC devices

2020-12-28 Thread Patrick Venture
Hi; Currently, devices for a BMC are specified in the board init method for that machine, see: - https://github.com/qemu/qemu/blob/b785d25e91718a660546a6550f64b3c543af7754/hw/arm/aspeed.c#L414 This requires listing all i2c devices, and setting some properties. QMP can be used to set the

[PATCH v3 6/7] fuzz: set bits in operand of write/out to zero

2020-12-28 Thread Qiuhao Li
Simplifying the crash cases by opportunistically setting bits in operands of out/write to zero may help to debug, since usually bit one means turn on or trigger a function while zero is the default turn-off setting. Tested Bug 1908062. Signed-off-by: Qiuhao Li ---

[PATCH v4 0/7] fuzz: improve crash case minimization

2020-12-28 Thread Qiuhao Li
Extend and refine the crash case minimization process. Test input: Bug 1909261 full_reproducer 6500 QTest instructions (write mostly) Refined (-M1 minimization level) vs. Original version: real 38m31.942s <-- real 532m57.192s user 28m18.188s <-- user 89m0.536s sys 12m42.239s

[PATCH v4 1/7] fuzz: accelerate non-crash detection

2020-12-28 Thread Qiuhao Li
We spend much time waiting for the timeout program during the minimization process until it passes a time limit. This patch hacks the CLOSED (indicates the redirection file closed) notification in QTest's output if it doesn't crash. Test with quadrupled trace input at:

[PATCH v4 2/7] fuzz: double the IOs to remove for every loop

2020-12-28 Thread Qiuhao Li
Instead of removing IO instructions one by one, we can try deleting multiple instructions at once. According to the locality of reference, we double the number of instructions to remove for the next round and recover it to one once we fail. This patch is usually significant for large input. Test

[PATCH v4 7/7] fuzz: heuristic split write based on past IOs

2020-12-28 Thread Qiuhao Li
If previous write commands write the same length of data with the same step, we view it as a hint. Signed-off-by: Qiuhao Li --- scripts/oss-fuzz/minimize_qtest_trace.py | 56 1 file changed, 56 insertions(+) diff --git a/scripts/oss-fuzz/minimize_qtest_trace.py

Re: Bug in Bonito? (mips/fuloong2e)

2020-12-28 Thread Jiaxun Yang
在 2020/12/29 上午11:26, BALATON Zoltan 写道: Hello, While continuing with part two of my vt82c686b clean ups I've tried to implement SMBus IO base configuration in the vt82c686b-pm part that I've already done for vt8231 for pegasos2 and it should be the same for 686B. (In short, writing address

Re: [PATCH] gdb: riscv: Add target description

2020-12-28 Thread Bin Meng
On Thu, Dec 24, 2020 at 1:09 AM Sylvain Pelissier wrote: > > Target description is not currently implemented in RISC-V architecture. Thus > GDB won't set it properly when attached. The patch implements the target > description response. > > Signed-off-by: Sylvain Pelissier > --- >

[PATCH v3 4/7] fuzz: loop the remove minimizer and refactoring

2020-12-28 Thread Qiuhao Li
Now we use a one-time scan and remove strategy in the remval minimizer, which is not suitable for timing dependent instructions. For example, instruction A will indicate an address where the config chunk locates, and instruction B will make the configuration active. If we have the following

[PATCH v3 7/7] fuzz: heuristic split write based on past IOs

2020-12-28 Thread Qiuhao Li
If previous write commands write the same length of data with the same step, we view it as a hint. Signed-off-by: Qiuhao Li --- scripts/oss-fuzz/minimize_qtest_trace.py | 55 1 file changed, 55 insertions(+) diff --git a/scripts/oss-fuzz/minimize_qtest_trace.py

[PATCH v3 0/7] fuzz: improve crash case minimization

2020-12-28 Thread Qiuhao Li
Extend and refine the crash case minimization process. Test input: Bug 1909261 full_reproducer 6500 QTest instructions (write mostly) Refined (-M1 minimization level) vs. Original version: real 38m31.942s <-- real 532m57.192s user 28m18.188s <-- user 89m0.536s sys 12m42.239s

[PATCH v3 3/7] fuzz: split write operand using binary approach

2020-12-28 Thread Qiuhao Li
Currently, we split the write commands' data from the middle. If it does not work, try to move the pivot left by one byte and retry until there is no space. But, this method has two flaws: 1. It may fail to trim all unnecessary bytes on the right side. For example, there is an IO write command:

[PATCH v3 5/7] fuzz: add minimization options

2020-12-28 Thread Qiuhao Li
-M1: loop around the remove minimizer -M2: try setting bits in operand of write/out to zero Signed-off-by: Qiuhao Li --- scripts/oss-fuzz/minimize_qtest_trace.py | 30 1 file changed, 25 insertions(+), 5 deletions(-) diff --git

Bug in Bonito? (mips/fuloong2e)

2020-12-28 Thread BALATON Zoltan via
Hello, While continuing with part two of my vt82c686b clean ups I've tried to implement SMBus IO base configuration in the vt82c686b-pm part that I've already done for vt8231 for pegasos2 and it should be the same for 686B. (In short, writing address to pm config 0x90 sets base address of

Re: [PATCH] RISC-V: Place DTB at 3GB boundary instead of 4GB

2020-12-28 Thread Bin Meng
Hi Atish, On Wed, Dec 23, 2020 at 9:20 AM Bin Meng wrote: > > Hi Atish, > > On Wed, Dec 23, 2020 at 3:59 AM Atish Patra wrote: > > > > On Tue, 2020-12-22 at 13:35 +0800, Bin Meng wrote: > > > Hi Atish, > > > > > > On Sat, Dec 19, 2020 at 3:46 AM Atish Patra > > > wrote: > > > > > > > > On Fri,

RE: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough

2020-12-28 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Monday, December 28, 2020 3:11 PM > To: Zhang, Chen ; qemu-dev de...@nongnu.org>; Eric Blake ; Dr. David Alan > Gilbert ; Markus Armbruster > Cc: Zhang Chen > Subject: Re: [PATCH 1/3] qapi/net: Add new QMP command for COLO > passthrough

[PATCH v3 2/7] fuzz: double the IOs to remove for every loop

2020-12-28 Thread Qiuhao Li
Instead of removing IO instructions one by one, we can try deleting multiple instructions at once. According to the locality of reference, we double the number of instructions to remove for the next round and recover it to one once we fail. This patch is usually significant for large input. Test

[PATCH v4 6/7] fuzz: add minimization options

2020-12-28 Thread Qiuhao Li
-M1: loop around the remove minimizer -M2: try setting bits in operand of write/out to zero Signed-off-by: Qiuhao Li --- scripts/oss-fuzz/minimize_qtest_trace.py | 32 +++- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/scripts/oss-fuzz/minimize_qtest_trace.py

[PATCH v4 5/7] fuzz: set bits in operand of write/out to zero

2020-12-28 Thread Qiuhao Li
Simplifying the crash cases by opportunistically setting bits in operands of out/write to zero may help to debug, since usually bit one means turn on or trigger a function while zero is the default turn-off setting. Tested Bug 1908062. Signed-off-by: Qiuhao Li ---

[PATCH v3 1/7] fuzz: accelerate non-crash detection

2020-12-28 Thread Qiuhao Li
We spend much time waiting for the timeout program during the minimization process until it passes a time limit. This patch hacks the CLOSED (indicates the redirection file closed) notification in QTest's output if it doesn't crash. Test with quadrupled trace input at:

[PATCH v4 3/7] fuzz: split write operand using binary approach

2020-12-28 Thread Qiuhao Li
Currently, we split the write commands' data from the middle. If it does not work, try to move the pivot left by one byte and retry until there is no space. But, this method has two flaws: 1. It may fail to trim all unnecessary bytes on the right side. For example, there is an IO write command:

[PATCH v4 4/7] fuzz: loop the remove minimizer and refactoring

2020-12-28 Thread Qiuhao Li
Now we use a one-time scan and remove strategy in the remval minimizer, which is not suitable for timing dependent instructions. For example, instruction A will indicate an address where the config chunk locates, and instruction B will make the configuration active. If we have the following

RE: [PATCH 4/8] spapr_pci: Fix memory leak of vmstate_spapr_pci

2020-12-28 Thread gaojinhao
Hi David, Firstly, thank you for you review. And then for your review, I worry that a memory leak will occur if QEMU exits after saves vmsd. So, we free it in post_save func. Jinhao Gao -Original Message- From: David Gibson [mailto:da...@gibson.dropbear.id.au] Sent: 2020-12-28 14:58

[PATCH 1/2] bsd-user, updating the FreeBSD's syscall list, based on the 11.x

2020-12-28 Thread David CARLIER
--- bsd-user/freebsd/syscall_nr.h | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/bsd-user/freebsd/syscall_nr.h b/bsd-user/freebsd/syscall_nr.h index d849024792..14d2465858 100644 --- a/bsd-user/freebsd/syscall_nr.h +++

Re: [PATCH 6/6] spapr: Model DR connectors as simple objects

2020-12-28 Thread David Gibson
On Fri, Dec 18, 2020 at 11:34:00AM +0100, Greg Kurz wrote: > Modeling DR connectors as individual devices raises some > concerns, as already discussed a year ago in this thread: > > https://patchew.org/QEMU/20191017205953.13122-1-chel...@linux.vnet.ibm.com/ > > First, high maxmem settings

RE: [PATCH 0/8] Fix memory leak of some device state in migration

2020-12-28 Thread gaojinhao
Thank you for you review. I will modify patches according to your opinion. Jinhao Gao -Original Message- From: Michael S. Tsirkin [mailto:m...@redhat.com] Sent: 2020年12月27日 21:20 To: gaojinhao Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; Marc-André Lureau ; Stefan Berger ; Jason

[PATCH 0/2] bsd-user, FreeBSD update

2020-12-28 Thread David CARLIER
>From 10b13162949debdbbd8394bc1047511d1a900176 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 28 Dec 2020 08:10:43 + Subject: [PATCH 0/2] *** SUBJECT HERE *** bsd-user, FreeBSD update. David Carlier (2): bsd-user, updating the FreeBSD's syscall list, based on the 11.x bsd-user,

[PATCH 2/2] bsd-user, Adding more strace support for a handful of syscalls.

2020-12-28 Thread David CARLIER
--- bsd-user/freebsd/strace.list | 12 1 file changed, 12 insertions(+) diff --git a/bsd-user/freebsd/strace.list b/bsd-user/freebsd/strace.list index 2800a2d4eb..136d2c42d7 100644 --- a/bsd-user/freebsd/strace.list +++ b/bsd-user/freebsd/strace.list @@ -38,6 +38,13 @@ {

Re: [PATCH 4/8] spapr_pci: Fix memory leak of vmstate_spapr_pci

2020-12-28 Thread David Gibson
On Mon, Dec 28, 2020 at 08:10:31AM +, gaojinhao wrote: > Hi David, > Firstly, thank you for you review. And then for your review, I worry > that a memory leak will occur if QEMU exits after saves vmsd. So, we > free it in post_save func. If qemu exits, all its memory will be freed, so we

[PATCH v2 0/3] Fix memory leak of some device state in migration

2020-12-28 Thread g00517791
From: Jinhao Gao For some device state having some fields of VMS_ALLOC flag, they don't free memory allocated for the fields in vmstate_save_state and vmstate_load_state. We add funcs or sentences of free memory before and after VM saves or loads device state to avoid memory leak. v2 - Drop

[PATCH v2 2/3] savevm: Fix memory leak of vmstate_configuration

2020-12-28 Thread g00517791
From: Jinhao Gao When VM migrate VMState of configuration, the fields(name and capabilities) of configuration having a flag of VMS_ALLOC need to allocate memory. If the src doesn't free memory of capabilities in SaveState after save VMState of configuration, or the dst doesn't free memory of

[PATCH v2 3/3] vmstate: Fix memory leak in vmstate_handle_alloc()

2020-12-28 Thread g00517791
From: Jinhao Gao Some memory allocated for fields having a flag of VMS_ALLOC in SaveState may not free before VM load vmsd in migration. So we pre-free memory before allocation in vmstate_handle_alloc() to avoid memleaks. Signed-off-by: Jinhao Gao Signed-off-by: Michael S. Tsirkin ---

[PATCH v2 1/3] spapr_pci: Fix memory leak of vmstate_spapr_pci

2020-12-28 Thread g00517791
From: Jinhao Gao When VM migrate VMState of spapr_pci, the field(msi_devs) of spapr_pci having a flag of VMS_ALLOC need to allocate memory. If the src doesn't free memory of msi_devs in SaveStateEntry of spapr_pci after QEMUFile save VMState of spapr_pci, it may result in memory leak of

Re: [RFC Qemu PATCH v2 1/2] spapr: drc: Add support for async hcalls at the drc level

2020-12-28 Thread David Gibson
On Mon, Dec 21, 2020 at 01:08:53PM +0100, Greg Kurz wrote: > Hi Shiva, > > On Mon, 30 Nov 2020 09:16:39 -0600 > Shivaprasad G Bhat wrote: > > > The patch adds support for async hcalls at the DRC level for the > > spapr devices. To be used by spapr-scm devices in the patch/es to follow. > > > >

RE: [PATCH 4/8] spapr_pci: Fix memory leak of vmstate_spapr_pci

2020-12-28 Thread gaojinhao
Thank you for you reply, I understand. Jinhao Gao -Original Message- From: David Gibson [mailto:da...@gibson.dropbear.id.au] Sent: 2020年12月28日 16:30 To: gaojinhao Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; Marc-André Lureau ; Stefan Berger ; Michael S . Tsirkin ; Jason Wang ;