From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by mx.groups.io with SMTP id smtpd.web11.14061.1585425514239828945 for ; Sat, 28 Mar 2020 12:58:34 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@oracle.com header.s=corp-2020-01-29 header.b=uSVK1tAx; spf=pass (domain: oracle.com, ip: 156.151.31.85, mailfrom: liran.alon@oracle.com) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02SJnPEH033087; Sat, 28 Mar 2020 19:58:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=0rvpBkUwBUak1TBiM53HB9zneTSmIY7BNRmrzcqLSg8=; b=uSVK1tAxjeRIDGgv29QpPkC3aMlXtxIDCQZMEclSJQccJMrHs18PoKqtX88sa9w78XBn GcUNTaNVQazdQ2ToMZ+lgSHVpIcBHpX9ztmb3iFT1fBHpbEf76gv5XrQhOZ49RevYuc5 tygqKfiMAnaqvtxq7hHfE2wHnwI9M/fcztKf4jVDt9htXZcRLvrZELvMJQ/sLONMFZXX 8DLv6fIZTblV/RpTbBywYsZ6tjhnzALD27g5Z9HEJOCKeWvbTlCh7O5kLPOMZK+D2JeA IUsQzN+c8hG2pMr7vABEgbkUuTw3XXQWL09FdcPVA1KglA2UQw3lArIef8NkbMJheg/N 1w== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 301y7mhf7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 19:58:33 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02SJoMmO071567; Sat, 28 Mar 2020 19:58:33 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 301wwhmvwu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 28 Mar 2020 19:58:32 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 02SJwVxu024958; Sat, 28 Mar 2020 19:58:31 GMT Received: from spark.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 28 Mar 2020 12:58:30 -0700 From: "Liran Alon" To: devel@edk2.groups.io, lersek@redhat.com Cc: nikita.leshchenko@oracle.com, aaron.young@oracle.com, jordan.l.justen@intel.com, ard.biesheuvel@linaro.org Subject: [PATCH v3 00/17] OvmfPkg: Support booting from VMware PVSCSI controller Date: Sat, 28 Mar 2020 23:00:43 +0300 Message-Id: <20200328200100.60786-1-liran.alon@oracle.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9574 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003280189 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9574 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 adultscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003280189 X-MIME-Autoconverted: from 8bit to quoted-printable by userp2120.oracle.com id 02SJnPEH033087 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, This series adds driver support for VMware PVSCSI controller. This controller is supported by VMware and QEMU. This work is part of the more general agenda of enhancing OVMF boot device support to have feature parity with SeaBIOS (Which supports booting from VMware PVSCSI). I pushed a copy of these (v3) patches to https://github.com/nikital/edk2/= tree/pvscsi6 The v2 patches can be found at https://github.com/nikital/edk2/tree/pvscs= i5 The v1 patches can be found at https://github.com/nikital/edk2/tree/pvscs= i4 Regards, -Liran v2->v3: * Add function documentation to PvScsiWriteCmdDesc with =E2=80=9C@param=E2= =80=9D to explain DescWords alignment requirement. [Laszlo] * Also set Packet=E2=80=99s HostAdapterStatus and TargetStatus when retur= ning EFI_BAD_BUFFER_SIZE from PassThru() method. [Liran] * Add comments explaining why DMA communication buffer fields sizes are d= efined as they are. [Laszlo] * Remove unnecessary (UINT64) casts from EFI_PHYSICAL_ADDRESS expressions= . [Laszlo] * Changed HandleResponse() to always copy SenseData based on Response->Se= nseLen. Not only if ScsiStatus equal to CHECK. [Liran] * Changed HandleResponse() to update Packet TransferLength only on underr= un. [Liran] * Changed PassThru() to return EFI_STATUS_SUCCESS on device return overru= n/underrun. [Laszlo & Liran] * Removed unnecessary PvScsiAllocatePages(), PvScsiFreePages(), PvScsiMap= Buffer() and PvScsiUnmapBuffer() utility functions. [Laszlo] * Changed PvScsiInitRings() to align PVSCSI_CMD_DESC_SETUP_RINGS command = to UINT32 before using it with EfiPciIoWidthFifoUint32. [Laszlo] * Removed PciIoOperation parameter from PvScsiAllocateSharedPages(). [Las= zlo * Added STATIC_ASSERT() to verify PVSCSI_CMD_DESC_SETUP_RINGS is of size = multiple of UINT32 words [Laszlo]. * Added reset device before either freeing PVSCSI rings or DMA communicat= ion buffer. [Laszlo] * Removed unnecessary cast to (VOID **) in call to PvScsiFreeSharedPages(= ) in PvScsiUninit(). [Laszlo] * Added #include and BaseLib to PvScsiDxe.inf because= of RShiftU64() usage. [Laszlo] v1->v2: * Removed Nikita=E2=80=99s Reviewed-By tags. [Laszlo] * Renamed PvScsi.inf to PvScsiDxe.inf and fixed references from all DSC f= iles. [Laszlo] * Changed =E2=80=9C!ifdef $(PVSCSI_ENABLE)=E2=80=9D in DSC files to =E2=80= =9C!if $(PVSCSI_ENABLE) =3D=3D TRUE=E2=80=9D. [Laszlo] * Fix Identation in various places. [Laszlo] * Added =E2=80=9C#include =E2=80=9D for EFI_SYSTEM_TABLE= . [Laszlo] * Fix various typos. [Laszlo] * Made =E2=80=9CSTATIC=E2=80=9D on same line of object delcerations. [Las= zlo] * Added Laszlo=E2=80=99s Reviewed-by tags on some patches. [Laszlo] * Added missing spaces before =E2=80=9C(=E2=80=9C on various function cal= ls. [Laszlo] * Added PvScsi.h header file to INF [Sources] section. [Laszlo] * Changed [Protocols] section in INF file to be lexicographically sorted.= [Laszlo] * Changed [PCDs] section in INF file to be lexigraphically sorted. [Laszl= o] * Fixed function comments blocks to be =E2=80=9C/** **/=E2=80=9D instead = of =E2=80=9C//=E2=80=9D style. [Laszlo] * Changed PvScsiGetTargetLun() to ZeroMem() all target bytes except first= one. [Laszlo] * Replaced =E2=80=9CIOSpace=E2=80=9D with =E2=80=9CMMIO-Space=E2=80=9D in= comments. [Laszlo] * Changed enums to match EDK2 coding convention. [Laszlo] * Use PCI_BAR_IDX0 instead of hard-coded 0. [Laszlo] * Use EFI_PAGES_TO_SIZE() instead of manually multiplying with EFI_PAGE_S= IZE. [Laszlo] * Use RShiftU64() to shift UINT64 vars. [Laszlo] * Changed ReqNumEntries var to UINT32 and shift to use =E2=80=9C1U <<=E2=80= =9D instead of =E2=80=9C1 <<=E2=80=9D. [Laszlo] * Changed condition on flag (In PvScsiWaitForRequestCompletion()) to be a= boolean expression. [Laszlo] * Replaced =E2=80=9CFakeHostAdapterError=E2=80=9D label with a utility fu= nction. [Laszlo] * Added debug message to PvScsiExitBoot() to assist debugging. [Laszlo] * Fixed resource management to make each function either completely succe= ed or completely fail and free all resources. [Laszlo] * Changed PvScsiWriteCmdDesc() to use EfiPciIoWidthFifoUint32. [Laszlo] * Changed PvScsiWriteCmdDesc() prototype to make clear it descriptor must= be an array of words. [Laszlo]