Matthew-Rosato…
Commits on Dec 7, 2021
-
MAINTAINERS: additional files related kvm s390 pci passthrough
Add entries from the s390 kvm subdirectory related to pci passthrough. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: introduce CPU feature for zPCI Interpretation
KVM_S390_VM_CPU_FEAT_ZPCI_INTERP relays whether zPCI interpretive execution is possible based on the available hardware facilities. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
vfio-pci/zdev: add DTSM to clp group capability
The DTSM, or designation type supported mask, indicates what IOAT formats are available to the guest. For an interpreted device, userspace will not know what format(s) the IOAT assist supports, so pass it via the capability chain. Since the value belongs to the Query PCI Function Group clp, let's extend the existing capability with a new version. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
vfio-pci/zdev: wire up zPCI IOAT assist support
Introduce support for VFIO_DEVICE_FEATURE_ZPCI_IOAT, which is a new VFIO_DEVICE_FEATURE ioctl. This interface is used to indicate that an s390x vfio-pci device wishes to enable/disable zPCI I/O Address Translation assistance, allowing the host to perform address translation and shadowing. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
vfio-pci/zdev: wire up zPCI adapter interrupt forwarding support
Introduce support for VFIO_DEVICE_FEATURE_ZPCI_AIF, which is a new VFIO_DEVICE_FEATURE ioctl. This interface is used to indicate that an s390x vfio-pci device wishes to enable/disable zPCI adapter interrupt forwarding, which allows underlying firmware to deliver interrupts directly to the associated kvm guest. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
vfio-pci/zdev: wire up zPCI interpretive execution support
Introduce support for VFIO_DEVICE_FEATURE_ZPCI_INTERP, which is a new VFIO_DEVICE_FEATURE ioctl. This interface is used to indicate that an s390x vfio-pci device wishes to enable/disable zPCI interpretive execution, which allows zPCI instructions to be executed directly by underlying firmware without KVM involvement. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
vfio-pci/zdev: wire up group notifier
KVM zPCI passthrough device logic will need a reference to the associated kvm guest that has access to the device. Let's register a group notifier for VFIO_GROUP_NOTIFY_SET_KVM to catch this information in order to create an association between a kvm guest and the host zdev. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
vfio/pci: re-introduce CONFIG_VFIO_PCI_ZDEV
This was previously removed as unnecessary; while that was true, subsequent changes will make KVM an additional required component for vfio-pci-zdev. Let's re-introduce CONFIG_VFIO_PCI_ZDEV as now there is actually a reason to say 'n' for it (when not planning to CONFIG_KVM). Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: intercept the rpcit instruction
For faster handling of PCI translation refreshes, intercept in KVM and call the associated handler. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: pci: handle refresh of PCI translations
Add a routine that will perform a shadow operation between a guest and host IOAT. A subsequent patch will invoke this in response to an 04 RPCIT instruction intercept. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: pci: provide routines for enabling/disabling IOAT assist
These routines will be wired into the vfio_pci_zdev ioctl handlers to respond to requests to enable / disable a device for PCI I/O Address Translation assistance. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: pci: provide routines for enabling/disabling interrupt for…
…warding These routines will be wired into the vfio_pci_zdev ioctl handlers to respond to requests to enable / disable a device for Adapter Event Notifications / Adapter Interuption Forwarding. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: pci: provide routines for enabling/disabling interpretation
These routines will be wired into the vfio_pci_zdev ioctl handlers to respond to requests to enable / disable a device for zPCI Load/Store interpretation. The first time such a request is received, enable the necessary facilities for the guest. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: mechanism to enable guest zPCI Interpretation
The guest must have access to certain facilities in order to allow interpretive execution of zPCI instructions and adapter event notifications. However, there are some cases where a guest might disable interpretation -- provide a mechanism via which we can defer enabling the associated zPCI interpretation facilities until the guest indicates it wishes to use them. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: expose guest Adapter Event Notification Interpretation fac…
…ility This facility will be used to enable forwarding of PCI interrupts from firmware directly to guests. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: expose the guest Adapter Interruption Source ID facility
This facility will be used to enable forwarding of PCI interrupts from firmware directly to guests. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: expose the guest zPCI interpretation facility
This facility will be used to enable interpretive execution of zPCI instructions. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: pci: enable host forwarding of Adapter Event Notifications
In cases where interrupts are not forwarded to the guest via firmware, KVM is responsible for ensuring delivery. When an interrupt presents with the forwarding bit, we must process the forwarding tables until all interrupts are delivered. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: pci: do initial setup for AEN interpretation
Initial setup for Adapter Event Notification Interpretation for zPCI passthrough devices. Specifically, allocate a structure for forwarding of adapter events and pass the address of this structure to firmware. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
KVM: s390: pci: add basic kvm_zdev structure
This structure will be used to carry kvm passthrough information related to zPCI devices. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/pci: get SHM information from list pci
KVM will need information on the special handle mask used to indicate emulated devices. In order to obtain this, a new type of list pci call must be made to gather the information. Remove the unused data pointer from clp_list_pci and __clp_add and instead optionally pass a pointer to a model-dependent-data field. Additionally, allow for clp_list_pci calls that don't specify a callback - in this case, just do the first pass of list pci and exit. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/pci: add helper function to find device by handle
Intercepted zPCI instructions will specify the desired function via a function handle. Add a routine to find the device with the specified handle. Acked-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/pci: stash dtsm and maxstbl
Store information about what IOAT designation types are supported by underlying hardware as well as the largest store block size allowed. These values will be needed by passthrough. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/pci: export some routines related to RPCIT processing
KVM will re-use dma_walk_cpu_trans to walk the host shadow table and will also need to be able to call zpci_refresh_trans to re-issue a RPCIT. Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/pci: stash associated GISA designation
For passthrough devices, we will need to know the GISA designation of the guest if interpretation facilities are to be used. Setup to stash this in the zdev and set a default of 0 (no GISA designation) for now; a subsequent patch will set a valid GISA designation for passthrough devices. Also, extend mpcific routines to specify this stashed designation as part of the mpcific command. Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/pci: externalize the SIC operation controls and routine
A subsequent patch will be issuing SIC from KVM -- export the necessary routine and make the operation control definitions available from a header. Because the routine will now be exported, let's swap the purpose of zpci_set_irq_ctrl and __zpci_set_irq_ctrl, leaving the latter as a static within pci_irq.c only for SIC calls that don't specify an iib. Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/airq: allow for airq structure that uses an input vector
When doing device passthrough where interrupts are being forwarded from host to guest, we wish to use a pinned section of guest memory as the vector (the same memory used by the guest as the vector). Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/airq: pass more TPI info to airq handlers
A subsequent patch will introduce an airq handler that requires additional TPI information beyond directed vs floating, so pass the entire tpi_info structure via the handler. Only pci actually uses this information today, for the other airq handlers this is effectively a no-op. Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/sclp: detect the AISI facility
Detect the Adapter Interruption Suppression Interpretation facility. Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/sclp: detect the AENI facility
Detect the Adapter Event Notification Interpretation facility. Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/sclp: detect the AISII facility
Detect the Adapter Interruption Source ID Interpretation facility. Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
-
s390/sclp: detect the zPCI interpretation facility
Detect the zPCI Load/Store Interpretation facility. Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Commits on Dec 5, 2021
-
-
Merge tag 'for-5.16/parisc-6' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: "Some bug and warning fixes: - Fix "make install" to use debians "installkernel" script which is now in /usr/sbin - Fix the bindeb-pkg make target by giving the correct KBUILD_IMAGE file name - Fix compiler warnings by annotating parisc agp init functions with __init - Fix timekeeping on SMP machines with dual-core CPUs - Enable some more config options in the 64-bit defconfig" * tag 'for-5.16/parisc-6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Mark cr16 CPU clocksource unstable on all SMP machines parisc: Fix "make install" on newer debian releases parisc/agp: Annotate parisc agp init functions with __init parisc: Enable sata sil, audit and usb support on 64-bit defconfig parisc: Fix KBUILD_IMAGE for self-extracting kernel -
Merge tag 'usb-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel…
…/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for a few reported issues. Included in here are: - xhci fix for a _much_ reported regression. I don't think there's a community distro that has not reported this problem yet :( - new USB quirk addition - cdns3 minor fixes - typec regression fix. All of these have been in linux-next with no reported problems, and the xhci fix has been reported by many to resolve their reported problem" * tag 'usb-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: cdnsp: Fix a NULL pointer dereference in cdnsp_endpoint_init() usb: cdns3: gadget: fix new urb never complete if ep cancel previous requests usb: typec: tcpm: Wait in SNK_DEBOUNCED until disconnect USB: NO_LPM quirk Lenovo Powered USB-C Travel Hub xhci: Fix commad ring abort, write all 64 bits to CRCR register.