Re: [PATCH v5 21/45] block: add bdrv_try_set_aio_context_tran transaction action

2022-06-13 Thread Hanna Reitz
On 09.06.22 16:56, Vladimir Sementsov-Ogievskiy wrote: On 6/8/22 14:49, Hanna Reitz wrote: On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: To be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block.c | 48   1 f

Re: [PATCH v5 21/45] block: add bdrv_try_set_aio_context_tran transaction action

2022-06-13 Thread Hanna Reitz
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: To be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 48 1 file changed, 48 insertions(+) diff --git a/block.c b/block.c index be19964f89..1900cdf277 10

[PATCH v2] ui: move 'pc-bios/keymaps' to 'ui/keymaps'

2022-06-13 Thread Daniel P . Berrangé
The 'keymaps' directory contents is nothing to do with the firmware blobs. The 'pc-bios/keymaps' directory appears to have been used previously as a convenience for getting the files installed into a subdir of the firmware install dir, as well as to make it easier to launch QEMU directly from the b

[PATCH 0/7] crypto: Introduce ECDSA algorithm

2022-06-13 Thread Lei He
This patch introduced ECDSA algorithm for crypto: 1. make the built-in ASN.1 decoder support more ASN.1 types. 2. support ECDSA key and signature parsing. 3. implement the ECDSA algorithm using nettle and gcrypt respectively. Lei He (7): crypto: Introduce ECDSA algorithm API crypto: Support mo

[PATCH 1/7] crypto: Introduce ECDSA algorithm API

2022-06-13 Thread Lei He
Introduce ECDSA related structures to qapi-crypto. Signed-off-by: lei he --- qapi/crypto.json | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/qapi/crypto.json b/qapi/crypto.json index 653e6e3f3d..c2fcdaa13a 100644 --- a/qapi/crypto.json +++ b/qap

[PATCH 6/7] crypto: Implement ECDSA algorithm by gcrypt

2022-06-13 Thread Lei He
Implement ECDSA algorithm by gcrypt Signed-off-by: lei he --- crypto/akcipher-gcrypt.c.inc | 400 +++ 1 file changed, 400 insertions(+) diff --git a/crypto/akcipher-gcrypt.c.inc b/crypto/akcipher-gcrypt.c.inc index abb1fb272e..24377bbec6 100644 --- a/cryp

Re: [PULL 00/17] Kraxel 20220610 patches

2022-06-13 Thread Daniel P . Berrangé
On Sat, Jun 11, 2022 at 06:34:28PM +0200, Volker Rümelin wrote: > Am 10.06.22 um 22:16 schrieb Richard Henderson: > > On 6/10/22 02:20, Gerd Hoffmann wrote: > > > The following changes since commit > > > 9cc1bf1ebca550f8d90f967ccd2b6d2e00e81387: > > > > > >    Merge tag 'pull-xen-20220609' of > >

[PATCH 4/7] crypto: Add ECDSA key parser

2022-06-13 Thread Lei He
Add ECDSA key parser and ECDSA signautre parser. Signed-off-by: lei he --- crypto/ecdsakey-builtin.c.inc | 248 ++ crypto/ecdsakey.c | 118 crypto/ecdsakey.h | 66 +++ crypto/meson.build|

[PATCH 2/7] crypto: Support more ASN.1 types

2022-06-13 Thread Lei He
1. support decoding of 'bit string','octet string', 'object id', and 'context specific tag' for DER decoder. 2. support encoding of int and sequence for DER decoder. 3. add test suites for the above changes. Signed-off-by: lei he --- crypto/der.c | 174 +++

[PATCH 3/7] crypto: remove "qemu/osdep.h" in rsakey.h

2022-06-13 Thread Lei He
Move 'include "qemu/osdep.h"' from rsakey.h to rsakey.c. Signed-off-by: lei he --- crypto/rsakey.c | 1 + crypto/rsakey.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/rsakey.c b/crypto/rsakey.c index cc40e072f0..dcdbd9ec57 100644 --- a/crypto/rsakey.c +++ b/crypto/r

[PATCH 7/7] crypto: Add test suite for ECDSA algorithm

2022-06-13 Thread Lei He
1. add test suite for ecdsa algorithm. 2. use qcrypto_akcihper_max_xxx_len to help create buffers in test code. Signed-off-by: lei he --- tests/unit/test-crypto-akcipher.c | 227 +++--- 1 file changed, 212 insertions(+), 15 deletions(-) diff --git a/tests/unit/te

[PATCH 5/7] crypto: Implement ECDSA algorithm by hogweed

2022-06-13 Thread Lei He
Implement ECDSA algorithm by hogweed and nettle. Signed-off-by: lei he --- crypto/akcipher-nettle.c.inc | 268 +++ 1 file changed, 268 insertions(+) diff --git a/crypto/akcipher-nettle.c.inc b/crypto/akcipher-nettle.c.inc index 02699e6e6d..94d6e0b629 1006

