From 07af4eee931210bad04b98d37a35bd0f61ba6bd3 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Sat, 12 Mar 2016 03:39:00 +0100 Subject: 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 Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Tested-by: Ard Biesheuvel Reviewed-by: Jordan Justen --- OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OvmfPkg/VirtioBlkDxe') 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; } -- cgit v1.2.3