[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

[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

[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

[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:

[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

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: [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

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

[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 -

[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

[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

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

[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(-)

[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 ---

[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

[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

[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

[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

[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'

[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é

[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

[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

[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 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 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.

[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

[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 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 ++

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:

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 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

[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

[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

[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 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

[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

[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 -

[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

[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

[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 |

[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

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

Re: [PATCH v2 04/11] hw/arm/aspeed: Use the IEC binary prefix definitions

2023-01-18 Thread Philippe Mathieu-Daudé
On 18/1/23 08:32, Cédric Le Goater wrote: On 1/18/23 07:53, Joel Stanley wrote: On Fri, 30 Dec 2022 at 11:35, Philippe Mathieu-Daudé wrote: IEC binary prefixes ease code review: the unit is explicit. I strongly prefer the existing code; it tells you the size without having to do maths. I

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

2023-01-18 Thread Bastian Koppelmann
On Tue, Jan 17, 2023 at 07:42:17PM +0100, 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 "hw/tricore/tricore.h", used once in >

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

2023-01-18 Thread Bastian Koppelmann
Hi Richard, On Tue, Jan 17, 2023 at 11:01:37AM -1000, Richard Henderson wrote: > On 1/17/23 08:42, Philippe Mathieu-Daudé wrote: > > Remove dead code: > > - unused fields in CPUTriCoreState > > - (unexisting) tricore_def_t structure > > - forward declaration of tricore_boot_info structure > >

Re: [PATCH v2 02/11] hw/watchdog/wdt_aspeed: Extend MMIO range to cover more registers

2023-01-18 Thread Cédric Le Goater
Philippe, On 1/2/23 14:31, Cédric Le Goater wrote: On 12/31/22 23:52, Dong, Eddie wrote: When booting the Zephyr demo in [1] we get:    aspeed.io: unimplemented device write (size 4, offset 0x185128, value 0x030f1ff1) <--    aspeed.io: unimplemented device write (size 4, offset 0x18512c,

Re: [PATCH v3 3/3] python/qemu/machine: use socketpair() for QMP by default

2023-01-18 Thread Marc-André Lureau
Hi On Wed, Jan 18, 2023 at 2:36 AM John Snow wrote: > > On Wed, Jan 11, 2023 at 3:01 AM wrote: > > > > From: Marc-André Lureau > > > > When no monitor address is given, establish the QMP communication through > > a socketpair() (API is also supported on Windows since Python 3.5) > > > >

Re: [PATCH v10 9/9] KVM: Enable and expose KVM_MEM_PRIVATE

2023-01-18 Thread Chao Peng
On Tue, Jan 17, 2023 at 07:35:58PM +, Sean Christopherson wrote: > On Tue, Jan 17, 2023, Chao Peng wrote: > > On Sat, Jan 14, 2023 at 12:01:01AM +, Sean Christopherson wrote: > > > On Fri, Dec 02, 2022, Chao Peng wrote: > > > > @@ -10357,6 +10364,12 @@ static int vcpu_enter_guest(struct

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

2023-01-18 Thread Hyeonggon Yoo
On Wed, Jan 18, 2023 at 10:12:48AM +0300, Pavel Dovgalyuk wrote: > As replay works well, the reverse debugging should be ok too. > But for "going back" it needs a VM snapshot that can be used for reload. > > Snapshots are saved on qcow2 images connected to QEMU. > Therefore you need to add an

Re: [PATCH v2 01/11] hw/watchdog/wdt_aspeed: Rename MMIO region size as 'iosize'

2023-01-18 Thread Cédric Le Goater
Philippe, On 1/2/23 13:30, Cédric Le Goater wrote: On 12/31/22 23:43, Dong, Eddie wrote: Avoid confusing two different things: - the WDT I/O region size ('iosize') - at which offset the SoC map the WDT ('offset') While it is often the same, we can map smaller region sizes at larger offsets.

[PATCH v2] linux-user: fix strace build w/out munlockall

2023-01-18 Thread Mike Frysinger
Signed-off-by: Mike Frysinger Reviewed-by: Philippe Mathieu-Daud?? --- linux-user/strace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 9ae5a812cd71..11a7c3df9498 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2023-01-18 Thread Chao Peng
On Tue, Jan 17, 2023 at 04:34:15PM +, Sean Christopherson wrote: > On Tue, Jan 17, 2023, Chao Peng wrote: > > On Fri, Jan 13, 2023 at 09:54:41PM +, Sean Christopherson wrote: > > > > + list_for_each_entry(notifier, >notifiers, list) { > > > > +

Re: [PATCH v2 04/11] hw/arm/aspeed: Use the IEC binary prefix definitions

2023-01-18 Thread Cédric Le Goater
On 1/18/23 09:37, Philippe Mathieu-Daudé wrote: On 18/1/23 08:32, Cédric Le Goater wrote: On 1/18/23 07:53, Joel Stanley wrote: On Fri, 30 Dec 2022 at 11:35, Philippe Mathieu-Daudé wrote: IEC binary prefixes ease code review: the unit is explicit. I strongly prefer the existing code; it

Re: [PATCH 2/3] bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings

2023-01-18 Thread Kevin Wolf
Am 17.01.2023 um 21:43 hat Stefan Hajnoczi geschrieben: > On Tue, 17 Jan 2023 at 12:17, Kevin Wolf wrote: > > > > Am 17.01.2023 um 17:43 hat Warner Losh geschrieben: > > > On Tue, Jan 17, 2023 at 9:25 AM Kevin Wolf wrote: > > > > > > > Am 17.01.2023 um 17:16 hat Warner Losh geschrieben: > > > >

Re: [PATCH 1/2] hw/pci-host/gt64120: Fix PCI I/O config register endianness

2023-01-18 Thread Klaus Jensen
On Jan 18 10:40, Philippe Mathieu-Daudé wrote: > The MByteSwap bit only affects the data register endianness, > not the config register. Map the config register once in the > gt64120_realize() handler, and only remap the data register > when the mapping is updated. > > Fixes: 145e2198d7

Re: [PATCH 0/2] hw/pci-host/gt64120: Fix regression on big-endian targets

2023-01-18 Thread Klaus Jensen
On Jan 18 10:43, Philippe Mathieu-Daudé wrote: > On 18/1/23 10:40, Philippe Mathieu-Daudé wrote: > > Klauss reported a regression on big-endian targets, introduced > > by commit 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using > > PCI_HOST_BRIDGE MemoryRegionOps"). Fix it and add the Klauss'

Re: [for-8.0 v2 05/11] cryptodev: Introduce 'query-cryptodev' QMP command

2023-01-18 Thread Thomas Huth
On 18/01/2023 11.29, Daniel P. Berrangé wrote: On Wed, Jan 18, 2023 at 05:25:37AM -0500, Michael S. Tsirkin wrote: On Mon, Jan 16, 2023 at 11:18:19AM +, Daniel P. Berrangé wrote: +for (uint32_t i = 0; i < QCRYPTODEV_BACKEND_SERVICE__MAX; i++) { QEMU coding style doesn't declare types

Re: [PATCH v14 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-01-18 Thread Nina Schoetterl-Glausch
On Wed, 2023-01-18 at 11:26 +0100, Thomas Huth wrote: > On 17/01/2023 17.56, Pierre Morel wrote: > > > > > > On 1/10/23 15:29, Thomas Huth wrote: > > > On 05/01/2023 15.53, Pierre Morel wrote: > > > > On interception of STSI(15.1.x) the System Information Block > > > > (SYSIB) is built from the

Re: [PATCH RFC 02/21] util: Include osdep.h first in util/mmap-alloc.c

2023-01-18 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Without it, we never have CONFIG_LINUX defined even if on linux, so > linux/mman.h is never really included. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > util/mmap-alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1

[PATCH 3/3] avocado_qemu: add AVOCADO_DEFAULT_MACHINE

2023-01-18 Thread Daniel Henrique Barboza
Allow users to control which machine to use in tests where no particular machine is specified. This is a good way to run tests in a machine that's not the arch default, e.g. for qemu-system-x86_64 tests can be run using a machine other than pc-i440fx. This env var has greater effect when used

[PATCH 2/3] avocado_qemu: add AVOCADO_DEFAULT_ARCH for cross-arch tests

2023-01-18 Thread Daniel Henrique Barboza
All avocado tests that are arch agnostic (i.e. does not set an 'arch' tag) are run with arch=None in pick_default_qemu_bin(), and then 'arch' is set to os.uname()[4], meaning that it will take the arch of the running host. This means that if one compiles QEMU binaries for non-x86 targets on an

[PATCH 0/3] avocado_qemu: allow cross-arch tests

2023-01-18 Thread Daniel Henrique Barboza
Hi, In these changes I've introduced two new avocado env variables to allow users to run 'check-avocado' with different archs and machines in tests that doesn't set any arch/machine to run with. This is useful for archs that doesn't have abundance of real hardware available (e.g. RISC-V),

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

2023-01-18 Thread Philippe Mathieu-Daudé
Remove dead code: - unused fields in CPUTriCoreState - (unexisting) tricore_def_t structure - forward declaration of tricore_boot_info structure (declared in "hw/tricore/tricore.h", used once in hw/tricore/tricore_testboard.c). Reviewed-by: Richard Henderson Reviewed-by: Bastian Koppelmann

[PATCH 1/2] hw/pci-host/gt64120: Fix PCI I/O config register endianness

2023-01-18 Thread Philippe Mathieu-Daudé
The MByteSwap bit only affects the data register endianness, not the config register. Map the config register once in the gt64120_realize() handler, and only remap the data register when the mapping is updated. Fixes: 145e2198d7 ("gt64xxx: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps")

[PATCH 2/2] tests/avocado: Add test accessing NVMe on big-endian MIPS target

2023-01-18 Thread Philippe Mathieu-Daudé
Add a Linux-boot test accessing PCI NVMe drive on big-endian MIPS: $ avocado --show=app,console run -t device:nvme tests/avocado/ (1/1) tests/avocado/boot_linux_console.py:BootLinuxConsole.test_mips64_malta_I6400_nvme: console: Linux version 6.2.0-rc4 (kbj@butter)

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

2023-01-18 Thread Pavel Dovgalyuk
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'll debug this case. On 18.01.2023 11:47, Hyeonggon Yoo wrote: On Wed,

[PATCH 0/2] hw/pci-host/gt64120: Fix regression on big-endian targets

2023-01-18 Thread Philippe Mathieu-Daudé
Klauss reported a regression on big-endian targets, introduced by commit 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps"). Fix it and add the Klauss' reproducer as Avocado test. Philippe Mathieu-Daudé (2): hw/pci-host/gt64120: Fix PCI I/O config register

Re: [PATCH v14 06/11] s390x/cpu topology: interception of PTF instruction

2023-01-18 Thread Pierre Morel
On 1/16/23 19:24, Nina Schoetterl-Glausch wrote: On Thu, 2023-01-05 at 15:53 +0100, Pierre Morel wrote: When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation by

Re: [PATCH v2 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

2023-01-18 Thread Michael S. Tsirkin
On Wed, Jan 04, 2023 at 03:44:31PM +0100, Bernhard Beschow wrote: > This series first renders TYPE_PIIX3_XEN_DEVICE redundant and finally removes > it. The motivation is to 1/ decouple PIIX from Xen and 2/ to make Xen in the > PC > machine agnostic to the precise southbridge being used. 2/ will

Re: [RFC PATCH v3 18/28] target/arm: Move common cpu code into cpu.c

2023-01-18 Thread Philippe Mathieu-Daudé
On 17/1/23 20:01, Fabiano Rosas wrote: Philippe Mathieu-Daudé writes: On 13/1/23 15:04, Fabiano Rosas wrote: The cpu_tcg.c file about to be moved into the tcg directory. Move the code that is needed for cpus that also work with KVM into cpu.c. Signed-off-by: Fabiano Rosas ---

RE: [QUESTION] About virtio and eventloop

2023-01-18 Thread zhukeqian via
Hi Stefan, this indeed helps, thank you. Keqian On Mon, 16 Jan 2023 at 03:20, zhukeqian via mailto:qemu-devel@nongnu.org>> wrote: > And if IO operation is blocked, is vCPU thread will blocked when do > deactivate? Yes, blk_drain() is a synchronous function. It blocks until in-flight I/O has

Re: [PATCH v3 7/7] piix3, ich9: Reuse qbus_build_aml()

2023-01-18 Thread Igor Mammedov
On Mon, 16 Jan 2023 16:29:08 +0100 Bernhard Beschow wrote: > Signed-off-by: Bernhard Beschow > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov I'd squash it in previous patch, and rename that to something 'remove no longer needed isa_build_aml() isa_build_aml() doesn't

Re: [PATCH 2/3] bsd-user/mmap: use TSA_NO_TSA to suppress clang TSA warnings

2023-01-18 Thread Stefan Hajnoczi
On Wed, Jan 18, 2023, 04:15 Kevin Wolf wrote: > Am 17.01.2023 um 21:43 hat Stefan Hajnoczi geschrieben: > > On Tue, 17 Jan 2023 at 12:17, Kevin Wolf wrote: > > > > > > Am 17.01.2023 um 17:43 hat Warner Losh geschrieben: > > > > On Tue, Jan 17, 2023 at 9:25 AM Kevin Wolf wrote: > > > > > > > >

Re: [PATCH] tests/qtest/qom-test: Stop spamming the test log

2023-01-18 Thread Daniel P . Berrangé
On Wed, Jan 18, 2023 at 01:25:57PM +0100, Thomas Huth wrote: > We are still facing the issues that our test logs in the gitlab CI > are too big (and thus cut off). A huge part is still caused by the > qom-test that prints the path and name of each object it looks at > by default. That's too much.

Re: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default

2023-01-18 Thread Daniel P . Berrangé
On Wed, Jan 18, 2023 at 01:55:49PM +0100, Thomas Huth wrote: > On 17/01/2023 11.44, Daniel P. Berrangé wrote: > > On Tue, Jan 17, 2023 at 11:32:42AM +0100, Thomas Huth wrote: > ... > > > - Instead of doing "cat meson-logs/testlog.txt" in the CI > > >scripts, we switch to "tail -n 1000

Re: [PATCH 2/2] hw/ppc/pegasos2: Extract via_vt8231_create() helper

2023-01-18 Thread Philippe Mathieu-Daudé
On 17/1/23 22:17, BALATON Zoltan wrote: On Tue, 17 Jan 2023, Philippe Mathieu-Daudé wrote: Simplify a bit pegasos2_init() by extracting the VIA southbridge creation code into a new via_vt8231_create() helper. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/pegasos2.c | 33

[PATCH v2 2/2] tests/avocado: Add test accessing NVMe on big-endian MIPS target

2023-01-18 Thread Philippe Mathieu-Daudé
Add a Linux-boot test accessing PCI NVMe drive on big-endian MIPS: $ avocado --show=app,console run -t device:nvme tests/avocado/ (1/1) tests/avocado/boot_linux_console.py:BootLinuxConsole.test_mips64_malta_I6400_nvme: console: Linux version 6.2.0-rc4 (kbj@butter)

[PATCH v2 1/2] hw/pci-host/gt64120: Fix PCI I/O config register endianness

2023-01-18 Thread Philippe Mathieu-Daudé
The MByteSwap bit only affects the data register endianness, not the config register. Map the config register once in the gt64120_realize() handler, and only remap the data register when the mapping is updated. Fixes: 145e2198d7 ("gt64xxx: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps")

Re: [for-8.0 v2 05/11] cryptodev: Introduce 'query-cryptodev' QMP command

2023-01-18 Thread Daniel P . Berrangé
On Wed, Jan 18, 2023 at 11:58:19AM +0100, Thomas Huth wrote: > On 18/01/2023 11.29, Daniel P. Berrangé wrote: > > On Wed, Jan 18, 2023 at 05:25:37AM -0500, Michael S. Tsirkin wrote: > > > On Mon, Jan 16, 2023 at 11:18:19AM +, Daniel P. Berrangé wrote: > > > > > +for (uint32_t i = 0; i <

Re: [PATCH] ppc/pegasos2: Improve readability of VIA south bridge creation

2023-01-18 Thread Philippe Mathieu-Daudé
On 17/1/23 22:57, BALATON Zoltan wrote: On Tue, 17 Jan 2023, BALATON Zoltan wrote: Slightly improve readability of creating the south btidge by cnamging Still left a typo in "bridge" above... Also "naming". This is alternative, inspired by Phil's patches, maybe I'd also need to add

[PATCH v2 0/2] hw/pci-host/gt64120: Fix regression on big-endian targets

2023-01-18 Thread Philippe Mathieu-Daudé
Klaus reported a regression on big-endian targets, introduced by commit 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps"). Fix it and add the Klaus' reproducer as Avocado test. Since v1: - Add Klaus Tested-by tag in patch #1 - Add parenthesis in "(v & b) ? x

Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory

2023-01-18 Thread Isaku Yamahata
On Wed, Jan 18, 2023 at 04:16:41PM +0800, Chao Peng wrote: > On Tue, Jan 17, 2023 at 04:34:15PM +, Sean Christopherson wrote: > > On Tue, Jan 17, 2023, Chao Peng wrote: > > > On Fri, Jan 13, 2023 at 09:54:41PM +, Sean Christopherson wrote: > > > > > + list_for_each_entry(notifier,

Re: [PATCH v2 1/2] hw/pci-host/gt64120: Fix PCI I/O config register endianness

2023-01-18 Thread Philippe Mathieu-Daudé
On 18/1/23 10:57, Philippe Mathieu-Daudé wrote: The MByteSwap bit only affects the data register endianness, not the config register. Map the config register once in the gt64120_realize() handler, and only remap the data register when the mapping is updated. Fixes: 145e2198d7 ("gt64xxx:

Re: [PATCH RFC 03/21] physmem: Add qemu_ram_is_hugetlb()

2023-01-18 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Returns true for a hugetlbfs mapping, false otherwise. > > Signed-off-by: Peter Xu Yeh OK, it feels a little delecate perhaps if anything else ever allows large mappings. Reviewed-by: Dr. David Alan Gilbert > --- > include/exec/cpu-common.h | 1 + >

[PATCH v7] tests/qtest: netdev: test stream and dgram backends

2023-01-18 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin Acked-by: Thomas Huth --- Notes: v7: - disable test_dgram_mcast() on windows - disable test_dgram_unix() on windows as it also fails (we test for unix support dynamically but the test is done with

[PATCH] tests/qtest/qom-test: Stop spamming the test log

2023-01-18 Thread Thomas Huth
We are still facing the issues that our test logs in the gitlab CI are too big (and thus cut off). A huge part is still caused by the qom-test that prints the path and name of each object it looks at by default. That's too much. Let's be silent by default, and only print the object path+name when

[PATCH qemu 3/3] hw/mips/mt7628.c: add mt7628 soc support, add a mt7628 board VoCore2.

2023-01-18 Thread ~luhux
From: LuHui Signed-off-by: LuHui --- MAINTAINERS | 1 + configs/devices/mips-softmmu/common.mak | 2 + hw/mips/Kconfig | 11 ++ hw/mips/meson.build | 2 + hw/mips/mt7628.c| 189

[PATCH qemu 2/3] hw/intc/mt7628-intc.c: add mt7628 interrupt control support.

2023-01-18 Thread ~luhux
From: LuHui Signed-off-by: LuHui --- hw/intc/meson.build | 1 + hw/intc/mt7628-intc.c | 155 ++ include/hw/intc/mt7628-intc.h | 30 +++ 3 files changed, 186 insertions(+) create mode 100644 hw/intc/mt7628-intc.c create mode 100644

[PATCH qemu 1/3] hw/misc/mt7628-sysctrl.c: Add mt7628 system control support.

2023-01-18 Thread ~luhux
From: LuHui Signed-off-by: LuHui --- MAINTAINERS | 5 + hw/misc/meson.build | 3 + hw/misc/mt7628-sysctrl.c | 169 +++ include/hw/misc/mt7628-sysctrl.h | 66 4 files changed, 243 insertions(+) create mode

[PATCH] tests/qtest/bios-tables-test: Make the test less verbose by default

2023-01-18 Thread Thomas Huth
We are facing the issues that our test logs in the gitlab CI are too big (and thus cut off). The bios-tables-test is one of the few qtests that prints many lines of output by default when running with V=1, so it contributes to this problem. Almost all other qtests are silent with V=1 and only

float tests are too verbose (was: [PATCH v2] tests/qtest/qom-test: Do not print tested properties by default)

2023-01-18 Thread Thomas Huth
On 17/01/2023 11.44, Daniel P. Berrangé wrote: ... And what i think is test float being overly verbose >> Testing f16_le_quiet 46464 tests total. 1 2 3 4 46464 tests performed. Could be written as >> Testing f16_le_quiet: 46464 tests total

Re: [for-8.0 v2 05/11] cryptodev: Introduce 'query-cryptodev' QMP command

2023-01-18 Thread Michael S. Tsirkin
On Mon, Jan 16, 2023 at 11:18:19AM +, Daniel P. Berrangé wrote: > > +for (uint32_t i = 0; i < QCRYPTODEV_BACKEND_SERVICE__MAX; i++) { > > QEMU coding style doesn't declare types inside the for() control > conditions. I'd suggest 'size_t i', and put it at top of this > function. It's

Re: [PATCH v14 03/11] target/s390x/cpu topology: handle STSI(15) and build the SYSIB

2023-01-18 Thread Thomas Huth
On 17/01/2023 17.56, Pierre Morel wrote: On 1/10/23 15:29, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: 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 --- ... +typedef

Re: [PATCH v4 4/5] hw/arm/aspeed: Add aspeed_eeprom.c

2023-01-18 Thread Cédric Le Goater
On 1/18/23 03:42, Peter Delevoryas wrote: - Create aspeed_eeprom.c and aspeed_eeprom.h - Include aspeed_eeprom.c in CONFIG_ASPEED meson source files - Include aspeed_eeprom.h in aspeed.c - Add fby35_bmc_fruid data - Use new at24c_eeprom_init_rom helper to initialize BMC FRUID EEPROM with data

Re: [PATCH 0/5] migration: Modified 'migrate' QAPI command for migration

2023-01-18 Thread Claudio Fontana
On 1/18/23 06:52, Het Gala wrote: > > On 17/01/23 4:22 pm, Claudio Fontana wrote: >> Hi, >> >> On 12/26/22 06:33, Het Gala wrote: >>> Current QAPI 'migrate' command design (for initiating a migration >>> stream) contains information regarding different migrate transport mechanism >>> (tcp / unix

  1   2   3   >