[22.04 FEAT] Enhanced Interpretation for PCI Functions - qemu part
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Medium
|
Skipper Bug Screeners | ||
qemu (Ubuntu) |
Fix Released
|
Undecided
|
Canonical Server | ||
Jammy |
Fix Released
|
Undecided
|
Sergio Durigan Junior | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned | ||
Lunar |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
When using QEMU on s390x, the PCI passthrough feature is implemented by intercepting the PCI I/O operations (load/store), which ends up being less performant than executing those same instructions in an LPAR. The set of upstream patches being backported addresses this limitation by enabling interpretive execution of the PCI I/O instructions.
[ Test Plan ]
* Hardware used: z14 or greater LPAR, PCI-attached devices
(RoCE VFs, ISM devices, NVMe drive)
* Setup: Both the kernel and QEMU features are needed for the feature
to function (an upstream QEMU can be used to verify the kernel early),
and the facility is only avaialble on z14 or newer.
When any of those pieces is missing,
the interpretation facility will not be used.
When both the kernel and QEMU features are included in their respective
packages, and running in an LPAR on a z14 or newer machine,
this feature will be enabled automatically.
Existing supported devices should behave as before with no changes
required by an end-user (e.g. no changes to libvirt domain definitions)
-- but will now make use of the interpretation facility.
Additionally, ISM devices will now be eligible for vfio-pci passthrough
(where before QEMU would exit on error if attempting to provide an ISM
device for vfio-pci passthrough, preventing the guest from starting)
* Testing will include the following scenarios, repeated each for RoCE,
ISM and NVMe:
1) Testing of basic device passthrough (create a VM with a vfio-pci
device as part of the libvirt domain definition, passing through
a RoCE VF, an ISM device, or an NVMe drive. Verify that the device
is available in the guest and functioning)
2) Testing of device hotplug/unplug (create a VM with a vfio-pci device,
virsh detach-device to remove the device from the running guest,
verify the device is removed from the guest, then virsh attach-device
to hotplug the device to the guest again, verify the device functions
in the guest)
3) Host power off testing: Power off the device from the host, verify
that the device is unplugged from the guest as part of the poweroff
4) Guest power off testing: Power off the device from within the guest,
verify that the device is unusuable in the guest,
power the device back on within the guest and verify that the device
is once again usable.
5) Guest reboot testing: (create a VM with a vfio-pci device,
verify the device is in working condition, reboot the guest,
verify that the device is still usable after reboot)
Testing will include the following scenarios specifically for ISM devices:
1) Testing of SMC-D v1 fallback: Using 2 ISM devices on the same VCHID
that share a PNETID, create 2 guests and pass one ISM device
via vfio-pci device to each guest.
Establish TCP connectivity between the 2 guests using the libvirt
default network, and then use smc_run
(https:/
to run an iperf workload between the 2 guests (will include both
short workloads and longer-running workloads).
Verify that SMC-D transfer was used between the guests instead
of TCP via 'smcd stats'
(https:/
2) Testing of SMC-D v2: Same as above,
but using 2 ISM devices on the same VCHID that have no PNETID specified
Testing will include the following scenarios specifically for RoCE devices:
1) Ping testing: Using 2 RoCE VFs that share a common network,
create 2 guests and pass one RoCE device to each guest.
Assign IP addresses within each guest to the associated TCP interface,
perform a ping between the guests to verify connectivity.
2) Iperf testing: Similar to the above, but instead establish an iperf
connection between the 2 guests and verify that the workload
is successful / no errors.
Will include both short workloads and longer-running workloads.
Testing will include the following scenario specifically for NVMe devices:
1) Fio testing: Using a NVMe drive passed to the guest via vfio-pci,
run a series of fio tests against the device from within the guest,
verifying that the workload is successful / no errors.
Will include both short workloads and longer-running workloads.
Aside from the extensive test described above, we will also run the qemu-migration-test (<https:/
[ Where problems could occur ]
The first potential problem here is the fact that we are backporting 22 upstream patches. Most of them relate solely to s390x, so there is some degree of confinement if a regression were to occur.
The patches have all been part of the upstream codebase for at least almost one year; some of them for even more time.
Another noteworthy point to make is the fact that the feature will be tested by IBM themselves, who authored the most important patches in the series. This gives us an extra level of confidence because of the expertise involved.
[ Other Info ]
This SRU implements support for a hardware feature on s390x in Jammy, and as such falls under the Hardware Enablement SRU exception.
[ Original Description ]
The PCI Passthrough implementation is based on intercepting PCI I/O instructions which leads to a reduced I/O performance compared to execution of PCI instructions in LPAR.
For improved performance the interpretive execution of the PCI store and PCI load instructions get enabled.
Further improvement is achieved by enabling the Adapter-
Related branches
- git-ubuntu bot: Approve
- Lucas Kanashiro (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 6704 lines (+6556/-0)24 files modifieddebian/changelog (+7/-0)
debian/patches/series (+22/-0)
debian/patches/ubuntu/lp-1853307-Update-linux-headers-to-v6.0-rc4.patch (+1400/-0)
debian/patches/ubuntu/lp-1853307-configure-Add-Wno-gnu-variable-sized-type-not-at-end.patch (+69/-0)
debian/patches/ubuntu/lp-1853307-hw-i386-pass-RNG-seed-via-setup_data-entry.patch (+53/-0)
debian/patches/ubuntu/lp-1853307-kvm-add-support-for-boolean-statistics.patch (+34/-0)
debian/patches/ubuntu/lp-1853307-linux-headers-Add-vduse.h.patch (+347/-0)
debian/patches/ubuntu/lp-1853307-linux-headers-Update-headers-to-v5.17-rc1.patch (+1212/-0)
debian/patches/ubuntu/lp-1853307-linux-headers-Update-to-v5.18-rc6.patch (+1009/-0)
debian/patches/ubuntu/lp-1853307-linux-headers-include-missing-changes-from-5.17.patch (+50/-0)
debian/patches/ubuntu/lp-1853307-linux-headers-update-to-5.16-rc1.patch (+717/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-RPCIT-second-pass-when-mappings-exhausted.patch (+103/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-add-routine-to-get-host-function-handle-fr.patch (+167/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-add-supported-DT-information-to-clp-respon.patch (+88/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-don-t-fence-interpreted-devices-without-MS.patch (+48/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-enable-adapter-event-notification-for-inte.patch (+254/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-enable-for-load-store-interpretation.patch (+306/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-let-intercept-devices-have-separate-PCI-gr.patch (+180/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-reflect-proper-maxstbl-for-groups-of-inter.patch (+41/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-reset-ISM-passthrough-devices-on-shutdown-.patch (+136/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-shrink-DMA-aperture-to-be-bound-by-vfio-DM.patch (+79/-0)
debian/patches/ubuntu/lp-1853307-s390x-pci-use-a-reserved-ID-for-the-default-PCI-grou.patch (+38/-0)
debian/patches/ubuntu/lp-1853307-update-linux-headers-Add-asm-riscv-kvm.h.patch (+156/-0)
debian/patches/ubuntu/lp-1853307-virtio-gpu-do-not-byteswap-padding.patch (+40/-0)
- git-ubuntu bot: Approve
- Andreas Hasenack (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 6922 lines (+6313/-13)16 files modifieddebian/changelog (+4885/-3)
debian/control (+55/-8)
debian/control-in (+5/-2)
debian/patches/series (+6/-0)
debian/patches/ubuntu/define-ubuntu-machine-types.patch (+911/-0)
debian/patches/ubuntu/enable-svm-by-default.patch (+34/-0)
debian/patches/ubuntu/pre-bionic-256k-ipxe-efi-roms.patch (+62/-0)
debian/patches/ubuntu/qboot-Disable-LTO-for-ELF-binary-build-step.patch (+44/-0)
debian/qemu-block-extra.postinst (+59/-0)
debian/qemu-kvm-init (+89/-0)
debian/qemu-system-common.install (+1/-0)
debian/qemu-system-common.qemu-kvm.default (+8/-0)
debian/qemu-system-common.qemu-kvm.service (+16/-0)
debian/qemu-system-x86.NEWS (+80/-0)
debian/qemu-system-x86.README.Debian (+47/-0)
debian/rules (+11/-0)
CVE References
tags: | added: architecture-s39064 bugnameltc-182255 severity-high targetmilestone-inin2004 |
Changed in ubuntu: | |
assignee: | nobody → Skipper Bug Screeners (skipper-screen-team) |
affects: | ubuntu → qemu (Ubuntu) |
tags: | added: qemu-20.04 |
summary: |
- [20.04 FEAT] Enhanced Interpretation for PCI Functions - qemu part + [20.10 FEAT] Enhanced Interpretation for PCI Functions - qemu part |
tags: |
added: qemu-20.10 removed: qemu-20.04 |
summary: |
- [20.10 FEAT] Enhanced Interpretation for PCI Functions - qemu part + [21.04 FEAT] Enhanced Interpretation for PCI Functions - qemu part |
tags: |
added: qemu-21.04 removed: qemu-20.10 |
summary: |
- [21.04 FEAT] Enhanced Interpretation for PCI Functions - qemu part + [21.10 FEAT] Enhanced Interpretation for PCI Functions - qemu part |
tags: |
added: qemu-21.10 removed: qemu-21.04 |
summary: |
- [21.10 FEAT] Enhanced Interpretation for PCI Functions - qemu part + [22.04 FEAT] Enhanced Interpretation for PCI Functions - qemu part |
tags: |
added: qemu-22.04 removed: qemu-21.10 |
Changed in qemu (Ubuntu): | |
status: | Incomplete → New |
Changed in ubuntu-z-systems: | |
status: | Incomplete → New |
tags: |
added: qemu-23.04 removed: qemu-22.04 |
Changed in ubuntu-z-systems: | |
status: | New → In Progress |
Changed in qemu (Ubuntu Lunar): | |
assignee: | Skipper Bug Screeners (skipper-screen-team) → Canonical Server (canonical-server) |
Changed in ubuntu-z-systems: | |
assignee: | Canonical Server (canonical-server) → Skipper Bug Screeners (skipper-screen-team) |
information type: | Private → Public |
Changed in qemu (Ubuntu Lunar): | |
assignee: | Canonical Server (canonical-server) → nobody |
Changed in qemu (Ubuntu Jammy): | |
assignee: | nobody → Sergio Durigan Junior (sergiodj) |
description: | updated |
Changed in qemu (Ubuntu Jammy): | |
status: | In Progress → Confirmed |
status: | Confirmed → In Progress |
description: | updated |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-z-systems: | |
status: | Fix Committed → Fix Released |
Please specify the planned qemu target release this is going to become upstream accepted.
Will it come with 4.2?
Changing to Incomplete for now.