- Oct 04, 2023
-
-
Gurchetan Singh authored
This adds basic documentation for virtio-gpu. Suggested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by:
Antonio Caggiano <quic_acaggian@quicinc.com> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Gurchetan Singh authored
This change enables rutabaga to receive virtio-gpu-3d hypercalls when it is active. Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by:
Antonio Caggiano <quic_acaggian@quicinc.com> Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Gurchetan Singh authored
- Add meson detection of rutabaga_gfx - Build virtio-gpu-rutabaga.c + associated vga/pci files when present Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by:
Antonio Caggiano <quic_acaggian@quicinc.com> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Gurchetan Singh authored
This adds initial support for gfxstream and cross-domain. Both features rely on virtio-gpu blob resources and context types, which are also implemented in this patch. gfxstream has a long and illustrious history in Android graphics paravirtualization. It has been powering graphics in the Android Studio Emulator for more than a decade, which is the main developer platform. Originally conceived by Jesse Hall, it was first known as "EmuGL" [a]. The key design characteristic was a 1:1 threading model and auto-generation, which fit nicely with the OpenGLES spec. It also allowed easy layering with ANGLE on the host, which provides the GLES implementations on Windows or MacOS enviroments. gfxstream has traditionally been maintained by a single engineer, and between 2015 to 2021, the goldfish throne passed to Frank Yang. Historians often remark this glorious reign ("pax gfxstreama" is the academic term) was comparable to that of Augustus and both Queen Elizabeths. Just to name a few accomplishments in a resplendent panoply: higher versions of GLES, address space graphics, snapshot support and CTS compliant Vulkan [b]. One major drawback was the use of out-of-tree goldfish drivers. Android engineers didn't know much about DRM/KMS and especially TTM so a simple guest to host pipe was conceived. Luckily, virtio-gpu 3D started to emerge in 2016 due to the work of the Mesa/virglrenderer communities. In 2018, the initial virtio-gpu port of gfxstream was done by Cuttlefish enthusiast Alistair Delva. It was a symbol compatible replacement of virglrenderer [c] and named "AVDVirglrenderer". This implementation forms the basis of the current gfxstream host implementation still in use today. cross-domain support follows a similar arc. Originally conceived by Wayland aficionado David Reveman and crosvm enjoyer Zach Reizner in 2018, it initially relied on the downstream "virtio-wl" device. In 2020 and 2021, virtio-gpu was extended to include blob resources and multiple timelines by yours truly, features gfxstream/cross-domain both require to function correctly. Right now, we stand at the precipice of a truly fantastic possibility: the Android Emulator powered by upstream QEMU and upstream Linux kernel. gfxstream will then be packaged properfully, and app developers can even fix gfxstream bugs on their own if they encounter them. It's been quite the ride, my friends. Where will gfxstream head next, nobody really knows. I wouldn't be surprised if it's around for another decade, maintained by a new generation of Android graphics enthusiasts. Technical details: - Very simple initial display integration: just used Pixman - Largely, 1:1 mapping of virtio-gpu hypercalls to rutabaga function calls Next steps for Android VMs: - The next step would be improving display integration and UI interfaces with the goal of the QEMU upstream graphics being in an emulator release [d]. Next steps for Linux VMs for display virtualization: - For widespread distribution, someone needs to package Sommelier or the wayland-proxy-virtwl [e] ideally into Debian main. In addition, newer versions of the Linux kernel come with DRM_VIRTIO_GPU_KMS option, which allows disabling KMS hypercalls. If anyone cares enough, it'll probably be possible to build a custom VM variant that uses this display virtualization strategy. [a] https://android-review.googlesource.com/c/platform/development/+/34470 [b] https://android-review.googlesource.com/q/topic:%22vulkan-hostconnection-start%22 [c] https://android-review.googlesource.com/c/device/generic/goldfish-opengl/+/761927 [d] https://developer.android.com/studio/releases/emulator [e] https://github.com/talex5/wayland-proxy-virtwl Signed-off-by:Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by:
Antonio Caggiano <quic_acaggian@quicinc.com> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Gurchetan Singh authored
This modifies the common virtio-gpu.h file have the fields and defintions needed by gfxstream/rutabaga, by VirtioGpuRutabaga. Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by:
Antonio Caggiano <quic_acaggian@quicinc.com> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Antonio Caggiano authored
This adds preparatory functions needed to: - decode blob cmds - tracking iovecs Signed-off-by:Antonio Caggiano <antonio.caggiano@collabora.com> Signed-off-by:
Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by:
Huang Rui <ray.huang@amd.com> Acked-by:
Huang Rui <ray.huang@amd.com> Reviewed-by:
Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Gerd Hoffmann authored
Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by:
Antonio Caggiano <antonio.caggiano@collabora.com> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by:
Huang Rui <ray.huang@amd.com> Acked-by:
Huang Rui <ray.huang@amd.com> Acked-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Antonio Caggiano authored
The feature can be enabled when a backend wants it. Signed-off-by:
Antonio Caggiano <antonio.caggiano@collabora.com> Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by:
Huang Rui <ray.huang@amd.com> Acked-by:
Huang Rui <ray.huang@amd.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
Dr. David Alan Gilbert authored
Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' to allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distinguished by a device-specific 'id'. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by:
Antonio Caggiano <antonio.caggiano@collabora.com> Signed-off-by:
Gurchetan Singh <gurchetansingh@chromium.org> Tested-by:
Alyssa Ross <hi@alyssa.is> Tested-by:
Huang Rui <ray.huang@amd.com> Tested-by:
Akihiko Odaki <akihiko.odaki@daynix.com> Acked-by:
Huang Rui <ray.huang@amd.com> Reviewed-by:
Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by:
Akihiko Odaki <akihiko.odaki@daynix.com>
-
https://gitlab.com/stefanha/qemuStefan Hajnoczi authored
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 <stefanha@redhat.com>" [ultimate] # gpg: aka "Stefan Hajnoczi <stefanha@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 <stefanha@redhat.com> -
https://gitlab.com/juan.quintela/qemuStefan Hajnoczi authored
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 <quintela@redhat.com>" [full] # gpg: aka "Juan Quintela <quintela@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 <stefanha@redhat.com> -
https://gitlab.com/bsdimp/qemuStefan Hajnoczi authored
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 <wlosh@netflix.com>" [unknown] # gpg: aka "Warner Losh <imp@bsdimp.com>" [unknown] # gpg: aka "Warner Losh <imp@freebsd.org>" [unknown] # gpg: aka "Warner Losh <imp@village.org>" [unknown] # gpg: aka "Warner Losh <wlosh@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 <stefanha@redhat.com> -
https://gitlab.com/marcandre.lureau/qemuStefan Hajnoczi authored
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.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@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 <stefanha@redhat.com> -
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é <berrange@redhat.com> Message-id: 20231003091549.223020-1-berrange@redhat.com Signed-off-by: Stefan ...
-
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: qemu-project/qemu#932 Reviewed-by:
Fabiano Rosas <farosas@suse.de> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230906204722.514474-1-peterx@redhat.com>
-
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 <berrange@redhat.com> Reviewed-by:
Peter Xu <peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Steve Sistare <steven.sistare@oracle.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <1694182931-61390-3-git-send-email-steven.sistare@oracle.com>
-
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.sistare@oracle.com> Tested-by:
Michael Galaxy <mgalaxy@akamai.com> Reviewed-by:
Michael Galaxy <mgalaxy@akamai.com> Reviewed-by: Fabiano R...
-
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: 5571dc82 ("tests/migration: Enable the migration test on s390x, too") Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by:
Daniil Tatianin <d-tatianin@yandex-team.ru> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230919102346.2117963-4-d-tatianin@yandex-team.ru>
-
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: ea0c6d62 ("test: Postcopy") Signed-off-by:Daniil Tatianin <d-tatianin@yandex-team.ru> Reviewed-by:
Peter Xu <peterx@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230919102346.2117963-3-d-tatianin@yandex-team.ru>
-
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 <peterx@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Daniil Tatianin <d-tatianin@yandex-team.ru> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230919102346.2117963-2-d-tatianin@yandex-team.ru>
-
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 <farosas@suse.de> Reviewed-by:
Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by:
Li Zhijian <lizhijian@fujitsu.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20230926100103.201564-2-lizhijian@fujitsu.com>
-
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 <farosas@suse.de> Cc: Juan Quintela <quintela@redhat.com> Acked-by:
Fabiano Rosas <farosas@suse.de> Reviewed-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231003143847.9245-1-peterx@redhat.com>
-
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é <berrange@redhat.com> Cc: Juan Quintela <quintela@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Zhijian Li (Fujitsu) <lizhijian@fujitsu.com> Cc: Fabiano Rosas <farosas@suse.de> Acked-by:
Li Zhijian <lizhijian@fujitsu.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230925133441.265455-1-peterx@redhat.com>
-
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 <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by:
Tejus GK <tejus.gk@nutanix.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20231003065538.244752-3-tejus.gk@nutanix.com>
-
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 <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by:
Tejus GK <tejus.gk@nutanix.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Message-ID: <20231003065538.244752-2-tejus.gk@nutanix.com>
-
- Oct 03, 2023
-
-
Warner Losh authored
The above system calls are not supported by qemu. Signed-off-by:
Warner Losh <imp@bsdimp.com> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-24-kariem.taha2.7@gmail.com>
-
Use `WITH_MMAP_LOCK_GUARD` instead of mmap_lock() and mmap_unlock(), to match linux-user implementation, according to the following commits: 69fa2708 linux-user: Use WITH_MMAP_LOCK_GUARD in target_{shmat,shmdt} ceda5688 linux-user: Fix shmdt Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Message-Id: <20230925182709.4834-23-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-22-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-21-kariem.taha2.7@gmail.com>
-
Co-authored-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-20-kariem.taha2.7@gmail.com>
-
Match linux-user, by manually applying the following commits, in order: d28b3c90 linux-user: Make sure initial brk(0) is page-aligned 15ad9853 linux-user: Fix qemu brk() to not zero bytes on current page dfe49864 linux-user: Prohibit brk() to to shrink below initial heap address eac78a4b linux-user: Fix signed math overflow in brk() syscall c6cc059e linux-user: Do not call get_errno() in do_brk() e69e032d linux-user: Use MAP_FIXED_NOREPLACE for do_brk() cb9d5d1f linux-user: Do nothing if too small brk is specified 2aea137a linux-user: Do not align brk with host page size Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-19-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-18-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-17-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-16-kariem.taha2.7@gmail.com>
-
Co-authored-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Kyle Evans <kevans@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-15-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Warner Losh <imp@bsdimp.com> Message-Id: <20230925182709.4834-14-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-13-kariem.taha2.7@gmail.com>
-
Preserve the copyright notice and help with the 'Author' info for subsequent changes to the file. Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Warner Losh <imp@bsdimp.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-12-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-11-kariem.taha2.7@gmail.com>
-
Signed-off-by:
Stacey Son <sson@FreeBSD.org> Signed-off-by:
Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230925182709.4834-10-kariem.taha2.7@gmail.com>
-