- Oct 20, 2023
-
-
Pierre Morel authored
S390x provides two more topology attributes, entitlement and dedication. Let's add these CPU attributes to the QAPI command query-cpu-fast. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Co-developed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-11-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
The modification of the CPU attributes are done through a monitor command. It allows to move the core inside the topology tree to optimize the cache usage in the case the host's hypervisor previously moved the CPU. The same command allows to modify the CPU attributes modifiers like polarization entitlement and the dedicated attribute to notify the guest if the host admin modified scheduling or dedication of a vCPU. With this knowledge the guest has the possibility to optimize the usage of the vCPUs. The command has a feature unstable for the moment. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Co-developed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Acked-by:
Markus Armbruster <armbru@redhat.com> Message-ID: <20231016183925.2384704-10-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
The KVM capability KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility in the host CPU model for the guest in the case the topology is available in QEMU and in KVM. The feature is disabled by default and fenced for SE (secure execution). Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-ID: <20231016183925.2384704-9-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervisor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are intercepted and must be emulated by the userland hypervisor. During RESET all CPU of the configuration are placed in horizontal polarity. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Co-developed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-8-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Co-developed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-7-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
The maximum nested topology entries is used by the guest to know how many nested topology are available on the machine. Let change the MNEST value from 2 to 4 in the SCLP READ INFO structure now that we support books and drawers. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-ID: <20231016183925.2384704-6-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
On interception of STSI(15.1.x) the System Information Block (SYSIB) is built from the list of pre-ordered topology entries. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Co-developed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-5-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
The topology information are attributes of the CPU and are specified during the CPU device creation. On hot plug we: - calculate the default values for the topology for drawers, books and sockets in the case they are not specified. - verify the CPU attributes - check that we have still room on the desired socket The possibility to insert a CPU in a mask is dependent on the number of cores allowed in a socket, a book or a drawer, the checking is done during the hot plug of the CPU to have an immediate answer. If the complete topology is not specified, the core is added in the physical topology based on its core ID and it gets defaults values for the modifier attributes. This way, starting QEMU without specifying the topology can still get some advantage of the CPU topology. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Co-developed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-4-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Pierre Morel authored
S390 adds two new SMP levels, drawers and books to the CPU topology. S390 CPUs have specific topology features like dedication and entitlement. These indicate to the guest information on host vCPU scheduling and help the guest make better scheduling decisions. Add the new levels to the relevant QAPI structs. Add all the supported topology levels, dedication and entitlement as properties to S390 CPUs. Create machine-common.json so we can later include it in machine-target.json also. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Co-developed-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-3-nsg@linux.ibm.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Nina Schoetterl-Glausch authored
Clarify roles of different architectures. Also change things a bit in anticipation of additional members being added. Suggested-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Nina Schoetterl-Glausch <nsg@linux.ibm.com> Message-ID: <20231016183925.2384704-2-nsg@linux.ibm.com> Acked-by:
Markus Armbruster <armbru@redhat.com> [thuth: Updated some comments according to suggestions from Markus] Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Oct 19, 2023
-
-
https://gitlab.com/rth7680/qemuStefan Hajnoczi authored
linux-user/mips: fix abort on integer overflow linux-user/sh4: Fix crashes on signal delivery linux-user/loongarch: Enable LSX/LASX in HWCAP linux-user: Fixes for zero_bss linux-user: Propagate failure in mmap_reserve_or_unmap back to target_munmap linux-user: Detect and report host crashes linux-user: Remap guest SIGABRT # -----BEGIN PGP SIGNATURE----- # # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmUwapYdHHJpY2hhcmQu # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV92UAf/RSsFWwCBAqt1WKIK # 7/7F8AF7WW1Hhjy3bHLjNnzgsDeWYfdIVxMGfF9IYKrYMeEqFeBeQ+vcOe9LTAvW # fEZkA//V+LosiYCwtVGBXyCbeXYxoONMp/taRv6lVHoqVU7aSlbXsYqwePcUtPWq # r/V+Ru5vssqMueBdE9+E53JPewGPVw8xQE+xGgd1TZIeHWgegZHBzKWVap/3noey # dKjTig3yxXXg1gQJLCRw+a6bl8oCl4vEluGsLzh5P8aV1imjvFPXkR2w1vQOC3ws # 8DmyMcPEcsY4D2WLeTAGMheURLRzs5141nT0fQCOB4yzO/I8zYFIG12xCxgWoQkg # kW9XZw== # =5oFh # -----END PGP SIGNATURE----- # gpg: Signature made Wed 18 Oct 2023 16:30:30 PDT # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * tag 'pull-lu-20231018' of https://gitlab.com/rth7680/qemu : linux-user: Remap guest SIGABRT linux-user: Detect and report host SIGILL, SIGFPE, SIGTRAP linux-user: Split out host_sig{segv,bus}_handler linux-user: Simplify signal_init linux-user: Map unsupported signals to an out-of-bounds value linux-user: Only register handlers for core_dump_signal by default linux-user: Detect and report host crashes linux-user: Exit not abort in die_with_backtrace linux-user: Split out die_with_signal linux-user: Propagate failure in mmap_reserve_or_unmap back to target_munmap linux-user/elfload: Enable LSX/LASX in HWCAP for LoongArch linux-user/sh4: Fix crashes on signal delivery linux-user/mips: fix abort on integer overflow linux-user: Fixes for zero_bss Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
https://gitlab.com/juan.quintela/qemuStefan Hajnoczi authored
Migration Pull request (20231018) In this pull request: - RDMA cleanups - compression cleanups CI: https://gitlab.com/juan.quintela/qemu/-/pipelines/1040780020 Please apply. PD. I tried to get the deprecated bits integrated, but I broke qemu-iotests duer to blk warning. Will resend it. # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmUvrjQACgkQ9IfvGFhy # 1yODnQ/+OKaOQMAEtJsJ1B67394VRjpGDd0K47U3uewJJ26XRMUy4uw0zeGYdiBc # VFjrX1NJu4jRZBOdhRzZQLZU9wDEGY/8zIL/sJB55X/gv1EysDB3IrNCWosNL8SS # weeYu9qkxsB5aJfM4Lp6XnPIplb7PIMSqX380sUGcK7uVLo3x3H8PgFxQszG5ZMs # 8OqhOdxZ8jPc7gUOxPcA0n/L6pJcfnuK1/8Vlf5wbkdD+lyVCs0QDTSgX8AnS5hd # DniV2nMFkVvNkOhDG3X8qr8FyjyQ9eyJxxw/2Nt+0201UIiCirz3U2T6EMejCYOv # LtIaaNaNHmEw5OdfSBhEjXOy7gHavcn+/LlUexYJQSiB/CXrdgh3jpSFmlAzcAY2 # Si514BRty6WX43f+698PSAKF4XaRnPGtvVCv7ubrFb1qVrg8DTEnYXNO+LadqSBS # bu1TpRK1iVgKnApQN1SQr26MRAzU+U+yqz/MB9QzIGwonM2TEWCF6c5Sqq6/RK8S # IIDu4s/NTx0wVWrR2rAZv335ANGa7oa1z2LykxcXmBJozqWAOgo6wzZJJ3klcpjZ # Li39m2jzx36oSKqudYANxj2Ds0MvXStnd2ZX9mQiEB++S2SY2Z8he57HESQwNzf0 # 0Z61eqdHr7th4zfLz/akiiZnRs66A+6/LFRFpoKedSAABE/sKY8= # =gNbf # -----END PGP SIGNATURE----- # gpg: Signature made Wed 18 Oct 2023 03:06:44 PDT # 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-20231018-pull-request' of https://gitlab.com/juan.quintela/qemu : migration: save_zero_page() can take block through pss migration: control_save_page() can take block through pss migration: save_compress_page() can take block through pss migration: Print block status when needed migration: Use "i" as an for index in ram-compress.c migration: Simplify decompress_data_with_multi_threads() migration: Move update_compress_threads_counts() to ram-compress.c migration: Create ram_compressed_pages() migration: Create populate_compress() migration: Move compression_counters cleanup ram-compress.c migration: RDMA is not compatible with anything else Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- Oct 18, 2023
-
-
Richard Henderson authored
Distinguish host SIGABRT from guest SIGABRT by mapping the guest signal onto one of the host RT signals. This prevents a cycle by which a host assertion failure is caught and handled by host_signal_handler, queued for the guest, and then we attempt to continue past the host abort. What happens next depends on the host libc, but is neither good nor helpful. Acked-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
These signals, when not spoofed via kill(), are always bugs. Use die_from_signal to report this sensibly. Acked-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Make host_signal_handler slightly easier to read. Acked-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Install the host signal handler at the same time we are probing the target signals for SIG_IGN/SIG_DFL. Ignore unmapped target signals. Acked-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Do not return a valid signal number in one domain when given an invalid signal number in the other domain. Acked-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
The set of fatal signals is really immaterial. If one arrives, and is unhandled, then the qemu process dies and the parent gets the correct signal. It is only for those signals which we would like to perform a guest core dump instead of a host core dump that we need to catch. Acked-by:
Helge Deller <deller@gmx.de> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Helge Deller authored
If there is an internal program error in the qemu source code which raises SIGSEGV or SIGBUS, we currently assume the signal belongs to the guest. With an artificial error introduced, we will now print QEMU internal SIGSEGV {code=MAPERR, addr=(nil)} Signed-off-by:
Helge Deller <deller@gmx.de> Message-Id: <20230812164314.352131-1-deller@gmx.de> [rth: Use in_code_gen_buffer and die_with_signal; drop backtrace] Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
This line is supposed to be unreachable, but if we're going to have it at all, SIGABRT via abort() is subject to the same signal peril that created this function in the first place. We can _exit immediately without peril. Acked-by:
Helge Deller <deller@gmx.de> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Because we trap so many signals for use by the guest, we have to take extra steps to exit properly. Acked-by:
Helge Deller <deller@gmx.de> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
Do not assert success, but return any failure received. Additionally, fix the method of earlier error return in target_munmap. Reported-by:
Andreas Schwab <schwab@suse.de> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Jiajie Chen authored
Since support for LSX and LASX is landed in QEMU recently, we can update HWCAPS accordingly. Signed-off-by:
Jiajie Chen <c@jia.je> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20231001085315.1692667-1-c@jia.je> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Mikulas Patocka authored
sh4 uses gUSA (general UserSpace Atomicity) to provide atomicity on CPUs that don't have atomic instructions. A gUSA region that adds 1 to an atomic variable stored in @R2 looks like this: 4004b6: 03 c7 mova 4004c4 <gusa+0x10>,r0 4004b8: f3 61 mov r15,r1 4004ba: 09 00 nop 4004bc: fa ef mov #-6,r15 4004be: 22 63 mov.l @r2,r3 4004c0: 01 73 add #1,r3 4004c2: 32 22 mov.l r3,@r2 4004c4: 13 6f mov r1,r15 R0 contains a pointer to the end of the gUSA region R1 contains the saved stack pointer R15 contains negative length of the gUSA region When this region is interrupted by a signal, the kernel detects if R15 >= -128U. If yes, the kernel rolls back PC to the beginning of the region and restores SP by copying R1 to R15. The problem happens if we are interrupted by a signal at address 4004c4. R15 still holds the value -6, but the atomic value was already written by an instruction at address 4004c2. In this situation we can't undo the gUSA. The function unwind_gusa does nothing, the signal handler attempts to push a signal frame to the address -6 and crashes. This patch fixes it, so that if we are interrupted at the last instruction in a gUSA region, we copy R1 to R15 to restore the correct stack pointer and avoid crashing. There's another bug: if we are interrupted in a delay slot, we save the address of the instruction in the delay slot. We must save the address of the previous instruction. Cc: qemu-stable@nongnu.org Signed-off-by:
Mikulas Patocka <mpatocka@redhat.com> Reviewed-by:
Yoshinori Sato <ysato@users.sourcefoege.jp> Message-Id: <b16389f7-6c62-70b7-59b3-87533c0bcc@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Mikulas Patocka authored
QEMU mips userspace emulation crashes with "qemu: unhandled CPU exception 0x15 - aborting" when one of the integer arithmetic instructions detects an overflow. This patch fixes it so that it delivers SIGFPE with FPE_INTOVF instead. Cc: qemu-stable@nongnu.org Signed-off-by:
Mikulas Patocka <mpatocka@redhat.com> Message-Id: <3ef979a8-3ee1-eb2d-71f7-d788ff88dd11@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Richard Henderson authored
The previous change, 2d385be6, assumed !PAGE_VALID meant that the page would be unmapped by the elf image. However, since we reserved the entire image space via mmap, PAGE_VALID will always be set. Instead, assume PROT_NONE for the same condition. Furthermore, assume bss is only ever present for writable segments, and that there is no page overlap between PT_LOAD segments. Instead of an assert, return false to indicate failure. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1854 Fixes: 2d385be6 ("linux-user: Do not adjust zero_bss for host page size") Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
https://github.com/legoater/qemuStefan Hajnoczi authored
vfio queue: * Support for VFIODisplay migration with ramfb * Preliminary work for IOMMUFD support # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmUvlEYACgkQUaNDx8/7 # 7KFlaw//X2053de2eTdo38/UMSzi5ACWWn2j1iGQZf/3+J2LcdlixZarZr/2DN56 # 4axmwF6+GKozt5+EnvWtgodDn6U9iyMNaAB3CGBHFHsH8uqKeZd/Ii754q4Rcmy9 # ZufBOPWm9Ff7s2MMFiAZvso75jP2wuwVEe1YPRjeJnsNSNIJ6WZfemh3Sl96yRBb # r38uqzqetKwl7HziMMWP3yb8v+dU8A9bqI1hf1FZGttfFz3XA+pmjXKA6XxdfiZF # AAotu5x9w86a08sAlr/qVsZFLR37oQykkXM0D840DafJDyr5fbJiq8cwfOjMw9+D # w6+udRm5KoBWPsvb/T3dR88GRMO22PChjH9Vjl51TstMNhdTxuKJTKhhSoUFZbXV # 8CMjwfALk5ggIOyCk1LRd04ed+9qkqgcbw1Guy5pYnyPnY/X6XurxxaxS6Gemgtn # UvgRYhSjio+LgHLO77IVkWJMooTEPzUTty2Zxa7ldbbE+utPUtsmac9+1m2pnpqk # 5VQmB074QnsJuvf+7HPU6vYCzQWoXHsH1UY/A0fF7MPedNUAbVYzKrdGPyqEMqHy # xbilAIaS3oO0pMT6kUpRv5c5vjbwkx94Nf/ii8fQVjWzPfCcaF3yEfaam62jMUku # stySaRpavKIx2oYLlucBqeKaBGaUofk13gGTQlsFs8pKCOAV7r4= # =s0fN # -----END PGP SIGNATURE----- # gpg: Signature made Wed 18 Oct 2023 04:16:06 EDT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@redhat.com>" [unknown] # gpg: aka "Cédric Le Goater <clg@kaod.org>" [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: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-vfio-20231018' of https://github.com/legoater/qemu : (22 commits) hw/vfio: add ramfb migration support ramfb-standalone: add migration support ramfb: add migration support vfio/pci: Remove vfio_detach_device from vfio_realize error path vfio/ccw: Remove redundant definition of TYPE_VFIO_CCW vfio/ap: Remove pointless apdev variable vfio/pci: Fix a potential memory leak in vfio_listener_region_add vfio/common: Move legacy VFIO backend code into separate container.c vfio/common: Introduce a global VFIODevice list vfio/common: Store the parent container in VFIODevice vfio/common: Introduce a per container device list vfio/common: Move VFIO reset handler registration to a group agnostic function vfio/ccw: Use vfio_[attach/detach]_device vfio/ap: Use vfio_[attach/detach]_device vfio/platform: Use vfio_[attach/detach]_device vfio/pci: Introduce vfio_[attach/detach]_device vfio/common: Extract out vfio_kvm_device_[add/del]_fd vfio/common: Introduce vfio_container_add|del_section_window() vfio/common: Propagate KVM_SET_DEVICE_ATTR error if any vfio/common: Move IOMMU agnostic helpers to a separate file ... Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
https://gitlab.com/bonzini/qemuStefan Hajnoczi authored
* build system and Python cleanups * fix netbsd VM build * allow non-relocatable installs * allow using command line options to configure qemu-ga * target/i386: check intercept for XSETBV * target/i386: fix CPUID_HT exposure # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmUvkQQUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroM3pQgArXCsmnsjlng1chjCvKnIuVmaTYZ5 # aC9pcx7TlyM0+XWtTN0NQhFt71Te+3ioReXIQRvy5O68RNbEkiu8LXfOJhWAHbWk # vZVtzHQuOZVizeZtUruKlDaw0nZ8bg+NI4aGLs6rs3WphEAM+tiLnZJ0BouiedKS # e/COB/Hqjok+Ntksbfv5q7XpWjwQB0y2073vM1Mcf0ToOWFLFdL7x0SZ3hxyYlYl # eoefp/8kbWeUWA7HuoOKmpiLIxmKnY7eXp+UCvdnEhnSce9sCxpn2nzqqLuPItTK # V3GrJ2//+lrekPHyQvb8IjUMUrPOmzf8GadIE0tkfdHjEP72IsHk0VX81A== # =rPte # -----END PGP SIGNATURE----- # gpg: Signature made Wed 18 Oct 2023 04:02:12 EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu : (32 commits) configure: define "pkg-config" in addition to "pkgconfig" meson: add a note on why we use config_host for program paths meson-buildoptions: document the data at the top configure, meson: use command line options to configure qemu-ga configure: unify handling of several Debian cross containers configure: move environment-specific defaults to config-meson.cross configure: move target-specific defaults to an external machine file configure: remove some dead cruft configure: clean up PIE option handling configure: clean up plugin option handling configure, tests/tcg: simplify GDB conditionals tests/tcg/arm: move non-SVE tests out of conditional hw/remote: move stub vfu_object_set_bus_irq out of stubs/ hw/xen: cleanup sourcesets configure: clean up handling of CFI option meson, cutils: allow non-relocatable installs meson: do not use set10 meson: do not build shaders by default tracetool: avoid invalid escape in Python string tests/vm: avoid invalid escape in Python string ... Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Juan Quintela authored
Reviewed-by:
Lukas Straub <lukasstraub2@web.de> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Reviewed-by:
Lukas Straub <lukasstraub2@web.de> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Reviewed-by:
Lukas Straub <lukasstraub2@web.de> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Marc-André Lureau authored
Add a "VFIODisplay" subsection whenever "x-ramfb-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Acked-by:
Gerd Hoffmann <kraxel@redhat.com> [ clg: - checkpatch fixes - improved warn_report() in vfio_realize() ] Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Marc-André Lureau authored
Add a "ramfb-dev" section whenever "x-migrate" is turned on. Turn it off by default on machines <= 8.1 for compatibility reasons. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Acked-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Marc-André Lureau authored
Implementing RAMFB migration is quite straightforward. One caveat is to treat the whole RAMFBCfg as a blob, since that's what is exposed to the guest directly. This avoid having to fiddle with endianness issues if we were to migrate fields individually as integers. The devices using RAMFB will have to include ramfb_vmstate in their migration description. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Acked-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Eric Auger authored
In vfio_realize, on the error path, we currently call vfio_detach_device() after a successful vfio_attach_device. While this looks natural, vfio_instance_finalize also induces a vfio_detach_device(), and it seems to be the right place instead as other resources are released there which happen to be a prerequisite to a successful UNSET_CONTAINER. So let's rely on the finalize vfio_detach_device call to free all the relevant resources. Fixes: a28e06621170 ("vfio/pci: Introduce vfio_[attach/detach]_device") Reported-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Signed-off-by:
Eric Auger <eric.auger@redhat.com> Tested-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Zhenzhong Duan authored
No functional changes. Signed-off-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by:
Eric Farman <farman@linux.ibm.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Zhenzhong Duan authored
No need to double-cast, call VFIO_AP_DEVICE() on DeviceState. No functional changes. Signed-off-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by:
Tony Krowiak <akrowiak@linux.ibm.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Zhenzhong Duan authored
When there is an failure in vfio_listener_region_add() and the section belongs to a ram device, there is an inaccurate error report which should never be related to vfio_dma_map failure. The memory holding err is also incrementally leaked in each failure. Fix it by reporting the real error and free it. Fixes: 567b5b30 ("vfio/pci: Relax DMA map errors for MMIO regions") Signed-off-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Yi Liu authored
Move all the code really dependent on the legacy VFIO container/group into a separate file: container.c. What does remain in common.c is the code related to VFIOAddressSpace, MemoryListeners, migration and all other general operations. Signed-off-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Yi Liu <yi.l.liu@intel.com> Signed-off-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by:
Cédric Le Goater <clg@redhat.com> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-
Zhenzhong Duan authored
Some functions iterate over all the VFIODevices. This is currently achieved by iterating over all groups/devices. Let's introduce a global list of VFIODevices simplifying that scan. This will also be useful while migrating to IOMMUFD by hiding the group specificity. Signed-off-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Zhenzhong Duan <zhenzhong.duan@intel.com> Suggested-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
-