Message ID | 20190215174548.2630-1-yury-kotov@yandex-team.ru (mailing list archive) |
---|---|
Headers | show |
Series | Add ignore-external migration capability | expand |
Patchew URL: https://patchew.org/QEMU/20190215174548.2630-1-yury-kotov@yandex-team.ru/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190215174548.2630-1-yury-kotov@yandex-team.ru Subject: [Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability Type: series === TEST SCRIPT BEGIN === #!/bin/bash git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 5f9e90967e migration: Add capabilities validation fad48088a8 tests/migration-test: Add a test for ignore-shared capability 68347ad2eb migration: Add an ability to ignore shared RAM blocks e3d2fd0298 migration: Introduce ignore-shared capability 73d9e23937 exec: Change RAMBlockIterFunc definition === OUTPUT BEGIN === 1/5 Checking commit 73d9e23937e9 (exec: Change RAMBlockIterFunc definition) 2/5 Checking commit e3d2fd0298a4 (migration: Introduce ignore-shared capability) 3/5 Checking commit 68347ad2eb24 (migration: Add an ability to ignore shared RAM blocks) ERROR: Macros with multiple statements should be enclosed in a do - while loop #146: FILE: migration/ram.c:169: +#define RAMBLOCK_FOREACH_NOT_IGNORED(block) \ + INTERNAL_RAMBLOCK_FOREACH(block) \ + if (ramblock_is_ignored(block)) {} else ERROR: trailing statements should be on next line #148: FILE: migration/ram.c:171: + if (ramblock_is_ignored(block)) {} else total: 2 errors, 0 warnings, 386 lines checked Patch 3/5 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 4/5 Checking commit fad48088a805 (tests/migration-test: Add a test for ignore-shared capability) 5/5 Checking commit 5f9e90967e69 (migration: Add capabilities validation) === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20190215174548.2630-1-yury-kotov@yandex-team.ru/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
Patchew URL: https://patchew.org/QEMU/20190215174548.2630-1-yury-kotov@yandex-team.ru/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190215174548.2630-1-yury-kotov@yandex-team.ru Subject: [Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability Type: series === TEST SCRIPT BEGIN === #!/bin/bash git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20190215174548.2630-1-yury-kotov@yandex-team.ru -> patchew/20190215174548.2630-1-yury-kotov@yandex-team.ru * [new tag] patchew/20190215174659.4007-1-v.maffione@gmail.com -> patchew/20190215174659.4007-1-v.maffione@gmail.com Submodule 'capstone' (https://git.qemu.org/git/capstone.git) registered for path 'capstone' Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc' Submodule 'roms/QemuMacDrivers' (https://git.qemu.org/git/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers' Submodule 'roms/SLOF' (https://git.qemu.org/git/SLOF.git) registered for path 'roms/SLOF' Submodule 'roms/ipxe' (https://git.qemu.org/git/ipxe.git) registered for path 'roms/ipxe' Submodule 'roms/openbios' (https://git.qemu.org/git/openbios.git) registered for path 'roms/openbios' Submodule 'roms/openhackware' (https://git.qemu.org/git/openhackware.git) registered for path 'roms/openhackware' Submodule 'roms/qemu-palcode' (https://git.qemu.org/git/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (https://git.qemu.org/git/seabios.git/) registered for path 'roms/seabios' Submodule 'roms/seabios-hppa' (https://github.com/hdeller/seabios-hppa.git) registered for path 'roms/seabios-hppa' Submodule 'roms/sgabios' (https://git.qemu.org/git/sgabios.git) registered for path 'roms/sgabios' Submodule 'roms/skiboot' (https://git.qemu.org/git/skiboot.git) registered for path 'roms/skiboot' Submodule 'roms/u-boot' (https://git.qemu.org/git/u-boot.git) registered for path 'roms/u-boot' Submodule 'roms/u-boot-sam460ex' (https://git.qemu.org/git/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex' Submodule 'tests/fp/berkeley-softfloat-3' (https://github.com/cota/berkeley-softfloat-3) registered for path 'tests/fp/berkeley-softfloat-3' Submodule 'tests/fp/berkeley-testfloat-3' (https://github.com/cota/berkeley-testfloat-3) registered for path 'tests/fp/berkeley-testfloat-3' Submodule 'ui/keycodemapdb' (https://git.qemu.org/git/keycodemapdb.git) registered for path 'ui/keycodemapdb' Cloning into 'capstone'... Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf' Cloning into 'dtc'... Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536' Cloning into 'roms/QemuMacDrivers'... Submodule path 'roms/QemuMacDrivers': checked out '90c488d5f4a407342247b9ea869df1c2d9c8e266' Cloning into 'roms/SLOF'... Submodule path 'roms/SLOF': checked out 'a5b428e1c1eae703bdd62a3f527223c291ee3fdc' Cloning into 'roms/ipxe'... Submodule path 'roms/ipxe': checked out 'de4565cbe76ea9f7913a01f331be3ee901bb6e17' Cloning into 'roms/openbios'... Submodule path 'roms/openbios': checked out '3464681b2b5983df80086a40179d324102347da3' Cloning into 'roms/openhackware'... Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5' Cloning into 'roms/qemu-palcode'... Submodule path 'roms/qemu-palcode': checked out '51c237d7e20d05100eacadee2f61abc17e6bc097' Cloning into 'roms/seabios'... Submodule path 'roms/seabios': checked out 'a698c8995ffb2838296ec284fe3c4ad33dfca307' Cloning into 'roms/seabios-hppa'... Submodule path 'roms/seabios-hppa': checked out '1ef99a01572c2581c30e16e6fe69e9ea2ef92ce0' Cloning into 'roms/sgabios'... Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a' Cloning into 'roms/skiboot'... Submodule path 'roms/skiboot': checked out 'e0ee24c27a172bcf482f6f2bc905e6211c134bcc' Cloning into 'roms/u-boot'... Submodule path 'roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943' Cloning into 'roms/u-boot-sam460ex'... Submodule path 'roms/u-boot-sam460ex': checked out '60b3916f33e617a815973c5a6df77055b2e3a588' Cloning into 'tests/fp/berkeley-softfloat-3'... Submodule path 'tests/fp/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037' Cloning into 'tests/fp/berkeley-testfloat-3'... Submodule path 'tests/fp/berkeley-testfloat-3': checked out '5a59dcec19327396a011a17fd924aed4fec416b3' Cloning into 'ui/keycodemapdb'... Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce' Switched to a new branch 'test' 5f9e909 migration: Add capabilities validation fad4808 tests/migration-test: Add a test for ignore-shared capability 68347ad migration: Add an ability to ignore shared RAM blocks e3d2fd0 migration: Introduce ignore-shared capability 73d9e23 exec: Change RAMBlockIterFunc definition === OUTPUT BEGIN === 1/5 Checking commit 73d9e23937e9 (exec: Change RAMBlockIterFunc definition) 2/5 Checking commit e3d2fd0298a4 (migration: Introduce ignore-shared capability) 3/5 Checking commit 68347ad2eb24 (migration: Add an ability to ignore shared RAM blocks) ERROR: Macros with multiple statements should be enclosed in a do - while loop #146: FILE: migration/ram.c:169: +#define RAMBLOCK_FOREACH_NOT_IGNORED(block) \ + INTERNAL_RAMBLOCK_FOREACH(block) \ + if (ramblock_is_ignored(block)) {} else ERROR: trailing statements should be on next line #148: FILE: migration/ram.c:171: + if (ramblock_is_ignored(block)) {} else total: 2 errors, 0 warnings, 386 lines checked Patch 3/5 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 4/5 Checking commit fad48088a805 (tests/migration-test: Add a test for ignore-shared capability) 5/5 Checking commit 5f9e90967e69 (migration: Add capabilities validation) === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20190215174548.2630-1-yury-kotov@yandex-team.ru/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
* Yury Kotov (yury-kotov@yandex-team.ru) wrote: > Hi, > > The series adds a migration capability, which allows to skip shared RAM blocks > during the migration. It's useful for fast local migration. E.g. to update QEMU > for the running guests. Other than the title of this cover letter being out of date, I think we're about OK! Dave > Usage example: > 1. Start source VM: > qemu-system-x86 \ > -m 4G \ > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ > -numa node,memdev=mem0 \ > -qmp unix:/tmp/qemu-qmp-1.sock,server,nowait \ > > 2. Start target VM: > qemu-system-x86 \ > -m 4G \ > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ > -numa node,memdev=mem0 \ > -qmp unix:/tmp/qemu-qmp-2.sock,server,nowait \ > -incoming defer > > 3. Enable ignore-shared capability on both VMs: > { "execute": "migrate-set-capabilities" , "arguments": > { "capabilities": [ { "capability": "x-ignore-shared", "state": true } ] } } > > 4. Start migration. > > Another use case I keep in mind is to migrate to file. Usage is very similar. > > V2 to V3: > * Split "migration: Introduce ignore-shared capability" > * Serialize the capabilities as strings rather than as indexes > * Don't allow to enable postcopy and ignore-shared together > * Skip the test for OSs which don't have /dev/shm > * Add a check whether shared RAM has been really skipped > > V1 to V2: > * Keep migration stream compatibility > * Reuse the existing code to ignore unwanted RAMBlocks > * Add capability validation feature > * ignore-external -> ignore-shared > > Regards, > Yury > > Yury Kotov (5): > exec: Change RAMBlockIterFunc definition > migration: Introduce ignore-shared capability > migration: Add an ability to ignore shared RAM blocks > tests/migration-test: Add a test for ignore-shared capability > migration: Add capabilities validation > > exec.c | 38 +++++------ > include/exec/cpu-common.h | 7 +- > migration/migration.c | 14 ++++ > migration/migration.h | 5 +- > migration/postcopy-ram.c | 48 +++++++------ > migration/ram.c | 110 ++++++++++++++++++++++-------- > migration/rdma.c | 9 ++- > migration/savevm.c | 137 ++++++++++++++++++++++++++++++++++++++ > qapi/migration.json | 5 +- > stubs/ram-block.c | 15 +++++ > tests/migration-test.c | 131 +++++++++++++++++++++++++++++------- > util/vfio-helpers.c | 6 +- > 12 files changed, 420 insertions(+), 105 deletions(-) > > -- > 2.20.1 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
* no-reply@patchew.org (no-reply@patchew.org) wrote: > Patchew URL: https://patchew.org/QEMU/20190215174548.2630-1-yury-kotov@yandex-team.ru/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Message-id: 20190215174548.2630-1-yury-kotov@yandex-team.ru > Subject: [Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability > Type: series > > === TEST SCRIPT BEGIN === > #!/bin/bash > git config --local diff.renamelimit 0 > git config --local diff.renames True > git config --local diff.algorithm histogram > ./scripts/checkpatch.pl --mailback base.. > === TEST SCRIPT END === > > Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 > Switched to a new branch 'test' > 5f9e90967e migration: Add capabilities validation > fad48088a8 tests/migration-test: Add a test for ignore-shared capability > 68347ad2eb migration: Add an ability to ignore shared RAM blocks > e3d2fd0298 migration: Introduce ignore-shared capability > 73d9e23937 exec: Change RAMBlockIterFunc definition > > === OUTPUT BEGIN === > 1/5 Checking commit 73d9e23937e9 (exec: Change RAMBlockIterFunc definition) > 2/5 Checking commit e3d2fd0298a4 (migration: Introduce ignore-shared capability) > 3/5 Checking commit 68347ad2eb24 (migration: Add an ability to ignore shared RAM blocks) > ERROR: Macros with multiple statements should be enclosed in a do - while loop > #146: FILE: migration/ram.c:169: > +#define RAMBLOCK_FOREACH_NOT_IGNORED(block) \ > + INTERNAL_RAMBLOCK_FOREACH(block) \ > + if (ramblock_is_ignored(block)) {} else This is OK, it's just a copy of the existing macro we have for the loop > ERROR: trailing statements should be on next line > #148: FILE: migration/ram.c:171: > + if (ramblock_is_ignored(block)) {} else > > total: 2 errors, 0 warnings, 386 lines checked > > Patch 3/5 has style problems, please review. If any of these errors > are false positives report them to the maintainer, see > CHECKPATCH in MAINTAINERS. > > 4/5 Checking commit fad48088a805 (tests/migration-test: Add a test for ignore-shared capability) > 5/5 Checking commit 5f9e90967e69 (migration: Add capabilities validation) > === OUTPUT END === > > Test command exited with code: 1 > > > The full log is available at > http://patchew.org/logs/20190215174548.2630-1-yury-kotov@yandex-team.ru/testing.checkpatch/?type=message. > --- > Email generated automatically by Patchew [http://patchew.org/]. > Please send your feedback to patchew-devel@redhat.com -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
Patchew URL: https://patchew.org/QEMU/20190215174548.2630-1-yury-kotov@yandex-team.ru/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190215174548.2630-1-yury-kotov@yandex-team.ru Subject: [Qemu-devel] [PATCH v3 0/5] Add ignore-external migration capability Type: series === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 74b71b6821 migration: Add capabilities validation 6d93a8d489 tests/migration-test: Add a test for ignore-shared capability 49c2e3db2c migration: Add an ability to ignore shared RAM blocks 96e230b463 migration: Introduce ignore-shared capability c56095df53 exec: Change RAMBlockIterFunc definition === OUTPUT BEGIN === 1/5 Checking commit c56095df53b1 (exec: Change RAMBlockIterFunc definition) 2/5 Checking commit 96e230b46352 (migration: Introduce ignore-shared capability) 3/5 Checking commit 49c2e3db2cab (migration: Add an ability to ignore shared RAM blocks) ERROR: Macros with multiple statements should be enclosed in a do - while loop #147: FILE: migration/ram.c:169: +#define RAMBLOCK_FOREACH_NOT_IGNORED(block) \ + INTERNAL_RAMBLOCK_FOREACH(block) \ + if (ramblock_is_ignored(block)) {} else ERROR: trailing statements should be on next line #149: FILE: migration/ram.c:171: + if (ramblock_is_ignored(block)) {} else total: 2 errors, 0 warnings, 386 lines checked Patch 3/5 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 4/5 Checking commit 6d93a8d48994 (tests/migration-test: Add a test for ignore-shared capability) 5/5 Checking commit 74b71b6821b2 (migration: Add capabilities validation) === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20190215174548.2630-1-yury-kotov@yandex-team.ru/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
* Yury Kotov (yury-kotov@yandex-team.ru) wrote: > Hi, > > The series adds a migration capability, which allows to skip shared RAM blocks > during the migration. It's useful for fast local migration. E.g. to update QEMU > for the running guests. Queued > > Usage example: > 1. Start source VM: > qemu-system-x86 \ > -m 4G \ > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ > -numa node,memdev=mem0 \ > -qmp unix:/tmp/qemu-qmp-1.sock,server,nowait \ > > 2. Start target VM: > qemu-system-x86 \ > -m 4G \ > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ > -numa node,memdev=mem0 \ > -qmp unix:/tmp/qemu-qmp-2.sock,server,nowait \ > -incoming defer > > 3. Enable ignore-shared capability on both VMs: > { "execute": "migrate-set-capabilities" , "arguments": > { "capabilities": [ { "capability": "x-ignore-shared", "state": true } ] } } > > 4. Start migration. > > Another use case I keep in mind is to migrate to file. Usage is very similar. > > V2 to V3: > * Split "migration: Introduce ignore-shared capability" > * Serialize the capabilities as strings rather than as indexes > * Don't allow to enable postcopy and ignore-shared together > * Skip the test for OSs which don't have /dev/shm > * Add a check whether shared RAM has been really skipped > > V1 to V2: > * Keep migration stream compatibility > * Reuse the existing code to ignore unwanted RAMBlocks > * Add capability validation feature > * ignore-external -> ignore-shared > > Regards, > Yury > > Yury Kotov (5): > exec: Change RAMBlockIterFunc definition > migration: Introduce ignore-shared capability > migration: Add an ability to ignore shared RAM blocks > tests/migration-test: Add a test for ignore-shared capability > migration: Add capabilities validation > > exec.c | 38 +++++------ > include/exec/cpu-common.h | 7 +- > migration/migration.c | 14 ++++ > migration/migration.h | 5 +- > migration/postcopy-ram.c | 48 +++++++------ > migration/ram.c | 110 ++++++++++++++++++++++-------- > migration/rdma.c | 9 ++- > migration/savevm.c | 137 ++++++++++++++++++++++++++++++++++++++ > qapi/migration.json | 5 +- > stubs/ram-block.c | 15 +++++ > tests/migration-test.c | 131 +++++++++++++++++++++++++++++------- > util/vfio-helpers.c | 6 +- > 12 files changed, 420 insertions(+), 105 deletions(-) > > -- > 2.20.1 > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
* Dr. David Alan Gilbert (dgilbert@redhat.com) wrote: > * Yury Kotov (yury-kotov@yandex-team.ru) wrote: > > Hi, > > > > The series adds a migration capability, which allows to skip shared RAM blocks > > during the migration. It's useful for fast local migration. E.g. to update QEMU > > for the running guests. > > Queued Hi Yury, The test is failing badly on aarch64 tcg for me (i.e. aarch64 tcg on x86); I'm going to keep it merged but keep the test disabled for now. Can you have a look to see if you can see what's going wrong? Dave > > > > Usage example: > > 1. Start source VM: > > qemu-system-x86 \ > > -m 4G \ > > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ > > -numa node,memdev=mem0 \ > > -qmp unix:/tmp/qemu-qmp-1.sock,server,nowait \ > > > > 2. Start target VM: > > qemu-system-x86 \ > > -m 4G \ > > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ > > -numa node,memdev=mem0 \ > > -qmp unix:/tmp/qemu-qmp-2.sock,server,nowait \ > > -incoming defer > > > > 3. Enable ignore-shared capability on both VMs: > > { "execute": "migrate-set-capabilities" , "arguments": > > { "capabilities": [ { "capability": "x-ignore-shared", "state": true } ] } } > > > > 4. Start migration. > > > > Another use case I keep in mind is to migrate to file. Usage is very similar. > > > > V2 to V3: > > * Split "migration: Introduce ignore-shared capability" > > * Serialize the capabilities as strings rather than as indexes > > * Don't allow to enable postcopy and ignore-shared together > > * Skip the test for OSs which don't have /dev/shm > > * Add a check whether shared RAM has been really skipped > > > > V1 to V2: > > * Keep migration stream compatibility > > * Reuse the existing code to ignore unwanted RAMBlocks > > * Add capability validation feature > > * ignore-external -> ignore-shared > > > > Regards, > > Yury > > > > Yury Kotov (5): > > exec: Change RAMBlockIterFunc definition > > migration: Introduce ignore-shared capability > > migration: Add an ability to ignore shared RAM blocks > > tests/migration-test: Add a test for ignore-shared capability > > migration: Add capabilities validation > > > > exec.c | 38 +++++------ > > include/exec/cpu-common.h | 7 +- > > migration/migration.c | 14 ++++ > > migration/migration.h | 5 +- > > migration/postcopy-ram.c | 48 +++++++------ > > migration/ram.c | 110 ++++++++++++++++++++++-------- > > migration/rdma.c | 9 ++- > > migration/savevm.c | 137 ++++++++++++++++++++++++++++++++++++++ > > qapi/migration.json | 5 +- > > stubs/ram-block.c | 15 +++++ > > tests/migration-test.c | 131 +++++++++++++++++++++++++++++------- > > util/vfio-helpers.c | 6 +- > > 12 files changed, 420 insertions(+), 105 deletions(-) > > > > -- > > 2.20.1 > > > > > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
05.03.2019, 21:06, "Dr. David Alan Gilbert" <dgilbert@redhat.com>: > * Dr. David Alan Gilbert (dgilbert@redhat.com) wrote: >> * Yury Kotov (yury-kotov@yandex-team.ru) wrote: >> > Hi, >> > >> > The series adds a migration capability, which allows to skip shared RAM blocks >> > during the migration. It's useful for fast local migration. E.g. to update QEMU >> > for the running guests. >> >> Queued > > Hi Yury, > The test is failing badly on aarch64 tcg for me (i.e. aarch64 tcg on > x86); I'm going to keep it merged but keep the test disabled for now. > Can you have a look to see if you can see what's going wrong? > > Dave > Hi, Yes, of course. I'll look at this. Regards, Yury >> > >> > Usage example: >> > 1. Start source VM: >> > qemu-system-x86 \ >> > -m 4G \ >> > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ >> > -numa node,memdev=mem0 \ >> > -qmp unix:/tmp/qemu-qmp-1.sock,server,nowait \ >> > >> > 2. Start target VM: >> > qemu-system-x86 \ >> > -m 4G \ >> > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ >> > -numa node,memdev=mem0 \ >> > -qmp unix:/tmp/qemu-qmp-2.sock,server,nowait \ >> > -incoming defer >> > >> > 3. Enable ignore-shared capability on both VMs: >> > { "execute": "migrate-set-capabilities" , "arguments": >> > { "capabilities": [ { "capability": "x-ignore-shared", "state": true } ] } } >> > >> > 4. Start migration. >> > >> > Another use case I keep in mind is to migrate to file. Usage is very similar. >> > >> > V2 to V3: >> > * Split "migration: Introduce ignore-shared capability" >> > * Serialize the capabilities as strings rather than as indexes >> > * Don't allow to enable postcopy and ignore-shared together >> > * Skip the test for OSs which don't have /dev/shm >> > * Add a check whether shared RAM has been really skipped >> > >> > V1 to V2: >> > * Keep migration stream compatibility >> > * Reuse the existing code to ignore unwanted RAMBlocks >> > * Add capability validation feature >> > * ignore-external -> ignore-shared >> > >> > Regards, >> > Yury >> > >> > Yury Kotov (5): >> > exec: Change RAMBlockIterFunc definition >> > migration: Introduce ignore-shared capability >> > migration: Add an ability to ignore shared RAM blocks >> > tests/migration-test: Add a test for ignore-shared capability >> > migration: Add capabilities validation >> > >> > exec.c | 38 +++++------ >> > include/exec/cpu-common.h | 7 +- >> > migration/migration.c | 14 ++++ >> > migration/migration.h | 5 +- >> > migration/postcopy-ram.c | 48 +++++++------ >> > migration/ram.c | 110 ++++++++++++++++++++++-------- >> > migration/rdma.c | 9 ++- >> > migration/savevm.c | 137 ++++++++++++++++++++++++++++++++++++++ >> > qapi/migration.json | 5 +- >> > stubs/ram-block.c | 15 +++++ >> > tests/migration-test.c | 131 +++++++++++++++++++++++++++++------- >> > util/vfio-helpers.c | 6 +- >> > 12 files changed, 420 insertions(+), 105 deletions(-) >> > >> > -- >> > 2.20.1 >> > >> > >> -- >> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
Hi, I've sent a mail about this problem: [RFC PATCH] QEMU may write to system_memory before guest starts Regards, Yury 06.03.2019, 13:47, "Yury Kotov" <yury-kotov@yandex-team.ru>: > 05.03.2019, 21:06, "Dr. David Alan Gilbert" <dgilbert@redhat.com>: >> * Dr. David Alan Gilbert (dgilbert@redhat.com) wrote: >>> * Yury Kotov (yury-kotov@yandex-team.ru) wrote: >>> > Hi, >>> > >>> > The series adds a migration capability, which allows to skip shared RAM blocks >>> > during the migration. It's useful for fast local migration. E.g. to update QEMU >>> > for the running guests. >>> >>> Queued >> >> Hi Yury, >> The test is failing badly on aarch64 tcg for me (i.e. aarch64 tcg on >> x86); I'm going to keep it merged but keep the test disabled for now. >> Can you have a look to see if you can see what's going wrong? >> >> Dave > > Hi, > > Yes, of course. I'll look at this. > > Regards, > Yury > >>> > >>> > Usage example: >>> > 1. Start source VM: >>> > qemu-system-x86 \ >>> > -m 4G \ >>> > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ >>> > -numa node,memdev=mem0 \ >>> > -qmp unix:/tmp/qemu-qmp-1.sock,server,nowait \ >>> > >>> > 2. Start target VM: >>> > qemu-system-x86 \ >>> > -m 4G \ >>> > -object memory-backend-file,id=mem0,size=4G,share=on,mem-path=/dev/shm/mem0 \ >>> > -numa node,memdev=mem0 \ >>> > -qmp unix:/tmp/qemu-qmp-2.sock,server,nowait \ >>> > -incoming defer >>> > >>> > 3. Enable ignore-shared capability on both VMs: >>> > { "execute": "migrate-set-capabilities" , "arguments": >>> > { "capabilities": [ { "capability": "x-ignore-shared", "state": true } ] } } >>> > >>> > 4. Start migration. >>> > >>> > Another use case I keep in mind is to migrate to file. Usage is very similar. >>> > >>> > V2 to V3: >>> > * Split "migration: Introduce ignore-shared capability" >>> > * Serialize the capabilities as strings rather than as indexes >>> > * Don't allow to enable postcopy and ignore-shared together >>> > * Skip the test for OSs which don't have /dev/shm >>> > * Add a check whether shared RAM has been really skipped >>> > >>> > V1 to V2: >>> > * Keep migration stream compatibility >>> > * Reuse the existing code to ignore unwanted RAMBlocks >>> > * Add capability validation feature >>> > * ignore-external -> ignore-shared >>> > >>> > Regards, >>> > Yury >>> > >>> > Yury Kotov (5): >>> > exec: Change RAMBlockIterFunc definition >>> > migration: Introduce ignore-shared capability >>> > migration: Add an ability to ignore shared RAM blocks >>> > tests/migration-test: Add a test for ignore-shared capability >>> > migration: Add capabilities validation >>> > >>> > exec.c | 38 +++++------ >>> > include/exec/cpu-common.h | 7 +- >>> > migration/migration.c | 14 ++++ >>> > migration/migration.h | 5 +- >>> > migration/postcopy-ram.c | 48 +++++++------ >>> > migration/ram.c | 110 ++++++++++++++++++++++-------- >>> > migration/rdma.c | 9 ++- >>> > migration/savevm.c | 137 ++++++++++++++++++++++++++++++++++++++ >>> > qapi/migration.json | 5 +- >>> > stubs/ram-block.c | 15 +++++ >>> > tests/migration-test.c | 131 +++++++++++++++++++++++++++++------- >>> > util/vfio-helpers.c | 6 +- >>> > 12 files changed, 420 insertions(+), 105 deletions(-) >>> > >>> > -- >>> > 2.20.1 >>> > >>> > >>> -- >>> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK >> -- >> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK