Public bug reported:

Description:   s390/pci: vfio-pci mmio being disabled erroneously
Symptom:       PCI virtual functions passed through via vfio-pci are unusable  
Problem:       The fix for CVE-2020-12888 'abafbc551fdd vfio-pci: Invalidate
               mmaps and block MMIO access on disabled memory' introduced an
               issue which prevented PCI Virtual Functions from being passed-
               through via vfio-pci as VFs are not allowed to have the
               PCI_COMMAND_MEMORY bit enabled per spec.  This issue was
               initially thought to be fixed via 'ebfa440ce38b vfio/pci: Fix
               SR-IOV VF handling with MMIO blocking' which removes the
               PCI_COMMAND_MEMORY requirement for VFs but this did not solve
               the issue for virtual functions on s390 that are first passed
               through to an LPAR without their associated physical function
               as they are not identified as VFs in the traditional sense
               (there is no PF available to the host kernel to link to).  As a
               result, when passing these devices through to a guest via
               vfio-pci, these devices do not trigger the check added by
               ebfa440ce38b which results in MMIO access from the guest being
               blocked because the PCI_COMMAND_MEMORY bit is off.
Solution:      Identify devices beyond traditional linked VFs that vfio must
               consider memory-enabled. 
Reproduction:  Pass a PCI Virtual Function to a qemu-kvm guest via vfio-pci
Upstream-ID:   12856e7acde4702b7c3238c15fcba86ff6aa507f
               08b6e22b850c28b6032da1e4d767a33116e23dfb
               515ecd5368f1510152fa4f9b9ce55b66ac56c334

These patches need to be applied for 20.10 and 20.04.
The git-commits will apply cleanly on the dedicated kernels.

Manx thx

** Affects: linux (Ubuntu)
     Importance: Undecided
     Assignee: Skipper Bug Screeners (skipper-screen-team)
         Status: New


** Tags: architecture-s39064 bugnameltc-190039 severity-high 
targetmilestone-inin---

** Tags added: architecture-s39064 bugnameltc-190039 severity-high
targetmilestone-inin---

** Changed in: ubuntu
     Assignee: (unassigned) => Skipper Bug Screeners (skipper-screen-team)

** Package changed: ubuntu => linux (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1907265

Title:
  [UBUNTU 21.04] s390/pci: vfio-pci mmio being disabled erroneously

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1907265/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to