From 764ecf77d03bb5fd42fac3d1042148da9130c552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=C4=9Fuz=20Ersen?= Date: Sun, 15 Aug 2021 22:22:18 +0300 Subject: [PATCH 01/11] po: update turkish translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: Signed-off-by: Oğuz Ersen Reviewed-by: Laurent Vivier [lv,pb: s/K_opyala/_Kopyala/;s/Se_kmeleri/_Sekmeleri/] Signed-off-by: Laurent Vivier --- po/tr.po | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/po/tr.po b/po/tr.po index 632c7f3851..f4f0425c43 100644 --- a/po/tr.po +++ b/po/tr.po @@ -1,14 +1,15 @@ # Turkish translation for QEMU. # This file is put in the public domain. # Ozan Çağlayan , 2013. +# Oğuz Ersen , 2021. # msgid "" msgstr "" "Project-Id-Version: QEMU 1.4.50\n" "Report-Msgid-Bugs-To: qemu-devel@nongnu.org\n" "POT-Creation-Date: 2018-07-18 07:56+0200\n" -"PO-Revision-Date: 2013-04-22 18:35+0300\n" -"Last-Translator: Ozan Çağlayan \n" +"PO-Revision-Date: 2021-08-15 22:17+0300\n" +"Last-Translator: Oğuz Ersen \n" "Language-Team: Türkçe <>\n" "Language: tr\n" "MIME-Version: 1.0\n" @@ -33,24 +34,22 @@ msgid "Power _Down" msgstr "_Kapat" msgid "_Quit" -msgstr "" +msgstr "_Çıkış" msgid "_Fullscreen" -msgstr "" +msgstr "_Tam Ekran" msgid "_Copy" -msgstr "" +msgstr "_Kopyala" -#, fuzzy msgid "Zoom _In" -msgstr "Yakınlaş ve Sığ_dır" +msgstr "_Yakınlaş" -#, fuzzy msgid "Zoom _Out" -msgstr "Yakınlaş ve Sığ_dır" +msgstr "_Uzaklaş" msgid "Best _Fit" -msgstr "" +msgstr "_En Uygun" msgid "Zoom To _Fit" msgstr "Yakınlaş ve Sığ_dır" @@ -62,13 +61,13 @@ msgid "_Grab Input" msgstr "Girdiyi _Yakala" msgid "Show _Tabs" -msgstr "Se_kmeleri Göster" +msgstr "_Sekmeleri Göster" msgid "Detach Tab" -msgstr "" +msgstr "Sekmeyi Ayır" msgid "Show Menubar" -msgstr "" +msgstr "Menü Çubuğunu Göster" msgid "_Machine" msgstr "_Makine" From ed899ac77d5c8b83797a001d33a1e57390181574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sat, 7 Aug 2021 13:09:38 +0200 Subject: [PATCH 02/11] disas/nios2: Fix style in print_insn_nios2() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We are going to modify this function, fix its style first. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth Message-Id: <20210807110939.95853-2-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- disas/nios2.c | 53 +++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/disas/nios2.c b/disas/nios2.c index c3e82140c7..d124902ae3 100644 --- a/disas/nios2.c +++ b/disas/nios2.c @@ -3482,38 +3482,37 @@ static int print_insn_nios2 (bfd_vma address, disassemble_info *info, enum bfd_endian endianness) { - bfd_byte buffer[INSNLEN]; - int status; + bfd_byte buffer[INSNLEN]; + int status; - status = (*info->read_memory_func) (address, buffer, INSNLEN, info); - if (status == 0) - { - unsigned long insn; - if (endianness == BFD_ENDIAN_BIG) - insn = (unsigned long) bfd_getb32 (buffer); - else - insn = (unsigned long) bfd_getl32 (buffer); - return nios2_disassemble (address, insn, info); + status = (*info->read_memory_func)(address, buffer, INSNLEN, info); + if (status == 0) { + unsigned long insn; + if (endianness == BFD_ENDIAN_BIG) { + insn = (unsigned long) bfd_getb32(buffer); + } else { + insn = (unsigned long) bfd_getl32(buffer); + } + return nios2_disassemble(address, insn, info); } - /* We might have a 16-bit R2 instruction at the end of memory. Try that. */ - if (info->mach == bfd_mach_nios2r2) - { - status = (*info->read_memory_func) (address, buffer, 2, info); - if (status == 0) - { - unsigned long insn; - if (endianness == BFD_ENDIAN_BIG) - insn = (unsigned long) bfd_getb16 (buffer); - else - insn = (unsigned long) bfd_getl16 (buffer); - return nios2_disassemble (address, insn, info); - } + /* We might have a 16-bit R2 instruction at the end of memory. Try that. */ + if (info->mach == bfd_mach_nios2r2) { + status = (*info->read_memory_func)(address, buffer, 2, info); + if (status == 0) { + unsigned long insn; + if (endianness == BFD_ENDIAN_BIG) { + insn = (unsigned long) bfd_getb16(buffer); + } else { + insn = (unsigned long) bfd_getl16(buffer); + } + return nios2_disassemble(address, insn, info); + } } - /* If we got here, we couldn't read anything. */ - (*info->memory_error_func) (status, address, info); - return -1; + /* If we got here, we couldn't read anything. */ + (*info->memory_error_func)(status, address, info); + return -1; } /* These two functions are the main entry points, accessed from From dcc99bd833840c6c4e909d391df17b71e47dea62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sat, 7 Aug 2021 13:09:39 +0200 Subject: [PATCH 03/11] disas/nios2: Simplify endianess conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit 12b6e9b27d4 ("disas: Clean up CPUDebug initialization") the disassemble_info->bfd_endian enum is set for all targets in target_disas(). We can directly call print_insn_nios2() and simplify. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth Message-Id: <20210807110939.95853-3-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- disas/nios2.c | 22 +++------------------- include/disas/dis-asm.h | 3 +-- target/nios2/cpu.c | 6 +----- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/disas/nios2.c b/disas/nios2.c index d124902ae3..98ac07d72e 100644 --- a/disas/nios2.c +++ b/disas/nios2.c @@ -3478,9 +3478,7 @@ nios2_disassemble (bfd_vma address, unsigned long opcode, instruction word at the address given, and prints the disassembled instruction on the stream info->stream using info->fprintf_func. */ -static int -print_insn_nios2 (bfd_vma address, disassemble_info *info, - enum bfd_endian endianness) +int print_insn_nios2(bfd_vma address, disassemble_info *info) { bfd_byte buffer[INSNLEN]; int status; @@ -3488,7 +3486,7 @@ print_insn_nios2 (bfd_vma address, disassemble_info *info, status = (*info->read_memory_func)(address, buffer, INSNLEN, info); if (status == 0) { unsigned long insn; - if (endianness == BFD_ENDIAN_BIG) { + if (info->endian == BFD_ENDIAN_BIG) { insn = (unsigned long) bfd_getb32(buffer); } else { insn = (unsigned long) bfd_getl32(buffer); @@ -3501,7 +3499,7 @@ print_insn_nios2 (bfd_vma address, disassemble_info *info, status = (*info->read_memory_func)(address, buffer, 2, info); if (status == 0) { unsigned long insn; - if (endianness == BFD_ENDIAN_BIG) { + if (info->endian == BFD_ENDIAN_BIG) { insn = (unsigned long) bfd_getb16(buffer); } else { insn = (unsigned long) bfd_getl16(buffer); @@ -3514,17 +3512,3 @@ print_insn_nios2 (bfd_vma address, disassemble_info *info, (*info->memory_error_func)(status, address, info); return -1; } - -/* These two functions are the main entry points, accessed from - disassemble.c. */ -int -print_insn_big_nios2 (bfd_vma address, disassemble_info *info) -{ - return print_insn_nios2 (address, info, BFD_ENDIAN_BIG); -} - -int -print_insn_little_nios2 (bfd_vma address, disassemble_info *info) -{ - return print_insn_nios2 (address, info, BFD_ENDIAN_LITTLE); -} diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h index 524f29196d..08e1beec85 100644 --- a/include/disas/dis-asm.h +++ b/include/disas/dis-asm.h @@ -455,8 +455,7 @@ int print_insn_crisv32 (bfd_vma, disassemble_info*); int print_insn_crisv10 (bfd_vma, disassemble_info*); int print_insn_microblaze (bfd_vma, disassemble_info*); int print_insn_ia64 (bfd_vma, disassemble_info*); -int print_insn_big_nios2 (bfd_vma, disassemble_info*); -int print_insn_little_nios2 (bfd_vma, disassemble_info*); +int print_insn_nios2(bfd_vma, disassemble_info*); int print_insn_xtensa (bfd_vma, disassemble_info*); int print_insn_riscv32 (bfd_vma, disassemble_info*); int print_insn_riscv64 (bfd_vma, disassemble_info*); diff --git a/target/nios2/cpu.c b/target/nios2/cpu.c index 947bb09bc1..58ecd27d75 100644 --- a/target/nios2/cpu.c +++ b/target/nios2/cpu.c @@ -147,11 +147,7 @@ static void nios2_cpu_disas_set_info(CPUState *cpu, disassemble_info *info) { /* NOTE: NiosII R2 is not supported yet. */ info->mach = bfd_arch_nios2; -#ifdef TARGET_WORDS_BIGENDIAN - info->print_insn = print_insn_big_nios2; -#else - info->print_insn = print_insn_little_nios2; -#endif + info->print_insn = print_insn_nios2; } static int nios2_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) From 3bc1bb80423b789cabedde2813630dd5092cb24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 7 Oct 2021 11:31:08 +0200 Subject: [PATCH 04/11] MAINTAINERS: Add myself as reviewer of 'Machine core' API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to help Eduardo and Marcel with the machine core API, add myself as reviewer. That will also help me to learn more about this subsystem :) Signed-off-by: Philippe Mathieu-Daudé Reviewed by: Marcel Apfelbaum Message-Id: <20211007093108.323223-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4e77d03651..894dc43105 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1617,6 +1617,7 @@ F: pc-bios/bios-microvm.bin Machine core M: Eduardo Habkost M: Marcel Apfelbaum +R: Philippe Mathieu-Daudé S: Supported F: cpu.c F: hw/core/cpu.c From f18d403f15b92ded56362703067eb67161cfe2a9 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Fri, 15 Oct 2021 11:29:44 +0200 Subject: [PATCH 05/11] softmmu/physmem.c: Fix typo in comment Fix the comment to match what the code is doing, as explained in the changelog of commit 86cf9e154632cb28d749db0ea47946fba8cf3f09 that introduced the change: Commit 9458a9a1df1a4c719e24512394d548c1fc7abd22 added synchronization of vCPU and migration operations through calling run_on_cpu operation. However, in replay mode this synchronization is unneeded, because I/O and vCPU threads are already synchronized. This patch disables such synchronization for record/replay mode. Signed-off-by: Greg Kurz Reviewed-by: David Hildenbrand Message-Id: <163429018454.1146856.3429437540871060739.stgit@bahia.huguette> Signed-off-by: Laurent Vivier --- softmmu/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index f67ad29981..555c907f67 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -2633,7 +2633,7 @@ static void tcg_log_global_after_sync(MemoryListener *listener) * In record/replay mode this causes a deadlock, because * run_on_cpu waits for rr mutex. Therefore no races are possible * in this case and no need for making run_on_cpu when - * record/replay is not enabled. + * record/replay is enabled. */ cpuas = container_of(listener, CPUAddressSpace, tcg_as_listener); run_on_cpu(cpuas->cpu, do_nothing, RUN_ON_CPU_NULL); From c4e4d0d92b37430b74be3e9dab6066d2f4b69a95 Mon Sep 17 00:00:00 2001 From: Tong Ho Date: Fri, 15 Oct 2021 13:35:30 -0700 Subject: [PATCH 06/11] hw/nvram: Fix Memory Leak in Xilinx eFuse QOM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tong Ho Reviewed-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211015203532.2463705-2-tong.ho@xilinx.com> Signed-off-by: Laurent Vivier --- hw/nvram/xlnx-efuse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c index ee1caab54c..a0fd77b586 100644 --- a/hw/nvram/xlnx-efuse.c +++ b/hw/nvram/xlnx-efuse.c @@ -144,10 +144,11 @@ static bool efuse_ro_bits_find(XlnxEFuse *s, uint32_t k) bool xlnx_efuse_set_bit(XlnxEFuse *s, unsigned int bit) { if (efuse_ro_bits_find(s, bit)) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + qemu_log_mask(LOG_GUEST_ERROR, "%s: WARN: " "Ignored setting of readonly efuse bit<%u,%u>!\n", - object_get_canonical_path(OBJECT(s)), - (bit / 32), (bit % 32)); + path, (bit / 32), (bit % 32)); return false; } @@ -202,9 +203,11 @@ static void efuse_realize(DeviceState *dev, Error **errp) efuse_ro_bits_sort(s); if ((s->efuse_size % 32) != 0) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + error_setg(errp, "%s.efuse-size: %u: property value not multiple of 32.", - object_get_canonical_path(OBJECT(dev)), s->efuse_size); + path, s->efuse_size); return; } From 512a63b2b00ee0e7bf99bda2d8e6ce807dfa32c2 Mon Sep 17 00:00:00 2001 From: Tong Ho Date: Fri, 15 Oct 2021 13:35:31 -0700 Subject: [PATCH 07/11] hw/nvram: Fix Memory Leak in Xilinx Versal eFuse device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tong Ho Reviewed-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211015203532.2463705-3-tong.ho@xilinx.com> Signed-off-by: Laurent Vivier --- hw/nvram/xlnx-versal-efuse-ctrl.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/nvram/xlnx-versal-efuse-ctrl.c b/hw/nvram/xlnx-versal-efuse-ctrl.c index d362376703..b35ba65ab5 100644 --- a/hw/nvram/xlnx-versal-efuse-ctrl.c +++ b/hw/nvram/xlnx-versal-efuse-ctrl.c @@ -439,9 +439,11 @@ static void efuse_pgm_addr_postw(RegisterInfo *reg, uint64_t val64) * up to guest to do so (or by reset). */ if (efuse_pgm_locked(s, bit)) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Denied setting of efuse<%u, %u, %u>\n", - object_get_canonical_path(OBJECT(s)), + path, FIELD_EX32(bit, EFUSE_PGM_ADDR, PAGE), FIELD_EX32(bit, EFUSE_PGM_ADDR, ROW), FIELD_EX32(bit, EFUSE_PGM_ADDR, COLUMN)); @@ -478,9 +480,11 @@ static void efuse_rd_addr_postw(RegisterInfo *reg, uint64_t val64) s->regs[R_EFUSE_RD_DATA] = xlnx_versal_efuse_read_row(s->efuse, bit, &denied); if (denied) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + qemu_log_mask(LOG_GUEST_ERROR, "%s: Denied reading of efuse<%u, %u>\n", - object_get_canonical_path(OBJECT(s)), + path, FIELD_EX32(bit, EFUSE_RD_ADDR, PAGE), FIELD_EX32(bit, EFUSE_RD_ADDR, ROW)); @@ -625,9 +629,11 @@ static void efuse_ctrl_reg_write(void *opaque, hwaddr addr, s = XLNX_VERSAL_EFUSE_CTRL(dev); if (addr != A_WR_LOCK && s->regs[R_WR_LOCK]) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + qemu_log_mask(LOG_GUEST_ERROR, "%s[reg_0x%02lx]: Attempt to write locked register.\n", - object_get_canonical_path(OBJECT(s)), (long)addr); + path, (long)addr); } else { register_write_memory(opaque, addr, data, size); } @@ -681,16 +687,20 @@ static void efuse_ctrl_realize(DeviceState *dev, Error **errp) const uint32_t lks_sz = sizeof(XlnxEFuseLkSpec) / 2; if (!s->efuse) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + error_setg(errp, "%s.efuse: link property not connected to XLNX-EFUSE", - object_get_canonical_path(OBJECT(dev))); + path); return; } /* Sort property-defined pgm-locks for bsearch lookup */ if ((s->extra_pg0_lock_n16 % lks_sz) != 0) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + error_setg(errp, "%s.pg0-lock: array property item-count not multiple of %u", - object_get_canonical_path(OBJECT(dev)), lks_sz); + path, lks_sz); return; } From e3f368e0b280315d5dd3bc26fb00b56587551d87 Mon Sep 17 00:00:00 2001 From: Tong Ho Date: Fri, 15 Oct 2021 13:35:32 -0700 Subject: [PATCH 08/11] hw/nvram: Fix Memory Leak in Xilinx ZynqMP eFuse device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tong Ho Reviewed-by: Edgar E. Iglesias Reviewed-by: Francisco Iglesias Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211015203532.2463705-4-tong.ho@xilinx.com> Signed-off-by: Laurent Vivier --- hw/nvram/xlnx-zynqmp-efuse.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hw/nvram/xlnx-zynqmp-efuse.c b/hw/nvram/xlnx-zynqmp-efuse.c index 1f87dbf988..228ba0bbfa 100644 --- a/hw/nvram/xlnx-zynqmp-efuse.c +++ b/hw/nvram/xlnx-zynqmp-efuse.c @@ -434,11 +434,12 @@ static void zynqmp_efuse_pgm_addr_postw(RegisterInfo *reg, uint64_t val64) if (!errmsg) { ARRAY_FIELD_DP32(s->regs, EFUSE_ISR, PGM_ERROR, 0); } else { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + ARRAY_FIELD_DP32(s->regs, EFUSE_ISR, PGM_ERROR, 1); qemu_log_mask(LOG_GUEST_ERROR, "%s - eFuse write error: %s; addr=0x%x\n", - object_get_canonical_path(OBJECT(s)), - errmsg, (unsigned)val64); + path, errmsg, (unsigned)val64); } ARRAY_FIELD_DP32(s->regs, EFUSE_ISR, PGM_DONE, 1); @@ -448,6 +449,7 @@ static void zynqmp_efuse_pgm_addr_postw(RegisterInfo *reg, uint64_t val64) static void zynqmp_efuse_rd_addr_postw(RegisterInfo *reg, uint64_t val64) { XlnxZynqMPEFuse *s = XLNX_ZYNQMP_EFUSE(reg->opaque); + g_autofree char *path = NULL; /* * Grant reads only to allowed bits; reference sources: @@ -538,10 +540,10 @@ static void zynqmp_efuse_rd_addr_postw(RegisterInfo *reg, uint64_t val64) return; denied: + path = object_get_canonical_path(OBJECT(s)); qemu_log_mask(LOG_GUEST_ERROR, "%s: Denied efuse read from array %u, row %u\n", - object_get_canonical_path(OBJECT(s)), - efuse_ary, efuse_row); + path, efuse_ary, efuse_row); s->regs[R_EFUSE_RD_DATA] = 0; @@ -731,9 +733,11 @@ static void zynqmp_efuse_reg_write(void *opaque, hwaddr addr, s = XLNX_ZYNQMP_EFUSE(dev); if (addr != A_WR_LOCK && s->regs[R_WR_LOCK]) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + qemu_log_mask(LOG_GUEST_ERROR, "%s[reg_0x%02lx]: Attempt to write locked register.\n", - object_get_canonical_path(OBJECT(s)), (long)addr); + path, (long)addr); } else { register_write_memory(opaque, addr, data, size); } @@ -784,8 +788,10 @@ static void zynqmp_efuse_realize(DeviceState *dev, Error **errp) XlnxZynqMPEFuse *s = XLNX_ZYNQMP_EFUSE(dev); if (!s->efuse) { + g_autofree char *path = object_get_canonical_path(OBJECT(s)); + error_setg(errp, "%s.efuse: link property not connected to XLNX-EFUSE", - object_get_canonical_path(OBJECT(dev))); + path); return; } From 1c3515ad59878ad249a61a4a952f1820a12afb83 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Mon, 18 Oct 2021 15:45:08 +0200 Subject: [PATCH 09/11] README: Fix some documentation URLs All of these pages live in the wiki, not in the main web site. Signed-off-by: Greg Kurz Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier Message-Id: <163456470882.196333.17366490695504718038.stgit@bahia.huguette> Signed-off-by: Laurent Vivier --- README.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 79b19f1481..23795b8377 100644 --- a/README.rst +++ b/README.rst @@ -59,9 +59,9 @@ of other UNIX targets. The simple steps to build QEMU are: Additional information can also be found online via the QEMU website: -* ``_ -* ``_ -* ``_ +* ``_ +* ``_ +* ``_ Submitting patches @@ -84,8 +84,8 @@ the Developers Guide. Additional information on submitting patches can be found online via the QEMU website -* ``_ -* ``_ +* ``_ +* ``_ The QEMU website is also maintained under source control. @@ -144,7 +144,7 @@ reported via GitLab. For additional information on bug reporting consult: -* ``_ +* ``_ ChangeLog @@ -168,4 +168,4 @@ main methods being email and IRC Information on additional methods of contacting the community can be found online via the QEMU website: -* ``_ +* ``_ From f98d372aeff5109d2b5a3b858a51347e0ccd36b1 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 15 Oct 2021 15:16:44 +0200 Subject: [PATCH 10/11] analyze-migration.py: fix a long standing typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The parameters of '-d' can be either 'state' or 'desc', not 'dump' as it is reported in the error message. Fixes: b17425701d66 ("Add migration stream analyzation script") Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211015131645.501281-2-lvivier@redhat.com> Signed-off-by: Laurent Vivier --- scripts/analyze-migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index d7177b212c..9d239d309f 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -610,4 +610,4 @@ elif args.dump == "desc": dump.read(desc_only = True) print(jsonenc.encode(dump.vmsd_desc)) else: - raise Exception("Please specify either -x, -d state or -d dump") + raise Exception("Please specify either -x, -d state or -d desc") From 2c92be50bcfa8b7529a39fc99078ef14dcfc71aa Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 15 Oct 2021 15:16:45 +0200 Subject: [PATCH 11/11] analyze-migration.py: fix extract contents ('-x') errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we try to use 'analyze-migration.py -x' with python3, we have the following errors: Traceback (most recent call last): File "scripts/analyze-migration.py", line 593, in f.write(jsonenc.encode(dump.vmsd_desc)) TypeError: a bytes-like object is required, not 'str' Traceback (most recent call last): File "scripts/analyze-migration.py", line 601, in f.write(jsonenc.encode(dict)) TypeError: a bytes-like object is required, not 'str' This happens because the file 'f' is open in binary mode while jsonenc.encode() returns a string. The results are human-readable files, 'desc.json' and 'state.json', so there is no reason to use the binary mode. Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211015131645.501281-3-lvivier@redhat.com> Signed-off-by: Laurent Vivier --- scripts/analyze-migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index 9d239d309f..b82a1b0c58 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -588,7 +588,7 @@ if args.extract: dump.read(desc_only = True) print("desc.json") - f = open("desc.json", "wb") + f = open("desc.json", "w") f.truncate() f.write(jsonenc.encode(dump.vmsd_desc)) f.close() @@ -596,7 +596,7 @@ if args.extract: dump.read(write_memory = True) dict = dump.getDict() print("state.json") - f = open("state.json", "wb") + f = open("state.json", "w") f.truncate() f.write(jsonenc.encode(dict)) f.close()