From nobody Fri Dec 27 01:57:27 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 1504265072973163.1309593288555; Fri, 1 Sep 2017 04:24:32 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A88F221E74914; Fri, 1 Sep 2017 04:21:44 -0700 (PDT) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0056.outbound.protection.outlook.com [104.47.34.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 316AC21E74908 for ; Fri, 1 Sep 2017 04:21:43 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 11:24:25 +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=1eR5Bss++9cx7HXkM6a8hT31EUO1cnGJz7AXLgG9c5w=; b=kbicl35WBDoNb2E8nJg0eHOKGiqQ809DfEv+kcCSIKHfJL1t3XT4GnZg0rgxRBjP2jBaEisHlu+4Qv0myyhUIxicFA/TxO+50LPJ2rE8dYat9iW1Ni94ryd7IWwKYd5YeY001ymd0ffojTTNOa5kMJABxaHpp6zMJLm9r9UPuyQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Fri, 1 Sep 2017 07:24:01 -0400 Message-Id: <1504265045-19008-2-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504265045-19008-1-git-send-email-brijesh.singh@amd.com> References: <1504265045-19008-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR03CA0012.namprd03.prod.outlook.com (10.168.230.150) To BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 567cfaa8-fa07-46ec-22c0-08d4f12c0128 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)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR12MB0146; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 3:mRlglqth+2+9uREySTVvytxU2cjLC6Q1aMppJKjZSTBPe5V8R+4y+e+4JeMh873qE4AlNmZPr1hb0xUo1qs88WpxzR+T4tzFlttmOPKU38qBA/2hLtI2ysLGMjvtqqMWT+KHhbI51gfnst55bH7v6o/qR23AJyFbgoQ2sCaR9Ko/fQlgLLVxn9whmYxelhYldv1JDYSmCEDpYsFy5BfHMCMYN3Rn2wS/+oefCwWKwIvaLTIe0Z/XEKvB5sSpIWn6; 25:Km2CNebBWcLsJwYfs/U5uAC9feBzBAipGde5gaKhQxroLyxqm/B/Np6DNroWCUkQ8SpU3hmR1LOM6GKDmfUS5IlpUVIReAYGzpTtcckXbNTOQXD6oVmrLcius5F0dECJ1v08ZYwguTm+pXy2FPd/oO2caw2/PY6+vqaNLvgV1OuB2b7COqKmGYWDyK6JGesnMc94bYc371/DIPewaPwt6Zk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eQqv5sK56vkLI1Nd9nKqYXBLnGFPWAEal1G8uLEbmEWDe55Bwquamzm33EsJWchDcvPt6fTU2nE5dKr3HcHuKtb+DP1b/DC1vqms1yXDN9Y2zGhnEXBdKdCaQwTLjC+ZwRVX5W/wZ2PjUrGDtsN+XcmqMRuhrUAuePp8s7PlgbLlAhjRGy96f14818+GmCT3PRTHqK4qutBCC3Ja123UoLopsfx9m1bRl9RmVqS2rPUhh0UjvmpFtdw= X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699)(17755550239193); 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)(10201501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR12MB0146; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR12MB0146; X-Forefront-PRVS: 0417A3FFD2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6009001)(39860400002)(199003)(51234002)(189002)(50466002)(54906002)(6666003)(8936002)(66066001)(4326008)(50226002)(48376002)(47776003)(53936002)(478600001)(25786009)(110136004)(189998001)(76176999)(42186005)(53416004)(5003940100001)(2351001)(68736007)(106356001)(105586002)(3846002)(6116002)(2950100002)(6916009)(2361001)(305945005)(36756003)(50986999)(5660300001)(33646002)(2906002)(101416001)(7736002)(97736004)(81166006)(6486002)(8676002)(81156014)(86362001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0146; 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; BY2PR12MB0146; 23:eAIGSz2uwBSVjLSm9r5LIOpAMyWk4La+b8tMFbCQ9?= =?us-ascii?Q?QMwcUKKG3GuNa9puOpQ2OQZ4sbiURYDqO3fxIT8WiCY0BEmulBf+qmSVBqXP?= =?us-ascii?Q?dvIy2SqsfQvr9EP5wDVJJATXUzT5U2E8RD4QnFIdIzZgNEhO9SS9dDxRVmry?= =?us-ascii?Q?q7a8OZ6nm1k1fWiyXS1wHoYBp4qaoCL0bxLafgruFZgt56tzlN+sleuizKvt?= =?us-ascii?Q?Vt9cauRSOaaArJelTdsWU4jNBkDvybgulbzF8qyN9OTbeF437bnZDiU903af?= =?us-ascii?Q?/MqX44q+TJ2on04a8YOw31LLFeNIrDhzsWCuqEBy7gUtjKii1NBvBeMQjTsV?= =?us-ascii?Q?OA+uy4Aist8XUifUisbJZLut0jyquA5YlQk+Xtzz9PZl3PH0Rr3oxO7L3Nf5?= =?us-ascii?Q?tVYpMEDtsl2vSJi/FrkcEavhJJR4dpAukLDeUElU65gYtdaHS8KDcPXpEInb?= =?us-ascii?Q?IA2h+cCWI7SElY+BGLAhRfprZElfaITzQaOKzc4rzDzFqKgyRhQHlT/T2DWq?= =?us-ascii?Q?3D0hYYpjFXdol++aCfbrZFdrG0/ylbemZpzYjVOOf80WSpWX/w06UcYg6A/B?= =?us-ascii?Q?GV8s4j5WQSK6yh+iWeXTfesKWrFKR+7T6DoMBSXLdAAzdLo2ZcCPZWFyJ0eg?= =?us-ascii?Q?mlcobydjQuT1T6yRh3cglP6BmqIKVPcSo1furzNeZt4PdeEgyyFVX9bVwg+A?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Elzt4SrJpsaKtjnmAmwTLnTRy3PAQDOHIDi4//9fEvZpnKTzVDSW/znXwTwOwghHTkO/sd06c+AJC9UHcDkix86Q04nBiYKGQTgKsSGh1A==; 24:c6tyKqbDSDgh+38hfJUtc8Y9PpPO2uBez014wWTskWGvtVwS6eG70vQEgKuhCjnGda12PAyTmlRfH+grQMf9Z6iuxCRgUNzkQANFp7PEVCY=; 7:7qmNJNal1m3gpbEKyip5hf59N9uxFLOjxGMk0bGb4ItjoHtiTPJxsdsCsPkeVCmw0yK5WeKfZkuX3bgs+Bhvri2SaEmAucAd6Jlbokm6gdVZdNAD0mWWdm5pGxqBnmx7EJ9ZBs1A1QtYHl9zYBcYOwsA8lv+0FxJkwHygckHKHHPdaCBg8tCuDbnAAywYpYwLiYw2ct04NlIqxeF2AqTKyoDmoaU4xrxuQM/LNDP8TM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 20:pOJBTEiM3fx4vt2/Y31peeVrI1kY8AQvLOUArZ4w+VLwjGnW8PrxXjsfQrPxVagVZD9FIgZCFa8VE1dQD0PJ6I4klTom1pjceZiKtleOrtNASLg1YzypjgP2hkD8G/a+k4ZXIvmJ73TUA2KTIW1hIQfMIP2CHRNpt7/AtuuPMPCuZb+ZyRXYM0yT0lY567ZNhqE3UPcxTiZTY66q38X/zWvnr0qYhiVN0FBVa8hY5ShQ5e0T7WQ2BIHzGP6DdWHu X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 11:24:25.7144 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0146 Subject: [edk2] [PATCH 1/5] OvmfPkg/VirtioNetDxe: map VRING using VirtioRingMap() 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" When device is behind the IOMMU then driver need to pass the device address when programing the bus master. The patch uses VirtioRingMap() to map the VRING system physical address to device address. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Tom Lendacky Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Brijesh Singh --- OvmfPkg/VirtioNetDxe/VirtioNet.h | 2 + OvmfPkg/VirtioNetDxe/Events.c | 7 ++++ OvmfPkg/VirtioNetDxe/SnpInitialize.c | 40 ++++++++++++++++---- OvmfPkg/VirtioNetDxe/SnpShutdown.c | 2 + 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/VirtioNetDxe/VirtioNet.h b/OvmfPkg/VirtioNetDxe/Virtio= Net.h index 710859bc6115..d80d441b50a4 100644 --- a/OvmfPkg/VirtioNetDxe/VirtioNet.h +++ b/OvmfPkg/VirtioNetDxe/VirtioNet.h @@ -82,10 +82,12 @@ typedef struct { EFI_HANDLE MacHandle; // VirtioNetDriverBinding= Start =20 VRING RxRing; // VirtioNetInitRing + VOID *RxRingMap; // VirtioRingMap UINT8 *RxBuf; // VirtioNetInitRx UINT16 RxLastUsed; // VirtioNetInitRx =20 VRING TxRing; // VirtioNetInitRing + VOID *TxRingMap; // VirtioRingMap UINT16 TxMaxPending; // VirtioNetInitTx UINT16 TxCurPending; // VirtioNetInitTx UINT16 *TxFreeStack; // VirtioNetInitTx diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c index 5be1af6ffbee..6950c4d56df1 100644 --- a/OvmfPkg/VirtioNetDxe/Events.c +++ b/OvmfPkg/VirtioNetDxe/Events.c @@ -88,4 +88,11 @@ VirtioNetExitBoot ( if (Dev->Snm.State =3D=3D EfiSimpleNetworkInitialized) { Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); } + + // + // Unmap Tx and Rx rings so that hypervisor will not be able get readabl= e data + // after device is reset. + // + Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->TxRingMap); + Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->RxRingMap); } diff --git a/OvmfPkg/VirtioNetDxe/SnpInitialize.c b/OvmfPkg/VirtioNetDxe/Sn= pInitialize.c index 0ecfe044a977..803a38bd4239 100644 --- a/OvmfPkg/VirtioNetDxe/SnpInitialize.c +++ b/OvmfPkg/VirtioNetDxe/SnpInitialize.c @@ -35,11 +35,13 @@ the network device. @param[out] Ring The virtio-ring inside the VNET_DEV structure, corresponding to Selector. + @param[out] Mapping A token return from the VirtioRingMap(). =20 @retval EFI_UNSUPPORTED The queue size reported by the virtio-net devic= e is too small. @return Status codes from VIRTIO_CFG_WRITE(), - VIRTIO_CFG_READ() and VirtioRingInit(). + VIRTIO_CFG_READ(), VirtioRingInit() and + VirtioRingMap(). @retval EFI_SUCCESS Ring initialized. */ =20 @@ -49,11 +51,13 @@ EFIAPI VirtioNetInitRing ( IN OUT VNET_DEV *Dev, IN UINT16 Selector, - OUT VRING *Ring + OUT VRING *Ring, + OUT VOID **Mapping ) { EFI_STATUS Status; UINT16 QueueSize; + UINT64 RingBaseShift; =20 // // step 4b -- allocate selected queue @@ -79,30 +83,38 @@ VirtioNetInitRing ( return Status; } =20 + Status =3D VirtioRingMap (Dev->VirtIo, Ring, &RingBaseShift, Mapping); + if (EFI_ERROR (Status)) { + goto ReleaseQueue; + } + // // Additional steps for MMIO: align the queue appropriately, and set the // size. If anything fails from here on, we must release the ring resour= ces. // Status =3D Dev->VirtIo->SetQueueNum (Dev->VirtIo, QueueSize); if (EFI_ERROR (Status)) { - goto ReleaseQueue; + goto UnmapQueue; } =20 Status =3D Dev->VirtIo->SetQueueAlign (Dev->VirtIo, EFI_PAGE_SIZE); if (EFI_ERROR (Status)) { - goto ReleaseQueue; + goto UnmapQueue; } =20 // // step 4c -- report GPFN (guest-physical frame number) of queue // - Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, Ring, 0); + Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, Ring, RingBaseShif= t); if (EFI_ERROR (Status)) { - goto ReleaseQueue; + goto UnmapQueue; } =20 return EFI_SUCCESS; =20 +UnmapQueue: + Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Mapping); + ReleaseQueue: VirtioRingUninit (Dev->VirtIo, Ring); =20 @@ -456,12 +468,22 @@ VirtioNetInitialize ( // // step 4b, 4c -- allocate and report virtqueues // - Status =3D VirtioNetInitRing (Dev, VIRTIO_NET_Q_RX, &Dev->RxRing); + Status =3D VirtioNetInitRing ( + Dev, + VIRTIO_NET_Q_RX, + &Dev->RxRing, + &Dev->RxRingMap + ); if (EFI_ERROR (Status)) { goto DeviceFailed; } =20 - Status =3D VirtioNetInitRing (Dev, VIRTIO_NET_Q_TX, &Dev->TxRing); + Status =3D VirtioNetInitRing ( + Dev, + VIRTIO_NET_Q_TX, + &Dev->TxRing, + &Dev->TxRingMap + ); if (EFI_ERROR (Status)) { goto ReleaseRxRing; } @@ -510,9 +532,11 @@ AbortDevice: Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); =20 ReleaseTxRing: + Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->TxRingMap); VirtioRingUninit (Dev->VirtIo, &Dev->TxRing); =20 ReleaseRxRing: + Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->RxRingMap); VirtioRingUninit (Dev->VirtIo, &Dev->RxRing); =20 DeviceFailed: diff --git a/OvmfPkg/VirtioNetDxe/SnpShutdown.c b/OvmfPkg/VirtioNetDxe/SnpS= hutdown.c index 5e84191fbbdd..36f3253e77ad 100644 --- a/OvmfPkg/VirtioNetDxe/SnpShutdown.c +++ b/OvmfPkg/VirtioNetDxe/SnpShutdown.c @@ -67,7 +67,9 @@ VirtioNetShutdown ( Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); VirtioNetShutdownRx (Dev); VirtioNetShutdownTx (Dev); + Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->TxRingMap); VirtioRingUninit (Dev->VirtIo, &Dev->TxRing); + Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->RxRingMap); VirtioRingUninit (Dev->VirtIo, &Dev->RxRing); =20 Dev->Snm.State =3D EfiSimpleNetworkStarted; --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel