1. 28 Sep, 2018 6 commits
  2. 26 Sep, 2018 10 commits
    • Tony Krowiak's avatar
      KVM: s390: interface to clear CRYCB masks · 42104598
      Tony Krowiak authored
      Introduces a new KVM function to clear the APCB0 and APCB1 in the guest's
      CRYCB. This effectively clears all bits of the APM, AQM and ADM masks
      configured for the guest. The VCPUs are taken out of SIE to ensure the
      VCPUs do not get out of sync.
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Acked-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Tested-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Message-Id: <20180925231641.4954-11-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      42104598
    • Tony Krowiak's avatar
      s390: vfio-ap: sysfs interface to view matrix mdev matrix · 81b2b4b7
      Tony Krowiak authored
      Provides a sysfs interface to view the AP matrix configured for the
      mediated matrix device.
      
      The relevant sysfs structures are:
      
      /sys/devices/vfio_ap/matrix/
      ...... [mdev_supported_types]
      ......... [vfio_ap-passthrough]
      ............ [devices]
      ...............[$uuid]
      .................. matrix
      
      To view the matrix configured for the mediated matrix device,
      print the matrix file:
      
      	cat matrix
      
      Below are examples of the output from the above command:
      
      Example 1: Adapters and domains assigned
      	Assignments:
      		Adapters 5 and 6
      		Domains 4 and 71 (0x47)
      
      	Output
      		05.0004
      		05.0047
      		06.0004
      	06.0047
      
      Examples 2: Only adapters assigned
      	Assignments:
      		Adapters 5 and 6
      
      	Output:
      		05.
      		06.
      
      Examples 3: Only domains assigned
      	Assignments:
      		Domains 4 and 71 (0x47)
      
      	Output:
      		.0004
      		.0047
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Tested-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Message-Id: <20180925231641.4954-10-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      81b2b4b7
    • Tony Krowiak's avatar
      s390: vfio-ap: sysfs interfaces to configure control domains · 3b1eab7f
      Tony Krowiak authored
      Provides the sysfs interfaces for:
      
      1. Assigning AP control domains to the mediated matrix device
      
      2. Unassigning AP control domains from a mediated matrix device
      
      3. Displaying the control domains assigned to a mediated matrix
         device
      
      The IDs of the AP control domains assigned to the mediated matrix
      device are stored in an AP domain mask (ADM). The bits in the ADM,
      from most significant to least significant bit, correspond to
      AP domain numbers 0 to 255. On some systems, the maximum allowable
      domain number may be less than 255 - depending upon the host's
      AP configuration - and assignment may be rejected if the input
      domain ID exceeds the limit.
      
      When a control domain is assigned, the bit corresponding its domain
      ID will be set in the ADM. Likewise, when a domain is unassigned,
      the bit corresponding to its domain ID will be cleared in the ADM.
      
      The relevant sysfs structures are:
      
      /sys/devices/vfio_ap/matrix/
      ...... [mdev_supported_types]
      ......... [vfio_ap-passthrough]
      ............ [devices]
      ...............[$uuid]
      .................. assign_control_domain
      .................. unassign_control_domain
      
      To assign a control domain to the $uuid mediated matrix device's
      ADM, write its domain number to the assign_control_domain file.
      To unassign a domain, write its domain number to the
      unassign_control_domain file. The domain number is specified
      using conventional semantics: If it begins with 0x the number
      will be parsed as a hexadecimal (case insensitive) number;
      if it begins with 0, it is parsed as an octal number;
      otherwise, it will be parsed as a decimal number.
      
      For example, to assign control domain 173 (0xad) to the mediated
      matrix device $uuid:
      
      	echo 173 > assign_control_domain
      
      	or
      
      	echo 0255 > assign_control_domain
      
      	or
      
      	echo 0xad > assign_control_domain
      
      To unassign control domain 173 (0xad):
      
      	echo 173 > unassign_control_domain
      
      	or
      
      	echo 0255 > unassign_control_domain
      
      	or
      
      	echo 0xad > unassign_control_domain
      
      The assignment will be rejected if the APQI exceeds the maximum
      value for an AP domain:
        * If the AP Extended Addressing (APXA) facility is installed,
          the max value is 255
        * Else the max value is 15
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Tested-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Message-Id: <20180925231641.4954-9-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      3b1eab7f
    • Tony Krowiak's avatar
      s390: vfio-ap: sysfs interfaces to configure domains · 3211da0c
      Tony Krowiak authored
      Introduces two new sysfs attributes for the VFIO mediated
      matrix device for assigning AP domains to and unassigning
      AP domains from a mediated matrix device. The IDs of the
      AP domains assigned to the mediated matrix device will be
      stored in an AP queue mask (AQM).
      
      The bits in the AQM, from most significant to least
      significant bit, correspond to AP queue index (APQI) 0 to
      255 (note that an APQI is synonymous with with a domain ID).
      On some systems, the maximum allowable domain number may be
      less than 255 - depending upon the host's AP configuration -
      and assignment may be rejected if the input domain ID exceeds
      the limit.
      
      When a domain is assigned, the bit corresponding to the APQI
      will be set in the AQM. Likewise, when a domain is unassigned,
      the bit corresponding to the APQI will be cleared from the AQM.
      
      In order to successfully assign a domain, the APQNs derived from
      the domain ID being assigned and the adapter numbers of all
      adapters previously assigned:
      
      1. Must be bound to the vfio_ap device driver.
      
      2. Must not be assigned to any other mediated matrix device.
      
      If there are no adapters assigned to the mdev, then there must
      be an AP queue bound to the vfio_ap device driver with an
      APQN containing the domain ID (i.e., APQI), otherwise all
      adapters subsequently assigned will fail because there will be no
      AP queues bound with an APQN containing the APQI.
      
      Assigning or un-assigning an AP domain will also be rejected if
      a guest using the mediated matrix device is running.
      
      The relevant sysfs structures are:
      
      /sys/devices/vfio_ap/matrix/
      ...... [mdev_supported_types]
      ......... [vfio_ap-passthrough]
      ............ [devices]
      ...............[$uuid]
      .................. assign_domain
      .................. unassign_domain
      
      To assign a domain to the $uuid mediated matrix device,
      write the domain's ID to the assign_domain file. To
      unassign a domain, write the domain's ID to the
      unassign_domain file. The ID is specified using
      conventional semantics: If it begins with 0x, the number
      will be parsed as a hexadecimal (case insensitive) number;
      if it begins with 0, it will be parsed as an octal number;
      otherwise, it will be parsed as a decimal number.
      
      For example, to assign domain 173 (0xad) to the mediated matrix
      device $uuid:
      
      	echo 173 > assign_domain
      
      	or
      
      	echo 0255 > assign_domain
      
      	or
      
      	echo 0xad > assign_domain
      
      To unassign domain 173 (0xad):
      
      	echo 173 > unassign_domain
      
      	or
      
      	echo 0255 > unassign_domain
      
      	or
      
      	echo 0xad > unassign_domain
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Tested-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Message-Id: <20180925231641.4954-8-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      3211da0c
    • Tony Krowiak's avatar
      s390: vfio-ap: sysfs interfaces to configure adapters · 96d152bd
      Tony Krowiak authored
      Introduces two new sysfs attributes for the VFIO mediated
      matrix device for assigning AP adapters to and unassigning
      AP adapters from a mediated matrix device. The IDs of the
      AP adapters assigned to the mediated matrix device will be
      stored in an AP mask (APM).
      
      The bits in the APM, from most significant to least significant
      bit, correspond to AP adapter IDs (APID) 0 to 255. On
      some systems, the maximum allowable adapter number may be less
      than 255 - depending upon the host's AP configuration - and
      assignment may be rejected if the input adapter ID exceeds the
      limit.
      
      When an adapter is assigned, the bit corresponding to the APID
      will be set in the APM. Likewise, when an adapter is
      unassigned, the bit corresponding to the APID will be cleared
      from the APM.
      
      In order to successfully assign an adapter, the APQNs derived from
      the adapter ID being assigned and the queue indexes of all domains
      previously assigned:
      
      1. Must be bound to the vfio_ap device driver.
      
      2. Must not be assigned to any other mediated matrix device
      
      If there are no domains assigned to the mdev, then there must
      be an AP queue bound to the vfio_ap device driver with an
      APQN containing the APID, otherwise all domains
      subsequently assigned will fail because there will be no
      AP queues bound with an APQN containing the adapter ID.
      
      Assigning or un-assigning an AP adapter will be rejected if
      a guest using the mediated matrix device is running.
      
      The relevant sysfs structures are:
      
      /sys/devices/vfio_ap/matrix/
      ...... [mdev_supported_types]
      ......... [vfio_ap-passthrough]
      ............ [devices]
      ...............[$uuid]
      .................. assign_adapter
      .................. unassign_adapter
      
      To assign an adapter to the $uuid mediated matrix device's APM,
      write the APID to the assign_adapter file. To unassign an adapter,
      write the APID to the unassign_adapter file. The APID is specified
      using conventional semantics: If it begins with 0x the number will
      be parsed as a hexadecimal number; if it begins with a 0 the number
      will be parsed as an octal number; otherwise, it will be parsed as a
      decimal number.
      
      For example, to assign adapter 173 (0xad) to the mediated matrix
      device $uuid:
      
      	echo 173 > assign_adapter
      
      	or
      
      	echo 0xad > assign_adapter
      
      	or
      
      	echo 0255 > assign_adapter
      
      To unassign adapter 173 (0xad):
      
      	echo 173 > unassign_adapter
      
      	or
      
      	echo 0xad > unassign_adapter
      
      	or
      
      	echo 0255 > unassign_adapter
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Tested-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Message-Id: <20180925231641.4954-7-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      96d152bd
    • Tony Krowiak's avatar
      s390: vfio-ap: register matrix device with VFIO mdev framework · 65f06713
      Tony Krowiak authored
      Registers the matrix device created by the VFIO AP device
      driver with the VFIO mediated device framework.
      Registering the matrix device will create the sysfs
      structures needed to create mediated matrix devices
      each of which will be used to configure the AP matrix
      for a guest and connect it to the VFIO AP device driver.
      
      Registering the matrix device with the VFIO mediated device
      framework will create the following sysfs structures:
      
      /sys/devices/vfio_ap/matrix/
      ...... [mdev_supported_types]
      ......... [vfio_ap-passthrough]
      ............ create
      
      To create a mediated device for the AP matrix device, write a UUID
      to the create file:
      
      	uuidgen > create
      
      A symbolic link to the mediated device's directory will be created in the
      devices subdirectory named after the generated $uuid:
      
      /sys/devices/vfio_ap/matrix/
      ...... [mdev_supported_types]
      ......... [vfio_ap-passthrough]
      ............ [devices]
      ............... [$uuid]
      
      A symbolic link to the mediated device will also be created
      in the vfio_ap matrix's directory:
      
      /sys/devices/vfio_ap/matrix/[$uuid]
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Message-Id: <20180925231641.4954-6-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      65f06713
    • Tony Krowiak's avatar
      s390: vfio-ap: base implementation of VFIO AP device driver · 1fde5734
      Tony Krowiak authored
      Introduces a new AP device driver. This device driver
      is built on the VFIO mediated device framework. The framework
      provides sysfs interfaces that facilitate passthrough
      access by guests to devices installed on the linux host.
      
      The VFIO AP device driver will serve two purposes:
      
      1. Provide the interfaces to reserve AP devices for exclusive
         use by KVM guests. This is accomplished by unbinding the
         devices to be reserved for guest usage from the zcrypt
         device driver and binding them to the VFIO AP device driver.
      
      2. Implements the functions, callbacks and sysfs attribute
         interfaces required to create one or more VFIO mediated
         devices each of which will be used to configure the AP
         matrix for a guest and serve as a file descriptor
         for facilitating communication between QEMU and the
         VFIO AP device driver.
      
      When the VFIO AP device driver is initialized:
      
      * It registers with the AP bus for control of type 10 (CEX4
        and newer) AP queue devices. This limitation was imposed
        due to:
      
        1. A desire to keep the code as simple as possible;
      
        2. Some older models are no longer supported by the kernel
           and others are getting close to end of service.
      
        3. A lack of older systems on which to test older devices.
      
        The probe and remove callbacks will be provided to support
        the binding/unbinding of AP queue devices to/from the VFIO
        AP device driver.
      
      * Creates a matrix device, /sys/devices/vfio_ap/matrix,
        to serve as the parent of the mediated devices created, one
        for each guest, and to hold the APQNs of the AP devices bound to
        the VFIO AP device driver.
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Message-Id: <20180925231641.4954-5-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      1fde5734
    • Tony Krowiak's avatar
      KVM: s390: refactor crypto initialization · e585b24a
      Tony Krowiak authored
      This patch refactors the code that initializes and sets up the
      crypto configuration for a guest. The following changes are
      implemented via this patch:
      
      1. Introduces a flag indicating AP instructions executed on
         the guest shall be interpreted by the firmware. This flag
         is used to set a bit in the guest's state description
         indicating AP instructions are to be interpreted.
      
      2. Replace code implementing AP interfaces with code supplied
         by the AP bus to query the AP configuration.
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
      Acked-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: default avatarJanosch Frank <frankja@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Tested-by: default avatarMichael Mueller <mimu@linux.ibm.com>
      Tested-by: default avatarFarhan Ali <alifm@linux.ibm.com>
      Message-Id: <20180925231641.4954-4-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      e585b24a
    • David Hildenbrand's avatar
      KVM: s390: introduce and use KVM_REQ_VSIE_RESTART · 3194cdb7
      David Hildenbrand authored
      When we change the crycb (or execution controls), we also have to make sure
      that the vSIE shadow datastructures properly consider the changed
      values before rerunning the vSIE. We can achieve that by simply using a
      VCPU request now.
      
      This has to be a synchronous request (== handled before entering the
      (v)SIE again).
      
      The request will make sure that the vSIE handler is left, and that the
      request will be processed (NOP), therefore forcing a reload of all
      vSIE data (including rebuilding the crycb) when re-entering the vSIE
      interception handler the next time.
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Reviewed-by: default avatarJanosch Frank <frankja@linux.ibm.com>
      Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Message-Id: <20180925231641.4954-3-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      3194cdb7
    • David Hildenbrand's avatar
      KVM: s390: vsie: simulate VCPU SIE entry/exit · 9ea59728
      David Hildenbrand authored
      VCPU requests and VCPU blocking right now don't take care of the vSIE
      (as it was not necessary until now). But we want to have synchronous VCPU
      requests that will also be handled before running the vSIE again.
      
      So let's simulate a SIE entry of the VCPU when calling the sie during
      vSIE handling and check for PROG_ flags. The existing infrastructure
      (e.g. exit_sie()) will then detect that the SIE (in form of the vSIE) is
      running and properly kick the vSIE CPU, resulting in it leaving the vSIE
      loop and therefore the vSIE interception handler, allowing it to handle
      VCPU requests.
      
      E.g. if we want to modify the crycb of the VCPU and make sure that any
      masks also get applied to the VSIE crycb shadow (which uses masks from the
      VCPU crycb), we will need a way to hinder the vSIE from running and make
      sure to process the updated crycb before reentering the vSIE again.
      Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarTony Krowiak <akrowiak@linux.ibm.com>
      Reviewed-by: default avatarPierre Morel <pmorel@linux.ibm.com>
      Reviewed-by: default avatarCornelia Huck <cohuck@redhat.com>
      Reviewed-by: default avatarJanosch Frank <frankja@linux.ibm.com>
      Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Message-Id: <20180925231641.4954-2-akrowiak@linux.vnet.ibm.com>
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      9ea59728
  3. 16 Sep, 2018 2 commits
  4. 15 Sep, 2018 8 commits
  5. 14 Sep, 2018 14 commits
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 090b75bc
      Linus Torvalds authored
      Pull DeviceTree fix from Rob Herring:
       "One regression for a 20 year old PowerMac:
      
         - Fix a regression on systems having a DT without any phandles which
           happens on a PowerMac G3"
      
      * tag 'devicetree-fixes-for-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: fix phandle cache creation for DTs with no phandles
      090b75bc
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.19c-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · d7c02680
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "This contains some minor cleanups and fixes:
      
         - a new knob for controlling scrubbing of pages returned by the Xen
           balloon driver to the Xen hypervisor to address a boot performance
           issue seen in large guests booted pre-ballooned
      
         - a fix of a regression in the gntdev driver which made it impossible
           to use fully virtualized guests (HVM guests) with a 4.19 based dom0
      
         - a fix in Xen cpu hotplug functionality which could be triggered by
           wrong admin commands (setting number of active vcpus to 0)
      
        One further note: the patches have all been under test for several
        days in another branch. This branch has been rebased in order to avoid
        merge conflicts"
      
      * tag 'for-linus-4.19c-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/gntdev: fix up blockable calls to mn_invl_range_start
        xen: fix GCC warning and remove duplicate EVTCHN_ROW/EVTCHN_COL usage
        xen: avoid crash in disable_hotplug_cpu
        xen/balloon: add runtime control for scrubbing ballooned out pages
        xen/manage: don't complain about an empty value in control/sysrq node
      d7c02680
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20180914' of git://github.com/jcmvbkbc/linux-xtensa · eae4f885
      Linus Torvalds authored
      Pull Xtensa fixes and cleanups from Max Filippov:
      
       - don't allocate memory in platform_setup as the memory allocator is
         not initialized at that point yet;
      
       - remove unnecessary ifeq KBUILD_SRC from arch/xtensa/Makefile;
      
       - enable SG chaining in arch/xtensa/Kconfig.
      
      * tag 'xtensa-20180914' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: enable SG chaining in Kconfig
        xtensa: remove unnecessary KBUILD_SRC ifeq conditional
        xtensa: ISS: don't allocate memory in platform_setup
      eae4f885
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 3e153256
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "The trickle of arm64 fixes continues to come in.
      
        Nothing that's the end of the world, but we've got a fix for PCI IO
        port accesses, an accidental naked "asm goto" and a fix to the
        vmcoreinfo PT_NOTE merged this time around which we'd like to get
        sorted before it becomes ABI.
      
         - Fix ioport_map() mapping the wrong physical address for some I/O
           BARs
      
         - Remove direct use of "asm goto", since some compilers don't like
           that
      
         - Ensure kimage_voffset is always present in vmcoreinfo PT_NOTE"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        asm-generic: io: Fix ioport_map() for !CONFIG_GENERIC_IOMAP && CONFIG_INDIRECT_PIO
        arm64: kernel: arch_crash_save_vmcoreinfo() should depend on CONFIG_CRASH_CORE
        arm64: jump_label.h: use asm_volatile_goto macro instead of "asm goto"
      3e153256
    • Trond Myklebust's avatar
      NFS: Don't open code clearing of delegation state · 9f0c5124
      Trond Myklebust authored
      Add a helper for the case when the nfs4 open state has been set to use
      a delegation stateid, and we want to revert to using the open stateid.
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      9f0c5124
    • Trond Myklebust's avatar
      NFSv4.1 fix infinite loop on I/O. · 994b15b9
      Trond Myklebust authored
      The previous fix broke recovery of delegated stateids because it assumes
      that if we did not mark the delegation as suspect, then the delegation has
      effectively been revoked, and so it removes that delegation irrespectively
      of whether or not it is valid and still in use. While this is "mostly
      harmless" for ordinary I/O, we've seen pNFS fail with LAYOUTGET spinning
      in an infinite loop while complaining that we're using an invalid stateid
      (in this case the all-zero stateid).
      
      What we rather want to do here is ensure that the delegation is always
      correctly marked as needing testing when that is the case. So we want
      to close the loophole offered by nfs4_schedule_stateid_recovery(),
      which marks the state as needing to be reclaimed, but not the
      delegation that may be backing it.
      
      Fixes: 0e3d3e5d ("NFSv4.1 fix infinite loop on IO BAD_STATEID error")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      Cc: stable@vger.kernel.org # v4.11+
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      994b15b9
    • Trond Myklebust's avatar
      NFSv4: Fix a tracepoint Oops in initiate_file_draining() · 2edaead6
      Trond Myklebust authored
      Now that the value of 'ino' can be NULL or an ERR_PTR(), we need to
      change the test in the tracepoint.
      
      Fixes: ce5624f7 ("NFSv4: Return NFS4ERR_DELAY when a layout fails...")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      Cc: stable@vger.kernel.org # v4.17+
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      2edaead6
    • Trond Myklebust's avatar
      pNFS: Ensure we return the error if someone kills a waiting layoutget · d03360aa
      Trond Myklebust authored
      If someone interrupts a wait on one or more outstanding layoutgets in
      pnfs_update_layout() then return the ERESTARTSYS/EINTR error.
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      d03360aa
    • Trond Myklebust's avatar
      NFSv4: Fix a tracepoint Oops in initiate_file_draining() · 2a534a74
      Trond Myklebust authored
      Now that the value of 'ino' can be NULL or an ERR_PTR(), we need to
      change the test in the tracepoint.
      
      Fixes: ce5624f7 ("NFSv4: Return NFS4ERR_DELAY when a layout fails...")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      Cc: stable@vger.kernel.org # v4.17+
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      2a534a74
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-4.19-rc4' of git://git.infradead.org/users/vkoul/slave-dma · f3c0b8ce
      Linus Torvalds authored
      Pull dmaengine fix from Vinod Koul:
       "Fix the mic_x100_dma driver to use devm_kzalloc for driver memory, so
        that it is freed properly when it unregisters from dmaengine using
        managed API"
      
      * tag 'dmaengine-fix-4.19-rc4' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: mic_x100_dma: use devm_kzalloc to fix an issue
      f3c0b8ce
    • Linus Torvalds's avatar
      Merge tag 'usb-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 1abc088a
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a number of small USB driver fixes for -rc4.
      
        The usual suspects of gadget, xhci, and dwc2/3 are in here, along with
        some reverts of reported problem changes, and a number of build
        documentation warning fixes. Full details are in the shortlog.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits)
        Revert "cdc-acm: implement put_char() and flush_chars()"
        usb: Change usb_of_get_companion_dev() place to usb/common
        usb: xhci: fix interrupt transfer error happened on MTK platforms
        usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()
        usb: misc: uss720: Fix two sleep-in-atomic-context bugs
        usb: host: u132-hcd: Fix a sleep-in-atomic-context bug in u132_get_frame()
        usb: Avoid use-after-free by flushing endpoints early in usb_set_interface()
        linux/mod_devicetable.h: fix kernel-doc missing notation for typec_device_id
        usb/typec: fix kernel-doc notation warning for typec_match_altmode
        usb: Don't die twice if PCI xhci host is not responding in resume
        usb: mtu3: fix error of xhci port id when enable U3 dual role
        usb: uas: add support for more quirk flags
        USB: Add quirk to support DJI CineSSD
        usb: typec: fix kernel-doc parameter warning
        usb/dwc3/gadget: fix kernel-doc parameter warning
        USB: yurex: Check for truncation in yurex_read()
        USB: yurex: Fix buffer over-read in yurex_write()
        usb: host: xhci-plat: Iterate over parent nodes for finding quirks
        xhci: Fix use after free for URB cancellation on a reallocated endpoint
        USB: add quirk for WORLDE Controller KS49 or Prodipe MIDI 49C USB controller
        ...
      1abc088a
    • Linus Torvalds's avatar
      Merge tag 'tty-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · c284cf06
      Linus Torvalds authored
      Pull tty fixes from Greg KH:
       "Here are three small HVC tty driver fixes to resolve a reported
        regression from 4.19-rc1.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: hvc: hvc_write() fix break condition
        tty: hvc: hvc_poll() fix read loop batching
        tty: hvc: hvc_poll() fix read loop hang
      c284cf06
    • Linus Torvalds's avatar
      Merge tag 'staging-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 45d9ab8a
      Linus Torvalds authored
      Pull staging/IIO driver fixes from Greg KH:
       "Here are a few small staging and iio driver fixes for -rc4.
      
        Nothing major, just a few small bugfixes for some reported issues, and
        a MAINTAINERS file update for the fbtft drivers.
      
        We also re-enable the building of the erofs filesystem as the XArray
        patches that were causing it to break never got merged in the -rc1
        cycle, so there's no reason it can't be turned back on for now. The
        problem that was previously there is now being handled in the Xarray
        tree at the moment, so it will not hit us again in the future.
      
        All of these patches have been in linux-next with no reported issues"
      
      * tag 'staging-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: vboxvideo: Change address of scanout buffer on page-flip
        staging: vboxvideo: Fix IRQs no longer working
        staging: gasket: TODO: re-implement using UIO
        staging/fbtft: Update TODO and mailing lists
        staging: erofs: rename superblock flags (MS_xyz -> SB_xyz)
        iio: imu: st_lsm6dsx: take into account ts samples in wm configuration
        Revert "iio: temperature: maxim_thermocouple: add MAX31856 part"
        Revert "staging: erofs: disable compiling temporarile"
        MAINTAINERS: Switch a maintainer for drivers/staging/gasket
        staging: wilc1000: revert "fix TODO to compile spi and sdio components in single module"
      45d9ab8a
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 319cbacf
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are a small handful of char/misc driver fixes for 4.19-rc4.
      
        All of them are simple, resolving reported problems in a few drivers.
        Full details are in the shortlog.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-4.19-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        firmware: Fix security issue with request_firmware_into_buf()
        vmbus: don't return values for uninitalized channels
        fpga: dfl: fme: fix return value check in in pr_mgmt_init()
        misc: hmc6352: fix potential Spectre v1
        Tools: hv: Fix a bug in the key delete code
        misc: ibmvsm: Fix wrong assignment of return code
        android: binder: fix the race mmap and alloc_new_buf_locked
        mei: bus: need to unlink client before freeing
        mei: bus: fix hw module get/put balance
        mei: fix use-after-free in mei_cl_write
        mei: ignore not found client in the enumeration
      319cbacf