------------------------------------------------------------------------------
Supported Distro list and supported package list
------------------------------------------------------------------------------

################################################################################
SuSE:
################################################################################

x86_64
	SLES 12 SP3
		Gold (4.4.73-5)			(default)
	SLES 12 SP4
		Gold (4.12.14-94.41)		(default)
	SLES 12 SP5
		Gold (4.12.14-120)		(default)
	SLES 15 SP1
		Gold (4.12.14-195)		(default)
	SLES 15 SP2
		Gold (5.3.18-22)		(default)
	SLES 15 SP3
		Gold (5.3.18-57)		(default)

################################################################################
Red Hat, Cent OS, Oracle Enterprise Linux
################################################################################


x86_64
	
	RHEL8/OEL8/CENTOS8
		Update4 (4.18.0-305.el8.x86_64)		(el8)
		Update5 (4.18.0-348.el8.x86_64)		(el8)
		Update6 (4.18.0-372.9.1.el8.x86_64)	(el8)
	
	RHEL9/OEL9/CENTOS9
		Base	(5.14.0-70.13.1.el9_0.x86_64)	(el9)

################################################################################
openEuler:
################################################################################

aarch64
                OE20.03 LTS (4.19.90-2003.4.0.0036.oe1.aarch64)


NOTES: 
	1. binary and source RPM support is provided for the openEuler20.03 LTS. 
	   As inbox driver supports the Ventura generation of controllers so there
	   will be no DUD support available.
	2. source RPM will be available in the kmod_srpm folder of the release tar ball.  
	3. binary and source RPM installation steps are the same as RHEL.  

################################################################################
Ubuntu:
################################################################################

Single source DKMS Deb driver package will work for below mentioned Ubuntu OS
releases. Please refer driver README for how to use DKMS deb driver package.

x86_64
	Ubuntu 20.04 LTS (5.4)
	Ubuntu 22.04 LTS (5.15)


NOTE:
	In case of a kernel upgrade, if megaraid_sas driver DMKS module installation
	fails in the upgraded kernel and if it is due to broken DKMS then inbox driver
	will be installed in the upgraded kernel.
	
################################################################################
Citrix:
################################################################################

NOTE:
	Only RPM support is provided for Citrix's XenServer/Hypervisor OSes.
	Citrix has changed the DUD (Driver Update Disk) process in XenServer/Hypervisor
	and made it mandatory for ISO images to be signed with GPG keys and
	the GPG public key must be present in the base OS installation media.
	Due to this DUD support is dropped for XenServer/Hypervisor.
	Also, XenServer/Hypervisor OS by default installs out-of-box megaraid_sas driver
	rpm while installing the OS. After installing the OS, user can upgrade to
	the latest Citrix XenServer/Hypervisor megaraid_sas driver rpm provided as below,

# rpm -Uvh avago-megaraid-sas-07.703.01.00_CitrixXen7.1-1.x86_64.rpm

x86_64
	Citrix7
		Update 1 LTSR	(4.4.0+2)

x86_64
        Citrix8		
                Base (4.19.0+1)
	Citrix8.1
		Base (4.19.0+1)
	Citrix8.2
		Base (4.19.0+1)

Few additional notes:
=====================
1. For few distros(e.g.fedora23), while building binary RPM from source RPM, debuginfo package building is mandatory
   but MR build scripts do not have debugfiles.list required to build MR driver's debuginfo RPM. Not having debugfiles.list
   can cause failure to build binary RPM from source RPM. On such distros, while creating binary RPM from source RPM(using rpmbuild)
   use below options-
   #rpmbuild -ba --define "debug_package %{nil}"  file_name.spec

2. SLES12 SP3 inbox driver has a code bug that results in driver updates via DUD to fail. The issue manifests itself only when inbox driver is unloaded
   as part of DUD installation. OS installations can still continue using inbox driver which supports latest generation MegaRAID controllers. 
   Customers can then upgrade to latest out-of-box driver using RPM method.
   Please refer below BugZilla for more details.
   https://bugzilla.novell.com/show_bug.cgi?id=1053681
 
