[23.10 FEAT] [VS2111] KVM: Enhance CCW address translation architectural compliance
Bug #2026211 reported by
bugproxy
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Medium
|
Skipper Bug Screeners | ||
linux (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Currently, CCW passthrough relies on every I/O containing only direct-addressed CCWs or a 4K Format-2 IDA, which is sufficient for Linux. Other operating systems may however require different formats and can fail on I/O.
tags: | added: architecture-s39064 bugnameltc-202909 severity-high targetmilestone-inin2310 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → linux (Ubuntu) |
summary: |
- [23.10] [VS2111] KVM: Enhance CCW address translation architectural + [23.10 FEAT] [VS2111] KVM: Enhance CCW address translation architectural compliance |
Changed in ubuntu-z-systems: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
Changed in linux (Ubuntu): | |
assignee: | Skipper Bug Screeners (skipper-screen-team) → Frank Heimes (fheimes) |
importance: | Undecided → High |
Changed in ubuntu-z-systems: | |
importance: | Undecided → Medium |
Changed in ubuntu-z-systems: | |
status: | New → Confirmed |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
Changed in linux (Ubuntu): | |
assignee: | Frank Heimes (fheimes) → nobody |
To post a comment you must log in.
------- Comment From <email address hidden> 2023-07-05 18:00 EDT------- ======= ======= =====
Update by ERIC R. FARMAN:
=======
The entirety of the vfio space has gone through a lot of rework in recent releases, though the commits in question for this item are specific to vfio-ccw and went in during the v6.3 merge window. I'll annotate the list because some are not strictly necessary:
$ git log --oneline v6.2..v6.3-rc1 -- drivers/ s390/cio/ vfio_ccw_ * emulated_ iommu_dev( )")
# 1c06bb87afb2 vfio/ccw: remove WARN_ON during shutdown
# Not needed; fix to a patch that went in 6.2 (and backported to 6.2.3)
beb060ed20d5 vfio/ccw: remove old IDA format restrictions
b5a73e8eb225 vfio/ccw: don't group contiguous pages on 2K IDAWs
# Optional; dependent on commit cfedb3d5e602 ("vfio/ccw: Only pass in contiguous pages")
1b676fe3d9d3 vfio/ccw: handle a guest Format-1 IDAL
61f3a16b9d5c vfio/ccw: allocate/populate the guest idal
6a6dc14ac847 vfio/ccw: calculate number of IDAWs regardless of format
667e5dbabf2b vfio/ccw: read only one Format-1 IDAW
b21f9cb1124e vfio/ccw: refactor the idaw counter
61783394f4eb vfio/ccw: populate page_array struct inline
62a97a56a64c vfio/ccw: pass page count to page_array struct
4b946d65b8aa vfio/ccw: remove unnecessary malloc alignment
# Optional; was opportunistic cleanup, can leave as-is
a4c6040472ba vfio/ccw: simplify CCW chain fetch routines
c5e8083f9580 vfio/ccw: replace copy_from_iova with vfio_dma_rw
# Optional;
# Interface was introduced in commit 8d46c0cca5f4 ("vfio: introduce vfio_dma_rw to read/write a range of IOVAs").
# Because of commit c6250ffbacc5 ("vfio/mdev: Pass in a struct vfio_device * to vfio_dma_rw()"),
# this may depend on commit 3bf1311f351e ("vfio/ccw: Convert to use vfio_register_
254cb663c2ac vfio/ccw: move where IDA flag is set in ORB
155a4321c117 vfio/ccw: allow non-zero storage keys
# 9fbed59fcd16 vfio/ccw: simplify the cp_get_orb interface
# Not needed; suggestion from review of a 6.2 patch
# 8a54e238ef1e vfio/ccw: cleanup some of the mdev commentary
# Not needed; comment cleanup from 6.2
Since these IDA formats are 2K-aligned, the above relies on the core vfio interface for vfio_pin_pages and vfio_unpin_pages using a list of struct pages (e.g., see [1] and [2]), instead of PFNs. With the original PFN-based interface, an alternative would be needed to track the page offset information when re-constituting the translated addresses before issuing an I/O. I have one squirreled away that I could provide, if it would help alleviate the drag on other drivers.
[1] commit 34a255e67615 ("vfio: Replace phys_pfn with pages for vfio_pin_pages()")
[2] commit 1331460514ff ("vfio/ccw: Change pa_pfn list to pa_iova list")