Re: reverse-{debugging,continue} not working on v7.2.0, i386 guest

2023-01-18 Thread Hyeonggon Yoo
On Wed, Jan 18, 2023 at 12:39:16PM +0300, Pavel Dovgalyuk wrote: > Sometimes replay (or reverse debugging) have problems due to incomplete or > incorrect virtual device save/load implementation. > > Can you try removing -cpu from your command line? > > Or you can provide the files you load and I'

Who maintains util/userfaultfd.c?

2023-01-18 Thread Markus Armbruster
commit 0e9b5cd6b238b7ca9a3a50d957f50c37082705a0 Author: Andrey Gruzdev Date: Fri Jan 29 13:14:04 2021 +0300 migration: introduce UFFD-WP low-level interface helpers Glue code to the userfaultfd kernel implementation. Querying feature support, createing file descriptor, feature

[PATCH v4 11/19] net: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- net/vmnet_int.h | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vmnet_int.h b/net/vmnet_in

[PATCH v4 18/19] 9p: Drop superfluous include of linux/limits.h

2023-01-18 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/9pfs/9p.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 9621ec1341..aa736af380 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -17,9 +17,6 @@ */ #include "qemu/osdep.h" -#ifdef CONFIG_LINUX -#include -#endif

[PATCH v4 15/19] accel: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- include/sysemu/accel-blocker.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/sysemu/

[PATCH v4 14/19] block: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- include/block/graph-lock.h | 1 - include/block/write-threshold.h | 2 -- block/qapi.c

[PATCH v4 00/19] Clean up includes

2023-01-18 Thread Markus Armbruster
Back in 2016, we discussed[1] rules for headers, and these were generally liked: 1. Have a carefully curated header that's included everywhere first. We got that already thanks to Peter: osdep.h. 2. Headers should normally include everything they need beyond osdep.h. If exceptions are need

[PATCH v4 01/19] scripts/clean-includes: Fully skip / ignore files

2023-01-18 Thread Markus Armbruster
When clean-includes claims to skip or ignore a file, only the part that sanitizes use of qemu/osdep.h skips the file. The part that looks for duplicate #include does not, and neither does committing to Git. The latter can get unrelated stuff included in the commit, but only if you run clean-inclu

[PATCH v4 0/3] memory: prevent dma-reentracy issues

2023-01-18 Thread Alexander Bulekov
These patches aim to solve two types of DMA-reentrancy issues: 1.) mmio -> dma -> mmio case To solve this, we track whether the device is engaged in io by checking/setting a reentrancy-guard within APIs used for MMIO access. 2.) bh -> dma write -> mmio case This case is trickier, since we dont ha

[PATCH v4 03/19] scripts/clean-includes: Skip symbolic links

2023-01-18 Thread Markus Armbruster
When a symbolic link points to a file that needs cleaning, the script replaces the link with a cleaned regular file. Not wanted; skip them. We have a few symbolic links under subprojects/libvduse/ and subprojects/libvhost-user/. Signed-off-by: Markus Armbruster --- scripts/clean-includes | 4 +

[PATCH v4 12/19] target/hexagon: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Changes to standalone programs dropped, because I can't tell whether them not using qemu/osdep.h is intentional: target/hexagon/gen

[PATCH v4 0/3] memory: prevent dma-reentracy issues

2023-01-18 Thread Alexander Bulekov
These patches aim to solve two types of DMA-reentrancy issues: 1.) mmio -> dma -> mmio case To solve this, we track whether the device is engaged in io by checking/setting a reentrancy-guard within APIs used for MMIO access. 2.) bh -> dma write -> mmio case This case is trickier, since we dont ha

[PATCH v4 19/19] Drop duplicate #include

2023-01-18 Thread Markus Armbruster
Tracked down with the help of scripts/clean-includes. Signed-off-by: Markus Armbruster --- include/hw/arm/fsl-imx6ul.h | 1 - include/hw/arm/fsl-imx7.h | 1 - backends/tpm/tpm_emulator.c | 1 - hw/acpi/piix4.c | 1 - hw/alpha/dp264.c | 1 - hw/arm/virt.c

