557e1d67 | 18-Jun-2017 |
Andrew Jeffery <andrew@aj.id.au> |
memory: Support unaligned accesses on aligned-only models
This was proposed as an RFC in 2017 :
http://patchwork.ozlabs.org/patch/782642/
Needed for ADC model.
Signed-off-by: Andrew Jeffery <an
memory: Support unaligned accesses on aligned-only models
This was proposed as an RFC in 2017 :
http://patchwork.ozlabs.org/patch/782642/
Needed for ADC model.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> [clg: code adjustments to current QEMU ] Signed-off-by: Cédric Le Goater <clg@kaod.org>
show more ...
|
964d2a0c | 03-Dec-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
system: Select HVF by default when no other accelerator is available
When testing with a HVF-only binary, we get:
3/12 qemu:func-quick+func-aarch64 / func-aarch64-version
system: Select HVF by default when no other accelerator is available
When testing with a HVF-only binary, we get:
3/12 qemu:func-quick+func-aarch64 / func-aarch64-version ERROR 0.29s exit status 1 stderr: Traceback (most recent call last): File "tests/functional/test_version.py", line 22, in test_qmp_human_info_version self.vm.launch() File "machine/machine.py", line 461, in launch raise VMLaunchFailure( qemu.machine.machine.VMLaunchFailure: ConnectError: Failed to establish session: EOFError Exit code: 1 Command: build/qemu-system-aarch64 -display none -vga none -chardev socket,id=mon,fd=5 -mon chardev=mon,mode=control -machine none -nodefaults Output: qemu-system-aarch64: No accelerator selected and no default accelerator available
Fix by checking for HVF in configure_accelerators() and using it by default when no other accelerator is available.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20241203094232.62232-1-philmd@linaro.org>
show more ...
|
11bf1d6a | 27-Aug-2024 |
Stefan Hajnoczi <stefanha@redhat.com> |
vl: use qmp_device_add() in qemu_create_cli_devices()
qemu_create_cli_devices() should use qmp_device_add() to match the behavior of the QMP monitor. A comment explained that libvirt changes impleme
vl: use qmp_device_add() in qemu_create_cli_devices()
qemu_create_cli_devices() should use qmp_device_add() to match the behavior of the QMP monitor. A comment explained that libvirt changes implementing strict CLI syntax were needed.
Peter Krempa <pkrempa@redhat.com> has confirmed that modern libvirt uses the same JSON for -device (CLI) and device_add (QMP). Go ahead and use qmp_device_add().
Cc: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20240827192751.948633-3-stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
be93fd53 | 27-Aug-2024 |
Stefan Hajnoczi <stefanha@redhat.com> |
qdev-monitor: avoid QemuOpts in QMP device_add
The QMP device_add monitor command converts the QDict arguments to QemuOpts and then back again to QDict. This process only supports scalar types. Devi
qdev-monitor: avoid QemuOpts in QMP device_add
The QMP device_add monitor command converts the QDict arguments to QemuOpts and then back again to QDict. This process only supports scalar types. Device properties like virtio-blk-pci's iothread-vq-mapping (an array of objects) are silently dropped by qemu_opts_from_qdict() during the QemuOpts conversion even though QAPI is capable of validating them. As a result, hotplugging virtio-blk-pci devices with the iothread-vq-mapping property does not work as expected (the property is ignored).
Get rid of the QemuOpts conversion in qmp_device_add() and call qdev_device_add_from_qdict() with from_json=true. Using the QMP command's QDict arguments directly allows non-scalar properties.
The HMP is also adjusted since qmp_device_add()'s now expects properly typed JSON arguments and cannot be used from HMP anymore. Move the code that was previously in qmp_device_add() (with QemuOpts conversion and from_json=false) into hmp_device_add() so that its behavior is unchanged.
This patch changes the behavior of QMP device_add but not HMP device_add. QMP clients that sent incorrectly typed device_add QMP commands no longer work. This is a breaking change but clients should be using the correct types already. See the netdev_add QAPIfication in commit db2a380c8457 for similar reasoning and object-add in commit 9151e59a8b6e. Unlike those commits, we continue to rely on 'gen': false for the time being.
Markus helped me figure this out and even provided a draft patch. The code ended up very close to what he suggested.
Suggested-by: Markus Armbruster <armbru@redhat.com> Cc: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20240827192751.948633-2-stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
0139a4f2 | 19-Nov-2024 |
Peter Maydell <peter.maydell@linaro.org> |
system/dma-helpers.c: Move trace events to system/trace-events
The dma-helpers.c file is in the system/ subdirectory, but it defines its trace events in the root trace-events file. Move them to the
system/dma-helpers.c: Move trace events to system/trace-events
The dma-helpers.c file is in the system/ subdirectory, but it defines its trace events in the root trace-events file. Move them to the system/trace-events file where they more naturally belong.
Fixes: 800d4deda0 ("softmmu: move more files to softmmu/") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20241108162909.4080314-2-peter.maydell@linaro.org
show more ...
|
118a2991 | 05-Sep-2024 |
Gerd Hoffmann <kraxel@redhat.com> |
vl: fix qemu_validate_options() indention
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240905141211.1253307-2-kraxel@redhat
vl: fix qemu_validate_options() indention
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240905141211.1253307-2-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
d36f165d | 18-Oct-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
qdev: make properties array "const"
Constify all accesses to qdev properties, except for the ObjectPropertyAccessor itself. This makes it possible to place them in read-only memory, and also lets R
qdev: make properties array "const"
Constify all accesses to qdev properties, except for the ObjectPropertyAccessor itself. This makes it possible to place them in read-only memory, and also lets Rust bindings switch from "static mut" arrays to "static"; which is advantageous, because mutable statics are highly discouraged.
Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
3f98408e | 20-Sep-2024 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
qapi: introduce device-sync-config
Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered interrupt to th
qapi: introduce device-sync-config
Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered interrupt to the guest or just not available (not supported by vhost-user server).
Command result is racy if allow it during migration. Let's not allow that.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Raphael Norwitz <raphael@enfabrica.net> Message-Id: <20240920094936.450987-4-vsementsov@yandex-team.ru> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
9e4cc917 | 20-Sep-2024 |
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> |
qdev-monitor: add option to report GenericError from find_device_state
Here we just prepare for the following patch, making possible to report GenericError as recommended.
This patch doesn't aim to
qdev-monitor: add option to report GenericError from find_device_state
Here we just prepare for the following patch, making possible to report GenericError as recommended.
This patch doesn't aim to prevent further use of DeviceNotFound by future interfaces:
- find_device_state() is used in blk_by_qdev_id() and qmp_get_blk() functions, which may lead to spread of DeviceNotFound anyway - also, nothing prevent simply copy-pasting find_device_state() calls with false argument
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com> Acked-by: Raphael Norwitz <raphael@enfabrica.net> Message-Id: <20240920094936.450987-2-vsementsov@yandex-team.ru> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
34a8892d | 24-Oct-2024 |
Peter Xu <peterx@redhat.com> |
migration: Drop migration_is_idle()
Now with the current migration_is_running(), it will report exactly the opposite of what will be reported by migration_is_idle().
Drop migration_is_idle(), inste
migration: Drop migration_is_idle()
Now with the current migration_is_running(), it will report exactly the opposite of what will be reported by migration_is_idle().
Drop migration_is_idle(), instead use "!migration_is_running()" which should be identical on functionality.
In reality, most of the idle check is inverted, so it's even easier to write with "migrate_is_running()" check.
Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20241024213056.1395400-6-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
d481cec7 | 17-Oct-2024 |
Hyman Huang <yong.huang@smartx.com> |
migration: Move cpu-throttle.c from system to migration
Move cpu-throttle.c from system to migration since it's only used for migration; this makes us avoid exporting the util functions and variable
migration: Move cpu-throttle.c from system to migration
Move cpu-throttle.c from system to migration since it's only used for migration; this makes us avoid exporting the util functions and variables in misc.h but export them in migration.h when implementing the periodic ramblock dirty sync feature in the upcoming commits.
Since CPU throttle timers are only used in migration, move their registry to migration_object_init.
Signed-off-by: Hyman Huang <yong.huang@smartx.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/c1b3efaa0cb49e03d422e9da97bdb65cc3d234d1.1729146786.git.yong.huang@smartx.com [peterx: Fix build on MacOS on cocoa.m, not move cpu-throttle.h yet] [peterx: Fix subject spelling, per pm215] Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
5ae3ec63 | 07-Oct-2024 |
Tudor Gheorghiu <tudor.reda@gmail.com> |
replace error_setg(&error_fatal, ...) with error_report()
According to include/qapi/error.h: * Please don't error_setg(&error_fatal, ...), use error_report() and * exit(), because that's more obviou
replace error_setg(&error_fatal, ...) with error_report()
According to include/qapi/error.h: * Please don't error_setg(&error_fatal, ...), use error_report() and * exit(), because that's more obvious.
Patch updates all instances of error_setg(&error_fatal, ...) with error_report(...), adds the explicit exit(1) and removes redundant return statements.
Signed-off-by: Tudor Gheorghiu <tudor.reda@gmail.com> Suggested-by: Thomas Huth <thuth@redhat.com> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2587 Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (Mjt: also fold __func__ to previous line)
show more ...
|
f7214f99 | 14-Oct-2024 |
Peter Maydell <peter.maydell@linaro.org> |
vl.c: Remove pxa2xx-specific -portrait and -rotate options
The ``-portrait`` and ``-rotate`` options were documented as only working with the PXA LCD device, and all the machine types using that dis
vl.c: Remove pxa2xx-specific -portrait and -rotate options
The ``-portrait`` and ``-rotate`` options were documented as only working with the PXA LCD device, and all the machine types using that display device were removed in 9.2.
These options were intended to simulate a mobile device being rotated by the user, and had three effects: * the display output was rotated by 90, 180 or 270 degrees (implemented in the PXA display device models) * the mouse/trackpad input was rotated the opposite way (implemented in generic code) * the machine model would signal to the guest about its orientation (implemented by e.g. the spitz machine model)
Of these three things, the input-rotation was coded without being restricted to boards which supported the full set of device-rotation handling, so in theory the options were usable on other machine models with odd effects (rotating input but not display output). But this was never intended or documented behaviour, so we can reasonably drop these command line arguments without a formal deprecate-and-drop cycle for them.
Remove the options, and their implementation and documentation. Describe the removal in removed-features.rst.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20241003140010.1653808-7-peter.maydell@linaro.org
show more ...
|
8d3031fa | 18-Sep-2024 |
Ani Sinha <anisinha@redhat.com> |
memory: notify hypervisor of all eventfds during listener (de)registration
When a new listener for an address space is registered, the hypervisor must be informed of all existing eventfds for that a
memory: notify hypervisor of all eventfds during listener (de)registration
When a new listener for an address space is registered, the hypervisor must be informed of all existing eventfds for that address space by calling eventfd_add() for that listener. Similarly, when a listener is de-registered from an address space, the hypervisor must be informed of all existing eventfds for that address space with a call to eventfd_del().
Same is also true for coalesced io. Send coalesced io add/del listener notifications if any flatrage for the address space registered with the listener intersects with any coalesced io range.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Ani Sinha <anisinha@redhat.com> Link: https://lore.kernel.org/r/20240918064853.30678-1-anisinha@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
1b063fe2 | 04-Sep-2024 |
Juraj Marcin <jmarcin@redhat.com> |
reset: Use ResetType for qemu_devices_reset() and MachineClass::reset()
Currently, both qemu_devices_reset() and MachineClass::reset() use ShutdownCause for the reason of the reset. However, the Res
reset: Use ResetType for qemu_devices_reset() and MachineClass::reset()
Currently, both qemu_devices_reset() and MachineClass::reset() use ShutdownCause for the reason of the reset. However, the Resettable interface uses ResetState, so ShutdownCause needs to be translated to ResetType somewhere. Translating it qemu_devices_reset() makes adding new reset types harder, as they cannot always be matched to a single ShutdownCause here, and devices may need to check the ResetType to determine what to reset and if to reset at all.
This patch moves this translation up in the call stack to qemu_system_reset() and updates all MachineClass children to use the ResetType instead.
Message-ID: <20240904103722.946194-2-jmarcin@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Juraj Marcin <jmarcin@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com>
show more ...
|
d8d5ca40 | 12-Sep-2024 |
Fea.Wang <fea.wang@sifive.com> |
softmmu/physmem.c: Keep transaction attribute in address_space_map()
The follow-up transactions may use the data in the attribution, so keep the value of attribution from the function parameter just
softmmu/physmem.c: Keep transaction attribute in address_space_map()
The follow-up transactions may use the data in the attribution, so keep the value of attribution from the function parameter just as flatview_translate() above.
Signed-off-by: Fea.Wang <fea.wang@sifive.com> Cc: qemu-stable@nongnu.org Fixes: f26404fbee ("Make address_space_map() take a MemTxAttrs argument") Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/r/20240912070404.2993976-2-fea.wang@sifive.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
eef0a1e3 | 05-Jul-2024 |
Thomas Huth <thuth@redhat.com> |
system: Enable the device aliases for or1k, too
Now that we've got a "virt" machine for or1k that supports PCI too (commit 40fef82c4e "hw/openrisc: Add PCI bus support to virt") we can also enable t
system: Enable the device aliases for or1k, too
Now that we've got a "virt" machine for or1k that supports PCI too (commit 40fef82c4e "hw/openrisc: Add PCI bus support to virt") we can also enable the virtio device aliases like we do on other similar platforms. This will e.g. help to run the iotests with qemu-system-or1k later.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240705090808.1305765-1-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240705124528.97471-3-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
a1b47343 | 05-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
system: Sort QEMU_ARCH_VIRTIO_PCI definition
Sort the QEMU_ARCH_VIRTIO_PCI to simplify adding/removing entries.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240705124528
system: Sort QEMU_ARCH_VIRTIO_PCI definition
Sort the QEMU_ARCH_VIRTIO_PCI to simplify adding/removing entries.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240705124528.97471-2-philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
6e7d8c5f | 10-Sep-2024 |
Pierrick Bouvier <pierrick.bouvier@linaro.org> |
system: replace assert(0) with g_assert_not_reached()
Use of assert(false) can trip spurious control flow warnings from some versions of GCC (i.e. using -fsanitize=thread with gcc-12):
error: con
system: replace assert(0) with g_assert_not_reached()
Use of assert(false) can trip spurious control flow warnings from some versions of GCC (i.e. using -fsanitize=thread with gcc-12):
error: control reaches end of non-void function [-Werror=return-type] default: assert(0); | } | ^
Solve that by unifying the code base on g_assert_not_reached() instead.
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240910221606.1817478-11-pierrick.bouvier@linaro.org> [PMD: Add description suggested by Eric Blake] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
990d2c18 | 24-Jul-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
seccomp: Remove check for CRIS host
As per the deprecation notice in commit c7bbef4023:
The CRIS architecture was pulled from Linux in 4.17 and the compiler is no longer packaged in any distro
seccomp: Remove check for CRIS host
As per the deprecation notice in commit c7bbef4023:
The CRIS architecture was pulled from Linux in 4.17 and the compiler is no longer packaged in any distro [...].
It is now unlikely QEMU is build on CRIS host.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Message-ID: <20240904143603.52934-16-philmd@linaro.org>
show more ...
|
154fd4d1 | 04-Sep-2024 |
Markus Armbruster <armbru@redhat.com> |
qapi/ui: Drop temporary 'prefix'
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code.
Revert it. This improve
qapi/ui: Drop temporary 'prefix'
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code.
Revert it. This improves DisplayGLMode's generated enumeration constant prefix from DISPLAYGL_MODE to DISPLAY_GL_MODE.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240904111836.3273842-9-armbru@redhat.com>
show more ...
|
89bccecd | 05-Sep-2024 |
Denis V. Lunev <den@openvz.org> |
system: improve migration debug
Right now migration_throttle() tracepoint lacks very important important information, i.e. no one could easily say how much the guest is throttled. This makes difficu
system: improve migration debug
Right now migration_throttle() tracepoint lacks very important important information, i.e. no one could easily say how much the guest is throttled. This makes difficult to debug guest quality of service during migration.
This patch adds one more tracepoint into cpu_throttle_set() which is actually doing this job.
Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Peter Xu <peterx@redhat.com> CC: Fabiano Rosas <farosas@suse.de> CC: Paolo Bonzini <pbonzini@redhat.com> Link: https://lore.kernel.org/r/20240905191941.310592-1-den@openvz.org Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
b84f06c2 | 28-Aug-2024 |
David Hildenbrand <david@redhat.com> |
softmmu/physmem: fix memory leak in dirty_memory_extend()
As reported by Peter, we might be leaking memory when removing the highest RAMBlock (in the weird ram_addr_t space), and adding a new one.
softmmu/physmem: fix memory leak in dirty_memory_extend()
As reported by Peter, we might be leaking memory when removing the highest RAMBlock (in the weird ram_addr_t space), and adding a new one.
We will fail to realize that we already allocated bitmaps for more dirty memory blocks, and effectively discard the pointers to them.
Fix it by getting rid of last_ram_page() and by remembering the number of dirty memory blocks that have been allocated already.
While at it, let's use "unsigned int" for the number of blocks, which should be sufficient until we reach ~32 exabytes.
Looks like this leak was introduced as we switched from using a single bitmap_zero_extend() to allocating multiple bitmaps: bitmap_zero_extend() relies on g_renew() which should have taken care of this.
Resolves: https://lkml.kernel.org/r/CAFEAcA-k7a+VObGAfCFNygQNfCKL=AfX6A4kScq=VSSK0peqPg@mail.gmail.com Reported-by: Peter Maydell <peter.maydell@linaro.org> Fixes: 5b82b703b69a ("memory: RCU ram_list.dirty_memory[] for safe RAM hotplug") Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Tested-by: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-stable@nongnu.org Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Xu <peterx@redhat.com> Cc: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: David Hildenbrand <david@redhat.com> Link: https://lore.kernel.org/r/20240828090743.128647-1-david@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
637b0aa1 | 19-Aug-2024 |
Mattias Nissler <mnissler@rivosinc.com> |
softmmu: Support concurrent bounce buffers
When DMA memory can't be directly accessed, as is the case when running the device model in a separate process without shareable DMA file descriptors, boun
softmmu: Support concurrent bounce buffers
When DMA memory can't be directly accessed, as is the case when running the device model in a separate process without shareable DMA file descriptors, bounce buffering is used.
It is not uncommon for device models to request mapping of several DMA regions at the same time. Examples include: * net devices, e.g. when transmitting a packet that is split across several TX descriptors (observed with igb) * USB host controllers, when handling a packet with multiple data TRBs (observed with xhci)
Previously, qemu only provided a single bounce buffer per AddressSpace and would fail DMA map requests while the buffer was already in use. In turn, this would cause DMA failures that ultimately manifest as hardware errors from the guest perspective.
This change allocates DMA bounce buffers dynamically instead of supporting only a single buffer. Thus, multiple DMA mappings work correctly also when RAM can't be mmap()-ed.
The total bounce buffer allocation size is limited individually for each AddressSpace. The default limit is 4096 bytes, matching the previous maximum buffer size. A new x-max-bounce-buffer-size parameter is provided to configure the limit for PCI devices.
Signed-off-by: Mattias Nissler <mnissler@rivosinc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/20240819135455.2957406-1-mnissler@rivosinc.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
d53bb908 | 22-Aug-2024 |
Peter Maydell <peter.maydell@linaro.org> |
system/vl.c: Print machine name, not "(null)", for unknown machine types
In commit 412d294ffdc we tried to improve the error message printed when the machine type is unknown, but we used the wrong v
system/vl.c: Print machine name, not "(null)", for unknown machine types
In commit 412d294ffdc we tried to improve the error message printed when the machine type is unknown, but we used the wrong variable, resulting in:
$ ./build/x86/qemu-system-aarch64 -M bang qemu-system-aarch64: unsupported machine type: "(null)" Use -machine help to list supported machines
Use the right variable, so we produce more helpful output:
$ ./build/x86/qemu-system-aarch64 -M bang qemu-system-aarch64: unsupported machine type: "bang" Use -machine help to list supported machines
Note that we must move the qdict_del() to below the error_setg(), because machine_type points into the value of that qdict entry, and deleting it will make the pointer invalid.
Cc: qemu-stable@nongnu.org Fixes: 412d294ffdc ("vl.c: select_machine(): add selected machine type to error message") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|