Re: [PATCH v2 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread Li Zhang
On Thu, Jun 9, 2022 at 5:59 PM Igor Mammedov wrote: > > On Fri, 20 May 2022 11:56:02 +0200 > Li Zhang wrote: > > > When no memory backend is specified in machine options, > > a default memory device will be added with default_ram_id. > > However, if a memory backend object is added in QEMU option

Re: [PATCH v5 22/45] block: implemet bdrv_unref_tran()

2022-06-13 Thread Hanna Reitz
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: Now nodes are removed during block-graph update transactions now? Look at bdrv_replace_child_tran: bdrv_unref() is simply postponed to commit phase. What is the problem with it? We want to make copy-before-write permissions strict: it shoul

Re: [PATCH 2/3] hw/acpi/aml-build: Fix {socket, cluster, core} IDs in PPTT

2022-06-13 Thread Gavin Shan
Hi Igor, On 6/10/22 12:00 AM, Igor Mammedov wrote: On Thu, 26 May 2022 22:40:05 +0800 Gavin Shan wrote: On 5/26/22 8:25 PM, Igor Mammedov wrote: On Wed, 18 May 2022 17:21:40 +0800 Gavin Shan wrote: The {socket, cluster, core} IDs detected from Linux guest aren't matching with what have

Re: [RFC v1] Adding block layer APIs resembling Linux ZoneBlockDevice ioctls.

2022-06-13 Thread Sam Li
Damien Le Moal 于2022年6月13日周一 14:24写道: > > On 6/13/22 13:09, Sam Li wrote: > > By adding zone management operations in BlockDriver, storage > > controller emulation can use the new block layer APIs including > > zone_report, zone_reset, zone_open, zone_close, and zone_finish. > > Like a real review

Re: [RFC v1] Adding block layer APIs resembling Linux ZoneBlockDevice ioctls.

2022-06-13 Thread Damien Le Moal
On 6/13/22 18:12, Sam Li wrote: [...] >>> +}; >>> + >>> +/** >>> + * Zone device information data structure. >>> + * Provide information on a device. >>> + */ >>> +typedef struct zbd_dev { >>> +enum zone_model model; >>> +uint32_t block_size; >>> +uint32_t write_granularity; >>> +ui

Re: [PATCH v5 29/45] block: introduce BDRV_O_NOPERM flag

2022-06-13 Thread Hanna Reitz
On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote: Now copy-before-write filter has weak permission model: when it has no parents, it share write permission on source. Otherwise we just can't blockdev-add it, when existing user of source has write permission. The situation is bad, it means t

Re: [PATCH v17 6/8] softmmu/dirtylimit: Implement virtual CPU throttle

2022-06-13 Thread manish.mishra
On 26/05/22 8:21 am, Jason Wang wrote: On Wed, May 25, 2022 at 11:56 PM Peter Xu wrote: On Wed, May 25, 2022 at 11:38:26PM +0800, Hyman Huang wrote: 2. Also this algorithm only control or limits dirty rate by guest writes. There can be some memory dirtying done by virtio based devices which i

Re: [PATCH 2/3] hw/usb/canokey: fix compatibility of qemu-xhci

2022-06-13 Thread Gerd Hoffmann
Hi, > case CANOKEY_EP_IN_WAIT: > /* NAK for early INTR IN */ > p->status = USB_RET_NAK; > +/* store pointer here for later emu_transmit wakeup */ > +key->ep_in_pointer[ep_in] = p->ep; There is no need to fish the ep pointer out of usb p

[PATCH v3 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread Li Zhang
When no memory backend is specified in machine options, a default memory device will be added with default_ram_id. However, if a memory backend object is added in QEMU options and id is the same as default_ram_id, a coredump happens. Command line: qemu-system-x86_64 -name guest=vmtest,debug-thread

Re: [PATCH] hw/openrisc: pass random seed to fdt

2022-06-13 Thread Jason A. Donenfeld
On 6/13/22, Stafford Horne wrote: > On Sun, Jun 12, 2022 at 11:59:49PM +0200, Jason A. Donenfeld wrote: >> If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to >> initialize early. Set this using the usual guest random number >> generation function. This is confirmed to successf

Re: [PATCH RFC 4/5] cpu: Allow cpu_synchronize_all_post_init() to take an errp

2022-06-13 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Jun 09, 2022 at 05:02:29PM -0400, Peter Xu wrote: > > On Wed, Jun 08, 2022 at 06:05:28PM +0100, Dr. David Alan Gilbert wrote: > > > > @@ -2005,7 +2005,17 @@ static void loadvm_postcopy_handle_run_bh(void > > > > *opaque) > > > > /* TODO we shoul

Re: [PATCH v2 00/11] vfio/migration: Implement VFIO migration protocol v2

2022-06-13 Thread Avihai Horon
On 6/8/2022 12:32 AM, Alex Williamson wrote: External email: Use caution opening links or attachments On Tue, 7 Jun 2022 20:44:23 +0300 Avihai Horon wrote: On 5/30/2022 8:07 PM, Avihai Horon wrote: Hello, Following VFIO migration protocol v2 acceptance in kernel, this series implements V

Re: [PATCH 1/1] block: use 'unsigned' for in_flight field on driver state

2022-06-13 Thread Denis V. Lunev
On 30.05.2022 12:39, Denis V. Lunev wrote: This patch makes in_flight field 'unsigned' for BDRVNBDState and MirrorBlockJob. This matches the definition of this field on BDS and is generically correct - we should never get negative value here. Signed-off-by: Denis V. Lunev CC: John Snow CC: Vla

Re: [PATCH v2 1/1] nbd: trace long NBD operations

2022-06-13 Thread Denis V. Lunev
On 30.05.2022 12:39, Denis V. Lunev wrote: At the moment there are 2 sources of lengthy operations if configured: * open connection, which could retry inside and * reconnect of already opened connection These operations could be quite lengthy and cumbersome to catch thus it would be quite natural

[PULL 00/16] Kraxel 20220613 patches

2022-06-13 Thread Gerd Hoffmann
The following changes since commit dcb40541ebca7ec98a14d461593b3cd7282b4fac: Merge tag 'mips-20220611' of https://github.com/philmd/qemu into staging (2022-06-11 21:13:27 -0700) are available in the Git repository at: git://git.kraxel.org/qemu tags/kraxel-20220613-pull-request

[PULL 06/16] meson: Add CanoKey

2022-06-13 Thread Gerd Hoffmann
From: "Hongren (Zenithal) Zheng" Signed-off-by: Hongren (Zenithal) Zheng Message-Id: Signed-off-by: Gerd Hoffmann --- meson_options.txt | 2 ++ hw/usb/Kconfig| 5 + hw/usb/meson.build| 5 + meson.build | 6 ++ scripts/meson

[PULL 13/16] ui/console: Do not return a value with ui_info

2022-06-13 Thread Gerd Hoffmann
From: Akihiko Odaki The returned value is not used and misleading. Signed-off-by: Akihiko Odaki Message-Id: <20220226115516.59830-2-akihiko.od...@gmail.com> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 2 +- hw/display/virtio-gpu-base.c | 6 +++--- hw/display/virtio-vga.c

[PULL 02/16] ui/gtk-gl-area: create the requested GL context version

2022-06-13 Thread Gerd Hoffmann
From: Volker Rümelin Since about 2018 virglrenderer (commit fa835b0f88 "vrend: don't hardcode context version") tries to open the highest available GL context version. This is done by creating the known GL context versions from the highest to the lowest until (*create_gl_context) returns a contex

[PULL 01/16] ui/gtk-gl-area: implement GL context destruction

2022-06-13 Thread Gerd Hoffmann
From: Volker Rümelin The counterpart function for gd_gl_area_create_context() is currently empty. Implement the gd_gl_area_destroy_context() function to avoid GL context leaks. Signed-off-by: Volker Rümelin Message-Id: <20220605085131.7711-1-vr_q...@t-online.de> Signed-off-by: Gerd Hoffmann --

[PULL 15/16] virtio-gpu: Respect UI refresh rate for EDID

2022-06-13 Thread Gerd Hoffmann
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Message-Id: <20220226115516.59830-4-akihiko.od...@gmail.com> Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu.h | 1 + hw/display/virtio-gpu-base.c | 1 + hw/display/virtio-gpu.c| 1 + 3 files changed, 3 insertions(+) dif

[PULL 11/16] usbredir: avoid queuing hello packet on snapshot restore

2022-06-13 Thread Gerd Hoffmann
From: Joelle van Dyne When launching QEMU with "-loadvm", usbredir_create_parser() should avoid setting up the hello packet (just as with "-incoming". On the latest version of libusbredir, usbredirparser_unserialize() will return error if the parser is not "pristine." Signed-off-by: Joelle van D

[PULL 03/16] ui/cocoa: Fix poweroff request code

2022-06-13 Thread Gerd Hoffmann
From: Akihiko Odaki Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220529082508.89097-1-akihiko.od...@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index

[PULL 04/16] hw/usb: Add CanoKey Implementation

2022-06-13 Thread Gerd Hoffmann
From: "Hongren (Zenithal) Zheng" This commit added a new emulated device called CanoKey to QEMU. CanoKey implements platform independent features in canokey-core https://github.com/canokeys/canokey-core, and leaves the USB implementation to the platform. In this commit the USB part was implemen

[PULL 07/16] docs: Add CanoKey documentation

2022-06-13 Thread Gerd Hoffmann
From: "Hongren (Zenithal) Zheng" Signed-off-by: Hongren (Zenithal) Zheng Message-Id: Signed-off-by: Gerd Hoffmann --- docs/system/device-emulation.rst | 1 + docs/system/devices/canokey.rst | 168 +++ 2 files changed, 169 insertions(+) create mode 100644 docs/s

[PULL 10/16] hw/usb/hcd-ehci: fix writeback order

2022-06-13 Thread Gerd Hoffmann
From: Arnout Engelen The 'active' bit passes control over a qTD between the guest and the controller: set to 1 by guest to enable execution by the controller, and the controller sets it to '0' to hand back control to the guest. ehci_state_writeback write two dwords to main memory using DMA: the

[PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-13 Thread Jason A. Donenfeld
If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to initialize early. Set this using the usual guest random number generation function. This is confirmed to successfully initialize the RNG on Linux 5.19-rc2. Cc: Alistair Francis Signed-off-by: Jason A. Donenfeld --- hw/riscv

[PULL 12/16] virtio-gpu: update done only on the scanout associated with rect

2022-06-13 Thread Gerd Hoffmann
From: Dongwon Kim It only needs to update the scanouts containing the rect area coming with the resource-flush request from the guest. Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim Message-Id: <20220505214030.4261-1-dongwon@intel.com> Signed-off-by: Gerd Hoffmann ---

[PULL 05/16] hw/usb/canokey: Add trace events

2022-06-13 Thread Gerd Hoffmann
From: "Hongren (Zenithal) Zheng" Signed-off-by: Hongren (Zenithal) Zheng Message-Id: Signed-off-by: Gerd Hoffmann --- hw/usb/canokey.c| 13 + hw/usb/trace-events | 16 2 files changed, 29 insertions(+) diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c index 6c

Re: [PATCH v2] ui: move 'pc-bios/keymaps' to 'ui/keymaps'

2022-06-13 Thread Gerd Hoffmann
On Mon, Jun 13, 2022 at 09:44:56AM +0100, Daniel P. Berrangé wrote: > The 'keymaps' directory contents is nothing to do with the firmware > blobs. The 'pc-bios/keymaps' directory appears to have been used > previously as a convenience for getting the files installed into > a subdir of the firmware

[PULL 09/16] MAINTAINERS: add myself as CanoKey maintainer

2022-06-13 Thread Gerd Hoffmann
From: "Hongren (Zenithal) Zheng" Signed-off-by: Hongren (Zenithal) Zheng Message-Id: Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0df25ed4b0a3..4cf6174f9f37 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @

[PULL 14/16] ui: Deliver refresh rate via QemuUIInfo

2022-06-13 Thread Gerd Hoffmann
From: Akihiko Odaki This change adds a new member, refresh_rate to QemuUIInfo in include/ui/console.h. It represents the refresh rate of the physical display backend, and it is more appropriate than GUI update interval as the refresh rate which the emulated device reports: - sdl may set GUI updat

[PULL 16/16] ui: move 'pc-bios/keymaps' to 'ui/keymaps'

2022-06-13 Thread Gerd Hoffmann
From: Daniel P. Berrangé The 'keymaps' directory contents is nothing to do with the firmware blobs. The 'pc-bios/keymaps' directory appears to have been used previously as a convenience for getting the files installed into a subdir of the firmware install dir, as well as to make it easier to laun

[PULL 08/16] docs/system/devices/usb: Add CanoKey to USB devices examples

2022-06-13 Thread Gerd Hoffmann
From: "Hongren (Zenithal) Zheng" Signed-off-by: Hongren (Zenithal) Zheng Message-Id: Signed-off-by: Gerd Hoffmann --- docs/system/devices/usb.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/system/devices/usb.rst b/docs/system/devices/usb.rst index afb7d6c2268d..872d9167589b

[Bug] Take more 150s to boot qemu on ARM64

2022-06-13 Thread chenxiang (M)
Hi all, I encounter a issue with kernel 5.19-rc1 on a ARM64 board: it takes about 150s between beginning to run qemu command and beginng to boot Linux kernel ("EFI stub: Booting Linux Kernel..."). But in kernel 5.18-rc4, it only takes about 5s. I git bisect the kernel code and it finds c244

[PATCH v2 0/3] CanoKey: Fix xHCI compatibility and CCID ZLP

2022-06-13 Thread Hongren (Zenithal) Zheng
In patch v5 [1] of Introduce CanoKey QEMU I said that canokey-qemu was incompatible with qemu-xhci. kraxel kindly suggested[2] that it should be the problem of usb_wakeup So I fixed it in this patch set. Now that the v5 patch has been in the process of git PULL [3], I think it would be better to

[PATCH v2 2/3] hw/usb/canokey: fix compatibility of qemu-xhci

2022-06-13 Thread Hongren (Zenithal) Zheng
XHCI wont poll interrupt IN endpoint if NAKed, and needs wakeup Suggested-by: Gerd Hoffmann Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/canokey.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c index 86548923eb..8da0d65556

[PATCH] po: add ukrainian translation

2022-06-13 Thread Andrij Mizyk
Signed-off-by: Andrij Mizyk --- po/LINGUAS | 1 + po/uk.po | 75 ++ 2 files changed, 76 insertions(+) create mode 100644 po/uk.po diff --git a/po/LINGUAS b/po/LINGUAS index cc4b5c3b36..9b33a3659f 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@

[PATCH v2 1/3] hw/usb/canokey: Fix CCID ZLP

2022-06-13 Thread Hongren (Zenithal) Zheng
CCID could send zero-length packet (ZLP) if we invoke two data_in, two packets would be concated and we could not distinguish them. The CANOKEY_EMU_EP_CTAPHID is imported from canokey-qemu.h Reported-by: MkfsSion Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/canokey.c | 7 +++ 1 file

[PATCH 1/5] libvduse: Fix resources leak in vduse_dev_destroy()

2022-06-13 Thread Xie Yongji
This fixes resource leak when the fd is zero in vduse_dev_destroy(). Fixes: 8dbd281c1675 ("libvduse: Add VDUSE (vDPA Device in Userspace) library") Signed-off-by: Xie Yongji --- subprojects/libvduse/libvduse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/li

[PATCH v2 3/3] docs/system/devices/usb/canokey: remove limitations on qemu-xhci

2022-06-13 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/system/devices/canokey.rst | 10 -- 1 file changed, 10 deletions(-) diff --git a/docs/system/devices/canokey.rst b/docs/system/devices/canokey.rst index 169f99b8eb..c2c58ae3e7 100644 --- a/docs/system/devices/canokey.rst +++ b/docs/system/

[PATCH 2/5] vduse-blk: Don't unlink the reconnect file if device exists

2022-06-13 Thread Xie Yongji
We should not unlink the reconnect file if vduse_dev_destroy() fails with -EBUSY which means the VDUSE device has not been removed from the vDPA bus. Otherwise, we might fail on the reconnection later. Fixes: 730abef0e873 ("libvduse: Add support for reconnecting") Signed-off-by: Xie Yongji --- b

Re: [PATCH 1/3] target/riscv: Remove the redundant initialization of env->misa_mxl

2022-06-13 Thread Bin Meng
On Mon, Jun 13, 2022 at 8:33 AM Alistair Francis wrote: > > On Thu, Jun 9, 2022 at 11:08 AM Bin Meng wrote: > > > > env->misa_mxl was already set in the RISC-V cpu init routine, and > > validated at the beginning of riscv_cpu_realize(). There is no need > > to do a redundant initialization later.

[PATCH 5/5] vduse-blk: Add name option

2022-06-13 Thread Xie Yongji
Currently we use 'id' option as the name of VDUSE device. It's a bit confusing since we use one value for two different purposes: the ID to identfy the export within QEMU (must be distinct from any other exports in the same QEMU process, but can overlap with names used by other processes), and the

[PATCH 0/5] Some fixes and improvements for vduse-blk

2022-06-13 Thread Xie Yongji
This series includes few fixes and improvements for the vduse-blk export. Patch 1 fixes resources leak when vduse fd is zero. Patch 2, 3 fixes two bugs which could be triggered by force deleting a vduse-blk export with high I/O loads. Patch 4, 5 adds two new options for vduse-blk export. Xie Yo

[PATCH 4/5] vduse-blk: Add serial option

2022-06-13 Thread Xie Yongji
Add a 'serial' option to allow user to specify this value explicitly. And the default value is changed to an empty string as what we did in "hw/block/virtio-blk.c". Signed-off-by: Xie Yongji --- block/export/vduse-blk.c | 20 ++-- block/export/vhost-user-blk-server.c

[PATCH 3/5] vduse-blk: Don't delete the export until all inflight I/Os completed

2022-06-13 Thread Xie Yongji
Don't delete the export until all inflight I/Os completed. Otherwise, it might lead to a use-after-free. Fixes: cc241b5505b2 ("vduse-blk: Implement vduse-blk export") Signed-off-by: Xie Yongji --- block/export/vduse-blk.c | 22 ++ 1 file changed, 22 insertions(+) diff --git

[PATCH v2 02/17] test/avocado/machine_aspeed.py: Move OpenBMC tests

2022-06-13 Thread Cédric Le Goater
It's easier to run. Keep test_arm_ast2600_debian() under the boot_linux_console.py file because it requires the extract_from_deb() helper. We could remove it when we have tests for the AST2600. Signed-off-by: Cédric Le Goater --- tests/avocado/boot_linux_console.py | 43 -

[PATCH v2 00/17] aspeed: Extend ast2600 I2C model with new mode

2022-06-13 Thread Cédric Le Goater
Hello, Here is a series aggregating recent changes proposed on the Aspeed ast2600 I2C controller model. First comes a large set of changes converting the model to use the registerfield interface and adding the I2C new register mode (Joe). Since this is complex to review, extra tests are added to

[PATCH v2 01/17] aspeed: Remove fake RTC device on ast2500-evb

2022-06-13 Thread Cédric Le Goater
The board has no such device. It might have been useful for some tests in the past, it's not anymore and the same can be achieved on the command line. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 4 1 file changed, 4 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c inde

[PATCH v2 06/17] test/avocado/machine_aspeed.py: Add an I2C RTC test

2022-06-13 Thread Cédric Le Goater
Add an RTC device and check that the output of the hwclock command matches the current year. Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 8 1 file changed, 8 insertions(+) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/

[PATCH v2 04/17] test/avocado/machine_aspeed.py: Add I2C tests to ast2500-evb

2022-06-13 Thread Cédric Le Goater
Create a named I2C temperature sensor device on the command line, instantiate device from Linux since it is not part of the device tree, and check the temperature is correctly reported under sysfs. Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 13 + 1 file cha

[PATCH v2 03/17] test/avocado/machine_aspeed.py: Add tests using buildroot images

2022-06-13 Thread Cédric Le Goater
Buildroot images are smaller than the OpenBMC images and faster to run. Built from source using : http://patchwork.ozlabs.org/project/buildroot/list/?series=303465 Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 52 + 1 file changed, 52 in

[PATCH v2 07/17] hw/registerfields: Add shared fields macros

2022-06-13 Thread Cédric Le Goater
From: Joe Komlodi Occasionally a peripheral will have different operating modes, where the MMIO layout changes, but some of the register fields have the same offsets and behaviors. To help support this, we add SHARED_FIELD_XX macros that create SHIFT, LENGTH, and MASK macros for the fields that

[PATCH v2 05/17] test/avocado/machine_aspeed.py: Add I2C tests to ast2600-evb

2022-06-13 Thread Cédric Le Goater
Create a named I2C temperature sensor device on the command line, instantiate device from Linux since it is not part of the device tree, and check the temperature is correctly reported under sysfs. Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 13 + 1 file cha

[PATCH v2 11/17] aspeed: i2c: Add PKT_DONE IRQ to trace

2022-06-13 Thread Cédric Le Goater
From: Joe Komlodi Signed-off-by: Joe Komlodi Change-Id: I566eb09f4b9016e24570572f367627f6594039f5 Message-Id: <20220331043248.2237838-7-koml...@google.com> Signed-off-by: Cédric Le Goater --- hw/i2c/aspeed_i2c.c | 3 +++ hw/i2c/trace-events | 2 +- 2 files changed, 4 insertions(+), 1 deletion(

[PATCH v2 09/17] aspeed: i2c: Use reg array instead of individual vars

2022-06-13 Thread Cédric Le Goater
From: Joe Komlodi Using a register array will allow us to represent old-mode and new-mode I2C registers by using the same underlying register array, instead of adding an entire new set of variables to represent new mode. As part of this, we also do additional cleanup to use ARRAY_FIELD_ macros i

[PATCH v2 13/17] aspeed/i2c: Add ast1030 controller models

2022-06-13 Thread Cédric Le Goater
Based on : https://lore.kernel.org/qemu-devel/20220324100439.478317-2-troy_...@aspeedtech.com/ Cc: Troy Lee Cc: Jamin Lin Cc: Steven Lee Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater --- include/hw/i2c/aspeed_i2c.h | 1 + hw/i2c/aspeed_i2c.c | 24

[PATCH v2 08/17] aspeed: i2c: Migrate to registerfields API

2022-06-13 Thread Cédric Le Goater
From: Joe Komlodi This cleans up some of the field accessing, setting, and clearing bitwise operations, and wraps them in macros instead. Signed-off-by: Joe Komlodi Change-Id: I33018d6325fa04376e7c29dc4a49ab389a8e333a Message-Id: <20220331043248.2237838-4-koml...@google.com> Signed-off-by: Cédr

[PATCH v2 14/17] aspeed: Add I2C buses to AST1030 model

2022-06-13 Thread Cédric Le Goater
From: Troy Lee Instantiate the I2C buses in AST1030 model and create two slave device for ast1030-evb. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Signed-off-by: Steven Lee Reviewed-by: Joel Stanley [ clg : - adapted to current AST1030 upstream models - changed AST2600 to AST103

[PATCH v2 15/17] hw/i2c/aspeed: rework raise interrupt trace event

2022-06-13 Thread Cédric Le Goater
From: Klaus Jensen Build a single string instead of having several parameters on the trace event. Suggested-by: Cédric Le Goater Signed-off-by: Klaus Jensen [ clg: simplified trace buffer creation ] Message-Id: <20220601210831.67259-2-...@irrelevant.dk> Signed-off-by: Cédric Le Goater --- hw

Re: [PATCH 45/50] lasips2: use qdev gpio for output IRQ

2022-06-13 Thread Philippe Mathieu-Daudé via
On 22/5/22 20:18, Mark Cave-Ayland wrote: This enables the IRQ to be wired up using qdev_connect_gpio_out() in lasips2_initfn(). Signed-off-by: Mark Cave-Ayland --- hw/input/lasips2.c | 8 include/hw/input/lasips2.h | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-)

[PATCH v2 10/17] aspeed: i2c: Add new mode support

2022-06-13 Thread Cédric Le Goater
From: Joe Komlodi On AST2600, I2C has a secondary mode, called "new mode", which changes the layout of registers, adds some minor behavior changes, and introduces a new way to transfer data called "packet mode". Most of the bit positions of the fields are the same between old and new mode, so we

[PATCH v2 16/17] hw/i2c/aspeed: add DEV_ADDR in old register mode

2022-06-13 Thread Cédric Le Goater
From: Klaus Jensen Add support for writing and reading the device address register in old register mode. On the AST2400 (only 1 slave address) * no upper bits On the AST2500 (2 possible slave addresses), * bit[31] : Slave Address match indicator * bit[30] : Slave Address Receiving pendi

Re: [PULL 13/27] machine: add mem compound property

2022-06-13 Thread Markus Armbruster
Paolo Bonzini writes: > Make -m syntactic sugar for a compound property "-machine > mem.{size,max-size,slots}". The new property does not have > the magic conversion to megabytes of unsuffixed arguments, > and also does not understand that "0" means the default size > (you have to leave it out t

Re: [PATCH v2] docs: add PCIe root bus for VGA compat guideline

2022-06-13 Thread Laszlo Ersek
On 06/12/22 19:32, Kevin Locke wrote: > PCI Express devices which use legacy VGA compatibility should be placed > on the Root Complex. This simplifies ioport access to VGA registers, > which requires use of a special exception bit to work across PCI(e) > bridges. It is also necessary for ioport a

[PATCH v2 12/17] aspeed: i2c: Move regs and helpers to header file

2022-06-13 Thread Cédric Le Goater
From: Joe Komlodi Moves register definitions and short commonly used inlined functiosn to the header file to help tidy up the implementation file. Signed-off-by: Joe Komlodi Change-Id: I34dff7485b6bbe3c9482715ccd94dbd65dc5f324 Message-Id: <20220331043248.2237838-8-koml...@google.com> Signed-off

[PATCH v2 17/17] aspeed/i2c: Enable SLAVE_ADDR_RX_MATCH always

2022-06-13 Thread Cédric Le Goater
There is no 'slave match interrupt' enable bit in the Interrupt Control Register. Consider it is always enabled and extend the mask value 'bus->regs[intr_ctrl_reg]' with the SLAVE_ADDR_RX_MATCH bit when the interrupt is raised. Signed-off-by: Cédric Le Goater --- hw/i2c/aspeed_i2c.c | 13 +++

Re: [Bug] Take more 150s to boot qemu on ARM64

2022-06-13 Thread Paul E. McKenney
On Mon, Jun 13, 2022 at 08:26:34PM +0800, chenxiang (M) wrote: > Hi all, > > I encounter a issue with kernel 5.19-rc1 on a ARM64 board: it takes about > 150s between beginning to run qemu command and beginng to boot Linux kernel > ("EFI stub: Booting Linux Kernel..."). > > But in kernel 5.18-rc4

Re: [PATCH] hw/openrisc: pass random seed to fdt

2022-06-13 Thread Philippe Mathieu-Daudé via
On 13/6/22 12:58, Jason A. Donenfeld wrote: On 6/13/22, Stafford Horne wrote: On Sun, Jun 12, 2022 at 11:59:49PM +0200, Jason A. Donenfeld wrote: If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to initialize early. Set this using the usual guest random number generation fu

Re: [PATCH 3/7] crypto: remove "qemu/osdep.h" in rsakey.h

2022-06-13 Thread Philippe Mathieu-Daudé via
On 13/6/22 10:45, Lei He wrote: Move 'include "qemu/osdep.h"' from rsakey.h to rsakey.c. Signed-off-by: lei he --- crypto/rsakey.c | 1 + crypto/rsakey.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

[PATCH v3] docs: add PCIe root bus for VGA compat guideline

2022-06-13 Thread Kevin Locke
PCI Express devices which use legacy VGA compatibility should be placed on the Root Complex. This simplifies ioport access to VGA registers, which requires use of a special exception bit to work across PCI(e) bridges. It is also necessary for ioport access to VESA BIOS Extension (VBE) registers,

Re: [PATCH v3 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread Igor Mammedov
On Mon, 13 Jun 2022 12:44:02 +0200 Li Zhang wrote: > When no memory backend is specified in machine options, > a default memory device will be added with default_ram_id. > However, if a memory backend object is added in QEMU options > and id is the same as default_ram_id, a coredump happens. > >

Re: [PATCH 4/7] crypto: Add ECDSA key parser

2022-06-13 Thread Philippe Mathieu-Daudé via
On 13/6/22 10:45, Lei He wrote: Add ECDSA key parser and ECDSA signautre parser. Signed-off-by: lei he --- crypto/ecdsakey-builtin.c.inc | 248 ++ crypto/ecdsakey.c | 118 crypto/ecdsakey.h | 66 ++

Re: [PATCH v17 6/8] softmmu/dirtylimit: Implement virtual CPU throttle

2022-06-13 Thread Peter Xu
On Mon, Jun 13, 2022 at 03:28:34PM +0530, manish.mishra wrote: > > On 26/05/22 8:21 am, Jason Wang wrote: > > On Wed, May 25, 2022 at 11:56 PM Peter Xu wrote: > > > On Wed, May 25, 2022 at 11:38:26PM +0800, Hyman Huang wrote: > > > > > 2. Also this algorithm only control or limits dirty rate by g

Re: [PATCH v3 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread Li Zhang
On Mon, Jun 13, 2022 at 4:19 PM Igor Mammedov wrote: > > On Mon, 13 Jun 2022 12:44:02 +0200 > Li Zhang wrote: > > > When no memory backend is specified in machine options, > > a default memory device will be added with default_ram_id. > > However, if a memory backend object is added in QEMU optio

Re: [PATCH v14 5/8] qmp: decode feature & status bits in virtio-status

2022-06-13 Thread Jonah Palmer
On 6/10/22 01:41, Michael S. Tsirkin wrote: On Thu, May 19, 2022 at 02:30:43AM -0400, Jonah Palmer wrote: On 5/16/22 16:26, Michael S. Tsirkin wrote: On Fri, Apr 01, 2022 at 09:23:22AM -0400, Jonah Palmer wrote: From: Laurent Vivier Display feature names instead of bit

[RFC PATCH] tcg/ppc: implement rem[u]_i{32,64} with mod[su][wd]

2022-06-13 Thread Matheus Kowalczuk Ferst
Power ISA v3.0 introduced mod[su][wd] insns that can be used to implement rem[u]_i{32,64}. Signed-off-by: Matheus Ferst --- tcg/ppc/tcg-target.c.inc | 22 ++ tcg/ppc/tcg-target.h | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/tcg/ppc/tcg-target

Re: [PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-06-13 Thread Julia Suvorova
On Tue, May 31, 2022 at 5:32 PM Stefan Hajnoczi wrote: > > On Tue, May 31, 2022 at 04:51:47PM +0200, Julia Suvorova wrote: > > In the ACPI specification [1], the 'unarmed' bit is set when a device > > cannot accept a persistent write. This means that when a memdev is > > read-only, the 'unarmed' f

Re: [PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-06-13 Thread Stefan Hajnoczi
On Mon, Jun 13, 2022 at 05:01:10PM +0200, Julia Suvorova wrote: > On Tue, May 31, 2022 at 5:32 PM Stefan Hajnoczi wrote: > > > > On Tue, May 31, 2022 at 04:51:47PM +0200, Julia Suvorova wrote: > > > In the ACPI specification [1], the 'unarmed' bit is set when a device > > > cannot accept a persist

Re: [PATCH v11 13/14] vfio-user: handle device interrupts

2022-06-13 Thread Stefan Hajnoczi
On Fri, Jun 10, 2022 at 03:50:40PM -0400, Jagannathan Raman wrote: > @@ -307,6 +315,38 @@ bool msi_is_masked(const PCIDevice *dev, unsigned int > vector) > return mask & (1U << vector); > } > > +void msi_set_irq_state(PCIDevice *dev, int vector, bool mask, Error **errp) The function name

Re: [PATCH v3 1/1] Fix the coredump when memory backend id conflicts with default_ram_id

2022-06-13 Thread David Hildenbrand
On 13.06.22 16:37, Li Zhang wrote: > On Mon, Jun 13, 2022 at 4:19 PM Igor Mammedov wrote: >> >> On Mon, 13 Jun 2022 12:44:02 +0200 >> Li Zhang wrote: >> >>> When no memory backend is specified in machine options, >>> a default memory device will be added with default_ram_id. >>> However, if a mem

Re: [PATCH v17 6/8] softmmu/dirtylimit: Implement virtual CPU throttle

2022-06-13 Thread manish.mishra
On 13/06/22 8:03 pm, Peter Xu wrote: On Mon, Jun 13, 2022 at 03:28:34PM +0530, manish.mishra wrote: On 26/05/22 8:21 am, Jason Wang wrote: On Wed, May 25, 2022 at 11:56 PM Peter Xu wrote: On Wed, May 25, 2022 at 11:38:26PM +0800, Hyman Huang wrote: 2. Also this algorithm only control or li

[PATCH 01/11] ppc/pnv: move root port attach to pnv_phb4_realize()

2022-06-13 Thread Daniel Henrique Barboza
Creating a root port is something related to the PHB, not the PEC. It also makes the logic more in line with what pnv-phb3 does. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 4 hw/pci-host/pnv_phb4_pec.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) d

[PATCH 02/11] ppc/pnv: attach phb3/phb4 root ports in QOM tree

2022-06-13 Thread Daniel Henrique Barboza
At this moment we leave the pnv-phb3(4)-root-port unattached in QOM: /unattached (container) (...) /device[2] (pnv-phb3-root-port) /bus master container[0] (memory-region) /bus master[0] (memory-region) /pci_bridge_io[0] (memory-region) /pci_bridge_io[1] (memory-regio

[PATCH 03/11] ppc/pnv: use dev->parent_bus->parent to get the PHB

2022-06-13 Thread Daniel Henrique Barboza
It is not advisable to execute an object_dynamic_cast() to poke into bus->qbus.parent and follow it up with a C cast into the PnvPHB type we think we got. A better way is to access the PnvPHB object via a QOM macro accessing the existing parent links of the DeviceState. For a given pnv-phb3/4-root

[PATCH 00/11] pnv-phb related cleanups

2022-06-13 Thread Daniel Henrique Barboza
Hi, I decided to make some cleanups/fixes after the feedback received in the v2 of the pnv-phb proxy series [1]. A lot of the reviews and comment were related to the current state of the code instead of what was being done there. With this series we want to: - provide a better base for proxy pnv

[PATCH 06/11] ppc/pnv: make pnv_ics_resend() use chip8->phbs[]

2022-06-13 Thread Daniel Henrique Barboza
pnv_ics_resend() is scrolling through all the child objects of the chip to search for the PHBs. It's faster and simpler to just use the phbs[] array. pnv_ics_resend_child() was folded into pnv_ics_resend() since it's too simple to justify its own function. Signed-off-by: Daniel Henrique Barboza

[PATCH 08/11] ppc/pnv: turn chip8->phbs[] into a PnvPHB3* array

2022-06-13 Thread Daniel Henrique Barboza
When enabling user created PHBs (a change reverted by commit 9c10d86fee) we were handling PHBs created by default versus by the user in different manners. The only difference between these PHBs is that one will have a valid phb3->chip that is assigned during pnv_chip_power8_realize(), while the use

  1   2   3   >