[PATCH v4 2/3] async: Add an optional reentrancy guard to the BH API

2023-01-18 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Signed-off-by: Alexander Bulekov --- docs/devel/multiple-iothreads.txt | 2 ++

[PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-18 Thread Alexander Bulekov
Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. This flag is set/checked prior to calling a device's MemoryRegion handlers, and set when device code initiates DMA. The purpose of this flag is to prevent two types of DMA-based reentrancy issues: 1.) mmio -> dma -> mmio cas

[PATCH v4 08/19] hw/tricore: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- include/hw/tricore/triboard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/trico

[PATCH v4 05/19] crypto: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- crypto/block-luks-priv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/block-luks-pri

[PATCH v4 02/19] scripts/clean-includes: Don't claim duplicate headers found when not

2023-01-18 Thread Markus Armbruster
When running with --check-dup-head, the script always claims it "Found duplicate header file includes." Fix to do it only when it actually found some. Fixes: d66253e46ae2b9c36a9dd90b2b74c0dfa5804b22 Signed-off-by: Markus Armbruster --- scripts/clean-includes | 5 ++--- 1 file changed, 2 inserti

[PATCH v4 1/3] memory: prevent dma-reentracy issues

2023-01-18 Thread Alexander Bulekov
Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. This flag is set/checked prior to calling a device's MemoryRegion handlers, and set when device code initiates DMA. The purpose of this flag is to prevent two types of DMA-based reentrancy issues: 1.) mmio -> dma -> mmio cas

[PATCH v4 3/3] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-01-18 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Signed-off-by: Alexander Bulekov --- hw/9pfs/xen-9p-backend.c| 4 +++- hw/block/dataplane/virtio-blk.c | 3 ++- hw/block/dataplane/xen-block.c | 5 +++-- hw/block/virtio-blk.c | 5 +++-- hw/char/virtio-serial-bus.c | 3

[PATCH v4 17/19] Don't include headers already included by qemu/osdep.h

2023-01-18 Thread Markus Armbruster
This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- backends/tpm/tpm_ioctl.h | 2 -- fsdev/p9array.h | 2 -- include/hw/misc/aspeed_lpc.h | 2 -- include/hw/pci/pcie_doe.h | 1 - include/qemu/async-teardown.h | 2 -

[PATCH v4 16/19] Fix non-first inclusions of qemu/osdep.h

2023-01-18 Thread Markus Armbruster
This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- audio/sndioaudio.c | 2 +- backends/hostmem-epc.c | 2 +- block/export/vduse-blk.c | 2 +- hw/hyperv/syndbg.c | 2 +- util/async-teardown.c| 12 5 files changed, 8 inserti

[PATCH v4 0/3] memory: prevent dma-reentracy issues

2023-01-18 Thread Alexander Bulekov
These patches aim to solve two types of DMA-reentrancy issues: 1.) mmio -> dma -> mmio case To solve this, we track whether the device is engaged in io by checking/setting a reentrancy-guard within APIs used for MMIO access. 2.) bh -> dma write -> mmio case This case is trickier, since we dont ha

[PATCH v4 04/19] bsd-user: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- bsd-user/bsd-proc.h | 4 bsd-user/qemu.h | 1 - bsd-user/arm

[PATCH v4 09/19] qga: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- qga/cutils.h | 2 -- qga/commands-posix.c | 1 - qga/cutils.c | 3 ++- 3 files ch

[PATCH v4 06/19] hw/cxl: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- include/hw/cxl/cxl_component.h | 2 -- include/hw/cxl/cxl_host.h | 1 - include/hw/cxl/cxl_p

[PATCH v4 13/19] riscv: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- target/riscv/pmu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/pmu.h b/target

[PATCH v4 10/19] migration: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- include/qemu/userfaultfd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/qemu/userfa

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-18 Thread Klaus Jensen
On Jan 18 15:26, Keith Busch wrote: > Klaus, > > This isn't going to help your issue, but there are at least two legacy > irq bugs in the nvme qemu implementation. > > 1. The admin queue breaks if start with legacy and later initialize > msix. > Hmm. Interesting that we have not encountered thi

