- May 09, 2022
-
-
Stefan Hajnoczi authored
virtio_scsi_handle_cmd_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20220427143541.119567-6-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
virtio_scsi_handle_ctrl_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20220427143541.119567-5-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
virtio_scsi_handle_event_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Message-id: 20220427143541.119567-4-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
The virtio-scsi event virtqueue is not emptied by its handler function. This is typical for rx virtqueues where the device uses buffers when some event occurs (e.g. a packet is received, an error condition happens, etc). Polling non-empty virtqueues wastes CPU cycles. We are not waiting for new buffers to become available, we are waiting for an event to occur, so it's a misuse of CPU resources to poll for buffers. Introduce the new virtio_queue_aio_attach_host_notifier_no_poll() API, which is identical to virtio_queue_aio_attach_host_notifier() except that it does not poll the virtqueue. Before this patch the following command-line consumed 100% CPU in the IOThread polling and calling virtio_scsi_handle_event(): $ qemu-system-x86_64 -M accel=kvm -m 1G -cpu host \ --object iothread,id=iothread0 \ --device virtio-scsi-pci,iothread=iothread0 \ --blockdev file,filename=test.img,aio=native,cache.direct=on,node-name=drive0 \ --device scsi-hd,drive=drive0 After this patch CPU is no longer wasted. Reported-by:
Nir Soffer <nsoffer@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Tested-by:
Nir Soffer <nsoffer@redhat.com> Message-id: 20220427143541.119567-3-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Nicolas Saenz Julienne authored
The thread pool regulates itself: when idle, it kills threads until empty, when in demand, it creates new threads until full. This behaviour doesn't play well with latency sensitive workloads where the price of creating a new thread is too high. For example, when paired with qemu's '-mlock', or using safety features like SafeStack, creating a new thread has been measured take multiple milliseconds. In order to mitigate this let's introduce a new 'EventLoopBase' property to set the thread pool size. The threads will be created during the pool's initialization or upon updating the property's value, remain available during its lifetime regardless of demand, and destroyed upon freeing it. A properly characterized workload will then be able to configure the pool to avoid any latency spikes. Signed-off-by:
Nicolas Saenz Julienne <nsaenzju@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Acked-by:
Markus Armbruster <armbru@redhat.com> Message-id: 20220425075723.20019-4-nsaenzju@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Nicolas Saenz Julienne authored
'event-loop-base' provides basic property handling for all 'AioContext' based event loops. So let's define a new 'MainLoopClass' that inherits from it. This will permit tweaking the main loop's properties through qapi as well as through the command line using the '-object' keyword[1]. Only one instance of 'MainLoopClass' might be created at any time. 'EventLoopBaseClass' learns a new callback, 'can_be_deleted()' so as to mark 'MainLoop' as non-deletable. [1] For example: -object main-loop,id=main-loop,aio-max-batch=<value> Signed-off-by:
Nicolas Saenz Julienne <nsaenzju@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Acked-by:
Markus Armbruster <armbru@redhat.com> Message-id: 20220425075723.20019-3-nsaenzju@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Nicolas Saenz Julienne authored
Introduce the 'event-loop-base' abstract class, it'll hold the properties common to all event loops and provide the necessary hooks for their creation and maintenance. Then have iothread inherit from it. EventLoopBaseClass is defined as user creatable and provides a hook for its children to attach themselves to the user creatable class 'complete' function. It also provides an update_params() callback to propagate property changes onto its children. The new 'event-loop-base' class will live in the root directory. It is built on its own using the 'link_whole' option (there are no direct function dependencies between the class and its children, it all happens trough 'constructor' magic). And also imposes new compilation dependencies: qom <- event-loop-base <- blockdev (iothread.c) And in subsequent patches: qom <- event-loop-base <- qemuutil (util/main-loop.c) All this forced some amount of reordering in meson.build: - Moved qom build definition before qemuutil. Doing it the other way around (i.e. moving qemuutil after qom) isn't possible as a lot of core libraries that live in between the two depend on it. - Process the 'hw' subdir earlier, as it introduces files into the 'qom' source set. No functional changes intended. Signed-off-by:
Nicolas Saenz Julienne <nsaenzju@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Acked-by:
Markus Armbruster <armbru@redhat.com> Message-id: 20220425075723.20019-2-nsaenzju@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- May 08, 2022
-
-
Mark Cave-Ayland authored
Move the LASI device implementation from hw/hppa to hw/misc so that it is located with all the other miscellaneous devices. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by:
Helge Deller <deller@gmx.de> Message-Id: <20220504092600.10048-43-mark.cave-ayland@ilande.co.uk> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Mark Cave-Ayland authored
Move the DINO device implementation from hw/hppa to hw/pci-host so that it is located with all the other PCI host bridges. Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by:
Helge Deller <deller@gmx.de> Message-Id: <20220504092600.10048-23-mark.cave-ayland@ilande.co.uk> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
- May 07, 2022
-
-
Paolo Bonzini authored
The pcspk device is the only user of the init_isa function, and the only -soundhw option which does not create a new device (it hacks into the PCSpkState by hand). Remove it, since it was deprecated. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
vhost-scsi and vhost-user-scsi are two devices of their own; it should be possible to enable/disable them with --without-default-devices, not --without-default-features. Compute their default value in Kconfig to obtain the more intuitive behavior. Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 06, 2022
-
-
Yi Liu authored
Rename VFIOGuestIOMMU iommu field into iommu_mr. Then it becomes clearer it is an IOMMU memory region. no functional change intended Signed-off-by:
Yi Liu <yi.l.liu@intel.com> Link: https://lore.kernel.org/r/20220502094223.36384-4-yi.l.liu@intel.com Signed-off-by:
Alex Williamson <alex.williamson@redhat.com>
-
Eric Auger authored
In a subsequent patch, VFIO will need to recognize if a memory region owner is a TPM CRB device. Hence VFIO needs to use TPM_IS_CRB() even if CONFIG_TPM is unset. So let's add a stub function. Signed-off-by:
Eric Auger <eric.auger@redhat.com> Suggested-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Stefan Berger <stefanb@linnux.ibm.com> Link: https://lore.kernel.org/r/20220506132510.1847942-2-eric.auger@redhat.com Signed-off-by:
Alex Williamson <alex.williamson@redhat.com>
-
- May 05, 2022
-
-
Frederic Barrat authored
When pulling or pushing an OS context from/to a CPU, we should re-evaluate the state of the External interrupt signal. Otherwise, we can end up catching the External interrupt exception in hypervisor mode, which is unexpected. The problem is best illustrated with the following scenario: 1. an External interrupt is raised while the guest is on the CPU. 2. before the guest can ack the External interrupt, an hypervisor interrupt is raised, for example the Hypervisor Decrementer or Hypervisor Virtualization interrupt. The hypervisor interrupt forces the guest to exit while the External interrupt is still pending. 3. the hypervisor handles the hypervisor interrupt. At this point, the External interrupt is still pending. So it's very likely to be delivered while the hypervisor is running. That's unexpected and can result in an infinite loop where the hypervisor catches the External interrupt, looks for an interrupt in its hypervisor queue, doesn't find any, exits the interrupt handler with the External interrupt still raised, repeat... The fix is simply to always lower the External interrupt signal when pulling an OS context. It means it needs to be raised again when re-pushing the OS context. Fortunately, it's already the case, as we now always call xive_tctx_ipb_update(), which will raise the signal if needed. Reviewed-by:
Cédric Le Goater <clg@kaod.org> Signed-off-by:
Frederic Barrat <fbarrat@linux.ibm.com> Message-Id: <20220429071620.177142-3-fbarrat@linux.ibm.com> Signed-off-by:
Daniel Henrique Barboza <danielhb413@gmail.com>
-
- May 04, 2022
-
-
Hanna Reitz authored
This reverts commit b1c07349. (We wanted to do so once the 7.1 tree opens, which has happened. The issue reported in https://gitlab.com/qemu-project/qemu/-/issues/945 should be fixed by the preceding patches.) Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20220427114057.36651-4-hreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Hanna Reitz authored
This function is safe to call in an I/O context, and qcow2_do_open() does so (invoked in an I/O context by qcow2_co_invalidate_cache()). Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20220427114057.36651-2-hreitz@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Thomas Huth authored
Capstone should be superior to the old libopcode disassembler, so we can drop the old file nowadays. Message-Id: <20220412165836.355850-2-thuth@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Richard Henderson authored
Swap half-words (16-bit) and words (32-bit) within a larger value. Mirrors functions of the same names within include/qemu/bitops.h. Signed-off-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
David Miller <dmiller423@gmail.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20220428094708.84835-5-david@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- May 03, 2022
-
-
Marc-André Lureau authored
The qemu_*block() functions are meant to be be used with sockets (the win32 implementation expects SOCKET) Over time, those functions where used with Win32 SOCKET or file-descriptors interchangeably. But for portability, they must only be used with socket-like file-descriptors. FDs can use g_unix_set_fd_nonblocking() instead. Rename the functions with "socket" in the name to prevent bad usages. This is effectively reverting commit f9e8cacc ("oslib-posix: rename socket_set_nonblock() to qemu_set_nonblock()"). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Marc-André Lureau authored
The function isn't used outside of qio_channel_command_new_spawn(), which is !win32-specific. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Marc-André Lureau authored
GLib g_unix_open_pipe() is essentially like qemu_pipe(), available since 2.30. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Marc-André Lureau authored
It is only used by block/file-posix.c, move it there. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org>
-
Steven Lee authored
Per ast1030_v7.pdf, AST1030 HACE engine is identical to AST2600's HACE engine. Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
- May 02, 2022
-
-
Steven Lee authored
The aspeed ast2600 accumulative mode is described in datasheet ast2600v10.pdf section 25.6.4: 1. Allocating and initiating accumulative hash digest write buffer with initial state. * Since QEMU crypto/hash api doesn't provide the API to set initial state of hash library, and the initial state is already set by crypto library (gcrypt/glib/...), so skip this step. 2. Calculating accumulative hash digest. (a) When receiving the last accumulative data, software need to add padding message at the end of the accumulative data. Padding message described in specific of MD5, SHA-1, SHA224, SHA256, SHA512, SHA512/224, SHA512/256. * Since the crypto library (gcrypt/glib) already pad the padding message internally. * This patch is to remove the padding message which fed byguest machine driver. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220426021120.28255-3-steven_lee@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
Support HACE28: Hash HMAC Key Buffer Base Address Register. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220426021120.28255-2-steven_lee@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
The embedded core of AST1030 SoC is ARM Coretex M4. It is hard to be integrated in the common Aspeed Soc framework. We introduce a new ast1030 class with instance_init and realize handlers. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> [ clg: rename aspeed_ast10xx.c to aspeed_ast10x0.c to match zephyr ] Message-Id: <20220401083850.15266-8-jamin_lin@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
Per ast1030_v07.pdf, AST1030 SOC doesn't have SCU300, the pclk divider selection is defined in SCU310[11:8]. Add a get_apb_freq function and a class init handler for ast1030. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220401083850.15266-7-jamin_lin@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
ast1030 tmc(timer controller) is identical to ast2600 tmc. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220401083850.15266-6-jamin_lin@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
AST1030 wdt controller is similiar to AST2600's wdt, but it has extra registers. Introduce ast1030 object class and increse the number of regs(offset) of ast1030 model. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220401083850.15266-5-jamin_lin@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
Per ast2500_2520_datasheet_v1.8 and ast2600v11.pdf, the default value of WDT00 and WDT04 is 0x014FB180 for ast2500/ast2600. Add default_status and default_reload_value attributes for storing counter status and reload value as they are different from ast2400. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220401083850.15266-4-jamin_lin@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
Per ast1030_v7.pdf, AST1030 ADC engine is identical to AST2600's ADC. Signed-off-by:
Troy Lee <troy_lee@aspeedtech.com> Signed-off-by:
Jamin Lin <jamin_lin@aspeedtech.com> Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220401083850.15266-2-jamin_lin@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Joel Stanley authored
Guest code (u-boot) pokes at this on boot. No functionality is required for guest code to work correctly, but it helps to document the region being read from. Signed-off-by:
Joel Stanley <joel@jms.id.au> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220318092211.723938-1-joel@jms.id.au> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
AST2600 clkin is always 25MHz, introduce clkin_25Mhz attribute for aspeed_scu_get_clkin() to return the correct clkin for ast2600. Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> Message-Id: <20220315075753.8591-3-steven_lee@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
Steven Lee authored
AST2600's HPLL register offset and bit definition are different from AST2500. Add a hpll calculation function and an apb frequency calculation function based on SCU200 register description in ast2600v11.pdf. Signed-off-by:
Steven Lee <steven_lee@aspeedtech.com> Reviewed-by:
Cédric Le Goater <clg@kaod.org> [ clg: checkpatch fixes ] Message-Id: <20220315075753.8591-2-steven_lee@aspeedtech.com> Signed-off-by:
Cédric Le Goater <clg@kaod.org>
-
- Apr 29, 2022
-
-
Alistair Francis authored
Create a platform bus to allow dynamic devices to be connected. This is based on the ARM implementation. Signed-off-by:
Alistair Francis <alistair.francis@wdc.com> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Message-Id: <20220427234146.1130752-4-alistair.francis@opensource.wdc.com> Signed-off-by:
Alistair Francis <alistair.francis@wdc.com>
-
Alistair Francis authored
The ARM virt machine currently uses sysbus-fdt to create device tree entries for dynamically created MMIO devices. The RISC-V virt machine can also benefit from this, so move the code to the core directory. Signed-off-by:
Alistair Francis <alistair.francis@wdc.com> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Message-Id: <20220427234146.1130752-3-alistair.francis@opensource.wdc.com> Signed-off-by:
Alistair Francis <alistair.francis@wdc.com>
-
Alistair Francis authored
Move the binary and device tree loading code to the machine done notifier. This allows us to prepare for editing the device tree as part of the notifier. This is based on similar code in the ARM virt machine. Signed-off-by:
Alistair Francis <alistair.francis@wdc.com> Reviewed-by:
Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Message-Id: <20220427234146.1130752-2-alistair.francis@opensource.wdc.com> Signed-off-by:
Alistair Francis <alistair.francis@wdc.com>
-
Weiwei Li authored
- share it between target/arm and target/riscv Signed-off-by:
Weiwei Li <liweiwei@iscas.ac.cn> Signed-off-by:
Junqiang Wang <wangjunqiang@iscas.ac.cn> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Alistair Francis <alistair.francis@wdc.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220423023510.30794-6-liweiwei@iscas.ac.cn> Signed-off-by:
Alistair Francis <alistair.francis@wdc.com>
-
- Apr 28, 2022
-
-
Jean-Philippe Brucker authored
The Record bit in the Context Descriptor tells the SMMU to report fault events to the event queue. Since we don't cache the Record bit at the moment, access faults from a cached Context Descriptor are never reported. Store the Record bit in the cached SMMUTransCfg. Fixes: 9bde7f06 ("hw/arm/smmuv3: Implement translate callback") Signed-off-by:
Jean-Philippe Brucker <jean-philippe@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Message-id: 20220427111543.124620-1-jean-philippe@linaro.org Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-