From nobody Fri Dec 27 03:11:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503491010639415.469507982844; Wed, 23 Aug 2017 05:23:30 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DF7EB21E49BB6; Wed, 23 Aug 2017 05:20:33 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0052.outbound.protection.outlook.com [104.47.40.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A950421D2E647 for ; Wed, 23 Aug 2017 05:20:28 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1362.18; Wed, 23 Aug 2017 12:23:00 +0000 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=TxjUmg4+uiyrlDmnqlyc33F5KgaPizNNL74yafc6vuc=; b=gqLppyp/vYpRWQTxoFa6eHLBzX5TPFWXF+lvdH+zU1NAYsIL52wCVFRJyj/xvzsX6xbOzrtV7KbH235ft9mmqD/ANVDFoOSMQwYbsu3rtiuQXSO3rhlMiRDK5OtiYoHVqQMDfgvXi3U9RSknot175LLdrDTzVl9kFbJhc+kyeNs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Wed, 23 Aug 2017 08:22:30 -0400 Message-Id: <1503490967-5559-7-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503490967-5559-1-git-send-email-brijesh.singh@amd.com> References: <1503490967-5559-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR12CA0069.namprd12.prod.outlook.com (2603:10b6:3:103::31) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab813dde-89a8-46a8-c472-08d4ea21b1df X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 3:s3DH0gwK9aKb03Ait0FXAo63YC+I5xHxtQzwBeeaH/Snv+7VhLztBqWRcXcjIfsI9F8BA+h7iJF82kqcz6zi5HJScfW2h4w/e9u2w/g0GankUxZTNJ8DG5A82iszUr6dyng6tDckH6gQi+s3g24Mx8GuQYPhZGVOaa4+sAny+5I5ZbSsR6hzoVwc2Bjr9Q8VhJRSQ98e6+ue8OK97qQ1XKiO+9WJj39U321Ek7hmvWLANSg6i6hbQqCbrVqXYw7u; 25:QlSvUaJo2KRTjO5CVTbZxhwHmyd8M53P8DIOs57WfW7/QZcJCWyITD6joI0Euk0ZbUKqG7hMqecCVbPxnCZ7P9jOo36x9K6cPchHm8h7kxs97jH6tmNLKk2G3+0KM8HzsflXvcufDwDW1vffDz8bl+gYyqVHEY6reShcoA3DJgBXF2OU6gYV6b9EC7CjGdTEDKMH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IHU+cpq7Rs9J6p+nmre4N7VrWEg583EchwJ2GnpABZK9EStcCt1c0g9GTEb3kIH1LSrd/MTRTxQm0ebQkCi5WF1e7McWeJitE74/zcnxtsiH3Am+0w/SMI7VaCala1Q+23/K+iEcsc8E7/Vkwz5HZndaw2gM8arTPPzOng3RlGG1QEpwmSEBEtgFYC/srr0BWBht3VQqKH8Fpawf4conPnHsPtYnw/tXA== X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR12MB0155; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR12MB0155; X-Forefront-PRVS: 040866B734 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39860400002)(189002)(199003)(51234002)(575784001)(305945005)(47776003)(97736004)(101416001)(110136004)(6666003)(189998001)(478600001)(7736002)(3846002)(66066001)(5003940100001)(6116002)(6486002)(48376002)(86362001)(105586002)(2950100002)(4326008)(106356001)(36756003)(6916009)(50466002)(2906002)(50226002)(42186005)(2351001)(33646002)(53416004)(25786009)(7350300001)(81156014)(76176999)(5660300001)(68736007)(54906002)(8676002)(53936002)(50986999)(81166006)(2361001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0155; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR12MB0155; 23:Oq3Kz/CZwU75Qro0VkM1cJVWlpEajpdPbMtuuKgOt?= =?us-ascii?Q?NOKZzX/S8FRWBB+o8xAVT3EnFfNI6hpneNOlBWrV5y3cfvWt3AASHJSuwMcc?= =?us-ascii?Q?gwcfdHlnqzM9+QGo8WNwy5yFhwdxMB4JUl3yZ5zkSLteXMvw58f+BnkTrrfu?= =?us-ascii?Q?W7L6+R4s/UqrzhYk5dNW40egtt9LRsaGzW4OuBsmR/Kod0yC+AgGsr5gbvB/?= =?us-ascii?Q?EFxXhh7xaf5sevF777IuHxRa36Mt33OidPH+nPpVE8sMm5zYt4PyFAMqz1NV?= =?us-ascii?Q?qQEWy2TKGLk5sKI8J36JcKNPOIC9ZVrcID8hJwKZRLc2XldFPWm2rwAW8E+w?= =?us-ascii?Q?psozP9TSOAo7Nbw/Wp3Mi+7C0zasNwDoJo0hJRgSKZZt1b0NmJqq+skxYY7c?= =?us-ascii?Q?c6aB/T7SdmBW2OWD8Pi5N1mbWigouEFPHuFbUwpSm4OJvlKNspLM5rlclm+b?= =?us-ascii?Q?+i0iDQu3YRlYzjhmpOzjQPDWtFYws4siM8ZTjQlzjfXjtMttOJX406PnyZUT?= =?us-ascii?Q?JCvTj8J4E3xT/n8975AvAyK6y/w7haxJmkrI/uEJPXZ9n7wJmzVYPAX5kgOm?= =?us-ascii?Q?ibQ+VFtdi0rg4eAgxEL1CWbYtFa/zFwWhpAk2aQ5WVepbLh4/UrPmnKeqO+z?= =?us-ascii?Q?hsuKXOknFpHX+P0IkONhfH5loxdo2VJ7WUqrXvPcUFjb2nbQRQ82ZX6EYaO3?= =?us-ascii?Q?HW7+7s76H5w7g+e7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bTaTuJaBb3CgUuZMngDB6H85vOjb7soVMPuL+JO+C7SRqlFzGKi5UED7vA5kW+XW8oUw==; 24:D8Q66SkJEWzgWtWT5H315l3DqoDAOLXSezOWbvZr3x1tyImdiXPyDhQZiBbEt5mjnvrzAEDcyewtAGN+z7GmpLTDZ/Fo+GrS+tOBKlWZE6E=; 7:2wEs1UxYbu3DuYJyStxpnH+mwWngkh83Zf0YLqX6pWHmV46NxoccKy/6zEQs0rLD0ibzjtKAxSZrKKg4x0iVszhjd1nGnwgAL0r2T7/Jc5vvP0FXhVVhcei+BqiAX+Dx2ddJdV6c6RnrYQmvNI84RqSE0oaYGOBBcDIZsa50iEYGP/qDYt4ygPV0cho/zc5yADry7jhpZQ88Zu4C4oItQr6ngtlDFBj5fAePIRAlk0o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:eoSL7TQju81yftvkultMkErKdscCtktpgyRygTLcokbnaRjyx5T4Qmw9lrQgSwO8jEpgSSvn8tg3OsOXYNqfln2wMaUG3IsD61Np1bsbG+Q2I4hMLxfT5tgoX2Xqf+blGBg8blrSV4i9xjQHQbvLOIy8DYG2tcDLcI47mgz2m0Rr8utXDpwvYcWgNpK6jtc9/gPVKLBsaoOdvlVvo+mHS+d4cZ7rADxjOpuJGfn7YdFhszaJ0Dg+QI3xaftBV+lf X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2017 12:23:00.3416 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 Subject: [edk2] [PATCH v3 06/23] OvmfPkg/VirtioLib: take VirtIo instance in VirtioRingInit/VirtioRingUninit X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Tom Lendacky , Laszlo Ersek , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Passing the VirtIo protocol instance will allow the vring to use VIRTIO_DEVICE_PROTOCOL.AllocateSharedPages () to allocate vring buffer. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Tom Lendacky Cc: Laszlo Ersek Reviewed-by: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Brijesh Singh --- OvmfPkg/Include/Library/VirtioLib.h | 14 ++++++++++---- OvmfPkg/Library/VirtioLib/VirtioLib.c | 14 ++++++++++---- OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 7 ++++--- OvmfPkg/VirtioGpuDxe/Commands.c | 7 ++++--- OvmfPkg/VirtioNetDxe/SnpInitialize.c | 9 +++++---- OvmfPkg/VirtioNetDxe/SnpShutdown.c | 5 +++-- OvmfPkg/VirtioRngDxe/VirtioRng.c | 7 ++++--- OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 7 ++++--- 8 files changed, 44 insertions(+), 26 deletions(-) diff --git a/OvmfPkg/Include/Library/VirtioLib.h b/OvmfPkg/Include/Library/= VirtioLib.h index 9ec9b91b59bb..40c51a2b3305 100644 --- a/OvmfPkg/Include/Library/VirtioLib.h +++ b/OvmfPkg/Include/Library/VirtioLib.h @@ -35,6 +35,8 @@ - 1.1 Virtqueues, - 2.3 Virtqueue Configuration. =20 + @param[in] VirtIo The virtio device which will use the ring. + @param[in] The number of descriptors to allocate for = the virtio ring, as requested by the host. =20 @@ -52,8 +54,9 @@ EFI_STATUS EFIAPI VirtioRingInit ( - IN UINT16 QueueSize, - OUT VRING *Ring + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN UINT16 QueueSize, + OUT VRING *Ring ); =20 =20 @@ -65,13 +68,16 @@ VirtioRingInit ( invoking this function: the VSTAT_DRIVER_OK bit must be clear in VhdrDeviceStatus. =20 - @param[out] Ring The virtio ring to clean up. + @param[in] VirtIo The virtio device which was using the ring. + + @param[out] Ring The virtio ring to clean up. =20 **/ VOID EFIAPI VirtioRingUninit ( - IN OUT VRING *Ring + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN OUT VRING *Ring ); =20 =20 diff --git a/OvmfPkg/Library/VirtioLib/VirtioLib.c b/OvmfPkg/Library/Virtio= Lib/VirtioLib.c index c85cd8dba569..8bc5b9aea4fc 100644 --- a/OvmfPkg/Library/VirtioLib/VirtioLib.c +++ b/OvmfPkg/Library/VirtioLib/VirtioLib.c @@ -37,6 +37,8 @@ - 1.1 Virtqueues, - 2.3 Virtqueue Configuration. =20 + @param[in] VirtIo The virtio device which will use the ring. + @param[in] The number of descriptors to allocate for = the virtio ring, as requested by the host. =20 @@ -54,8 +56,9 @@ EFI_STATUS EFIAPI VirtioRingInit ( - IN UINT16 QueueSize, - OUT VRING *Ring + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN UINT16 QueueSize, + OUT VRING *Ring ) { UINTN RingSize; @@ -128,13 +131,16 @@ VirtioRingInit ( invoking this function: the VSTAT_DRIVER_OK bit must be clear in VhdrDeviceStatus. =20 - @param[out] Ring The virtio ring to clean up. + @param[in] VirtIo The virtio device which was using the ring. + + @param[out] Ring The virtio ring to clean up. =20 **/ VOID EFIAPI VirtioRingUninit ( - IN OUT VRING *Ring + IN VIRTIO_DEVICE_PROTOCOL *VirtIo, + IN OUT VRING *Ring ) { FreePages (Ring->Base, Ring->NumPages); diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/Virtio= Blk.c index 3ce72281c204..61b9cab4ff02 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -12,6 +12,7 @@ =20 Copyright (C) 2012, Red Hat, Inc. Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2017, AMD Inc, All rights reserved.
=20 This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this @@ -722,7 +723,7 @@ VirtioBlkInit ( goto Failed; } =20 - Status =3D VirtioRingInit (QueueSize, &Dev->Ring); + Status =3D VirtioRingInit (Dev->VirtIo, QueueSize, &Dev->Ring); if (EFI_ERROR (Status)) { goto Failed; } @@ -811,7 +812,7 @@ VirtioBlkInit ( return EFI_SUCCESS; =20 ReleaseQueue: - VirtioRingUninit (&Dev->Ring); + VirtioRingUninit (Dev->VirtIo, &Dev->Ring); =20 Failed: // @@ -848,7 +849,7 @@ VirtioBlkUninit ( // Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); =20 - VirtioRingUninit (&Dev->Ring); + VirtioRingUninit (Dev->VirtIo, &Dev->Ring); =20 SetMem (&Dev->BlockIo, sizeof Dev->BlockIo, 0x00); SetMem (&Dev->BlockIoMedia, sizeof Dev->BlockIoMedia, 0x00); diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Command= s.c index 962087cfec97..c2e4d72feb67 100644 --- a/OvmfPkg/VirtioGpuDxe/Commands.c +++ b/OvmfPkg/VirtioGpuDxe/Commands.c @@ -3,6 +3,7 @@ VirtIo GPU initialization, and commands (primitives) for the GPU device. =20 Copyright (C) 2016, Red Hat, Inc. + Copyright (c) 2017, AMD Inc, All rights reserved.
=20 This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this @@ -127,7 +128,7 @@ VirtioGpuInit ( // // [...] population of virtqueues [...] // - Status =3D VirtioRingInit (QueueSize, &VgpuDev->Ring); + Status =3D VirtioRingInit (VgpuDev->VirtIo, QueueSize, &VgpuDev->Ring); if (EFI_ERROR (Status)) { goto Failed; } @@ -148,7 +149,7 @@ VirtioGpuInit ( return EFI_SUCCESS; =20 ReleaseQueue: - VirtioRingUninit (&VgpuDev->Ring); + VirtioRingUninit (VgpuDev->VirtIo, &VgpuDev->Ring); =20 Failed: // @@ -183,7 +184,7 @@ VirtioGpuUninit ( // configuration. // VgpuDev->VirtIo->SetDeviceStatus (VgpuDev->VirtIo, 0); - VirtioRingUninit (&VgpuDev->Ring); + VirtioRingUninit (VgpuDev->VirtIo, &VgpuDev->Ring); } =20 /** diff --git a/OvmfPkg/VirtioNetDxe/SnpInitialize.c b/OvmfPkg/VirtioNetDxe/Sn= pInitialize.c index 430670a980f2..6d9b81a9f939 100644 --- a/OvmfPkg/VirtioNetDxe/SnpInitialize.c +++ b/OvmfPkg/VirtioNetDxe/SnpInitialize.c @@ -5,6 +5,7 @@ =20 Copyright (C) 2013, Red Hat, Inc. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2017, AMD Inc, All rights reserved.
=20 This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this @@ -73,7 +74,7 @@ VirtioNetInitRing ( if (QueueSize < 2) { return EFI_UNSUPPORTED; } - Status =3D VirtioRingInit (QueueSize, Ring); + Status =3D VirtioRingInit (Dev->VirtIo, QueueSize, Ring); if (EFI_ERROR (Status)) { return Status; } @@ -103,7 +104,7 @@ VirtioNetInitRing ( return EFI_SUCCESS; =20 ReleaseQueue: - VirtioRingUninit (Ring); + VirtioRingUninit (Dev->VirtIo, Ring); =20 return Status; } @@ -509,10 +510,10 @@ AbortDevice: Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); =20 ReleaseTxRing: - VirtioRingUninit (&Dev->TxRing); + VirtioRingUninit (Dev->VirtIo, &Dev->TxRing); =20 ReleaseRxRing: - VirtioRingUninit (&Dev->RxRing); + VirtioRingUninit (Dev->VirtIo, &Dev->RxRing); =20 DeviceFailed: // diff --git a/OvmfPkg/VirtioNetDxe/SnpShutdown.c b/OvmfPkg/VirtioNetDxe/SnpS= hutdown.c index 01409c0ce714..5e84191fbbdd 100644 --- a/OvmfPkg/VirtioNetDxe/SnpShutdown.c +++ b/OvmfPkg/VirtioNetDxe/SnpShutdown.c @@ -4,6 +4,7 @@ =20 Copyright (C) 2013, Red Hat, Inc. Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2017, AMD Inc, All rights reserved.
=20 This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this @@ -66,8 +67,8 @@ VirtioNetShutdown ( Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); VirtioNetShutdownRx (Dev); VirtioNetShutdownTx (Dev); - VirtioRingUninit (&Dev->TxRing); - VirtioRingUninit (&Dev->RxRing); + VirtioRingUninit (Dev->VirtIo, &Dev->TxRing); + VirtioRingUninit (Dev->VirtIo, &Dev->RxRing); =20 Dev->Snm.State =3D EfiSimpleNetworkStarted; Status =3D EFI_SUCCESS; diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/Virtio= Rng.c index 1a186d04082a..e20602ac7225 100644 --- a/OvmfPkg/VirtioRngDxe/VirtioRng.c +++ b/OvmfPkg/VirtioRngDxe/VirtioRng.c @@ -6,6 +6,7 @@ =20 Copyright (C) 2012, Red Hat, Inc. Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2017, AMD Inc, All rights reserved.
=20 This driver: =20 @@ -275,7 +276,7 @@ VirtioRngInit ( goto Failed; } =20 - Status =3D VirtioRingInit (QueueSize, &Dev->Ring); + Status =3D VirtioRingInit (Dev->VirtIo, QueueSize, &Dev->Ring); if (EFI_ERROR (Status)) { goto Failed; } @@ -331,7 +332,7 @@ VirtioRngInit ( return EFI_SUCCESS; =20 ReleaseQueue: - VirtioRingUninit (&Dev->Ring); + VirtioRingUninit (Dev->VirtIo, &Dev->Ring); =20 Failed: // @@ -358,7 +359,7 @@ VirtioRngUninit ( // the old comms area. // Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); - VirtioRingUninit (&Dev->Ring); + VirtioRingUninit (Dev->VirtIo, &Dev->Ring); } =20 // diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/Vir= tioScsi.c index c080404330e5..c2f6f412ff40 100644 --- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c +++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c @@ -27,6 +27,7 @@ =20 Copyright (C) 2012, Red Hat, Inc. Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2017, AMD Inc, All rights reserved.
=20 This program and the accompanying materials are licensed and made availa= ble under the terms and conditions of the BSD License which accompanies this @@ -832,7 +833,7 @@ VirtioScsiInit ( goto Failed; } =20 - Status =3D VirtioRingInit (QueueSize, &Dev->Ring); + Status =3D VirtioRingInit (Dev->VirtIo, QueueSize, &Dev->Ring); if (EFI_ERROR (Status)) { goto Failed; } @@ -926,7 +927,7 @@ VirtioScsiInit ( return EFI_SUCCESS; =20 ReleaseQueue: - VirtioRingUninit (&Dev->Ring); + VirtioRingUninit (Dev->VirtIo, &Dev->Ring); =20 Failed: // @@ -964,7 +965,7 @@ VirtioScsiUninit ( Dev->MaxLun =3D 0; Dev->MaxSectors =3D 0; =20 - VirtioRingUninit (&Dev->Ring); + VirtioRingUninit (Dev->VirtIo, &Dev->Ring); =20 SetMem (&Dev->PassThru, sizeof Dev->PassThru, 0x00); SetMem (&Dev->PassThruMode, sizeof Dev->PassThruMode, 0x00); --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel