diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-03-12 03:39:00 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-04-06 13:04:03 +0200 |
commit | 07af4eee931210bad04b98d37a35bd0f61ba6bd3 (patch) | |
tree | a9f71fa883463b913ae24fc1d719d98da5386530 /OvmfPkg/Include/Protocol | |
parent | 235be6a0f197d6c103615ae2bf7b329ece890da1 (diff) | |
download | edk2-platforms-07af4eee931210bad04b98d37a35bd0f61ba6bd3.tar.xz |
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: pass VRING object to SetQueueAddress()
In virtio-1.0, it is not enough to pass the base address of the virtio
queue to the hypervisor (as a frame number); instead it will want the
addresses of the descriptor table, the available ring, and the used ring
separately. Pass the VRING object to the SetQueueAddress() member
function; this will enable a virtio-1.0 implementation. Convert the
current producers and consumers to this prototype.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg/Include/Protocol')
-rw-r--r-- | OvmfPkg/Include/Protocol/VirtioDevice.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OvmfPkg/Include/Protocol/VirtioDevice.h b/OvmfPkg/Include/Protocol/VirtioDevice.h index f8afa7120a..910a4866e7 100644 --- a/OvmfPkg/Include/Protocol/VirtioDevice.h +++ b/OvmfPkg/Include/Protocol/VirtioDevice.h @@ -19,6 +19,8 @@ #ifndef __VIRTIO_DEVICE_H__
#define __VIRTIO_DEVICE_H__
+#include <IndustryStandard/Virtio.h>
+
// VirtIo Specification Revision: Major[31:24].Minor[23:16].Revision[15:0
#define VIRTIO_SPEC_REVISION(major,minor,revision) \
((((major) & 0xFF) << 24) | (((minor) & 0xFF) << 16) | ((revision) & 0xFFFF))
@@ -127,14 +129,12 @@ EFI_STATUS );
/**
- Write the queue address field in the Virtio Header.
-
- The parameter Address must be the base address of the virtqueue divided
- by 4096.
+ Write the queue address field(s) in the Virtio Header.
@param[in] This This instance of VIRTIO_DEVICE_PROTOCOL
- @param[in] Address The 32-bit Queue Address field
+ @param[in] Ring The initialized VRING object to take the
+ addresses from.
@retval EFI_SUCCESS The data was written successfully.
@retval EFI_UNSUPPORTED The underlying IO device doesn't support the
@@ -144,7 +144,7 @@ typedef EFI_STATUS
(EFIAPI *VIRTIO_SET_QUEUE_ADDRESS) (
IN VIRTIO_DEVICE_PROTOCOL *This,
- IN UINT32 Address
+ IN VRING *Ring
);
/**
|