summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioBlkDxe
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2016-03-12 03:39:00 +0100
committerLaszlo Ersek <lersek@redhat.com>2016-04-06 13:04:03 +0200
commit07af4eee931210bad04b98d37a35bd0f61ba6bd3 (patch)
treea9f71fa883463b913ae24fc1d719d98da5386530 /OvmfPkg/VirtioBlkDxe
parent235be6a0f197d6c103615ae2bf7b329ece890da1 (diff)
downloadedk2-07af4eee931210bad04b98d37a35bd0f61ba6bd3.tar.gz
edk2-07af4eee931210bad04b98d37a35bd0f61ba6bd3.tar.bz2
edk2-07af4eee931210bad04b98d37a35bd0f61ba6bd3.zip
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/VirtioBlkDxe')
-rw-r--r--OvmfPkg/VirtioBlkDxe/VirtioBlk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
index b35f60c9d2..daccc7a5d0 100644
--- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
+++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c
@@ -730,8 +730,7 @@ VirtioBlkInit (
//
// step 4c -- Report GPFN (guest-physical frame number) of queue.
//
- Status = Dev->VirtIo->SetQueueAddress (Dev->VirtIo,
- (UINT32) ((UINTN) Dev->Ring.Base >> EFI_PAGE_SHIFT));
+ Status = Dev->VirtIo->SetQueueAddress (Dev->VirtIo, &Dev->Ring);
if (EFI_ERROR (Status)) {
goto ReleaseQueue;
}