- 22 4月, 2022 12 次提交
-
-
由 Viktor Prutyanov 提交于
Before this patch, 'dump-guest-memory -w' was accepting only 64-bit dump header provided by guest through vmcoreinfo and thus was unable to produce 32-bit guest Windows dump. So, add 32-bit guest Windows dumping support. Signed-off-by: NViktor Prutyanov <viktor.prutyanov@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> [ misc error handling fixes to avoid compiler warning ] Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220406171558.199263-5-viktor.prutyanov@redhat.com>
-
由 Viktor Prutyanov 提交于
Perform read access to Windows dump header fields via helper macros. This is preparation for the next 32-bit guest Windows dump support. Signed-off-by: NViktor Prutyanov <viktor.prutyanov@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220406171558.199263-3-viktor.prutyanov@redhat.com>
-
由 Viktor Prutyanov 提交于
Context structure in 64-bit Windows differs from 32-bit one and it should be reflected in its name. Signed-off-by: NViktor Prutyanov <viktor.prutyanov@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220406171558.199263-2-viktor.prutyanov@redhat.com>
-
由 Janosch Frank 提交于
Just like with the other write functions let's move the 32/64 bit elf handling to a function to improve readability. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220330123603.107120-10-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
There's no need to have a gigantic if in there let's move the elf 32/64 bit logic into the section, segment or note code. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220330123603.107120-9-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
There's no need to have two write functions. Let's rather have two functions that set the data for elf 32/64 and then write it in a common function. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220330123603.107120-8-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
Checking d_class in dump_info leads to lengthy conditionals so let's shorten things a bit by introducing a helper function. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220330123603.107120-7-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
Offset calculations are easy enough to get wrong. Let's add a few variables to make moving around elf headers and data sections easier. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Message-Id: <20220330123603.107120-6-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
When s->shdr_num is 0 we'll add 0 bytes of section headers which is equivalent to not adding section headers but with the multiplication we can remove a if/else. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220330123603.107120-5-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
Let's move from a boolean to a int variable which will later enable us to store the number of sections that are in the dump file. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220330123603.107120-4-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
There's no need to have phdr_num and sh_info at the same time. We can make phdr_num 32 bit and set PN_XNUM when we write the header if phdr_num >= PN_XNUM. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220407094824.5074-1-frankja@linux.ibm.com>
-
由 Janosch Frank 提交于
Let's move to the new way of handling errors before changing the dump code. This patch has mostly been generated by the coccinelle script scripts/coccinelle/errp-guard.cocci. Signed-off-by: NJanosch Frank <frankja@linux.ibm.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220330123603.107120-2-frankja@linux.ibm.com>
-
- 06 4月, 2022 2 次提交
-
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Marc-André Lureau 提交于
Along with other state tracking functions. Rename it for consistency. Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-21-marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 21 3月, 2022 1 次提交
-
-
由 Markus Armbruster 提交于
g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with size arguments of the form sizeof(T). Patch created mechanically with: $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \ --macro-file scripts/cocci-macro-file.h FILES... Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: NCédric Le Goater <clg@kaod.org> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Acked-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20220315144156.1595462-4-armbru@redhat.com> Reviewed-by: NPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
-
- 15 12月, 2021 1 次提交
-
-
由 Juan Quintela 提交于
It just calls buffer_is_zero(). Just change the callers. Signed-off-by: NJuan Quintela <quintela@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
-
- 02 11月, 2021 1 次提交
-
-
由 Peter Xu 提交于
Both dump-guest-memory and live migration caches vm state at the beginning. Either of them entering the other one will cause race on the vm state, and even more severe on that (please refer to the crash report in the bug link). Let's block live migration in dump-guest-memory, and that'll also block dump-guest-memory if it detected that we're during a live migration. Side note: migrate_del_blocker() can be called even if the blocker is not inserted yet, so it's safe to unconditionally delete that blocker in dump_cleanup (g_slist_remove allows no-entry-found case). Suggested-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1996609Signed-off-by: NPeter Xu <peterx@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NJuan Quintela <quintela@redhat.com>
-
- 02 5月, 2021 1 次提交
-
-
由 Thomas Huth 提交于
Stop including cpu.h in files that don't need it. Signed-off-by: NThomas Huth <thuth@redhat.com> Message-Id: <20210416171314.2074665-4-thuth@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
- 28 1月, 2021 1 次提交
-
-
由 Eric Blake 提交于
These cases require a bit more thought to review; in each case, the code was appending to a list, but not with a FOOList **tail variable. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210113221013.390592-6-eblake@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> [Flawed change to qmp_guest_network_get_interfaces() dropped] Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 09 10月, 2020 1 次提交
-
-
由 Kevin Wolf 提交于
cur_mon really needs to be coroutine-local as soon as we move monitor command handlers to coroutines and let them yield. As a first step, just remove all direct accesses to cur_mon so that we can implement this in the getter function later. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Message-Id: <20201005155855.256490-4-kwolf@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 23 9月, 2020 1 次提交
-
-
由 Stefan Hajnoczi 提交于
clang's C11 atomic_fetch_*() functions only take a C11 atomic type pointer argument. QEMU uses direct types (int, etc) and this causes a compiler error when a QEMU code calls these functions in a source file that also included <stdatomic.h> via a system header file: $ CC=clang CXX=clang++ ./configure ... && make ../util/async.c:79:17: error: address argument to atomic operation must be a pointer to _Atomic type ('unsigned int *' invalid) Avoid using atomic_*() names in QEMU's atomic.h since that namespace is used by <stdatomic.h>. Prefix QEMU's APIs with 'q' so that atomic.h and <stdatomic.h> can co-exist. I checked /usr/include on my machine and searched GitHub for existing "qatomic_" users but there seem to be none. This patch was generated using: $ git grep -h -o '\<atomic\(64\)\?_[a-z0-9_]\+' include/qemu/atomic.h | \ sort -u >/tmp/changed_identifiers $ for identifier in $(</tmp/changed_identifiers); do sed -i "s%\<$identifier\>%q$identifier%g" \ $(git grep -I -l "\<$identifier\>") done I manually fixed line-wrap issues and misaligned rST tables. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Acked-by: NPaolo Bonzini <pbonzini@redhat.com> Message-Id: <20200923105646.47864-1-stefanha@redhat.com>
-
- 16 9月, 2020 1 次提交
-
-
由 Daniel P. Berrangé 提交于
We want to introduce a new version of qemu_open() that uses an Error object for reporting problems and make this it the preferred interface. Rename the existing method to release the namespace for the new impl. Reviewed-by: NEric Blake <eblake@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 21 8月, 2020 1 次提交
-
-
由 Marc-André Lureau 提交于
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 10 7月, 2020 1 次提交
-
-
由 Markus Armbruster 提交于
When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous two commits did that for sufficiently simple cases with Coccinelle. Do it for several more manually. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-Id: <20200707160613.848843-37-armbru@redhat.com>
-
- 29 4月, 2020 1 次提交
-
-
由 Philippe Mathieu-Daudé 提交于
Fixes the following coccinelle warnings: $ spatch --sp-file --verbose-parsing ... \ scripts/coccinelle/remove_local_err.cocci ... SUSPICIOUS: a \ character appears outside of a #define at ./target/ppc/translate_init.inc.c:5213 SUSPICIOUS: a \ character appears outside of a #define at ./target/ppc/translate_init.inc.c:5261 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:166 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:167 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:169 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:170 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:171 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:172 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:173 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5787 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5789 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5800 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5801 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5802 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5804 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5805 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5806 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:6329 SUSPICIOUS: a \ character appears outside of a #define at ./hw/sd/sdhci.c:1133 SUSPICIOUS: a \ character appears outside of a #define at ./hw/scsi/scsi-disk.c:3081 SUSPICIOUS: a \ character appears outside of a #define at ./hw/net/virtio-net.c:1529 SUSPICIOUS: a \ character appears outside of a #define at ./hw/riscv/sifive_u.c:468 SUSPICIOUS: a \ character appears outside of a #define at ./dump/dump.c:1895 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2209 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2215 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2221 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2222 SUSPICIOUS: a \ character appears outside of a #define at ./block/replication.c:172 SUSPICIOUS: a \ character appears outside of a #define at ./block/replication.c:173 Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200412223619.11284-2-f4bug@amsat.org> Reviewed-by: NAlistair Francis <alistair.francis@wdc.com> Acked-by: NDavid Gibson <david@gibson.dropbear.id.au> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 04 4月, 2020 2 次提交
-
-
It's possible that we'll try to set err twice (or more). It's bad, it will crash. Instead, use warn_report(). Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20200324153630.11882-4-vsementsov@virtuozzo.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NRichard Henderson <richard.henderson@linaro.org> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Peter Maydell 提交于
In write_elf_section() we set the 'shdr' pointer to point to local structures shdr32 or shdr64, which we fill in to be written out to the ELF dump. Unfortunately the address we pass to fd_write_vmcore() has a spurious '&' operator, so instead of writing out the section header we write out the literal pointer value followed by whatever is on the stack after the 'shdr' local variable. Pass the correct address into fd_write_vmcore(). Spotted by Coverity: CID 1421970. Cc: qemu-stable@nongnu.org Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200324173630.12221-1-peter.maydell@linaro.org
-
- 18 12月, 2019 1 次提交
-
-
We don't need Error **, as all callers pass local Error object, which isn't used after the call. Use Error * instead. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Acked-by: NDr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <20191205174635.18758-5-vsementsov@virtuozzo.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
-
- 16 8月, 2019 3 次提交
-
-
由 Markus Armbruster 提交于
sysemu/sysemu.h is a rather unfocused dumping ground for stuff related to the system-emulator. Evidence: * It's included widely: in my "build everything" tree, changing sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h, down from 5400 due to the previous two commits). * It pulls in more than a dozen additional headers. Split stuff related to run state management into its own header sysemu/runstate.h. Touching sysemu/sysemu.h now recompiles some 850 objects. qemu/uuid.h also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400 to 4200. Touching new sysemu/runstate.h recompiles some 500 objects. Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also add qemu/main-loop.h. Suggested-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <20190812052359.30071-30-armbru@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> [Unbreak OS-X build]
-
由 Markus Armbruster 提交于
In my "build everything" tree, changing sysemu/sysemu.h triggers a recompile of some 5400 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). Almost a third of its inclusions are actually superfluous. Delete them. Downgrade two more to qapi/qapi-types-run-state.h, and move one from char/serial.h to char/serial.c. hw/semihosting/config.c, monitor/monitor.c, qdev-monitor.c, and stubs/semihost.c define variables declared in sysemu/sysemu.h without including it. The compiler is cool with that, but include it anyway. This doesn't reduce actual use much, as it's still included into widely included headers. The next commit will tackle that. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NAlistair Francis <alistair.francis@wdc.com> Message-Id: <20190812052359.30071-27-armbru@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
-
由 Markus Armbruster 提交于
In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more. Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <20190812052359.30071-21-armbru@redhat.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
-
- 02 7月, 2019 2 次提交
-
-
由 Markus Armbruster 提交于
Move the HMP handlers related to qapi/dump.json to dump/dump-hmp-cmds.c, where they are covered by MAINTAINERS section "Dump", just like qapi/dump.json. Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <20190619201050.19040-18-armbru@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com> [Commit message typo fixed]
-
由 Markus Armbruster 提交于
Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Message-Id: <20190619201050.19040-16-armbru@redhat.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-