From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Jonah Palmer <jonah.palmer@oracle.com>,
Thomas Huth <thuth@redhat.com>, Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>,
Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
qemu-s390x@nongnu.org
Subject: [PULL 07/91] virtio-ccw: Handle extra notification data
Date: Tue, 2 Jul 2024 10:07:16 -0400 [thread overview]
Message-ID: <594b543a4a75d08f47e5ea92c96a89502a3eab72.1719929191.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1719929191.git.mst@redhat.com>
From: Jonah Palmer <jonah.palmer@oracle.com>
Add support to virtio-ccw devices for handling the extra data sent from
the driver to the device when the VIRTIO_F_NOTIFICATION_DATA transport
feature has been negotiated.
The extra data that's passed to the virtio-ccw device when this feature
is enabled varies depending on the device's virtqueue layout.
That data passed to the virtio-ccw device is in the same format as the
data passed to virtio-pci devices.
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240315165557.26942-5-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index cd063f8b64..8cd912f20e 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -126,9 +126,11 @@ static void subsystem_reset(void)
static int virtio_ccw_hcall_notify(const uint64_t *args)
{
uint64_t subch_id = args[0];
- uint64_t queue = args[1];
+ uint64_t data = args[1];
SubchDev *sch;
+ VirtIODevice *vdev;
int cssid, ssid, schid, m;
+ uint16_t vq_idx = data;
if (ioinst_disassemble_sch_ident(subch_id, &m, &cssid, &ssid, &schid)) {
return -EINVAL;
@@ -137,12 +139,19 @@ static int virtio_ccw_hcall_notify(const uint64_t *args)
if (!sch || !css_subch_visible(sch)) {
return -EINVAL;
}
- if (queue >= VIRTIO_QUEUE_MAX) {
+
+ vdev = virtio_ccw_get_vdev(sch);
+ if (vq_idx >= VIRTIO_QUEUE_MAX || !virtio_queue_get_num(vdev, vq_idx)) {
return -EINVAL;
}
- virtio_queue_notify(virtio_ccw_get_vdev(sch), queue);
- return 0;
+ if (virtio_vdev_has_feature(vdev, VIRTIO_F_NOTIFICATION_DATA)) {
+ virtio_queue_set_shadow_avail_idx(virtio_get_queue(vdev, vq_idx),
+ (data >> 16) & 0xFFFF);
+ }
+
+ virtio_queue_notify(vdev, vq_idx);
+ return 0;
}
static int virtio_ccw_hcall_early_printk(const uint64_t *args)
--
MST
next prev parent reply other threads:[~2024-07-02 14:11 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 14:06 [PULL 00/91] virtio: features,fixes Michael S. Tsirkin
2024-07-02 14:06 ` [PULL 01/91] vhost: dirty log should be per backend type Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 02/91] vhost: Perform memory section dirty scans once per iteration Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 03/91] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 04/91] virtio/virtio-pci: Handle extra notification data Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 05/91] virtio: Prevent creation of device using notification-data with ioeventfd Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 06/91] virtio-mmio: Handle extra notification data Michael S. Tsirkin
2024-07-02 14:07 ` Michael S. Tsirkin [this message]
2024-07-02 14:07 ` [PULL 08/91] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 09/91] Fix vhost user assertion when sending more than one fd Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 10/91] vhost-vsock: add VIRTIO_F_RING_PACKED to feature_bits Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 11/91] hw/virtio: Fix obtain the buffer id from the last descriptor Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 12/91] virtio-pci: only reset pm state during resetting Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 13/91] vhost-user-gpu: fix import of DMABUF Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 14/91] Revert "vhost-user: fix lost reconnect" Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 15/91] vhost-user: fix lost reconnect again Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 16/91] hw/cxl/mailbox: change CCI cmd set structure to be a member, not a reference Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 17/91] hw/cxl/mailbox: interface to add CCI commands to an existing CCI Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 18/91] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 19/91] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 20/91] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 21/91] hw/mem/cxl_type3: Add support to create DC regions to " Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 22/91] hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size instead of mr as argument Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 23/91] hw/mem/cxl_type3: Add host backend and address space handling for DC regions Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 24/91] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 25/91] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 26/91] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 27/91] hw/mem/cxl_type3: Add DPA range validation for accesses to DC regions Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 28/91] hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 29/91] hw/mem/cxl_type3: Allow to release extent superset in QMP interface Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 30/91] linux-headers: update to 6.10-rc1 Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 31/91] hw/misc/pvpanic: centralize definition of supported events Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 32/91] tests/qtest/pvpanic: use centralized " Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 33/91] hw/misc/pvpanic: add support for normal shutdowns Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 34/91] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 35/91] tests/qtest/pvpanic: add tests for pvshutdown event Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 36/91] Revert "docs/specs/pvpanic: mark shutdown event as not implemented" Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 37/91] virtio-pci: Fix the failure process in kvm_virtio_pci_vector_use_one() Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 38/91] hw/cxl: Fix read from bogus memory Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 39/91] virtio-pci: implement No_Soft_Reset bit Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 40/91] vhost-user-test: don't set call fd -1 non-blocking Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 41/91] i386/apic: Add hint on boot failure because of disabling x2APIC Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 42/91] hw/virtio: Free vqs after vhost_dev_cleanup() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 43/91] virtio-iommu: add error check before assert Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 44/91] vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE requests Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 45/91] hw/net/virtio-net.c: fix crash in iov_copy() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 46/91] qapi: clarify that the default is backend dependent Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 47/91] libvhost-user: set msg.msg_control to NULL when it is empty Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 48/91] libvhost-user: fail vu_message_write() if sendmsg() is failing Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 49/91] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 50/91] vhost-user-server: do not set memory fd non-blocking Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 51/91] contrib/vhost-user-blk: fix bind() using the right size of the address Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 52/91] contrib/vhost-user-*: use QEMU bswap helper functions Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 53/91] vhost-user: enable frontends on any POSIX system Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 54/91] libvhost-user: enable it " Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 55/91] contrib/vhost-user-blk: " Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 56/91] hostmem: add a new memory backend based on POSIX shm_open() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 57/91] tests/qtest/vhost-user-blk-test: use memory-backend-shm Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 58/91] tests/qtest/vhost-user-test: add a test case for memory-backend-shm Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 59/91] hw/virtio: Fix the de-initialization of vhost-user devices Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 60/91] hw/arm/virt-acpi-build: Drop local iort_node_offset Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 61/91] hw/i386/fw_cfg: Add etc/e820 to fw_cfg late Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 62/91] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 63/91] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 64/91] uefi-test-tools: Add support for python based build script Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 65/91] tests/data/uefi-boot-images: Add RISC-V ISO image Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 66/91] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 67/91] tests/qtest/bios-tables-test.c: Add support for arch in path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 68/91] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 69/91] tests/qtest/bios-tables-test.c: Set "arch" for x86 tests Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 70/91] tests/data/acpi: Move x86 ACPI tables under x86/${machine} path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 71/91] tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 72/91] meson.build: Add RISC-V to the edk2-target list Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 73/91] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 74/91] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 75/91] tests/qtest/bios-tables-test: Add empty ACPI data files for RISC-V Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 76/91] tests/qtest/bios-tables-test.c: Enable basic testing " Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 77/91] tests/qtest/bios-tables-test: Add expected ACPI data files " Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 78/91] hw/cxl/events: Improve QMP interfaces and documentation for add/release dynamic capacity Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 79/91] hw/cxl/events: Mark cxl-add-dynamic-capacity and cxl-release-dynamic-capcity unstable Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 80/91] virtio: remove virtio_tswap16s() call in vring_packed_event_read() Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 81/91] virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 82/91] hw/pci: Rename has_power to enabled Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 83/91] hw/ppc/spapr_pci: Do not create DT for disabled PCI device Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 84/91] hw/ppc/spapr_pci: Do not reject VFs created after a PF Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 85/91] pcie_sriov: Do not manually unrealize Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 86/91] pcie_sriov: Ensure VF function number does not overflow Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 87/91] pcie_sriov: Reuse SR-IOV VF device instances Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 88/91] pcie_sriov: Release VFs failed to realize Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 89/91] pcie_sriov: Remove num_vfs from PCIESriovPF Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 90/91] pcie_sriov: Register VFs after migration Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 91/91] hw/pci: Replace -1 with UINT32_MAX for romsize Michael S. Tsirkin
2024-07-02 14:35 ` [PULL 00/91] virtio: features,fixes Michael S. Tsirkin
2024-07-02 15:25 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=594b543a4a75d08f47e5ea92c96a89502a3eab72.1719929191.git.mst@redhat.com \
--to=mst@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=jonah.palmer@oracle.com \
--cc=pasic@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).