PING: [PATCH v3 0/6] Misc fixes for throttle

2023-07-20 Thread zhenwei pi
Hi Kevin, Hanna, Patch 1 -> patch 5 of this series are already reviewed by Alberto(these affects throttle framework only), the patch 6 affects qemu block layer, would you please review this(in the further step, merge this series if this is acceptable)? On 7/13/23 14:41, zhenwei pi wrote:

[PATCH v6 2/3] hw/ufs: Support for Query Transfer Requests

2023-07-20 Thread Jeuk Kim
This commit makes the UFS device support query and nop out transfer requests. The next patch would be support for UFS logical unit and scsi command transfer request. Signed-off-by: Jeuk Kim --- hw/ufs/trace-events | 1 + hw/ufs/ufs.c| 980 +++-

[PATCH v6 0/3] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-20 Thread Jeuk Kim
Since v5: - Fix to print an error message instead of a segmentation fault when no drive property is specified for a ufs-lu device Since v4: Addressed review comment from Stefan Hajnoczi. The fixes are as follows. - Keep u->reg fields in host endian (Removed little-endian helper functions

[PATCH v6 1/3] hw/ufs: Initial commit for emulated Universal-Flash-Storage

2023-07-20 Thread Jeuk Kim
Universal Flash Storage (UFS) is a high-performance mass storage device with a serial interface. It is primarily used as a high-performance data storage device for embedded applications. This commit contains code for UFS device to be recognized as a UFS PCI device. Patches to handle UFS logical

[PATCH v6 3/3] hw/ufs: Support for UFS logical unit

2023-07-20 Thread Jeuk Kim
This commit adds support for ufs logical unit. The LU handles processing for the SCSI command, unit descriptor query request. This commit enables the UFS device to process IO requests. Signed-off-by: Jeuk Kim --- hw/ufs/lu.c | 1439 ++

Re: [PATCH v5 0/3] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-20 Thread Jeuk Kim
On 7/21/2023 3:49 AM, Stefan Hajnoczi wrote: Hi, I'm ready to merge this but encountered a bug when testing: $ qemu-system-x86_64 --device ufs --device ufs-lu Segmentation fault (core dumped) Please ensure there is an error message like with SCSI disks: $ qemu-system-x86_64 --device

Re: [PATCH v5 0/3] hw/ufs: Add Universal Flash Storage (UFS) support

2023-07-20 Thread Stefan Hajnoczi
Hi, I'm ready to merge this but encountered a bug when testing: $ qemu-system-x86_64 --device ufs --device ufs-lu Segmentation fault (core dumped) Please ensure there is an error message like with SCSI disks: $ qemu-system-x86_64 --device virtio-scsi-pci --device scsi-hd

Re: [PATCH] block: Be more verbose in create fallback

2023-07-20 Thread Eric Blake
On Thu, Jul 20, 2023 at 04:00:24PM +0200, Hanna Czenczek wrote: > For image creation code, we have central fallback code for protocols > that do not support creating new images (like NBD or iscsi). So for > them, you can only specify existing paths/exports that are overwritten > to make clean new

Re: [PATCH] hw/nvme: use stl/ldl pci dma api

2023-07-20 Thread Cédric Le Goater
On 7/20/23 11:42, Klaus Jensen wrote: From: Klaus Jensen Use the stl/ldl pci dma api for writing/reading doorbells. This removes the explicit endian conversions. Signed-off-by: Klaus Jensen Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater on big and little endian hosts,

Re: [PATCH 2/4] python/console_socket: accept existing FD in initializer

2023-07-20 Thread John Snow
On Thu, Jul 20, 2023 at 10:01 AM Daniel P. Berrangé wrote: > > On Thu, Jul 20, 2023 at 09:04:46AM -0400, John Snow wrote: > > Useful if we want to use ConsoleSocket() for a socket created by > > socketpair(). > > > > Signed-off-by: John Snow > > --- > > python/qemu/machine/console_socket.py |

Re: [PATCH 4/4] python/machine: remove unused console socket configuration arguments

2023-07-20 Thread John Snow
On Thu, Jul 20, 2023 at 10:05 AM Daniel P. Berrangé wrote: > > On Thu, Jul 20, 2023 at 09:04:48AM -0400, John Snow wrote: > > By using a socketpair for the console, we don't need the sock_dir > > argument for the base class anymore, remove it. > > > > The qtest subclass still uses the argument

Re: [PATCH 4/4] python/machine: remove unused console socket configuration arguments

2023-07-20 Thread Daniel P . Berrangé
On Thu, Jul 20, 2023 at 09:04:48AM -0400, John Snow wrote: > By using a socketpair for the console, we don't need the sock_dir > argument for the base class anymore, remove it. > > The qtest subclass still uses the argument for the qtest socket for now. > > Signed-off-by: John Snow > --- >

Re: [PATCH 3/4] python/machine: use socketpair() for console connections

2023-07-20 Thread Daniel P . Berrangé
On Thu, Jul 20, 2023 at 09:04:47AM -0400, John Snow wrote: > Create a socketpair for the console output. This should help eliminate > race conditions around console text early in the boot process that might > otherwise have been dropped on the floor before being able to connect to > QEMU under

Re: [PATCH 2/4] python/console_socket: accept existing FD in initializer

2023-07-20 Thread Daniel P . Berrangé
On Thu, Jul 20, 2023 at 09:04:46AM -0400, John Snow wrote: > Useful if we want to use ConsoleSocket() for a socket created by > socketpair(). > > Signed-off-by: John Snow > --- > python/qemu/machine/console_socket.py | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff

[PATCH] block: Be more verbose in create fallback

2023-07-20 Thread Hanna Czenczek
For image creation code, we have central fallback code for protocols that do not support creating new images (like NBD or iscsi). So for them, you can only specify existing paths/exports that are overwritten to make clean new images. In such a case, if the given path cannot be opened (assuming a

Re: [PATCH 1/4] python/machine: move socket setup out of _base_args property

2023-07-20 Thread Daniel P . Berrangé
On Thu, Jul 20, 2023 at 09:04:45AM -0400, John Snow wrote: > This property isn't meant to do much else besides return a list of > strings, so move this setup back out into _pre_launch(). > > Signed-off-by: John Snow > --- > python/qemu/machine/machine.py | 5 ++--- > 1 file changed, 2

Re: [PATCH 0/4] python/machine: use socketpair() for console socket

2023-07-20 Thread Peter Maydell
On Thu, 20 Jul 2023 at 14:04, John Snow wrote: > > Like we did for the QMP socket, use socketpair() for the console socket > so that hopefully there isn't a race condition during early boot where > data might get dropped on the floor. > > "lightly tested"; passes local tests and gitlab CI.

Re: [PATCH] hw/nvme: use stl/ldl pci dma api

2023-07-20 Thread Philippe Mathieu-Daudé
On 20/7/23 11:42, Klaus Jensen wrote: From: Klaus Jensen Use the stl/ldl pci dma api for writing/reading doorbells. This removes the explicit endian conversions. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 42 +- 1 file changed, 13

[PATCH 1/4] python/machine: move socket setup out of _base_args property

2023-07-20 Thread John Snow
This property isn't meant to do much else besides return a list of strings, so move this setup back out into _pre_launch(). Signed-off-by: John Snow --- python/qemu/machine/machine.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/python/qemu/machine/machine.py

[PATCH 3/4] python/machine: use socketpair() for console connections

2023-07-20 Thread John Snow
Create a socketpair for the console output. This should help eliminate race conditions around console text early in the boot process that might otherwise have been dropped on the floor before being able to connect to QEMU under "server,nowait". Signed-off-by: John Snow ---

[PATCH 2/4] python/console_socket: accept existing FD in initializer

2023-07-20 Thread John Snow
Useful if we want to use ConsoleSocket() for a socket created by socketpair(). Signed-off-by: John Snow --- python/qemu/machine/console_socket.py | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/qemu/machine/console_socket.py

[PATCH 4/4] python/machine: remove unused console socket configuration arguments

2023-07-20 Thread John Snow
By using a socketpair for the console, we don't need the sock_dir argument for the base class anymore, remove it. The qtest subclass still uses the argument for the qtest socket for now. Signed-off-by: John Snow --- python/qemu/machine/machine.py | 18 --

[PATCH 0/4] python/machine: use socketpair() for console socket

2023-07-20 Thread John Snow
Like we did for the QMP socket, use socketpair() for the console socket so that hopefully there isn't a race condition during early boot where data might get dropped on the floor. "lightly tested"; passes local tests and gitlab CI. Doesn't seem to make anything worse. John Snow (4):

Re: [PATCH] hw/nvme: use stl/ldl pci dma api

2023-07-20 Thread Thomas Huth
On 20/07/2023 11.42, Klaus Jensen wrote: From: Klaus Jensen Use the stl/ldl pci dma api for writing/reading doorbells. This removes the explicit endian conversions. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 42 +- 1 file changed, 13

[PATCH] hw/nvme: use stl/ldl pci dma api

2023-07-20 Thread Klaus Jensen
From: Klaus Jensen Use the stl/ldl pci dma api for writing/reading doorbells. This removes the explicit endian conversions. Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 42 +- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git

Re: [PULL 1/1] hw/nvme: fix endianness issue for shadow doorbells

2023-07-20 Thread Klaus Jensen
On Jul 20 09:51, Peter Maydell wrote: > On Thu, 20 Jul 2023 at 09:49, Klaus Jensen wrote: > > > > On Jul 20 09:43, Peter Maydell wrote: > > > On Wed, 19 Jul 2023 at 21:13, Michael Tokarev wrote: > > > > > > > > 19.07.2023 10:36, Klaus Jensen wrote: > > > > pu(req->cmd.dptr.prp2); > > > > > +

Re: [PULL 1/1] hw/nvme: fix endianness issue for shadow doorbells

2023-07-20 Thread Peter Maydell
On Thu, 20 Jul 2023 at 09:49, Klaus Jensen wrote: > > On Jul 20 09:43, Peter Maydell wrote: > > On Wed, 19 Jul 2023 at 21:13, Michael Tokarev wrote: > > > > > > 19.07.2023 10:36, Klaus Jensen wrote: > > > pu(req->cmd.dptr.prp2); > > > > +uint32_t v; > > > > > > > if (sq) { > > > >

Re: [PULL 1/1] hw/nvme: fix endianness issue for shadow doorbells

2023-07-20 Thread Klaus Jensen
On Jul 20 09:43, Peter Maydell wrote: > On Wed, 19 Jul 2023 at 21:13, Michael Tokarev wrote: > > > > 19.07.2023 10:36, Klaus Jensen wrote: > > pu(req->cmd.dptr.prp2); > > > +uint32_t v; > > > > > if (sq) { > > > +v = cpu_to_le32(sq->tail); > > > > > -

Re: [PULL 1/1] hw/nvme: fix endianness issue for shadow doorbells

2023-07-20 Thread Peter Maydell
On Wed, 19 Jul 2023 at 21:13, Michael Tokarev wrote: > > 19.07.2023 10:36, Klaus Jensen wrote: > pu(req->cmd.dptr.prp2); > > +uint32_t v; > > > if (sq) { > > +v = cpu_to_le32(sq->tail); > > > -pci_dma_write(pci, sq->db_addr, >tail, sizeof(sq->tail)); > > +