From nobody Fri Dec 27 18:50:48 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 1502710672182571.2036752422781; Mon, 14 Aug 2017 04:37:52 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4C02121D0A25C; Mon, 14 Aug 2017 04:34:56 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0076.outbound.protection.outlook.com [104.47.40.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B67BA21D0A252 for ; Mon, 14 Aug 2017 04:34:54 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by BY2PR12MB0145.namprd12.prod.outlook.com (10.162.82.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1341.21; Mon, 14 Aug 2017 11:37:16 +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=EZCx28wx2X4AteNCeUPuKegiRd6y7+8XhcrOMrfaPus=; b=HxGo37oBtyIlUDDyHYuy0a+FNmMiRAQdhfOl7GiRyiMDg50LbrekctC4Zd01IzFyy+iRB6Nj1D+2Cd+TYS0cxu6i8+DELzmpeX5ETF6QB1nICtu948V/s1MfH9r9Gp2ck5JG5EFSYcA6L6YXTrx8w/WcftIiaBPsWmiPC8+wme0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Mon, 14 Aug 2017 07:36:33 -0400 Message-Id: <1502710605-8058-12-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502710605-8058-1-git-send-email-brijesh.singh@amd.com> References: <1502710605-8058-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR15CA0043.namprd15.prod.outlook.com (10.173.226.157) To BY2PR12MB0145.namprd12.prod.outlook.com (10.162.82.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0b94979-c713-4cc4-c1f9-08d4e308d0d4 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:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 3:kOl1k7vdkFW2Z0qN6vceNwio2tSkegjyKaM1o5hEETaJokLZJHghYVvUqtOvqpOC71G5C+2MOsjd3OxPwh/W2W94RY03VK4szcVlfiAzLIBgkzHj2xvGZic+I8ZIN1kPTtbhGkHA3zml4ShfGI7uLyXEO3NwfXzLpH+EdH3OLm8JZQGFwU9/icrIiSlUAlwleMNCW/6EGsDtyWIjTFmJ3cVJPxSwchj2saU/SjO/Xyl5Tcp84fUGw4UrZBrtWgiq; 25:+PnJRoWjY+sIVjdhBicbHfDQI8RJw3kjNBG/nGI2DLxbm5ryxa7mXVEmBud490S94J+o09Lj4PP0flo1OUn56Sz7PUUUjGCgRbGwdxsSwbWvKEe8FZ4A0KUGBdZb1xG04M+dmU+qUQ1LstnQ/g3koO/0SveEdA3193FkzLIRMLqLgyT4f8d18rfhqQCnEOitUdyV/kuhCdk7fjttpDW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o6LObFpEb9dlvMLPvPiCW+J9OzC616FvtEiDzJjok8nNcwKAx5U7osR1acCLggk3NTmr7GvZCNycU188Zt7zaet7L8ukd9vAiJ3vhKhGfUjDkTCMMeaTd2Qi+TNmVCRb4zpVTebo1K/5cEppnU8Et2hIMgI8HmTzKE7C8GoIEjA1lRAjkE7rDJLa3fzJOmwEEniN5g39plh/ghx3pONu56Gur5DaNtVuQ1bKpG09IM5bwA== 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)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR12MB0145; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR12MB0145; X-Forefront-PRVS: 039975700A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39860400002)(199003)(189002)(51234002)(54906002)(5003940100001)(6116002)(3846002)(53936002)(97736004)(575784001)(86362001)(36756003)(81156014)(81166006)(110136004)(8676002)(189998001)(50986999)(76176999)(5660300001)(2361001)(25786009)(2351001)(50226002)(4326008)(7350300001)(33646002)(478600001)(53416004)(42186005)(2906002)(105586002)(7736002)(305945005)(106356001)(48376002)(50466002)(47776003)(66066001)(6486002)(6916009)(2950100002)(6666003)(68736007)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0145; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; BY2PR12MB0145; 23:KucaFOz7ogw/8wXhIdpUfGyZ8KBZQ6ZAxXO8+CqTC?= =?us-ascii?Q?kHK/ZjQFLcUHoiN84KQXy653zPeOIj3t3NkbB0MFgXcfIFDbteRZ5hB6MEpb?= =?us-ascii?Q?gt2BHK3XcmtiEyImXyYu0+MX4monFSTHNIC+9wH6E4MW29sKerq1v2lgYSP7?= =?us-ascii?Q?kejVgSoQrp8QX/THOzSCnywxH2VZhnj7ol7BMBKEY5b2xliRdNixu81Zu35f?= =?us-ascii?Q?BirabDcmlV7qFDls5mXsLpQJjjMaXMVuPXRZbejhSJC5VLQV6hq2CiCqzwx/?= =?us-ascii?Q?kyAuNxg6LNd26RccHVma6fxIioK7q48WXCSSB52UiaWuKulNXebdYtfIYndy?= =?us-ascii?Q?KRGTTC5dOAd1Ovjzz61h3217DBLza9IaezO3PZxWld19L35gAfMftpuru70J?= =?us-ascii?Q?l0BriT4cCgzuobvFPtVw634vE2PlXvQ5GEa3KqQTFxu4somPrdBUCl03UEhr?= =?us-ascii?Q?2vjGS9DfoI3f6hSDgjcoId7o8QCEKSWVsJS9mohxb2OaqCNP5GYPp65yAO14?= =?us-ascii?Q?4TqqlG2EWcJ1x4VY7vMElp3TK+EddXQ+jCYfFoeFm8GyfG5kbYXzlyNSY6aB?= =?us-ascii?Q?JgxubiURUQCj1FIqZvVU6Mt9THM+vKGddtAVrRxMW7rAazXS4XtyJkacn0Ti?= =?us-ascii?Q?wJWvm1psTDx0GrMsFVGjUT8lFA1TIWyLLvsOi9gx7C0Kqan0URFqeNDGlJex?= =?us-ascii?Q?ihu9rJ9bSO1xo20czJfvpB5+4m2XPfEkf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VKAVBL0X0v/w6RRh41IkVVjlUb41/bqMBPjM1EmUvh2dYosS6tkRw==; 24:fsreAQwz5zlqEqCnBiD1lBumgUYHLkvWLUkMKP/9jvC5ASPFYLCc5M8wRlKsYAGc38xWU9uD4TrEJiAQePTpOaq++BoKzTZNJ083HrWFZVg=; 7:BexoONMIXjO6fwTj8stl2eiz42CR6ClVs2d8vR9CO41UygDqaIYgaKsxPojTPMVQjdRQ1iuXJvXD8NUNt1pNp6kA/H60PV7eiIZE7kGocptJGjXfppVwD8ad3P3S8g4PPkSY+norOKbM2yk4QI4t8ItlS2JlJ8oKgg90adGeLPzqcklcS8f/xmunAZUIFmQpNDZBjQyLY+Of36sXX6Fv3Vg/+Xv9Lws1P8CqzZtxC50= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 20:jdOnqVOby3QwkhSNaBv4wPsNcfC2vED5ImCUDuP0v3Qs6TtDShLVOu7drB0sFLI6TxJm/hSXP1XH16kBeT3LRWa6wyxiak//D9DlGNTaKrk0gW8YCPEFdaPEc2cSwPgvkvdUdgL8md5ActCke7KnS8herVuskdo7yxmxOWtGVcmfBly5kSJN62e2OSymuQyuEu1CjvoANhne98pLD12KKHLKtAPsfRvscHsfnN7tNY9CH4v10Sb+8sMhEPllL4Q9 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 11:37:16.2992 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0145 Subject: [edk2] [PATCH v2 11/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 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Brijesh Singh Reviewed-by: Laszlo Ersek --- 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 d8f24a5d68b1..ca0b217a04eb 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 ac0ae97f3692..5b64d18a8d6f 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