OvmfPkg/VirtioFsDxe: submit the FUSE_INIT request to the device

Submit the FUSE_INIT request to the Virtio Filesystem device, for starting
the FUSE session.

The FUSE_INIT request is logged by the virtio-fs daemon, with this patch
applied, when (for example) using the "CONNECT" UEFI shell command.

Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201216211125.19496-9-lersek@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
This commit is contained in:
Laszlo Ersek
2020-12-16 22:10:45 +01:00
committed by mergify[bot]
parent e8a74c9a07
commit fa97e37282
6 changed files with 182 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ typedef struct {
UINT16 QueueSize; // VirtioFsInit 1
VRING Ring; // VirtioRingInit 2
VOID *RingMap; // VirtioRingMap 2
UINT64 RequestId; // DriverBindingStart 0
UINT64 RequestId; // FuseInitSession 1
EFI_EVENT ExitBoot; // DriverBindingStart 0
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL SimpleFs; // DriverBindingStart 0
} VIRTIO_FS;
@@ -138,7 +138,7 @@ VirtioFsFuseNewRequest (
IN OUT VIRTIO_FS *VirtioFs,
OUT VIRTIO_FS_FUSE_REQUEST *Request,
IN UINT32 RequestSize,
IN UINT32 Opcode,
IN VIRTIO_FS_FUSE_OPCODE Opcode,
IN UINT64 NodeId
);
@@ -154,6 +154,15 @@ VirtioFsErrnoToEfiStatus (
IN INT32 Errno
);
//
// Wrapper functions for FUSE commands (primitives).
//
EFI_STATUS
VirtioFsFuseInitSession (
IN OUT VIRTIO_FS *VirtioFs
);
//
// EFI_SIMPLE_FILE_SYSTEM_PROTOCOL member functions for the Virtio Filesystem
// driver.