• Andra Paraschiv's avatar
    nitro_enclaves: Init PCI device driver · 89308c11
    Andra Paraschiv authored
    The Nitro Enclaves PCI device is used by the kernel driver as a means of
    communication with the hypervisor on the host where the primary VM and
    the enclaves run. It handles requests with regard to enclave lifetime.
    
    Setup the PCI device driver and add support for MSI-X interrupts.
    
    Changelog
    
    v9 -> v10
    
    * Update commit message to include the changelog before the SoB tag(s).
    
    v8 -> v9
    
    * Init the reference to the ne_pci_dev in the ne_devs data structure.
    
    v7 -> v8
    
    * Add NE PCI driver shutdown logic.
    
    v6 -> v7
    
    * No changes.
    
    v5 -> v6
    
    * Update documentation to kernel-doc format.
    
    v4 -> v5
    
    * Remove sanity checks for situations that shouldn't happen, only if
      buggy system or broken logic at all.
    
    v3 -> v4
    
    * Use dev_err instead of custom NE log pattern.
    * Update NE PCI driver name to "nitro_enclaves".
    
    v2 -> v3
    
    * Remove the GPL additional wording as SPDX-License-Identifier is
      already in place.
    * Remove the WARN_ON calls.
    * Remove linux/bug include that is not needed.
    * Update static calls sanity checks.
    * Remove "ratelimited" from the logs that are not in the ioctl call
      paths.
    * Update kzfree() calls to kfree().
    
    v1 -> v2
    
    * Add log pattern for NE.
    * Update PCI device setup functions to receive PCI device data structure and
      then get private data from it inside the functions logic.
    * Remove the BUG_ON calls.
    * Add teardown function for MSI-X setup.
    * Update goto labels to match their purpose.
    * Implement TODO for NE PCI device disable state check.
    * Update function name for NE PCI device probe / remove.
    Reviewed-by: default avatarAlexander Graf <graf@amazon.com>
    Signed-off-by: default avatarAlexandru-Catalin Vasile <lexnv@amazon.com>
    Signed-off-by: default avatarAlexandru Ciobotaru <alcioa@amazon.com>
    Signed-off-by: default avatarAndra Paraschiv <andraprs@amazon.com>
    Link: https://lore.kernel.org/r/20200921121732.44291-5-andraprs@amazon.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    89308c11
ne_pci_dev.c 6.72 KB