[PATCH v4 07/19] hw/input: Clean up includes

2023-01-18 Thread Markus Armbruster
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Markus Armbruster --- include/hw/input/pl050.h | 1 - hw/input/tsc210x.c | 1 - 2 files changed, 2 deletions(-)

Re: [PATCH 00/20] target/arm: CONFIG_TCG=n part 1

2023-01-18 Thread Philippe Mathieu-Daudé
On 18/1/23 22:28, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: Hi Fabiano, On 18/1/23 20:34, Fabiano Rosas wrote: These are the already reviewed patches from the first half of my previous series: https://lore.kernel.org/r/20230113140419.4013-1-faro...@suse.de This unbreaks the --disa

Re: [PATCH 00/20] target/arm: CONFIG_TCG=n part 1

2023-01-18 Thread Philippe Mathieu-Daudé
On 19/1/23 08:05, Philippe Mathieu-Daudé wrote: On 18/1/23 22:28, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: On 18/1/23 20:34, Fabiano Rosas wrote: These are the already reviewed patches from the first half of my previous series: https://lore.kernel.org/r/20230113140419.4013-1-faro..

[PATCH v3 01/12] cryptodev: Introduce cryptodev.json

2023-01-18 Thread zhenwei pi
Introduce QCryptodevBackendType in cryptodev.json, also apply this to related codes. Then we can drop 'enum CryptoDevBackendOptionsType'. Note that `CRYPTODEV_BACKEND_TYPE_NONE` is *NOT* used by anywhere, so drop it(no 'none' enum in QCryptodevBackendType). Reviewed-by: Daniel P. Berrangé Signed

[PATCH v3 02/12] cryptodev: Remove 'name' & 'model' fields

2023-01-18 Thread zhenwei pi
We have already used qapi to generate crypto device types, this allows to convert type to a string 'model', so the 'model' field is not needed. And the 'name' field is not used by any backend driver, drop it. Reviewed-by: Daniel P. Berrangé Signed-off-by: zhenwei pi --- backends/cryptodev-buil

[PATCH v3 04/12] cryptodev: Introduce server type in QAPI

2023-01-18 Thread zhenwei pi
Introduce cryptodev service type in cryptodev.json, then apply this to related codes. Now we can remove VIRTIO_CRYPTO_SERVICE_xxx dependence from QEMU cryptodev. Reviewed-by: Daniel P. Berrangé Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c| 8 backends/cryptodev-lkcf.

[PATCH v3 08/12] cryptodev: Use CryptoDevBackendOpInfo for operation

2023-01-18 Thread zhenwei pi
Move queue_index, CryptoDevCompletionFunc and opaque into struct CryptoDevBackendOpInfo, then cryptodev_backend_crypto_operation() needs an argument CryptoDevBackendOpInfo *op_info only. And remove VirtIOCryptoReq from cryptodev. It's also possible to hide VirtIOCryptoReq into virtio-crypto.c in th

[PATCH v3 00/12] Refactor cryptodev

2023-01-18 Thread zhenwei pi
v2 -> v3: - rebase code against the lastest commist: fb7e7990342e59cf67d - document the missing fields in qapi/cryptodev.json - rework statistics part: use 'query-stats' command instead of 'query-cryptodev'(cryptodev: Support query-stats QMP command) v1 -> v2: - fix coding style and use 'g_strjo

[PATCH v3 10/12] cryptodev: support QoS

2023-01-18 Thread zhenwei pi
Add 'throttle-bps' and 'throttle-ops' limitation to set QoS. The two arguments work with both QEMU command line and QMP command. Example of QEMU command line: -object cryptodev-backend-builtin,id=cryptodev1,throttle-bps=1600,\ throttle-ops=100 Example of QMP command: virsh qemu-monitor-command bu

[PATCH v3 03/12] cryptodev: Introduce cryptodev alg type in QAPI

