Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: 0337e4123e62721bd0bcb4d5645fee2a31e8906d https://github.com/qemu/qemu/commit/0337e4123e62721bd0bcb4d5645fee2a31e8906d Author: Akihiko Odaki <akihiko.od...@daynix.com> Date: 2023-10-03 (Tue, 03 Oct 2023)
Changed paths: M include/ui/input.h M ui/cocoa.m M ui/dbus-console.c M ui/gtk.c M ui/input.c M ui/sdl2.c M ui/spice-input.c M ui/trace-events M ui/vnc.c Log Message: ----------- input: Allow to choose console with qemu_input_is_absolute Although an input is routed depending on the console, qemu_input_is_absolute() had no mechanism to specify the console. Accept QemuConsole as an argument for qemu_input_is_absolute, and let the display know the absolute/relative state for a particular console. Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-Id: <20230921082936.28100-1-akihiko.od...@daynix.com> Commit: 845fff1f83ac87f592b5b0fa01c37844ea8cc9f9 https://github.com/qemu/qemu/commit/845fff1f83ac87f592b5b0fa01c37844ea8cc9f9 Author: Laszlo Ersek <ler...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M include/ui/console.h M ui/console.c Log Message: ----------- ui/console: make qemu_console_is_multihead() static qemu_console_is_multihead() is only called from within "ui/console.c"; make it static. Cc: "Marc-André Lureau" <marcandre.lur...@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kra...@redhat.com> (odd fixer:Graphics) Signed-off-by: Laszlo Ersek <ler...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-ID: <20230913144959.41891-2-ler...@redhat.com> Commit: 4ce2f97c000629531553328e1871b56312a210cf https://github.com/qemu/qemu/commit/4ce2f97c000629531553328e1871b56312a210cf Author: Laszlo Ersek <ler...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: only walk QemuGraphicConsoles in qemu_console_is_multihead() qemu_console_is_multihead() declares the console "c" a "multihead" console if there are two different consoles in the system that (a) both reference "c->device", and (b) have different "c->head" numbers. In effect, if at least two consoles exist that are different heads of the same device that underlies "c". Commit 58d5870845c6 ("ui/console: move graphic fields to QemuGraphicConsole", 2023-09-04) pushed the "device" and "head" members from the QemuConsole base class down to the QemuGraphicConsole subclass, adjusting the referring QOM properties accordingly as well. As a result, the "device" property lookup in qemu_console_is_multihead() now crashes, in case the candidate console being investigated for criterion (a) is not a QemuGraphicConsole instance: > Unexpected error in object_property_find_err() at qom/object.c:1314: > qemu: Property 'qemu-fixed-text-console.device' not found > Aborted (core dumped) This is effectively an unchecked downcast. Make it checked: only consider such console candidates that are themselves QemuGraphicConsole instances. Cc: "Marc-André Lureau" <marcandre.lur...@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kra...@redhat.com> (odd fixer:Graphics) Fixes: 58d5870845c6 Signed-off-by: Laszlo Ersek <ler...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-ID: <20230913144959.41891-3-ler...@redhat.com> Commit: 2c0c4c1f650d48c814df5a8b48544ea44918bd8f https://github.com/qemu/qemu/commit/2c0c4c1f650d48c814df5a8b48544ea44918bd8f Author: Laszlo Ersek <ler...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: eliminate QOM properties from qemu_console_is_multihead() According to Marc-André's and Gerd's descriptions, the "device" and "head" members of QemuGraphicConsole are exposed as QOM properties for two purposes: (1) Introspection (e.g., "qom-get" monitor command). (2) A VNC server can display a specific device + head. This lets us run a multihead configuration by using multiple VNC servers (one for each head). Further, we can link input devices to device + head, so input events are routed to different devices dependent on where they are coming from. Which is most useful for tablet devices in a VNC multihead setup, each head has its own tablet device then. This does requires manual guest-side configuration, for establishing the same tablet <-> head relationship. However, neither goal seems to justify the complicated QOM property lookup that's internal to qemu_console_is_multihead(). Rework qemu_console_is_multihead() with plain old C language field accesses. Cc: "Marc-André Lureau" <marcandre.lur...@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kra...@redhat.com> (odd fixer:Graphics) Signed-off-by: Laszlo Ersek <ler...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-ID: <20230913144959.41891-4-ler...@redhat.com> Commit: 65d7ceb49b434d578cee61467c009cb16a794b16 https://github.com/qemu/qemu/commit/65d7ceb49b434d578cee61467c009cb16a794b16 Author: Laszlo Ersek <ler...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M ui/console.c Log Message: ----------- ui/console: sanitize search in qemu_graphic_console_is_multihead() qemu_graphic_console_is_multihead() declares the graphical console "c" a "multihead" console if there are two different graphical consoles in the system that (a) both reference "c->device", and (b) have different "c->head" numbers. In effect, if at least two graphical consoles exist that are different heads of the same device that underlies "c". In fact, "c" may be one of these two graphical consoles, or "c" may differ from both of those consoles (in case "c->device" has at least three heads). The loop currently uses this awkward "two different consoles" approach because the function used not to have access to "c", only to "c->device", which didn't allow for fetching (and comparing) "c->head". But, we've changed that in the last patch; we now pass all of "c" to qemu_graphic_console_is_multihead(). Thus, look for the *first* (and possibly *only*) graphical console, if any, that refers to the same "device" as "c", but by a different "head" number. Cc: "Marc-André Lureau" <marcandre.lur...@redhat.com> (odd fixer:Graphics) Cc: Gerd Hoffmann <kra...@redhat.com> (odd fixer:Graphics) Signed-off-by: Laszlo Ersek <ler...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-ID: <20230913144959.41891-5-ler...@redhat.com> Commit: 7db57a73f66463488fbd53fe5f9589de49534fe8 https://github.com/qemu/qemu/commit/7db57a73f66463488fbd53fe5f9589de49534fe8 Author: Ken Xue <ken....@amd.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M include/ui/qemu-pixman.h M ui/qemu-pixman.c Log Message: ----------- ui: add XBGR8888 and ABGR8888 in drm_format_pixman_map Android uses XBGR8888 and ABGR8888 as default scanout buffer, But qemu does not support them for qemu_pixman_to_drm_format conversion within virtio_gpu_create_dmabuf for virtio gpu. so, add those 2 formats into drm_format_pixman_map. Signed-off-by: Ken Xue <ken....@amd.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-ID: <20230914013151.805363-1-ken....@amd.com> Commit: 75b773d84c89220463a14a6883d2b2a8e49e5b68 https://github.com/qemu/qemu/commit/75b773d84c89220463a14a6883d2b2a8e49e5b68 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M include/qemu/compiler.h M util/oslib-win32.c Log Message: ----------- win32: avoid discarding the exception handler In all likelihood, the compiler with lto doesn't see the function being used, from assembly macro __try1. Help it by marking the function has being used. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1904 Fixes: commit d89f30b4df ("win32: wrap socket close() with an exception handler") Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Thomas Huth <th...@redhat.com> Commit: 9bd4d3df633593878ada3dffcfe05318754b4596 https://github.com/qemu/qemu/commit/9bd4d3df633593878ada3dffcfe05318754b4596 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M ui/gtk.c Log Message: ----------- ui/gtk: fix UI info precondition dpy_get_ui_info() shouldn't be called if the underlying GPU doesn't support it. Before the assert() was added and the regression introduced, GTK code used to get "zero" UI info, for ex with a simple VGA device. The assert was added to prevent from calling when there are no console too. The other display backend that calls dpy_get_ui_info() correctly checks that pre-condition. Calling dpy_set_ui_info() is "safe" in this case, it will simply return an error that can be generally ignored. Fixes: commit a92e7bb4c ("ui: add precondition for dpy_get_ui_info()") Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Commit: f1de309792d6656ef3443ba65272c4a868a43914 https://github.com/qemu/qemu/commit/f1de309792d6656ef3443ba65272c4a868a43914 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M scripts/analyze-migration.py Log Message: ----------- analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH Traceback (most recent call last): File "scripts/analyze-migration.py", line 605, in <module> dump.read(dump_memory = args.memory) File "scripts/analyze-migration.py", line 542, in read section.read() File "scripts/analyze-migration.py", line 214, in read raise Exception("Unknown RAM flags: %x" % flags) Exception: Unknown RAM flags: 200 See commit 77c259a4cb ("multifd: Create property multifd-flush-after-each-section") Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Fabiano Rosas <faro...@suse.de> Commit: 314e0a84cd5d3a8d04c9778eecb5618dee3574cf https://github.com/qemu/qemu/commit/314e0a84cd5d3a8d04c9778eecb5618dee3574cf Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M hw/core/machine.c Log Message: ----------- hw/core: remove needless includes The include list is large, make it smaller. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Acked-by: Laszlo Ersek <ler...@redhat.com> Commit: bf7e5215c40c9c38067798fdced94623f2ee0201 https://github.com/qemu/qemu/commit/bf7e5215c40c9c38067798fdced94623f2ee0201 Author: Marc-André Lureau <marcandre.lur...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M hw/i386/pc.c Log Message: ----------- hw/pc: remove needless includes The include list is gigantic, make it smaller. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Acked-by: Laszlo Ersek <ler...@redhat.com> Commit: e0288a778473ebd35eac6cc1924faca7d477d241 https://github.com/qemu/qemu/commit/e0288a778473ebd35eac6cc1924faca7d477d241 Author: Laszlo Ersek <ler...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M hw/display/ramfb.c Log Message: ----------- hw/display/ramfb: plug slight guest-triggerable leak on mode setting The fw_cfg DMA write callback in ramfb prepares a new display surface in QEMU; this new surface is put to use ("swapped in") upon the next display update. At that time, the old surface (if any) is released. If the guest triggers the fw_cfg DMA write callback at least twice between two adjacent display updates, then the second callback (and further such callbacks) will leak the previously prepared (but not yet swapped in) display surface. The issue can be shown by: (1) starting QEMU with "-trace displaysurface_free", and (2) running the following program in the guest UEFI shell: > #include <Library/ShellCEntryLib.h> // ShellAppMain() > #include <Library/UefiBootServicesTableLib.h> // gBS > #include <Protocol/GraphicsOutput.h> // EFI_GRAPHICS_OUTPUT_PROTOCOL > > INTN > EFIAPI > ShellAppMain ( > IN UINTN Argc, > IN CHAR16 **Argv > ) > { > EFI_STATUS Status; > VOID *Interface; > EFI_GRAPHICS_OUTPUT_PROTOCOL *Gop; > UINT32 Mode; > > Status = gBS->LocateProtocol ( > &gEfiGraphicsOutputProtocolGuid, > NULL, > &Interface > ); > if (EFI_ERROR (Status)) { > return 1; > } > > Gop = Interface; > > Mode = 1; > for ( ; ;) { > Status = Gop->SetMode (Gop, Mode); > if (EFI_ERROR (Status)) { > break; > } > > Mode = 1 - Mode; > } > > return 1; > } The symptom is then that: - only one trace message appears periodically, - the time between adjacent messages keeps increasing -- implying that some list structure (containing the leaked resources) keeps growing, - the "surface" pointer is ever different. > 18566@1695127471.449586:displaysurface_free surface=0x7f2fcc09a7c0 > 18566@1695127471.529559:displaysurface_free surface=0x7f2fcc9dac10 > 18566@1695127471.659812:displaysurface_free surface=0x7f2fcc441dd0 > 18566@1695127471.839669:displaysurface_free surface=0x7f2fcc0363d0 > 18566@1695127472.069674:displaysurface_free surface=0x7f2fcc413a80 > 18566@1695127472.349580:displaysurface_free surface=0x7f2fcc09cd00 > 18566@1695127472.679783:displaysurface_free surface=0x7f2fcc1395f0 > 18566@1695127473.059848:displaysurface_free surface=0x7f2fcc1cae50 > 18566@1695127473.489724:displaysurface_free surface=0x7f2fcc42fc50 > 18566@1695127473.969791:displaysurface_free surface=0x7f2fcc45dcc0 > 18566@1695127474.499708:displaysurface_free surface=0x7f2fcc70b9d0 > 18566@1695127475.079769:displaysurface_free surface=0x7f2fcc82acc0 > 18566@1695127475.709941:displaysurface_free surface=0x7f2fcc369c00 > 18566@1695127476.389619:displaysurface_free surface=0x7f2fcc32b910 > 18566@1695127477.119772:displaysurface_free surface=0x7f2fcc0d5a20 > 18566@1695127477.899517:displaysurface_free surface=0x7f2fcc086c40 > 18566@1695127478.729962:displaysurface_free surface=0x7f2fccc72020 > 18566@1695127479.609839:displaysurface_free surface=0x7f2fcc185160 > 18566@1695127480.539688:displaysurface_free surface=0x7f2fcc23a7e0 > 18566@1695127481.519759:displaysurface_free surface=0x7f2fcc3ec870 > 18566@1695127482.549930:displaysurface_free surface=0x7f2fcc634960 > 18566@1695127483.629661:displaysurface_free surface=0x7f2fcc26b140 > 18566@1695127484.759987:displaysurface_free surface=0x7f2fcc321700 > 18566@1695127485.940289:displaysurface_free surface=0x7f2fccaad100 We figured this wasn't a CVE-worthy problem, as only small amounts of memory were leaked (the framebuffer itself is mapped from guest RAM, QEMU only allocates administrative structures), plus libvirt restricts QEMU memory footprint anyway, thus the guest can only DoS itself. Plug the leak, by releasing the last prepared (not yet swapped in) display surface, if any, in the fw_cfg DMA write callback. Regarding the "reproducer", with the fix in place, the log is flooded with trace messages (one per fw_cfg write), *and* the trace message alternates between just two "surface" pointer values (i.e., nothing is leaked, the allocator flip-flops between two objects in effect). This issue appears to date back to the introducion of ramfb (995b30179bdc, "hw/display: add ramfb, a simple boot framebuffer living in guest ram", 2018-06-18). Cc: Gerd Hoffmann <kra...@redhat.com> (maintainer:ramfb) Cc: qemu-sta...@nongnu.org Fixes: 995b30179bdc Signed-off-by: Laszlo Ersek <ler...@redhat.com> Acked-by: Laszlo Ersek <ler...@redhat.com> Reviewed-by: Gerd Hoffmann <kra...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Message-ID: <20230919131955.27223-1-ler...@redhat.com> Commit: 4f7689f0817a717d18cc8aca298990760f27a89b https://github.com/qemu/qemu/commit/4f7689f0817a717d18cc8aca298990760f27a89b Author: Thomas Huth <th...@redhat.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M chardev/char-pty.c Log Message: ----------- chardev/char-pty: Avoid losing bytes when the other side just (re-)connected When starting a guest via libvirt with "virsh start --console ...", the first second of the console output is missing. This is especially annoying on s390x that only has a text console by default and no graphical output - if the bios fails to boot here, the information about what went wrong is completely lost. One part of the problem (there is also some things to be done on the libvirt side) is that QEMU only checks with a 1 second timer whether the other side of the pty is already connected, so the first second of the console output is always lost. This likely used to work better in the past, since the code once checked for a re-connection during write, but this has been removed in commit f8278c7d74 ("char-pty: remove the check for connection on write") to avoid some locking. To ease the situation here at least a little bit, let's check with g_poll() whether we could send out the data anyway, even if the connection has not been marked as "connected" yet. The file descriptor is marked as non-blocking anyway since commit fac6688a18 ("Do not hang on full PTY"), so this should not cause any trouble if the other side is not ready for receiving yet. With this patch applied, I can now successfully see the bios output of a s390x guest when running it with "virsh start --console" (with a patched version of virsh that fixes the remaining issues there, too). Reported-by: Marc Hartmayer <mhart...@linux.ibm.com> Signed-off-by: Thomas Huth <th...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Message-Id: <20230816210743.1319018-1-th...@redhat.com> Commit: 5783a530166c0881df6fe680e095e28d962fc198 https://github.com/qemu/qemu/commit/5783a530166c0881df6fe680e095e28d962fc198 Author: Karim Taha <kariem.taha...@gmail.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/syscall_defs.h Log Message: ----------- bsd-user: define TARGET_RFSPAWN for rfork to use vfork(2) semantics, and fix RLIM_INFINITY RLIM_INFINITY on FreeBSD, OpenBSD and NetBSD has value of ~(1<<63), caculated one way or another. Signed-off-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-2-kariem.taha...@gmail.com> Commit: d314ae93f1724fa2f5e9636aa6483acf9fa7505f https://github.com/qemu/qemu/commit/d314ae93f1724fa2f5e9636aa6483acf9fa7505f Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/syscall_defs.h Log Message: ----------- bsd-user: Define procctl(2) related structs Implement procctl flags and related structs: struct target_procctl_reaper_status struct target_procctl_reaper_pidinfo struct target_procctl_reaper_pids struct target_procctl_reaper_kill Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-3-kariem.taha...@gmail.com> Commit: 3f254cf203e7bebc3758058802f834d9ba6ca3dc https://github.com/qemu/qemu/commit/3f254cf203e7bebc3758058802f834d9ba6ca3dc Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/signal-common.h M bsd-user/signal.c Log Message: ----------- bsd-user: Implement host_to_target_siginfo. Used in wait6 system call Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-4-kariem.taha...@gmail.com> Commit: cc47390ce7553b29bc8fb12f171836ce5dbf61f5 https://github.com/qemu/qemu/commit/cc47390ce7553b29bc8fb12f171836ce5dbf61f5 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/qemu.h Log Message: ----------- bsd-user: Add freebsd_exec_common and do_freebsd_procctl to qemu.h. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-5-kariem.taha...@gmail.com> Commit: 00bff01fc09c5e3aed4d35842ebc3dbc36a56ee9 https://github.com/qemu/qemu/commit/00bff01fc09c5e3aed4d35842ebc3dbc36a56ee9 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: A bsd-user/qemu-bsd.h Log Message: ----------- bsd-user: add extern declarations for bsd-proc.c conversion functions Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-6-kariem.taha...@gmail.com> Commit: 0caa37687882569163ed5984d554938fb327ea3c https://github.com/qemu/qemu/commit/0caa37687882569163ed5984d554938fb327ea3c Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: A bsd-user/bsd-proc.c M bsd-user/bsd-proc.h M bsd-user/meson.build Log Message: ----------- bsd-user: Implement target_to_host_resource conversion function Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-7-kariem.taha...@gmail.com> Commit: 550fc7018993d4c21092d6882e4846fc3151d3ed https://github.com/qemu/qemu/commit/550fc7018993d4c21092d6882e4846fc3151d3ed Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.c Log Message: ----------- bsd-user: Implement target_to_host_rlim and host_to_target_rlim conversion. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-8-kariem.taha...@gmail.com> Commit: 66c51d63d408fe4130d3fb63524d7a009e1e01a6 https://github.com/qemu/qemu/commit/66c51d63d408fe4130d3fb63524d7a009e1e01a6 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.c Log Message: ----------- bsd-user: Implement host_to_target_rusage and host_to_target_wrusage. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-9-kariem.taha...@gmail.com> Commit: 3f44e273ff530ae9885b64791779ced571233d1d https://github.com/qemu/qemu/commit/3f44e273ff530ae9885b64791779ced571233d1d Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.c Log Message: ----------- bsd-user: Implement host_to_target_waitstatus conversion. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-10-kariem.taha...@gmail.com> Commit: b623031ca60b23dbb8a573306495e7d99821a9af https://github.com/qemu/qemu/commit/b623031ca60b23dbb8a573306495e7d99821a9af Author: Kyle Evans <kev...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.c M bsd-user/bsd-proc.h Log Message: ----------- bsd-user: Get number of cpus. Signed-off-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-11-kariem.taha...@gmail.com> Commit: a478416dc89f9eaceb8d6550efd8417a965153a2 https://github.com/qemu/qemu/commit/a478416dc89f9eaceb8d6550efd8417a965153a2 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement getgroups(2) and setgroups(2) system calls. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-12-kariem.taha...@gmail.com> Commit: 82fe5f3a3454fe19cfff1b52430ef783da10719a https://github.com/qemu/qemu/commit/82fe5f3a3454fe19cfff1b52430ef783da10719a Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement umask(2), setlogin(2) and getlogin(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-13-kariem.taha...@gmail.com> Commit: 59e801efdfce31b62d09793d35e85d3bdad0230c https://github.com/qemu/qemu/commit/59e801efdfce31b62d09793d35e85d3bdad0230c Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement getrusage(2). Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-14-kariem.taha...@gmail.com> Commit: faba8e123f41902edf762bb12054f096713a5338 https://github.com/qemu/qemu/commit/faba8e123f41902edf762bb12054f096713a5338 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement getrlimit(2) and setrlimit(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-15-kariem.taha...@gmail.com> Commit: e4446e0a2c8b4f32d53694a85ebdedc06cb69499 https://github.com/qemu/qemu/commit/e4446e0a2c8b4f32d53694a85ebdedc06cb69499 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement several get/set system calls: getpid(2), getppid(2), getpgrp(2) setreuid(2), setregid(2) getuid(2), geteuid(2), getgid(2), getegid(2), getpgid(2) setuid(2), seteuid(2), setgid(2), setegid(2), setpgid(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-16-kariem.taha...@gmail.com> Commit: 932683c3d421a2057e15cd7f87ad781c3d65fc95 https://github.com/qemu/qemu/commit/932683c3d421a2057e15cd7f87ad781c3d65fc95 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement get/set[resuid/resgid/sid] and issetugid. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-17-kariem.taha...@gmail.com> Commit: 615ad41c614bf0f2011bba43116434b66e40abc0 https://github.com/qemu/qemu/commit/615ad41c614bf0f2011bba43116434b66e40abc0 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Add stubs for profil(2), ktrace(2), utrace(2) and ptrace(2). Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-18-kariem.taha...@gmail.com> Commit: ff26637260d059f5b37d32f00d7881a8c21a06f9 https://github.com/qemu/qemu/commit/ff26637260d059f5b37d32f00d7881a8c21a06f9 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement getpriority(2) and setpriority(2). Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-19-kariem.taha...@gmail.com> Commit: 84d41c5e6dc69be9b3e0fb8ad5f1ff2007e0e8a1 https://github.com/qemu/qemu/commit/84d41c5e6dc69be9b3e0fb8ad5f1ff2007e0e8a1 Author: Karim Taha <kariem.taha...@gmail.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/meson.build A bsd-user/freebsd/os-proc.c Log Message: ----------- bsd-user: Implement get_filename_from_fd. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-20-kariem.taha...@gmail.com> Commit: 8632729060bf840560215c91c8611bd6769deff9 https://github.com/qemu/qemu/commit/8632729060bf840560215c91c8611bd6769deff9 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.c M bsd-user/main.c M bsd-user/qemu.h Log Message: ----------- bsd-user: Implement freebsd_exec_common, used in implementing execve/fexecve. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-21-kariem.taha...@gmail.com> Commit: dcaa3dfda379157a1e5148e112a77aa7e1d79c58 https://github.com/qemu/qemu/commit/dcaa3dfda379157a1e5148e112a77aa7e1d79c58 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.c M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement procctl(2) along with necessary conversion functions. Implement t2h_procctl_cmd, h2t_reaper_status, h2t_reaper_pidinfo and h2t/t2h reaper_kill conversion functions. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-22-kariem.taha...@gmail.com> Commit: 36999e6a6bb1e3c7d7d40c751b67d5886f023ee9 https://github.com/qemu/qemu/commit/36999e6a6bb1e3c7d7d40c751b67d5886f023ee9 Author: Karim Taha <kariem.taha...@gmail.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: A bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement execve(2) and fexecve(2) system calls. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-23-kariem.taha...@gmail.com> Commit: ae502887cb3e3aa38bc0837cd7580f7a6768a649 https://github.com/qemu/qemu/commit/ae502887cb3e3aa38bc0837cd7580f7a6768a649 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement wait4(2) and wait6(2) system calls. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-24-kariem.taha...@gmail.com> Commit: 159e5b0c4bb00ade2d53e6c482ecda59f69fbdde https://github.com/qemu/qemu/commit/159e5b0c4bb00ade2d53e6c482ecda59f69fbdde Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement setloginclass(2) and getloginclass(2) system calls. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-25-kariem.taha...@gmail.com> Commit: 0571e3f5e20e4a93b0d59c948bcd89b60033d0be https://github.com/qemu/qemu/commit/0571e3f5e20e4a93b0d59c948bcd89b60033d0be Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement pdgetpid(2) and the undocumented setugid. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-26-kariem.taha...@gmail.com> Commit: 831a5a7fcbb3bfc36e8e7ed511817e8390344f87 https://github.com/qemu/qemu/commit/831a5a7fcbb3bfc36e8e7ed511817e8390344f87 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement fork(2) and vfork(2) system calls. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-27-kariem.taha...@gmail.com> Commit: 510eecbc86e1aa93c17e9e0a3acced366b0258e1 https://github.com/qemu/qemu/commit/510eecbc86e1aa93c17e9e0a3acced366b0258e1 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement rfork(2) system call. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-28-kariem.taha...@gmail.com> Commit: 6756ae283ac7fe43b8bbc1d8662dfe238f667032 https://github.com/qemu/qemu/commit/6756ae283ac7fe43b8bbc1d8662dfe238f667032 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement pdfork(2) system call. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Acked-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182425.3163-29-kariem.taha...@gmail.com> Commit: 61a8f1100759a320940e8c53eaaefb37a4c603fb https://github.com/qemu/qemu/commit/61a8f1100759a320940e8c53eaaefb37a4c603fb Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/syscall_defs.h Log Message: ----------- bsd-user: Implement struct target_ipc_perm Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182709.4834-2-kariem.taha...@gmail.com> Commit: 695cb9137f6c1b1bf940d303b2f26a46241056b8 https://github.com/qemu/qemu/commit/695cb9137f6c1b1bf940d303b2f26a46241056b8 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/syscall_defs.h Log Message: ----------- bsd-user: Implement struct target_shmid_ds Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182709.4834-3-kariem.taha...@gmail.com> Commit: 1d4c4026b15045e45de5c6f64e4b6322274680e7 https://github.com/qemu/qemu/commit/1d4c4026b15045e45de5c6f64e4b6322274680e7 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/qemu-bsd.h Log Message: ----------- bsd-user: Declarations for ipc_perm and shmid_ds conversion functions Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182709.4834-4-kariem.taha...@gmail.com> Commit: 137d963cfb1c9f0d9e76a40229df2996809b746b https://github.com/qemu/qemu/commit/137d963cfb1c9f0d9e76a40229df2996809b746b Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: A bsd-user/freebsd/os-misc.h Log Message: ----------- bsd-user: Introduce freebsd/os-misc.h to the source tree To preserve the copyright notice and help with the 'Author' info for subsequent changes to the file. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182709.4834-5-kariem.taha...@gmail.com> Commit: 0c3529888a427cefe248227423f7a89c8f665fab https://github.com/qemu/qemu/commit/0c3529888a427cefe248227423f7a89c8f665fab Author: Karim Taha <kariem.taha...@gmail.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-misc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement shm_open2(2) system call Signed-off-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-6-kariem.taha...@gmail.com> Commit: 182ea728e06a09e6ceaa9d62a279e883459d36dd https://github.com/qemu/qemu/commit/182ea728e06a09e6ceaa9d62a279e883459d36dd Author: Kyle Evans <kev...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/freebsd/os-misc.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement shm_rename(2) system call Signed-off-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182709.4834-7-kariem.taha...@gmail.com> Commit: dde5f40dc38d61e80a91c482d9faf45eacdceed8 https://github.com/qemu/qemu/commit/dde5f40dc38d61e80a91c482d9faf45eacdceed8 Author: Karim Taha <kariem.taha...@gmail.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: A bsd-user/bsd-mem.c M bsd-user/meson.build Log Message: ----------- bsd-user: Add bsd-mem.c to meson.build Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182709.4834-8-kariem.taha...@gmail.com> Commit: c9cdf0a5ecfd16176e48a8cec6fc4a22d9d7b229 https://github.com/qemu/qemu/commit/c9cdf0a5ecfd16176e48a8cec6fc4a22d9d7b229 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.c M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement target_set_brk function in bsd-mem.c instead of os-syscall.c The definitions and variables names matches the corresponding ones in linux-user/syscall.c, for making later implementation of do_obreak easier Co-authored-by: Mikaël Urankar <mikael.uran...@gmail.com> Signed-off-by: Mikaël Urankar <mikael.uran...@gmail.com> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-9-kariem.taha...@gmail.com> Commit: 86fbb4436bd09c5006c1f07d4cb007b2e91b595a https://github.com/qemu/qemu/commit/86fbb4436bd09c5006c1f07d4cb007b2e91b595a Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.c Log Message: ----------- bsd-user: Implement ipc_perm conversion between host and target. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-10-kariem.taha...@gmail.com> Commit: bd2b73182f5a793c1b226a2846c847faaa7b3e9d https://github.com/qemu/qemu/commit/bd2b73182f5a793c1b226a2846c847faaa7b3e9d Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.c Log Message: ----------- bsd-user: Implement shmid_ds conversion between host and target. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-11-kariem.taha...@gmail.com> Commit: 6765e988e12825e9464a10b6451aeb25b29bfbc3 https://github.com/qemu/qemu/commit/6765e988e12825e9464a10b6451aeb25b29bfbc3 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: A bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Introduce bsd-mem.h to the source tree Preserve the copyright notice and help with the 'Author' info for subsequent changes to the file. Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-12-kariem.taha...@gmail.com> Commit: 87dcb4ad485424dcbfedbc7a298279e8738f1a40 https://github.com/qemu/qemu/commit/87dcb4ad485424dcbfedbc7a298279e8738f1a40 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement mmap(2) and munmap(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-13-kariem.taha...@gmail.com> Commit: ecbe22494d970b7811a1764d2f98e083b02f73d0 https://github.com/qemu/qemu/commit/ecbe22494d970b7811a1764d2f98e083b02f73d0 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement mprotect(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Warner Losh <i...@bsdimp.com> Message-Id: <20230925182709.4834-14-kariem.taha...@gmail.com> Commit: f28a1e4bab4cfdd067bde3d958529575aa8e8f6b https://github.com/qemu/qemu/commit/f28a1e4bab4cfdd067bde3d958529575aa8e8f6b Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement msync(2) Co-authored-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-15-kariem.taha...@gmail.com> Commit: 0a49ef02a643864a9c6a36ebaf452e0d30c96b0b https://github.com/qemu/qemu/commit/0a49ef02a643864a9c6a36ebaf452e0d30c96b0b Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement mlock(2), munlock(2), mlockall(2), munlockall(2), minherit(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-16-kariem.taha...@gmail.com> Commit: 0c1ced42c84bdd8beeef6c40dff8d143cf409f15 https://github.com/qemu/qemu/commit/0c1ced42c84bdd8beeef6c40dff8d143cf409f15 Author: Karim Taha <kariem.taha...@gmail.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c M bsd-user/syscall_defs.h Log Message: ----------- bsd-user: Implment madvise(2) to match the linux-user implementation. Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-17-kariem.taha...@gmail.com> Commit: 83b045ad4e0106836963185ed696991883104359 https://github.com/qemu/qemu/commit/83b045ad4e0106836963185ed696991883104359 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement mincore(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-18-kariem.taha...@gmail.com> Commit: a99d74034754b1d8735d814cf17db6bf0eb4bfd1 https://github.com/qemu/qemu/commit/a99d74034754b1d8735d814cf17db6bf0eb4bfd1 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement do_obreak function Match linux-user, by manually applying the following commits, in order: d28b3c90cfad1a7e211ae2bce36ecb9071086129 linux-user: Make sure initial brk(0) is page-aligned 15ad98536ad9410fb32ddf1ff09389b677643faa linux-user: Fix qemu brk() to not zero bytes on current page dfe49864afb06e7e452a4366051697bc4fcfc1a5 linux-user: Prohibit brk() to to shrink below initial heap address eac78a4b0b7da4de2c0a297f4d528ca9cc6256a3 linux-user: Fix signed math overflow in brk() syscall c6cc059eca18d9f6e4e26bb8b6d1135ddb35d81a linux-user: Do not call get_errno() in do_brk() e69e032d1a8ee8d754ca119009a3c2c997f8bb30 linux-user: Use MAP_FIXED_NOREPLACE for do_brk() cb9d5d1fda0bc2312fc0c779b4ea1d7bf826f31f linux-user: Do nothing if too small brk is specified 2aea137a425a87b930a33590177b04368fd7cc12 linux-user: Do not align brk with host page size Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-19-kariem.taha...@gmail.com> Commit: 4f0be683e399e7685608b83240da099ea45d84e6 https://github.com/qemu/qemu/commit/4f0be683e399e7685608b83240da099ea45d84e6 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement shm_open(2) Co-authored-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Kyle Evans <kev...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-20-kariem.taha...@gmail.com> Commit: 9d14db15b121c81a008098c46053d98cd6a0da6b https://github.com/qemu/qemu/commit/9d14db15b121c81a008098c46053d98cd6a0da6b Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement shm_unlink(2) and shmget(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Warner Losh <i...@bsdimp.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-21-kariem.taha...@gmail.com> Commit: f9bbe3cf28ae7157724a364da6f4a7231f2fdfb3 https://github.com/qemu/qemu/commit/f9bbe3cf28ae7157724a364da6f4a7231f2fdfb3 Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Implement shmctl(2) Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-22-kariem.taha...@gmail.com> Commit: 4e00b7d85d0dcc2064c68168163d3a411e32798f https://github.com/qemu/qemu/commit/4e00b7d85d0dcc2064c68168163d3a411e32798f Author: Stacey Son <s...@freebsd.org> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c M bsd-user/mmap.c M bsd-user/qemu.h Log Message: ----------- bsd-user: Implement shmat(2) and shmdt(2) Use `WITH_MMAP_LOCK_GUARD` instead of mmap_lock() and mmap_unlock(), to match linux-user implementation, according to the following commits: 69fa2708a216df715ba5102a0f98468b540a464e linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt} ceda5688b650646248f269a992c06b11148c5759 linux-user: Fix shmdt Signed-off-by: Stacey Son <s...@freebsd.org> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Message-Id: <20230925182709.4834-23-kariem.taha...@gmail.com> Commit: dfa1d915756b2d9d22946cbd7d2587f30cdcb7a3 https://github.com/qemu/qemu/commit/dfa1d915756b2d9d22946cbd7d2587f30cdcb7a3 Author: Warner Losh <i...@bsdimp.com> Date: 2023-10-03 (Tue, 03 Oct 2023) Changed paths: M bsd-user/bsd-mem.h M bsd-user/freebsd/os-syscall.c Log Message: ----------- bsd-user: Add stubs for vadvise(), sbrk() and sstk() The above system calls are not supported by qemu. Signed-off-by: Warner Losh <i...@bsdimp.com> Signed-off-by: Karim Taha <kariem.taha...@gmail.com> Reviewed-by: Richard Henderson <richard.hender...@linaro.org> Message-Id: <20230925182709.4834-24-kariem.taha...@gmail.com> Commit: 969298f9d7ed0ccad39203bc3656805cbf0893d4 https://github.com/qemu/qemu/commit/969298f9d7ed0ccad39203bc3656805cbf0893d4 Author: Tejus GK <tejus...@nutanix.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M include/migration/vmstate.h M migration/savevm.c M migration/vmstate.c Log Message: ----------- migration/vmstate: Introduce vmstate_save_state_with_err 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 <pet...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Tejus GK <tejus...@nutanix.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20231003065538.244752-2-tejus...@nutanix.com> Commit: 848a0503422d043d541130d5e3e2f7bc147cdef9 https://github.com/qemu/qemu/commit/848a0503422d043d541130d5e3e2f7bc147cdef9 Author: Tejus GK <tejus...@nutanix.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M migration/savevm.c M migration/vmstate.c Log Message: ----------- migration: Update error description outside migration.c 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 <pet...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Tejus GK <tejus...@nutanix.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20231003065538.244752-3-tejus...@nutanix.com> Commit: 8ebcb4b31264a1b2e87f7c61c2d746be1974b333 https://github.com/qemu/qemu/commit/8ebcb4b31264a1b2e87f7c61c2d746be1974b333 Author: Peter Xu <pet...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M MAINTAINERS Log Message: ----------- MAINTAINERS: Add entry for rdma migration 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é <berra...@redhat.com> Cc: Juan Quintela <quint...@redhat.com> Cc: Markus Armbruster <arm...@redhat.com> Cc: Zhijian Li (Fujitsu) <lizhij...@fujitsu.com> Cc: Fabiano Rosas <faro...@suse.de> Acked-by: Li Zhijian <lizhij...@fujitsu.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Peter Xu <pet...@redhat.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20230925133441.265455-1-pet...@redhat.com> Commit: 2bace555b3bd7bb38a58b9862016c4528b331fdb https://github.com/qemu/qemu/commit/2bace555b3bd7bb38a58b9862016c4528b331fdb Author: Peter Xu <pet...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M MAINTAINERS Log Message: ----------- migration: Add co-maintainers for migration 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 <faro...@suse.de> Cc: Juan Quintela <quint...@redhat.com> Acked-by: Fabiano Rosas <faro...@suse.de> Reviewed-by: Juan Quintela <quint...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Peter Xu <pet...@redhat.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20231003143847.9245-1-pet...@redhat.com> Commit: 2ada4b63f1764d13a2b9ca9cbeb5feda46ab6851 https://github.com/qemu/qemu/commit/2ada4b63f1764d13a2b9ca9cbeb5feda46ab6851 Author: Li Zhijian <lizhij...@fujitsu.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M migration/rdma.c Log Message: ----------- migration/rdma: zore out head.repeat to make the error more clear 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 <faro...@suse.de> Reviewed-by: Peter Xu <pet...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Li Zhijian <lizhij...@fujitsu.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20230926100103.201564-2-lizhij...@fujitsu.com> Commit: 67aeae794e51b3238ced158218edf443f8607626 https://github.com/qemu/qemu/commit/67aeae794e51b3238ced158218edf443f8607626 Author: Daniil Tatianin <d-tatia...@yandex-team.ru> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M tests/migration/i386/a-b-bootblock.S Log Message: ----------- i386/a-b-bootblock: factor test memory addresses out into constants 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 <pet...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Daniil Tatianin <d-tatia...@yandex-team.ru> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20230919102346.2117963-2-d-tatia...@yandex-team.ru> Commit: adc1914a403e0ec89ebec4761ec8427668261c5b https://github.com/qemu/qemu/commit/adc1914a403e0ec89ebec4761ec8427668261c5b Author: Daniil Tatianin <d-tatia...@yandex-team.ru> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M tests/migration/i386/a-b-bootblock.S M tests/migration/i386/a-b-bootblock.h Log Message: ----------- i386/a-b-bootblock: zero the first byte of each page on start 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: ea0c6d62391 ("test: Postcopy") Signed-off-by: Daniil Tatianin <d-tatia...@yandex-team.ru> Reviewed-by: Peter Xu <pet...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20230919102346.2117963-3-d-tatia...@yandex-team.ru> Commit: b28e3ecf0de1bc77b6a1a520e3c223f37b5afce2 https://github.com/qemu/qemu/commit/b28e3ecf0de1bc77b6a1a520e3c223f37b5afce2 Author: Daniil Tatianin <d-tatia...@yandex-team.ru> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M tests/migration/s390x/a-b-bios.c M tests/migration/s390x/a-b-bios.h Log Message: ----------- s390x/a-b-bios: zero the first byte of each page on start 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: 5571dc824b ("tests/migration: Enable the migration test on s390x, too") Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru> Reviewed-by: Peter Xu <pet...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Daniil Tatianin <d-tatia...@yandex-team.ru> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20230919102346.2117963-4-d-tatia...@yandex-team.ru> Commit: 2a9e2e595f2bc81c07e2f06ef9ba7d4c68897f1c https://github.com/qemu/qemu/commit/2a9e2e595f2bc81c07e2f06ef9ba7d4c68897f1c Author: Steve Sistare <steven.sist...@oracle.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: A migration/file.c A migration/file.h M migration/meson.build M migration/migration.c M migration/trace-events M qemu-options.hx Log Message: ----------- migration: file URI 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 <steven.sist...@oracle.com> Tested-by: Michael Galaxy <mgal...@akamai.com> Reviewed-by: Michael Galaxy <mgal...@akamai.com> Reviewed-by: Fabiano Rosas <faro...@suse.de> Reviewed-by: Peter Xu <pet...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <1694182931-61390-2-git-send-email-steven.sist...@oracle.com> Commit: 385f510df5f6a7f3998b3ff01deca33b0027ff29 https://github.com/qemu/qemu/commit/385f510df5f6a7f3998b3ff01deca33b0027ff29 Author: Steve Sistare <steven.sist...@oracle.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M migration/file.c M qemu-options.hx Log Message: ----------- migration: file URI offset 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 <berra...@redhat.com> Reviewed-by: Peter Xu <pet...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Steve Sistare <steven.sist...@oracle.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <1694182931-61390-3-git-send-email-steven.sist...@oracle.com> Commit: 579cedf430582b37f804f6b6ed131554cebb11b5 https://github.com/qemu/qemu/commit/579cedf430582b37f804f6b6ed131554cebb11b5 Author: Peter Xu <pet...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M migration/trace-events M migration/vmstate.c Log Message: ----------- migration: Unify and trace vmstate field_exists() checks 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 <faro...@suse.de> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Peter Xu <pet...@redhat.com> Signed-off-by: Juan Quintela <quint...@redhat.com> Message-ID: <20230906204722.514474-1-pet...@redhat.com> Commit: 9afa888ce0f816d0f2cfc95eebe4f49244c518af https://github.com/qemu/qemu/commit/9afa888ce0f816d0f2cfc95eebe4f49244c518af Author: Daniel P. Berrangé <berra...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M include/qemu/osdep.h M meson.build M util/coroutine-sigaltstack.c M util/coroutine-ucontext.c Log Message: ----------- osdep: set _FORTIFY_SOURCE=2 when optimization is enabled 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é <berra...@redhat.com> Message-id: 20231003091549.223020-1-berra...@redhat.com Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Commit: c7c907bc2082724556ba30d25535d8a7c6a953d0 https://github.com/qemu/qemu/commit/c7c907bc2082724556ba30d25535d8a7c6a953d0 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M chardev/char-pty.c M hw/core/machine.c M hw/display/ramfb.c M hw/i386/pc.c M include/qemu/compiler.h M include/ui/console.h M include/ui/input.h M include/ui/qemu-pixman.h M scripts/analyze-migration.py M ui/cocoa.m M ui/console.c M ui/dbus-console.c M ui/gtk.c M ui/input.c M ui/qemu-pixman.c M ui/sdl2.c M ui/spice-input.c M ui/trace-events M ui/vnc.c M util/oslib-win32.c Log Message: ----------- Merge tag 'misc-pull-request' of https://gitlab.com/marcandre.lureau/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 "marcandre.lur...@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lur...@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lur...@gmail.com>" [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 <stefa...@redhat.com> Commit: 80dcaf682a4399578edb4922472e599f014484e0 https://github.com/qemu/qemu/commit/80dcaf682a4399578edb4922472e599f014484e0 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: A bsd-user/bsd-mem.c A bsd-user/bsd-mem.h A bsd-user/bsd-proc.c M bsd-user/bsd-proc.h M bsd-user/freebsd/meson.build A bsd-user/freebsd/os-misc.h A bsd-user/freebsd/os-proc.c A bsd-user/freebsd/os-proc.h M bsd-user/freebsd/os-syscall.c M bsd-user/main.c M bsd-user/meson.build M bsd-user/mmap.c A bsd-user/qemu-bsd.h M bsd-user/qemu.h M bsd-user/signal-common.h M bsd-user/signal.c M bsd-user/syscall_defs.h Log Message: ----------- Merge tag 'bsd-user-mmap-pull-request' of https://gitlab.com/bsdimp/qemu 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 <wl...@netflix.com>" [unknown] # gpg: aka "Warner Losh <i...@bsdimp.com>" [unknown] # gpg: aka "Warner Losh <i...@freebsd.org>" [unknown] # gpg: aka "Warner Losh <i...@village.org>" [unknown] # gpg: aka "Warner Losh <wl...@bsdimp.com>" [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 <stefa...@redhat.com> Commit: 6dcf8a9a749bb612aff8b172d55b53d5d994e28c https://github.com/qemu/qemu/commit/6dcf8a9a749bb612aff8b172d55b53d5d994e28c Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M MAINTAINERS M include/migration/vmstate.h A migration/file.c A migration/file.h M migration/meson.build M migration/migration.c M migration/rdma.c M migration/savevm.c M migration/trace-events M migration/vmstate.c M qemu-options.hx M tests/migration/i386/a-b-bootblock.S M tests/migration/i386/a-b-bootblock.h M tests/migration/s390x/a-b-bios.c M tests/migration/s390x/a-b-bios.h Log Message: ----------- Merge tag 'migration-20231004-pull-request' of https://gitlab.com/juan.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 <quint...@redhat.com>" [full] # gpg: aka "Juan Quintela <quint...@trasno.org>" [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 <stefa...@redhat.com> Commit: 7598971167080a8328a1b8e22425839cb4ccf7b7 https://github.com/qemu/qemu/commit/7598971167080a8328a1b8e22425839cb4ccf7b7 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2023-10-04 (Wed, 04 Oct 2023) Changed paths: M include/qemu/osdep.h M meson.build M util/coroutine-sigaltstack.c M util/coroutine-ucontext.c Log Message: ----------- Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into 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 <stefa...@redhat.com>" [ultimate] # gpg: aka "Stefan Hajnoczi <stefa...@gmail.com>" [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 <stefa...@redhat.com> Compare: https://github.com/qemu/qemu/compare/da1034094d37...759897116708