-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some occurrences of -Wshadow=local #87
Conversation
It was unclear what was the supported public interface. I.e. when refactoring the code, what functions/classes are important to retain. Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
It wasn't clear where the constants and structs came from, so I added comments to help. Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
The arguments extracted from `sys.argv` named and unpacked to make it clear what the arguments are and what they're used for. The two input files were opened, but never explicitly closed. File usage changed to use `with` statement to take care of this. At the same time, ownership of the file-object is moved up to `run` function. Added option to process to support file-like objects. Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
Readability is subjective, but I've expanded the naming of the variables and arguments, to help with understanding for new eyes on the code. Signed-off-by: Mads Ynddal <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
The call to `getargspec` was deprecated and in Python 3.11 it has been removed in favor of `getfullargspec`. `getfullargspec` is compatible with QEMU's requirement of at least Python version 3.6. Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
A failed call to `read_header` wouldn't be handled the same for the two different code paths (one path would try to use `None` as a list). Changed to raise exception to be handled centrally. This also allows for easier unpacking, as errors has been filtered out. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
Define `SimpleException` to differentiate our exceptions from generic exceptions (IOError, etc.). Adapted simpletrace to support this and output to stderr. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
Instead of explicitly calling `begin` and `end`, we can change the class to use the context-manager paradigm. This is mostly a styling choice, used in modern Python code. But it also allows for more advanced analyzers to handle exceptions gracefully in the `__exit__` method (not demonstrated here). Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
Moved event_mapping and event_id_to_name down one level in the function call-stack to keep variable instantiation and usage closer (`process` and `run` has no use of the variables; `read_trace_records` does). Instead of passing event_mapping and event_id_to_name to the bottom of the call-stack, we move their use to `read_trace_records`. This separates responsibility and ownership of the information. `read_record` now just reads the arguments from the file-object by knowning the total number of bytes. Parsing it to specific arguments is moved up to `read_trace_records`. Special handling of dropped events removed, as they can be handled by the general code. Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
To avoid duplicate code depending on input types and to better handle open/close of log with a context-manager, we move the logic of process into _process. Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
Moved event processing to the Analyzer class to separate specific analyzer logic (like caching and function signatures) from the _process function. This allows for new types of Analyzer-based subclasses without changing the core code. Note, that the fn_cache is important for performance in cases where the analyzer is branching away from the catch-all a lot. The cache has no measurable performance penalty. Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
By moving the dynamic argument construction to keyword-arguments, we can remove all of the specialized handling, and streamline it. If a tracing method wants to access these, they can define the kwargs, or ignore it be placing `**kwargs` at the end of the function's arguments list. Added deprecation warning to Analyzer class to make users aware of the Analyzer2 class. No removal date is planned. Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
In my work to refactor simpletrace.py, I noticed that there's no maintainer of it, and has the status of "odd fixes". I'm using it from time to time, so I'd like to maintain the script. I've added myself as reviewer under "Tracing" to be informed of changes that might affect simpletrace.py. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This means the script currently doesn't work on Python 3. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Mads Ynddal <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
we don't want to exclude ISA v1.6.2 insns from our tests. Acked-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-Id: <[email protected]>
reported in https://gitlab.com/qemu-project/qemu/-/issues/1667 Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
when we reconstructed PSW using psw_read(), we were trying to clear the cached USB bits out of env->PSW. The mask was wrong and we would clear PSW.RM as well. when we write the PSW using psw_write() we update the rounding modes in env->fp_status for softfloat. The order of bits used by TriCore is not the one used by softfloat. Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
this is not something other ISAs do, so clarify it with a comment. Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
reported in https://gitlab.com/qemu-project/qemu/-/issues/1667 Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
Reviewed-by: Richard Henderson <[email protected]> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1667 Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
we would crash if width was 0 for these insns, as tcg_gen_deposit() is undefined for that case. For TriCore, width = 0 is a mov from the src reg to the dst reg, so we special case this here. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
Acked-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
RSx for d regs and e regs now use the same numbering. This makes sure that mixing d and e registers in an insn test will not overwrite data between registers. Signed-off-by: Bastian Koppelmann <[email protected]> Message-ID: <[email protected]>
Thank you for your interest in the QEMU project. This repository is a read-only mirror of the project's repostories hosted QEMU welcomes contributions of code (either fixing bugs or adding new |
Signed-off-by: Karim Taha <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
Signed-off-by: Stacey Son <[email protected]> Signed-off-by: Karim Taha <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
Match linux-user, by manually applying the following commits, in order: d28b3c9 linux-user: Make sure initial brk(0) is page-aligned 15ad985 linux-user: Fix qemu brk() to not zero bytes on current page dfe4986 linux-user: Prohibit brk() to to shrink below initial heap address eac78a4 linux-user: Fix signed math overflow in brk() syscall c6cc059 linux-user: Do not call get_errno() in do_brk() e69e032 linux-user: Use MAP_FIXED_NOREPLACE for do_brk() cb9d5d1 linux-user: Do nothing if too small brk is specified 2aea137 linux-user: Do not align brk with host page size Signed-off-by: Stacey Son <[email protected]> Signed-off-by: Karim Taha <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
Co-authored-by: Kyle Evans <[email protected]> Signed-off-by: Stacey Son <[email protected]> Signed-off-by: Kyle Evans <[email protected]> Signed-off-by: Karim Taha <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
Signed-off-by: Stacey Son <[email protected]> Signed-off-by: Karim Taha <[email protected]> Reviewed-by: Warner Losh <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
Signed-off-by: Stacey Son <[email protected]> Signed-off-by: Karim Taha <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
Use `WITH_MMAP_LOCK_GUARD` instead of mmap_lock() and mmap_unlock(), to match linux-user implementation, according to the following commits: 69fa270 linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt} ceda568 linux-user: Fix shmdt Signed-off-by: Stacey Son <[email protected]> Signed-off-by: Karim Taha <[email protected]> Message-Id: <[email protected]>
The above system calls are not supported by qemu. Signed-off-by: Warner Losh <[email protected]> Signed-off-by: Karim Taha <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
Currently, a few code paths exist in the function vmstate_save_state_v, which ultimately leads to a migration failure. However, an update in the current MigrationState for the error description is never done. vmstate.c somehow doesn't seem to allow the use of migrate_set_error due to some dependencies for unit tests. Hence, this patch introduces a new function vmstate_save_state_with_err, which will eventually propagate the error message to savevm.c where a migrate_set_error call can be eventually done. Acked-by: Peter Xu <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Tejus GK <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
A few code paths exist in the source code,where a migration is marked as failed via MIGRATION_STATUS_FAILED, but the failure happens outside of migration.c In such cases, an error_report() call is made, however the current MigrationState is never updated with the error description, and hence clients like libvirt never know the actual reason for the failure. This patch covers such cases outside of migration.c and updates the error description at the appropriate places. Acked-by: Peter Xu <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Tejus GK <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
It's not obvious to many that RDMA migration is in Odd Fixes stage for a long time. Add an explicit sub entry for it (besides migration, which already covers the rdma files) to be clear on that, meanwhile add Zhijian as Reviewer, so Zhijian can see the patches and review when he still has the bandwidth. Cc: Daniel P. Berrangé <[email protected]> Cc: Juan Quintela <[email protected]> Cc: Markus Armbruster <[email protected]> Cc: Zhijian Li (Fujitsu) <[email protected]> Cc: Fabiano Rosas <[email protected]> Acked-by: Li Zhijian <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Peter Xu <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
Per the qemu upstream call a few hours ago, proposing Fabiano and myself as the co-maintainer for migration subsystem to help Juan. Cc: Fabiano Rosas <[email protected]> Cc: Juan Quintela <[email protected]> Acked-by: Fabiano Rosas <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Peter Xu <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
Previously, we got a confusion error that complains the RDMAControlHeader.repeat: qemu-system-x86_64: rdma: Too many requests in this message (3638950032).Bailing. Actually, it's caused by an unexpected RDMAControlHeader.type. After this patch, error will become: qemu-system-x86_64: Unknown control message QEMU FILE Reviewed-by: Fabiano Rosas <[email protected]> Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Li Zhijian <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Daniil Tatianin <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially. This easily breaks if we reduce the amount of RAM for the test instances from 150MiB to e.g 110MiB since that makes SeaBIOS dirty some of the pages starting at about 0x5dd2000 (~93 MiB) as it reuses those for the HighMemory allocator since commit dc88f9b72df ("malloc: use large ZoneHigh when there is enough memory"). This would result in the following errors: 12/60 qemu:qtest+qtest-x86_64 / qtest-x86_64/migration-test ERROR 2.74s killed by signal 6 SIGABRT stderr: Memory content inconsistency at 5dd2000 first_byte = cc last_byte = cb current = 9e hit_edge = 1 Memory content inconsistency at 5dd3000 first_byte = cc last_byte = cb current = 89 hit_edge = 1 Memory content inconsistency at 5dd4000 first_byte = cc last_byte = cb current = 23 hit_edge = 1 Memory content inconsistency at 5dd5000 first_byte = cc last_byte = cb current = 31 hit_edge = 1 Memory content inconsistency at 5dd6000 first_byte = cc last_byte = cb current = 70 hit_edge = 1 Memory content inconsistency at 5dd7000 first_byte = cc last_byte = cb current = ff hit_edge = 1 Memory content inconsistency at 5dd8000 first_byte = cc last_byte = cb current = 54 hit_edge = 1 Memory content inconsistency at 5dd9000 first_byte = cc last_byte = cb current = 64 hit_edge = 1 Memory content inconsistency at 5dda000 first_byte = cc last_byte = cb current = 1d hit_edge = 1 Memory content inconsistency at 5ddb000 first_byte = cc last_byte = cb current = 1a hit_edge = 1 and in another 26 pages** ERROR:../tests/qtest/migration-test.c:300:check_guests_ram: assertion failed: (bad == 0) Fix this by always zeroing the first byte of each page in the range so that we get consistent results no matter the initial contents. Fixes: ea0c6d6 ("test: Postcopy") Signed-off-by: Daniil Tatianin <[email protected]> Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
Same as with the x86 verison of this test, we relied on the contents of all pages in RAM to be the same across the entire test range, which is very fragile. Zero the first byte of each page before running the increment loop to fix this. Fixes: 5571dc8 ("tests/migration: Enable the migration test on s390x, too") Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]> Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Daniil Tatianin <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
Extend the migration URI to support file:<filename>. This can be used for any migration scenario that does not require a reverse path. It can be used as an alternative to 'exec:cat > file' in minimized containers that do not contain /bin/sh, and it is easier to use than the fd:<fdname> URI. It can be used in HMP commands, and as a qemu command-line parameter. For best performance, guest ram should be shared and x-ignore-shared should be true, so guest pages are not written to the file, in which case the guest may remain running. If ram is not so configured, then the user is advised to stop the guest first. Otherwise, a busy guest may re-dirty the same page, causing it to be appended to the file multiple times, and the file may grow unboundedly. That issue is being addressed in the "fixed-ram" patch series. Signed-off-by: Steve Sistare <[email protected]> Tested-by: Michael Galaxy <[email protected]> Reviewed-by: Michael Galaxy <[email protected]> Reviewed-by: Fabiano Rosas <[email protected]> Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
Allow an offset option to be specified as part of the file URI, in the form "file:filename,offset=offset", where offset accepts the common size suffixes, or the 0x prefix, but not both. Migration data is written to and read from the file starting at offset. If unspecified, it defaults to 0. This is needed by libvirt to store its own data at the head of the file. Suggested-by: Daniel P. Berrange <[email protected]> Reviewed-by: Peter Xu <[email protected]> Reviewed-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Steve Sistare <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
For both save/load we actually share the logic on deciding whether a field should exist. Merge the checks into a helper and use it for both save and load. When doing so, add documentations and reformat the code to make it much easier to read. The real benefit here (besides code cleanups) is we add a trace-point for this; this is a known spot where we can easily break migration compatibilities between binaries, and this trace point will be critical for us to identify such issues. For example, this will be handy when debugging things like: https://gitlab.com/qemu-project/qemu/-/issues/932 Reviewed-by: Fabiano Rosas <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Peter Xu <[email protected]> Signed-off-by: Juan Quintela <[email protected]> Message-ID: <[email protected]>
Currently we set _FORTIFY_SOURCE=2 as a compiler argument when the meson 'optimization' setting is non-zero, the compiler is GCC and the target is Linux. While the default QEMU optimization level is 2, user could override this by setting CFLAGS="-O0" or --extra-cflags="-O0" when running configure and this won't be reflected in the meson 'optimization' setting. As a result we try to enable _FORTIFY_SOURCE=2 and then the user gets compile errors as it only works with optimization. Rather than trying to improve detection in meson, it is simpler to just check the __OPTIMIZE__ define from osdep.h. The comment about being incompatible with clang appears to be outdated, as compilation works fine without excluding clang. In the coroutine code we must set _FORTIFY_SOURCE=0 to stop the logic in osdep.h then enabling it. Signed-off-by: Daniel P. Berrangé <[email protected]> Message-id: [email protected] Signed-off-by: Stefan Hajnoczi <[email protected]>
…qemu into staging Misc fixes and cleanups # -----BEGIN PGP SIGNATURE----- # # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmUcClAcHG1hcmNhbmRy # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5R5FD/9oeCDGXVzkm52K0DoW # 90N5Blda/3exvnS49TEz+rbIxXcy9IBxEKV3aPesCDw0V7Vxy6ZijPA/aHKzQEeP # DOX+0sELWLFRKvNNuXLxPlZcEQDgXkgqoCKf+0jp5oH7TAL2upezMhIr4XlUwG3v # rKQstpmr0Jm9sjsBTL9uIZCJpzglWk7CIbgAlBjOX6MFz0HAManrhBBuguvSZtrW # wYWrdkBEdTK6ranBvRA3IKi4ux/pmNsCpCtuOVT+WOLjC/wmJIE8+pBzlK9eOdqW # bPaxuu4XK1qao1+z6EyoaUtH/UW50EUInGq7aR2Z31/S1BLxqEpFCCnPAw7RGYZO # VlAuiR2U7K7AHFDfp8fJaUNH8a3Zh2wzpba5cyQ7LqVNRVbDhx65sQZw0pA3pjfi # JG0brIpWldD7auJtZTdCxXcoHWxeyfqqzH3a6GpeZzrRwuuAwxv0+yGF3Y2cMJ7+ # lV9JVcei5M+Acq1UfO4BCC77UpXs4Jl0+zyRq02vOJFnfwcLMQ7VjD2A3e00yodj # F5cPnbacI212ynNm925RNv45svaY1hD2Z8kJRV/15/04m9dRv4WHOOTuF3iwZjt1 # 9gp/p949tcEL/rBbDF+9QZiVHTWurVCQ0ZFnNhVnbKm+Hm5nHk5slc2p+VXQ0KB0 # E2mN1irWzLov0K1YZTfetiXo8A== # =3ol2 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 03 Oct 2023 08:34:24 EDT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "[email protected]" # gpg: Good signature from "Marc-André Lureau <[email protected]>" [full] # gpg: aka "Marc-André Lureau <[email protected]>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * tag 'misc-pull-request' of https://gitlab.com/marcandre.lureau/qemu: chardev/char-pty: Avoid losing bytes when the other side just (re-)connected hw/display/ramfb: plug slight guest-triggerable leak on mode setting hw/pc: remove needless includes hw/core: remove needless includes analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH ui/gtk: fix UI info precondition win32: avoid discarding the exception handler ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map ui/console: sanitize search in qemu_graphic_console_is_multihead() ui/console: eliminate QOM properties from qemu_console_is_multihead() ui/console: only walk QemuGraphicConsoles in qemu_console_is_multihead() ui/console: make qemu_console_is_multihead() static input: Allow to choose console with qemu_input_is_absolute Signed-off-by: Stefan Hajnoczi <[email protected]>
into staging bsd-user mmap and exec branches from gsoc This pull request represents the mmap and exec changes from Karim Taha for his GSoC project. They represent all the mmap and exec related system calls and get bsd-user to the point that a dynamic hello-world works (at least for armv7). There are a couple of patch check errors, but they are the lessor evil: I made purposely bad style choices to ensure all the commits compiled (and i undid the style choices in subsequent commits). I pushed an earlier version to gitlab, and all but the riscv64 pipelines were green. Since bsd-user doesn't change anything related to ricsv64 (there's no support in qemu-project repo, though we do have it in the bsd-user fork: coming soon). I think this is good to go. https://gitlab.com/bsdimp/qemu.git Warner # -----BEGIN PGP SIGNATURE----- # Comment: GPGTools - https://gpgtools.org # # iQIzBAABCgAdFiEEIDX4lLAKo898zeG3bBzRKH2wEQAFAmUcpC4ACgkQbBzRKH2w # EQDD9xAA3Rg0AnfnFrd+AoWRb/1/gOuO0v+dEGXj50qnGY8OmHeYtg3XecYPArBq # EicZzL/OG7UZKMl5OfrmGP9tbr32yfeRUTe3AGGHfmnSb11q0yeSaEFZI7felLHj # 9nlq4H/2EDRrY+7EnG1TWqtnuqDJAJf/7M0giiVxIk77XGX+USUNPOSG4NP/yc8E # D5p2GN23pUsvnI0jBZkyP3gyeXVNCNG5+KobwqJM3r6OjEiTRmLEVBw98YzG12bh # OY9ekMtVUKHi4Cvsf+2TtkDGRya0wX4uqm4UB1TtV1VUDoCWhYgEKBHp3ozCoVjB # J+ygbx7/jNfY53cpgEpKUBFH7rnOq1yQQ+ad5Ap5hbp4j6WSvPwdp1N3RCnkZzd/ # L50VIaySd+P6enAgPO5Mbt3kMMVd/eDGhQDWdzNToIjyhXBb5hUNfumg9AgdEwTh # rW/kKT39YLYWLO123hIJCy2CKU9nvoea9588ExkKb22v0ltrtDcAlWfCbZvZYxNN # wRzh+MFBt7Cd/bqk7HaJ0J/YyPToqImoUjNuBnBSDPqZQP2H4U8v/FoICQ0mm5kR # jZCmGLMEP1PiDlusjUjaW0iamHvXiSP8KEzaAbIxx5UUiTWTTkQm4CKY/xPxC9VQ # 0ygJqJVrKHlNrAY9u6ggJAXtorVwmC55z4ZqIVQH6cbzUYFMuJU= # =WpL4 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 03 Oct 2023 19:30:54 EDT # gpg: using RSA key 2035F894B00AA3CF7CCDE1B76C1CD1287DB01100 # gpg: Good signature from "Warner Losh <[email protected]>" [unknown] # gpg: aka "Warner Losh <[email protected]>" [unknown] # gpg: aka "Warner Losh <[email protected]>" [unknown] # gpg: aka "Warner Losh <[email protected]>" [unknown] # gpg: aka "Warner Losh <[email protected]>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 2035 F894 B00A A3CF 7CCD E1B7 6C1C D128 7DB0 1100 * tag 'bsd-user-mmap-pull-request' of https://gitlab.com/bsdimp/qemu: (51 commits) bsd-user: Add stubs for vadvise(), sbrk() and sstk() bsd-user: Implement shmat(2) and shmdt(2) bsd-user: Implement shmctl(2) bsd-user: Implement shm_unlink(2) and shmget(2) bsd-user: Implement shm_open(2) bsd-user: Implement do_obreak function bsd-user: Implement mincore(2) bsd-user: Implment madvise(2) to match the linux-user implementation. bsd-user: Implement mlock(2), munlock(2), mlockall(2), munlockall(2), minherit(2) bsd-user: Implement msync(2) bsd-user: Implement mprotect(2) bsd-user: Implement mmap(2) and munmap(2) bsd-user: Introduce bsd-mem.h to the source tree bsd-user: Implement shmid_ds conversion between host and target. bsd-user: Implement ipc_perm conversion between host and target. bsd-user: Implement target_set_brk function in bsd-mem.c instead of os-syscall.c bsd-user: Add bsd-mem.c to meson.build bsd-user: Implement shm_rename(2) system call bsd-user: Implement shm_open2(2) system call bsd-user: Introduce freebsd/os-misc.h to the source tree ... Signed-off-by: Stefan Hajnoczi <[email protected]>
…n.quintela/qemu into staging Migration Pull request (20231004) Hi In this series: * make sure migration-tests get 0's (daniil) Notice that this creates a checkpatch negative, everything on that file is volatile, no need to add a comment. * RDMA fix from li * MAINTAINERS Get peter and fabiano to become co-maintainers of migration Get Entry fro migration-rdma for Li Zhijian * Create field_exists() (peterx) * Improve error messages (Tejus) Please apply. s # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmUdXTwACgkQ9IfvGFhy # 1yPFPg//awd8HpoLs1Cq6zquBRivZOS88+tstwlBIODoU3lwPlriGU9Wquv8MqxG # NGvcUKVsv1XXsRWYsqN3OPV6m+uRZpKrFfXEnIGNpHptf/e6KrrDGAttukalhx4n # hJXCAActe9DlujSu+QI0L/j7R9S33zvLS46sjq7jaYLQLMzuEf5i+hiEPWfPP7AT # 0SjrtpFaqIOGY4+VKteDirP7zJtu1+WEMVFgtAUeh3c0R8UAOsxVzBjfM3+KagIx # NnYesFZoaOjVi1Xi1cRII7FmeKZ2OU7VBdYN9h3Y+dRIRjzF/YZOdt6Ypgb1c4gw # ohpWJWT2tHU1z7nguSFpnqtu8xCeGhwAy+HUn/Az0TP6SCtpKRh23bZpwbfWIrHs # eSZB6tO/eC/noQ5/d2cSs6pz7P77MkhTfxwD2+n9R4O36vSHEj3dGF0JbgCPr/Kw # 0qfch9BQkFkAec3kiaZO/JOQ1rJuIMTbdER9gDzIODpUIc5QExs1dFwLoz5IRcpQ # A1kOqVatMmm8jrvC3lEw76FjMX5pv11DKcS75ogWsSZHGk/jpXWABPEtiamzloqv # c6owc5f09etkQCzT5ME8AZyZRjt7eeqIxZDZlGCjHbqZ+w/xuDsFJrEdg8YJvRLw # AmsU5rRT2JV4lDNgZ1XG+xY9HF5LhAXYet5+UrCMBpFGk7JnHIw= # =il/A # -----END PGP SIGNATURE----- # gpg: Signature made Wed 04 Oct 2023 08:40:28 EDT # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <[email protected]>" [full] # gpg: aka "Juan Quintela <[email protected]>" [full] # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * tag 'migration-20231004-pull-request' of https://gitlab.com/juan.quintela/qemu: migration: Unify and trace vmstate field_exists() checks migration: file URI offset migration: file URI s390x/a-b-bios: zero the first byte of each page on start i386/a-b-bootblock: zero the first byte of each page on start i386/a-b-bootblock: factor test memory addresses out into constants migration/rdma: zore out head.repeat to make the error more clear migration: Add co-maintainers for migration MAINTAINERS: Add entry for rdma migration migration: Update error description outside migration.c migration/vmstate: Introduce vmstate_save_state_with_err Signed-off-by: Stefan Hajnoczi <[email protected]>
…to staging Pull request # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmUdbkgACgkQnKSrs4Gr # c8j03Af/Ww5CrGjvcTefvm6W65zTh6Di6ymUn59eqIpjpDbWTPruhnsrJFtNEo3Z # wv8hcxgc+wP8Y7BbZiwiNrSZsjQ1y8rReeO+Eoe9YZoRTMy8aJYaASXvs9TWZoMT # IjqPR6YEAEzh+30zLaPje/Lfy49Ni2Lqsg/fKsozl0b2LrZoEN5xJMHqI8CuRrzB # JmtX4nCkaf/P0yvW1MAp4Dxiuqgk3Z7n2+F1Qrjklw1eSZsc6Mi9QmEwuzX4rnKO # tzU2EApDWNvFQ604H86XHqWqXIw4C+7nNl81kOIZhUqIRamPD8bCNAeijkthmdLF # l4EIOqSDX8nkxuddRS7jQmHxlIw18g== # =26iN # -----END PGP SIGNATURE----- # gpg: Signature made Wed 04 Oct 2023 09:53:12 EDT # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <[email protected]>" [ultimate] # gpg: aka "Stefan Hajnoczi <[email protected]>" [ultimate] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * tag 'block-pull-request' of https://gitlab.com/stefanha/qemu: osdep: set _FORTIFY_SOURCE=2 when optimization is enabled Signed-off-by: Stefan Hajnoczi <[email protected]>
As docs/devel/loads-stores.rst states: ``GETPC()`` should be used with great care: calling it in other functions that are *not* the top level ``HELPER(foo)`` will cause unexpected behavior. Instead, the value of ``GETPC()`` should be read from the helper and passed if needed to the functions that the helper calls. Let's fix the GETPC() usage in Hexagon, making sure it's always called from top level helpers and passed down to the places where it's needed. There are a few snippets where that is not currently the case: - probe_store(), which is only called from two helpers, so it's easy to move GETPC() up. - mem_load*() functions, which are also called directly from helpers, but through the MEM_LOAD*() set of macros. Note that this are only used when compiling with --disable-hexagon-idef-parser. In this case, we also take this opportunity to simplify the code, unifying the mem_load*() functions. - HELPER(probe_hvx_stores), when called from another helper, ends up using its own GETPC() expansion instead of the top level caller. Signed-off-by: Matheus Tavares Bernardino <[email protected]> Reviewed-by: Taylor Simpson <[email protected]> Message-Id: <2c74c3696946edba7cc5b2942cf296a5af532052.1689070412.git.quic_mathbern@quicinc.com>-ne Reviewed-by: Brian Cain <[email protected]>
Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31: ../target/hexagon/mmvec/macros.h:205:18: error: declaration of ‘i’ shadows a previous local [-Werror=shadow=compatible-local] 205 | for (int i = 0; i < sizeof(MMVector); i += sizeof(TYPE)) { \ | ^ ../target/hexagon/op_helper.c:157:17: note: in expansion of macro ‘SCATTER_OP_WRITE_TO_MEM’ 157 | SCATTER_OP_WRITE_TO_MEM(uint16_t); | ^~~~~~~~~~~~~~~~~~~~~~~ ../target/hexagon/op_helper.c:135:9: note: shadowed declaration is here 135 | int i; | ^ In file included from ../target/hexagon/op_helper.c:31: ../target/hexagon/mmvec/macros.h:204:19: error: declaration of ‘ra’ shadows a previous local [-Werror=shadow=compatible-local] 204 | uintptr_t ra = GETPC(); \ | ^~ ../target/hexagon/op_helper.c:160:17: note: in expansion of macro ‘SCATTER_OP_WRITE_TO_MEM’ 160 | SCATTER_OP_WRITE_TO_MEM(uint32_t); | ^~~~~~~~~~~~~~~~~~~~~~~ ../target/hexagon/op_helper.c:134:15: note: shadowed declaration is here 134 | uintptr_t ra = GETPC(); | ^~ Reviewed-by: Matheus Tavares Bernardino <[email protected]> Signed-off-by: Brian Cain <[email protected]>
The typedef `vaddr` is shadowed by `vaddr` identifiers, so we rename the identifiers to avoid shadowing the type name. Signed-off-by: Brian Cain <[email protected]>
89453e7
to
28a2c4c
Compare
This was merged upstream. |
No description provided.