Re: [PATCH 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()

2022-05-09 Thread Durrant, Paul
On 08/05/2022 11:34, Bernhard Beschow wrote: This function was declared in a generic and public header, implemented in a device-specific source file but only used in xen_platform. Given its 'aux' parameter, this function is more xen-specific than piix-specific. Also, the hardcoded magic constants

Re: [PATCH 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()

2022-05-09 Thread Bernhard Beschow
Am 9. Mai 2022 08:02:13 UTC schrieb "Durrant, Paul" : >On 08/05/2022 11:34, Bernhard Beschow wrote: >> This function was declared in a generic and public header, implemented >> in a device-specific source file but only used in xen_platform. Given its >> 'aux' parameter, this function is more xen-sp

Re: [PULL 0/3] Block patches

2022-05-09 Thread Stefan Hajnoczi
On Thu, 5 May 2022 at 17:43, Richard Henderson wrote: > > On 5/5/22 03:42, Stefan Hajnoczi wrote: > > The following changes since commit 9cf289af47bcfae5c75de37d8e5d6fd23705322c: > > > >Merge tag 'qga-pull-request' of gitlab.com:marcandre.lureau/qemu into > > staging (2022-05-04 03:42:49 -070

Re: [PATCH 0/2] hw/nvme: support smart AEN

2022-05-09 Thread Klaus Jensen
On May 7 15:26, zhenwei pi wrote: > Hi, > In this series, firstly introduce smart related bits of aen cfg, then > support this in oaes. > > Linux guest does not support this currently, I also send a series to > enable smart AEN: > https://lore.kernel.org/lkml/20220507065026.260306-1-pizhen...@byt

[PATCH 0/2] ci: improve debuggability of I/O tests

2022-05-09 Thread Daniel P . Berrangé
Currently with the TAP harness we see essentially no useful information about the I/O tests execution. To pick a random job: https://gitlab.com/qemu-project/qemu/-/jobs/2429330423 All that we get is this: 184/204 qemu:block / qemu-iotests qcow2 OK 309.10s 116 subtests passed The full de

[PATCH 1/2] tests/qemu-iotests: print intent to run a test in TAP mode

2022-05-09 Thread Daniel P . Berrangé
When running I/O tests using TAP output mode, we get a single TAP test with a sub-test reported for each I/O test that is run. The output looks something like this: 1..123 ok qcow2 011 ok qcow2 012 ok qcow2 013 ok qcow2 217 ... If everything runs or fails normally this is fine, but periodic

Re: [PATCH 1/2] tests/qemu-iotests: print intent to run a test in TAP mode

2022-05-09 Thread Thomas Huth
On 09/05/2022 14.41, Daniel P. Berrangé wrote: When running I/O tests using TAP output mode, we get a single TAP test with a sub-test reported for each I/O test that is run. The output looks something like this: 1..123 ok qcow2 011 ok qcow2 012 ok qcow2 013 ok qcow2 217 ... If every

[PULL 0/9] Block patches

2022-05-09 Thread Stefan Hajnoczi
The following changes since commit 554623226f800acf48a2ed568900c1c968ec9a8b: Merge tag 'qemu-sparc-20220508' of https://github.com/mcayland/qemu into staging (2022-05-08 17:03:26 -0500) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for

[PULL 1/9] Introduce event-loop-base abstract class

2022-05-09 Thread Stefan Hajnoczi
From: Nicolas Saenz Julienne Introduce the 'event-loop-base' abstract class, it'll hold the properties common to all event loops and provide the necessary hooks for their creation and maintenance. Then have iothread inherit from it. EventLoopBaseClass is defined as user creatable and provides a

Re: Re: [PATCH 0/2] hw/nvme: support smart AEN

2022-05-09 Thread zhenwei pi
On 5/9/22 19:12, Klaus Jensen wrote: On May 7 15:26, zhenwei pi wrote: Hi, In this series, firstly introduce smart related bits of aen cfg, then support this in oaes. Linux guest does not support this currently, I also send a series to enable smart AEN: https://lore.kernel.org/lkml/20220507065

[PULL 5/9] virtio-scsi: don't waste CPU polling the event virtqueue

2022-05-09 Thread Stefan Hajnoczi
The virtio-scsi event virtqueue is not emptied by its handler function. This is typical for rx virtqueues where the device uses buffers when some event occurs (e.g. a packet is received, an error condition happens, etc). Polling non-empty virtqueues wastes CPU cycles. We are not waiting for new bu

[PULL 2/9] util/main-loop: Introduce the main loop into QOM

2022-05-09 Thread Stefan Hajnoczi
From: Nicolas Saenz Julienne 'event-loop-base' provides basic property handling for all 'AioContext' based event loops. So let's define a new 'MainLoopClass' that inherits from it. This will permit tweaking the main loop's properties through qapi as well as through the command line using the '-ob

[PATCH 2/2] .gitlab-ci.d: export meson testlog.txt as an artifact

2022-05-09 Thread Daniel P . Berrangé
When running 'make check' we only get a summary of progress on the console. Fortunately meson/ninja have saved the raw test output to a logfile. Exposing this log will make it easier to debug failures that happen in CI. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/buildtest-template.yml |

Re: [PULL 0/3] Block patches

2022-05-09 Thread Stefan Hajnoczi
It looks like a race condition in the test case. The failed test case (tests/unit/test-aio.c:test_timer_schedule()) assumes the process will be scheduled in a timely manner. A timer is scheduled for 750 ms and the test waits for 1 second before running the event loop. At that point a callback sched

[PULL 3/9] util/event-loop-base: Introduce options to set the thread pool size

2022-05-09 Thread Stefan Hajnoczi
From: Nicolas Saenz Julienne The thread pool regulates itself: when idle, it kills threads until empty, when in demand, it creates new threads until full. This behaviour doesn't play well with latency sensitive workloads where the price of creating a new thread is too high. For example, when pair

[PULL 6/9] virtio-scsi: clean up virtio_scsi_handle_event_vq()

2022-05-09 Thread Stefan Hajnoczi
virtio_scsi_handle_event_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20220427143541.119567-4-stefa...@r

[PULL 7/9] virtio-scsi: clean up virtio_scsi_handle_ctrl_vq()

2022-05-09 Thread Stefan Hajnoczi
virtio_scsi_handle_ctrl_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20220427143541.119567-5-stefa...@re

[PULL 9/9] virtio-scsi: move request-related items from .h to .c

2022-05-09 Thread Stefan Hajnoczi
There is no longer a need to expose the request and related APIs in virtio-scsi.h since there are no callers outside virtio-scsi.c. Note the block comment in VirtIOSCSIReq has been adjusted to meet the coding style. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 202204271

Re: [PATCH v7 00/22] host: Support macOS 12

2022-05-09 Thread Philippe Mathieu-Daudé via
On 3/5/22 11:40, Claudio Fontana wrote: On 3/7/22 12:17 AM, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Few patches to be able to build QEMU on macOS 12 (Monterey). Missing review: 0006-hvf-Fix-OOB-write-in-RDTSCP-instruction-decode.patch 0013-osdep-Avoid-using-Clang-specif

Re: [PATCH 2/2] .gitlab-ci.d: export meson testlog.txt as an artifact

2022-05-09 Thread Thomas Huth
On 09/05/2022 14.41, Daniel P. Berrangé wrote: When running 'make check' we only get a summary of progress on the console. Fortunately meson/ninja have saved the raw test output to a logfile. Exposing this log will make it easier to debug failures that happen in CI. Signed-off-by: Daniel P. Berr

[PULL 4/9] virtio-scsi: fix ctrl and event handler functions in dataplane mode

2022-05-09 Thread Stefan Hajnoczi
Commit f34e8d8b8d48d73f36a67b6d5e492ef9784b5012 ("virtio-scsi: prepare virtio_scsi_handle_cmd for dataplane") prepared the virtio-scsi cmd virtqueue handler function to be used in both the dataplane and non-datpalane code paths. It failed to convert the ctrl and event virtqueue handler functions,

Re: [PATCH v7 00/22] host: Support macOS 12

2022-05-09 Thread Claudio Fontana
On 5/9/22 2:31 PM, Philippe Mathieu-Daudé wrote: > On 3/5/22 11:40, Claudio Fontana wrote: >> On 3/7/22 12:17 AM, Philippe Mathieu-Daudé wrote: >>> From: Philippe Mathieu-Daudé >>> >>> Few patches to be able to build QEMU on macOS 12 (Monterey). >>> >>> Missing review: >>> 0006-hvf-Fix-OOB-write

[PULL 8/9] virtio-scsi: clean up virtio_scsi_handle_cmd_vq()

2022-05-09 Thread Stefan Hajnoczi
virtio_scsi_handle_cmd_vq() is only called from hw/scsi/virtio-scsi.c now and its return value is no longer used. Remove the function prototype from virtio-scsi.h and drop the return value. Signed-off-by: Stefan Hajnoczi Reviewed-by: Paolo Bonzini Message-id: 20220427143541.119567-6-stefa...@red

[PATCH] hw/sd/sdcard: Return ILLEGAL for CMD19/CMD23 prior SD spec v3.01

2022-05-09 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé CMD19 (SEND_TUNING_BLOCK) and CMD23 (SET_BLOCK_COUNT) were added in the Physical SD spec v3.01. When earlier spec version is requested, we should return ILLEGAL. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

Re: [PATCH v12 2/7] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-05-09 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Fri, May 06, 2022 at 10:57:54PM -0300, Leonardo Bras wrote: > > diff --git a/io/channel-socket.c b/io/channel-socket.c > > index 05c425abb8..f03a068f25 100644 > > --- a/io/channel-socket.c > > +++ b/io/channel-socket.c > > @@ -25,9 +25,18 @@ > > #include

Re: [PATCH v5 06/16] hvf: Enable RDTSCP support

2022-05-09 Thread Silvio Moioli
> On 14 February, 2022, at 19:55, Philippe Mathieu-Daudé via > wrote: > > From: Cameron Esfahani > > Pass through RDPID and RDTSCP support in CPUID if host supports it. > Correctly detect if CPU_BASED_TSC_OFFSET and CPU_BASED2_RDTSCP would > be supported in primary and secondary processor-ba

Re: [PATCH v5 06/16] hvf: Enable RDTSCP support

2022-05-09 Thread Silvio Moioli
> > On 14 February, 2022, at 19:55, Philippe Mathieu-Daudé via > wrote: > > From: Cameron Esfahani > > Pass through RDPID and RDTSCP support in CPUID if host supports it. > Correctly detect if CPU_BASED_TSC_OFFSET and CPU_BASED2_RDTSCP would > be supported in primary and secondary processor-b

[PATCH v8 03/12] hw/nvme: Add support for Secondary Controller List

2022-05-09 Thread Lukasz Maniak
Introduce handling for Secondary Controller List (Identify command with CNS value of 15h). Secondary controller ids are unique in the subsystem, hence they are reserved by it upon initialization of the primary controller to the number of sriov_max_vfs. ID reservation requires the addition of an i

[PATCH v8 08/12] hw/nvme: Initialize capability structures for primary/secondary controllers

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk With four new properties: - sriov_v{i,q}_flexible, - sriov_max_v{i,q}_per_vf, one can configure the number of available flexible resources, as well as the limits. The primary and secondary controller capability structures are initialized accordingly. Since the number of ava

[PATCH v8 02/12] hw/nvme: Add support for Primary Controller Capabilities

2022-05-09 Thread Lukasz Maniak
Implementation of Primary Controller Capabilities data structure (Identify command with CNS value of 14h). Currently, the command returns only ID of a primary controller. Handling of remaining fields are added in subsequent patches implementing virtualization enhancements. Signed-off-by: Lukasz M

[PATCH v8 04/12] hw/nvme: Implement the Function Level Reset

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk This patch implements the Function Level Reset, a feature currently not implemented for the Nvme device, while listed as a mandatory ("shall") in the 1.4 spec. The implementation reuses FLR-related building blocks defined for the pci-bridge module, and follows the same logic:

[PATCH v8 09/12] hw/nvme: Add support for the Virtualization Management command

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk With the new command one can: - assign flexible resources (queues, interrupts) to primary and secondary controllers, - toggle the online/offline state of given controller. Signed-off-by: Łukasz Gieryk Acked-by: Michael S. Tsirkin Reviewed-by: Klaus Jensen --- hw/nvme

[PATCH v8 12/12] hw/acpi: Make the PCI hot-plug aware of SR-IOV

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk PCI device capable of SR-IOV support is a new, still-experimental feature with only a single working example of the Nvme device. This patch in an attempt to fix a double-free problem when a SR-IOV-capable Nvme device is hot-unplugged in the following scenario: Qemu CLI:

[PATCH v8 00/12] hw/nvme: SR-IOV with Virtualization Enhancements

2022-05-09 Thread Lukasz Maniak
Changes since v7: - Fixed description of hw/acpi: Make the PCI hot-plug aware of SR-IOV - Added description to docs: Add documentation for SR-IOV and Virtualization Enhancements - Added Reviewed-by and Acked-by tags - Rebased on master Lukasz Maniak (4): hw/nvme: Add support for SR-IOV hw/nv

[PATCH v8 05/12] hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk The NVMe device defines two properties: max_ioqpairs, msix_qsize. Having them as constants is problematic for SR-IOV support. SR-IOV introduces virtual resources (queues, interrupts) that can be assigned to PF and its dependent VFs. Each device, following a reset, should work

[PATCH v8 06/12] hw/nvme: Remove reg_size variable and update BAR0 size calculation

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk The n->reg_size parameter unnecessarily splits the BAR0 size calculation in two phases; removed to simplify the code. With all the calculations done in one place, it seems the pow2ceil, applied originally to reg_size, is unnecessary. The rounding should happen as the last ste

[PATCH v8 01/12] hw/nvme: Add support for SR-IOV

2022-05-09 Thread Lukasz Maniak
This patch implements initial support for Single Root I/O Virtualization on an NVMe device. Essentially, it allows to define the maximum number of virtual functions supported by the NVMe controller via sriov_max_vfs parameter. Passing a non-zero value to sriov_max_vfs triggers reporting of SR-IOV

[PATCH v8 07/12] hw/nvme: Calculate BAR attributes in a function

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk An NVMe device with SR-IOV capability calculates the BAR size differently for PF and VF, so it makes sense to extract the common code to a separate function. Signed-off-by: Łukasz Gieryk Reviewed-by: Klaus Jensen Acked-by: Michael S. Tsirkin --- hw/nvme/ctrl.c | 45 ++

Re: [PATCH] hw/sd/sdcard: Return ILLEGAL for CMD19/CMD23 prior SD spec v3.01

2022-05-09 Thread Bin Meng
On Mon, May 9, 2022 at 10:13 PM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > CMD19 (SEND_TUNING_BLOCK) and CMD23 (SET_BLOCK_COUNT) were > added in the Physical SD spec v3.01. When earlier spec version nits: it should be spec v3.00, despite the fact that in QEMU we have been

[PATCH v8 10/12] docs: Add documentation for SR-IOV and Virtualization Enhancements

2022-05-09 Thread Lukasz Maniak
Documentation describes 5 new parameters being added regarding SR-IOV: sriov_max_vfs sriov_vq_flexible sriov_vi_flexible sriov_max_vi_per_vf sriov_max_vq_per_vf The description also includes the simplest possible QEMU invocation and the series of NVMe commands required to enable SR-IOV support. S

[PATCH v8 11/12] hw/nvme: Update the initalization place for the AER queue

2022-05-09 Thread Lukasz Maniak
From: Łukasz Gieryk This patch updates the initialization place for the AER queue, so it’s initialized once, at controller initialization, and not every time controller is enabled. While the original version works for a non-SR-IOV device, as it’s hard to interact with the controller if it’s not

Re: [PULL 0/9] Block patches

2022-05-09 Thread Richard Henderson
On 5/9/22 07:53, Stefan Hajnoczi wrote: The following changes since commit 554623226f800acf48a2ed568900c1c968ec9a8b: Merge tag 'qemu-sparc-20220508' of https://github.com/mcayland/qemu into staging (2022-05-08 17:03:26 -0500) are available in the Git repository at: https://gitlab.com/st

Re: [PATCH 2/2] .gitlab-ci.d: export meson testlog.txt as an artifact

2022-05-09 Thread Philippe Mathieu-Daudé via
On 9/5/22 14:41, Daniel P. Berrangé wrote: When running 'make check' we only get a summary of progress on the console. Fortunately meson/ninja have saved the raw test output to a logfile. Exposing this log will make it easier to debug failures that happen in CI. Signed-off-by: Daniel P. Berrangé

Re: [RFC PATCH 10/17] hw/sd: Add sd_cmd_SEND_TUNING_BLOCK() handler

2022-05-09 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: From: Joel Stanley Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 25e86c893bba..602ed6eb070

Re: [RFC PATCH 07/17] hw/sd: Add sd_cmd_SEND_OP_CMD() handler

2022-05-09 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210624142209.1193073-9-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) @@

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-09 Thread Philippe Mathieu-Daudé via
Hi Cédric, On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices. Signed-off-by

Re: [RFC PATCH 17/17] hw/sd: Subtract bootarea size from blk

2022-05-09 Thread Philippe Mathieu-Daudé via
Hi Joel, On 18/3/22 14:28, Cédric Le Goater wrote: From: Joel Stanley The userdata size is derived from the file the user passes on the command line, but we must take into account the boot areas. Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 6 ++ 1 fil

答复: [PATCH] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2022-05-09 Thread Gao, Lu
Ping https://patchew.org/QEMU/20220321055618.4026-1-lu@verisilicon.com/ Please help review the patch. Thanks. B.R. -邮件原件- 发件人: Gao, Lu 发送时间: Monday, April 25, 2022 9:35 AM 收件人: Gao, Lu; qemu-de...@nongnu.org 抄送: Wen, Jianxian; Philippe Mathieu-Daudé; Bin Meng; open list:SD (Secure C

Re: [RFC PATCH 10/17] hw/sd: Add sd_cmd_SEND_TUNING_BLOCK() handler

2022-05-09 Thread Cédric Le Goater
On 5/9/22 23:05, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: From: Joel Stanley Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater ---   hw/sd/sd.c | 28 +---   1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/sd/s