Recommendation - 
1.	DUD for SLES12SP3 is not really required since inbox driver supports upto Ventura series controllers.  
2.	Install SLES12SP3 OS using default inbox megaraid_sas driver. 
3.	Post installation user can pick kmp rpm, souce rpm and upgrade the driver. 
Note - rmmod and manual insmod on live system is not possible due above mentioned issue.


3. Many Linux kernel distribution fails >4MB contiguous memory allocation request on x86 platform. Most of the linux distribution on x86 platform supports
   PAGE_SIZE=4K and max possible physical contiguous memory supported is 4MB (2^10 * PAGE_SIZE). This upper limit (4MB) depends upon architecture and kernel
   configuration (like PAGE_SIZE etc.).
 
   In MegaRaid JBOD personality which supports adapter QD  = ~9k, memory required for IO request frame pool is >4 MB.
   <megaraid_sas> driver will work in reduced QD mode (QD set to 8172) so that corresponding memory requirement for IO request frames is  <= 4MB.
   Below is git commit id of upstream patch which makes driver is reduced QD mode due to >4MB memory can not be allocated-
  
   e97e673 scsi: megaraid_sas: Retry with reduced queue depth when alloc fails for higher QD 
  
 
   In newer kernels, CMA (contiguous memory allocator) feature can be used to allocate large physical contiguous memory. 
   CMA can be enabled by adding cma=xxxx in grub entry of kernel. This will reserve some memory reserved for larger memory allocations on boot time. 
   Once grub file is edited, reboot the system and check for CmaTotal in output of cat /proc/meminfo it should reflect memory reserved
   in grub config file.
   e.g. If cma=16M is set in grub config file(menu.lst/grub.cfg), then CmaTotal should be set as below- 
  # cat /proc/meminfo 
  --
  --
  CmaTotal:          16384 kB
  CmaFree:               0 kB
  --
 
  For more details on CMA refer to this link- https://lwn.net/Articles/486301/

4. List of megaraid_sas driver binaries with retpoline support-

   1. Driver binaries for below OS versions have retpoline support built using "thunk-extern" GCC option
      as the GA kernels itself have retpoline support enabled:
       - RHEL7.7 GA and any future RHEL7.x major releases that are supported
       - RHEL8.3 GA and any future RHEL8.x major releases that are supported
       - SLES15 SP1 GA and any future SLES15 Service Pack releases that are supported
       - SLES12 SP4 GA and any future SLES12 Service Pack releases that are supported
       - Ubuntu 18.04 LTS and any future Ubuntu LTS releases that are supported

   2. Driver binaries for below OS versions have retpoline support built using "thunk-inline" GCC option:
       - SLES12 SP3

   In output of "modinfo megaraid_sas.ko", "retpoline:   Y" indicates compiled driver module is retpoline compliant.

5. Some information on driver binaries built for OS GA kernels which does not have retpoline support:
    1. For those OS where GA kernel does not have retpoline support, if OSV has released updated GCC
       package, in that case driver binaries will be built using "thunk-inline" GCC option.
       Refer above list for OS GA versions where retpoline support is currently available.
    2. In this case, both driver RPMs and DUDs are compiled with GCC option:
       "-mindirect-branch=thunk-inline -mindirect-branch-register"
       They are safe from Spectre v2 vulnerabilities.
    3. "modinfo megaraid_sas.ko" will show "retpoline :Y" for driver module built with retpoline support. 
    4. Retpoline kernels have "CONFIG_RETPOLINE=y" in kernel config file.
    5. Driver binaries (both DUD and RPM) will work for both OS GA as well as retpoline kernels.

6. Ubuntu 22.04 LTS throws few UBSAN array-index-out-of-bounds warnings on 'MR_LD_SPAN_MAP [1]' while
   creation/deletion of logical drives which is a false-postive and it can be ignored. 

