OvmfPkg/VirtioScsiDxe: add helper to create a fake host adapter error
OvmfPkg/VirtioScsiDxe: add helper to create a fake host adapter error

When virtio request fails we return EFI_DEVICE_ERROR, as per the spec
EFI_EXT_SCSI_PASS_THRU_PROTOCOL.PassThru() member function is required
to implement elaborated error reporting.

The patch refactors out entire block of the code that creates the host
adapter error into a separate helper function (ReportHostAdapterError).

Suggested-by: Laszlo Ersek <7437296077edea1cb64451c122c4dac071f0cfbc@redhat.com>
Cc: Ard Biesheuvel <66d3c5fdaeea7ff1f996ad04f2c45e08ab38e2f5@linaro.org>
Cc: Jordan Justen <a79006884ba9cf5f4f7fcbb92a15b208780d8c97@intel.com>
Cc: Tom Lendacky <bcbe2d8614c98cf419bfc4320d4a7a260d53de8f@amd.com>
Cc: Laszlo Ersek <7437296077edea1cb64451c122c4dac071f0cfbc@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Brijesh Singh <6c1ba716601dd19ee463759bfdaf6de1e69b2b21@amd.com>
[7437296077edea1cb64451c122c4dac071f0cfbc@redhat.com: fix style & typo in ReportHostAdapterError() comment]
Reviewed-by: Laszlo Ersek <7437296077edea1cb64451c122c4dac071f0cfbc@redhat.com>
Regression-tested-by: Laszlo Ersek <7437296077edea1cb64451c122c4dac071f0cfbc@redhat.com>
Tested-by: Laszlo Ersek <7437296077edea1cb64451c122c4dac071f0cfbc@redhat.com>

MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2