2023-01-18 Thread zhenwei pi
Introduce cryptodev alg type in cryptodev.json, then apply this to related codes, and drop 'enum CryptoDevBackendAlgType'. There are two options: 1, { 'enum': 'QCryptodevBackendAlgType', 'prefix': 'CRYPTODEV_BACKEND_ALG', 'data': ['sym', 'asym']} Then we can keep 'CRYPTODEV_BACKEND_ALG_SYM' an

[PATCH v3 09/12] cryptodev: Account statistics

2023-01-18 Thread zhenwei pi
Account OPS/BPS for crypto device, this will be used for 'query-stats' QEMU monitor command and QoS in the next step. Note that a crypto device may support symmetric mode, asymmetric mode, both symmetric and asymmetric mode. So we use two structure to describe the statistics of a crypto device. S

[PATCH v3 05/12] cryptodev: Introduce 'query-cryptodev' QMP command

2023-01-18 Thread zhenwei pi
Now we have a QMP command to query crypto devices: virsh qemu-monitor-command vm '{"execute": "query-cryptodev"}' | jq { "return": [ { "service": [ "akcipher", "mac", "hash", "cipher" ], "id": "cryptodev1", "client": [ {

[PATCH v3 11/12] cryptodev: Support query-stats QMP command

2023-01-18 Thread zhenwei pi
Now we can use "query-stats" QMP command to query statistics of crypto devices. (Originally this was designed to show statistics by '{"execute": "query-cryptodev"}'. Daniel Berrangé suggested that querying configuration info by "query-cryptodev", and querying runtime performance info by "query-stat

[PATCH v3 12/12] MAINTAINERS: add myself as the maintainer for cryptodev

2023-01-18 Thread zhenwei pi
Signed-off-by: zhenwei pi --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5ec5aebadb..0f8ffe2f64 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2858,6 +2858,7 @@ T: git https://gitlab.com/ehabkost/qemu.git machine-next Cryptodev Backends M:

[PATCH v3 06/12] cryptodev-builtin: Detect akcipher capability

2023-01-18 Thread zhenwei pi
Rather than exposing akcipher service/RSA algorithm to virtio crypto device unconditionally, detect akcipher capability from akcipher crypto framework. This avoids unsuccessful requests. Reviewed-by: Daniel P. Berrangé Signed-off-by: zhenwei pi --- backends/cryptodev-builtin.c | 18

[PATCH v3 07/12] hmp: add cryptodev info command

2023-01-18 Thread zhenwei pi
Example of this command: # virsh qemu-monitor-command vm --hmp info cryptodev cryptodev1: service=[akcipher|mac|hash|cipher] queue 0: type=builtin cryptodev0: service=[akcipher] queue 0: type=lkcf Signed-off-by: zhenwei pi --- hmp-commands-info.hx | 14 ++ include/monitor/h

Re: [PATCH v2] target/tricore: Remove unused fields from CPUTriCoreState

2023-01-18 Thread Bastian Koppelmann
On Wed, Jan 18, 2023 at 09:01:48AM -1000, Richard Henderson wrote: > On 1/17/23 23:33, Philippe Mathieu-Daudé wrote: > > Remove dead code: > > - unused fields in CPUTriCoreState > > - (unexisting) tricore_def_t structure > > - forward declaration of tricore_boot_info structure > >(declared in "

Re: completion timeouts with pin-based interrupts in QEMU hw/nvme

2023-01-18 Thread Klaus Jensen
On Jan 18 21:03, Keith Busch wrote: > On Thu, Jan 19, 2023 at 01:10:57PM +1000, Alistair Francis wrote: > > On Thu, Jan 19, 2023 at 12:44 PM Keith Busch wrote: > > > > > > Further up, it says the "interrupt gateway" is responsible for > > > forwarding new interrupt requests while the level remains

Re: [PATCH 00/20] target/arm: CONFIG_TCG=n part 1

2023-01-18 Thread Philippe Mathieu-Daudé
On 18/1/23 20:34, Fabiano Rosas wrote: These are the already reviewed patches from the first half of my previous series: https://lore.kernel.org/r/20230113140419.4013-1-faro...@suse.de This unbreaks the --disable-tcg build, but there are issues in runtime that are still being hashed out in the o

<    1   2   3