summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2020-12-16 22:10:45 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-12-21 17:16:23 +0000
commitfa97e3728210fbb5963ac91fafdadd6f83dc1226 (patch)
treec37613446e37279bcb958ef235df66021c85b775 /OvmfPkg/Include
parente8a74c9a0712f4d282807aca442a787afe4075ab (diff)
downloadedk2-fa97e3728210fbb5963ac91fafdadd6f83dc1226.tar.gz
edk2-fa97e3728210fbb5963ac91fafdadd6f83dc1226.tar.bz2
edk2-fa97e3728210fbb5963ac91fafdadd6f83dc1226.zip
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>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r--OvmfPkg/Include/IndustryStandard/VirtioFs.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/OvmfPkg/Include/IndustryStandard/VirtioFs.h b/OvmfPkg/Include/IndustryStandard/VirtioFs.h
index 521288b03f..006e0f5deb 100644
--- a/OvmfPkg/Include/IndustryStandard/VirtioFs.h
+++ b/OvmfPkg/Include/IndustryStandard/VirtioFs.h
@@ -76,6 +76,13 @@ typedef struct {
#define VIRTIO_FS_FUSE_MAJOR 7
#define VIRTIO_FS_FUSE_MINOR 31
+//
+// FUSE operation codes.
+//
+typedef enum {
+ VirtioFsFuseOpInit = 26,
+} VIRTIO_FS_FUSE_OPCODE;
+
#pragma pack (1)
//
// Request-response headers common to all request types.
@@ -96,6 +103,30 @@ typedef struct {
INT32 Error;
UINT64 Unique;
} VIRTIO_FS_FUSE_RESPONSE;
+
+//
+// Headers for VirtioFsFuseOpInit.
+//
+typedef struct {
+ UINT32 Major;
+ UINT32 Minor;
+ UINT32 MaxReadahead;
+ UINT32 Flags;
+} VIRTIO_FS_FUSE_INIT_REQUEST;
+
+typedef struct {
+ UINT32 Major;
+ UINT32 Minor;
+ UINT32 MaxReadahead;
+ UINT32 Flags;
+ UINT16 MaxBackground;
+ UINT16 CongestionThreshold;
+ UINT32 MaxWrite;
+ UINT32 TimeGran;
+ UINT16 MaxPages;
+ UINT16 MapAlignment;
+ UINT32 Unused[8];
+} VIRTIO_FS_FUSE_INIT_RESPONSE;
#pragma pack ()
#endif // VIRTIO_FS_H_