From nobody Fri Dec 27 18:12:26 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 1502710679654437.3689197740009; Mon, 14 Aug 2017 04:37:59 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id BEBB521D0A270; Mon, 14 Aug 2017 04:34:58 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0089.outbound.protection.outlook.com [104.47.40.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 04A9621D1825A for ; Mon, 14 Aug 2017 04:34:57 -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:18 +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=DwJN2SZb+h8CsxoQN2/Y+4/j3q72TkT1RgwDxyMjSN4=; b=KcdOSrnhwVJvsVkx8JGOZCIiK+qKn7ZfoWNPq9t0k0c3ScDNUwtIlC4vys2bxzHLXB5wr/L3iE2xZXr+pLTCfwmRptadjiRew8gblJ7dligM+wJB8BB5sUVjJ6QMJ93pdTh7rO1MLGXFcJ532m5W5bk3xy8HGItTHLvLlnbGC5Y= 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:35 -0400 Message-Id: <1502710605-8058-14-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: 77fad79b-586f-47e2-ef71-08d4e308d205 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:Y+PyjHcemvxltsgLX4XU22KtFqAQhUQqcjd8vL/64KxohtUEhzUMQdFjMc4ELl98PP04Ocz6Jgh9h0Csuj1NHO29x42rDoTbt/flSNggwEzUz8uysxDixjpnG3w74JxffFkXR6CaD9hbJhuu+hVNc2MfO/RFE1k14K5TflZY3Gnj8uqqx5NxG7OnLxI71W/L0BoRjUJKhr9WOnuwF024Wk5hxtYLtzrbQWIhwq/bp74Thfpcd40cBKXSaRWDe1m+; 25:E2i/Z1ziCts0EZFxhZ4VYdrAO+PRiZaWxDSDFneRVpSfFjun5luSbYdZfbaorfqN7pQ1xuwUyKGzkhDkwqM8I1R8ODTZ4IzsC34t2M6U7G/bTqkQpRXW1ivKds591rpXv9BkbgLK8WPem3TzCCvFNbqGV+GXJ6wjIkuLMXjsljUaRDtBziXs7Pe1cQwA7+OC2VX2Rkq6lYdneW98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XraeF+fIFH1PdgslWAvAhSW+oXzWRP4ES/ohFmP9pvFfRVEpFSiDcn60OZ+CUGJe6OWn4/ATptixhO0RoabmIDSrYYtnQTabKGacrCMuujwiw8q4Pb1kyBVdKpESwZAWh98NodPr1rOElKAa7aWtPd99y+EoEk/qGKHpm6MpqRZuy2Y3iORjT+/TOslmUlksVogjwrDqlmriifv+CCAwTBJi6vr7mrTR/LyiQL5+TBXukUBKxng== 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)(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)(19627235001); 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:JUf22kGWkRAtfFncyFIJihWU046ZHdpJa5TBgXfX7?= =?us-ascii?Q?NJW+f61bBvIxL7Eoi+9az9Lu90P8xxOrET96+VE4iBs8Cc6mLaXjdWIsi+0V?= =?us-ascii?Q?ZHb9yn69Fi9RisYwVsK0QiDk8eLH98J2RyRxopgPRKvfdgc3ZJDVaipoiAkF?= =?us-ascii?Q?e5g0B6fGjPLKDZemeSV7agRuUoJ+ccDlT1n7aiTOF/J3j+vYoJjwbvwarBsB?= =?us-ascii?Q?rkZdWB1JI/FWC2VZPC/89Bg44iZTv4QN0XD1bFQ1QaxFchRllptGxmCx2fqX?= =?us-ascii?Q?+ocRKBbNBCn9gn8cOjj4lzW/jJP1OAI0EfVqLc1rr+KMXhPdriW+ZKsBbfCE?= =?us-ascii?Q?sfAjGY51H/zPr/Z1glyCIqJuZKxOnUBEw4sd33vtHsukeO7nVPRKz6HAkOc9?= =?us-ascii?Q?ewAdWUA67KFSARcvcKNYwlD+HClxyvvNDiARV0VbqcY7AfuYTJlorPXRtVx3?= =?us-ascii?Q?IrlvQK1wbr4/sjOLh3zkjaKSEBJDOCs8mKknq+5dSKijWm5TN4pl2WXgeN/G?= =?us-ascii?Q?bJrAKExxm8h7w4ZJzm+72CgzPvJtk3tIjcXWxlIZccm299qHOI+lTRF56hWg?= =?us-ascii?Q?8cYDxl4HuiuaMZafbtfvaj1t4+boiwGuAdeANz8MWkDVh3lOAWt4ShVPxdbv?= =?us-ascii?Q?JVnsxA8BRvdMKZCZSi66ZktFDYRyduQ/DUZZuv0+mtbMEqBfBW/g2gMIwm0F?= =?us-ascii?Q?heI3Yf8SdZs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/JDDSgl0hbVYt/9JyeUb4gS46nxRBLl2gSKao2LoZJKWzn+7VTPiNNQlUKHvbht+Brepa3Lg0JmU3IJA==; 24:Oa25ZMG3zgVJ5qNHZENIzCQmXqdPVc5nMirSxVM7NASeDrBcvBxWjNyZBKKJXLUZhtEJRF3i7vncbYIBZsKJJL5Tf57aFi1wDifW6UgXfYE=; 7:/XyW39UoydpBXy363XPtUgXxaTHzhghAErDQTiV1yfiBvcWHWcJhgAiqnjsI0MZMzhWkzzWNZv4ahtNLBeROHOrkWOPT6iPQMuGHOYkpAAcI9hIJ4hnRI05DmmV88p9UzoWYxjXk4BOsNV2SGOoYmqNXHCbkqmvtmd9u95EUhvw9BfCKtnAhGuC6nQ9s26ymaB+bVsTDu5PwNtgvRXUC8k5kZu2rFfua5h28Q8b1LOA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0145; 20:C393i33zdPj8t2antRSNmPtAl5X0O/zSI7/xTINPZuBQdCY0IyMAtIsOTytJ1CmpzngdR7ocSIyQgl8skcZNx6DJfX3Df3BGYmBGGrVYPBW9C3tjA4EfbXaiSQYc9niN19qlOYy6GwgqfXCeIF38GwWFkRHT12kvkopbP2Oiq+ov/FU0qXepjdO46eh7vh0sD9/gllMGWFL53GnPlxvhgXaBeQ9/8FcDNzgbkK/sIVdym+KjXjIA8yUa7U3ndG1R X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 11:37:18.2680 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0145 Subject: [edk2] [PATCH v2 13/23] OvmfPkg/Virtio: take RingBaseShift in VirtioSetQueueAddress() 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" VirtioRingMap() maps the ring buffer system physical to a bus address. When an IOMMU is used for translating the address then bus address can start at a different offset from the system physical address. - MMIO and legacy virtio device does not use IOMMU to translate the addresses hence RingBaseShift will always be set to zero. - modern virtio device use IOMMU to translate the address, in next patch we will update the Virtio10Dxe to use RingBaseShift offset. Suggested-by: Laszlo Ersek 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/Include/Protocol/VirtioDevice.h | 5 ++++- OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h | 3 ++- OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h | 3 ++- OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c | 5 ++++- OvmfPkg/Virtio10Dxe/Virtio10.c | 5 ++++- OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 2 +- OvmfPkg/VirtioGpuDxe/Commands.c | 3 ++- OvmfPkg/VirtioNetDxe/SnpInitialize.c | 2 +- OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c | 5 ++++- OvmfPkg/VirtioRngDxe/VirtioRng.c | 2 +- OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 2 +- 11 files changed, 26 insertions(+), 11 deletions(-) diff --git a/OvmfPkg/Include/Protocol/VirtioDevice.h b/OvmfPkg/Include/Prot= ocol/VirtioDevice.h index 14f980d7bf0a..25fd73b847a5 100644 --- a/OvmfPkg/Include/Protocol/VirtioDevice.h +++ b/OvmfPkg/Include/Protocol/VirtioDevice.h @@ -156,6 +156,8 @@ EFI_STATUS @param[in] Ring The initialized VRING object to take the addresses from. =20 + @param[in] RingBaseShift The offset for the Ring Base address. + @retval EFI_SUCCESS The data was written successfully. @retval EFI_UNSUPPORTED The underlying IO device doesn't support the provided address offset and write size. @@ -164,7 +166,8 @@ typedef EFI_STATUS (EFIAPI *VIRTIO_SET_QUEUE_ADDRESS) ( IN VIRTIO_DEVICE_PROTOCOL *This, - IN VRING *Ring + IN VRING *Ring, + IN UINT64 RingBaseShift ); =20 /** diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h b/OvmfP= kg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h index b69f6d7b7a85..b5cc091fe820 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.h @@ -113,7 +113,8 @@ VirtioMmioSetQueueSel ( EFI_STATUS VirtioMmioSetQueueAddress ( IN VIRTIO_DEVICE_PROTOCOL *This, - IN VRING *Ring + IN VRING *Ring, + IN UINT64 RingBaseShift ); =20 EFI_STATUS diff --git a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h b/OvmfPkg/VirtioP= ciDeviceDxe/VirtioPciDevice.h index 41df5a98e560..1f0dc45d501e 100644 --- a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h +++ b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h @@ -126,7 +126,8 @@ EFI_STATUS EFIAPI VirtioPciSetQueueAddress ( IN VIRTIO_DEVICE_PROTOCOL *This, - IN VRING *Ring + IN VRING *Ring, + IN UINT64 RingBaseShift ); =20 EFI_STATUS diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.= c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c index f3f69f324c6c..3d14b1035e91 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c @@ -183,11 +183,14 @@ VirtioMmioSetQueueSel ( EFI_STATUS VirtioMmioSetQueueAddress ( IN VIRTIO_DEVICE_PROTOCOL *This, - IN VRING *Ring + IN VRING *Ring, + IN UINT64 RingBaseShift ) { VIRTIO_MMIO_DEVICE *Device; =20 + ASSERT (RingBaseShift =3D=3D 0); + Device =3D VIRTIO_MMIO_DEVICE_FROM_VIRTIO_DEVICE (This); =20 VIRTIO_CFG_WRITE (Device, VIRTIO_MMIO_OFFSET_QUEUE_PFN, diff --git a/OvmfPkg/Virtio10Dxe/Virtio10.c b/OvmfPkg/Virtio10Dxe/Virtio10.c index 413ffa06cf35..d102e1fd8551 100644 --- a/OvmfPkg/Virtio10Dxe/Virtio10.c +++ b/OvmfPkg/Virtio10Dxe/Virtio10.c @@ -489,7 +489,8 @@ EFI_STATUS EFIAPI Virtio10SetQueueAddress ( IN VIRTIO_DEVICE_PROTOCOL *This, - IN VRING *Ring + IN VRING *Ring, + IN UINT64 RingBaseShift ) { VIRTIO_1_0_DEV *Dev; @@ -497,6 +498,8 @@ Virtio10SetQueueAddress ( UINT64 Address; UINT16 Enable; =20 + ASSERT (RingBaseShift =3D=3D 0); + Dev =3D VIRTIO_1_0_FROM_VIRTIO_DEVICE (This); =20 Address =3D (UINTN)Ring->Desc; diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/Virtio= Blk.c index 61b9cab4ff02..bff15fe3add1 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -745,7 +745,7 @@ VirtioBlkInit ( // // step 4c -- Report GPFN (guest-physical frame number) of queue. // - Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, &Dev->Ring); + Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, &Dev->Ring, 0); if (EFI_ERROR (Status)) { goto ReleaseQueue; } diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Command= s.c index c2e4d72feb67..df8ded99edff 100644 --- a/OvmfPkg/VirtioGpuDxe/Commands.c +++ b/OvmfPkg/VirtioGpuDxe/Commands.c @@ -132,7 +132,8 @@ VirtioGpuInit ( if (EFI_ERROR (Status)) { goto Failed; } - Status =3D VgpuDev->VirtIo->SetQueueAddress (VgpuDev->VirtIo, &VgpuDev->= Ring); + Status =3D VgpuDev->VirtIo->SetQueueAddress (VgpuDev->VirtIo, + &VgpuDev->Ring, 0); if (EFI_ERROR (Status)) { goto ReleaseQueue; } diff --git a/OvmfPkg/VirtioNetDxe/SnpInitialize.c b/OvmfPkg/VirtioNetDxe/Sn= pInitialize.c index 6d9b81a9f939..0ecfe044a977 100644 --- a/OvmfPkg/VirtioNetDxe/SnpInitialize.c +++ b/OvmfPkg/VirtioNetDxe/SnpInitialize.c @@ -96,7 +96,7 @@ VirtioNetInitRing ( // // step 4c -- report GPFN (guest-physical frame number) of queue // - Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, Ring); + Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, Ring, 0); if (EFI_ERROR (Status)) { goto ReleaseQueue; } diff --git a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c b/OvmfPkg/Virt= ioPciDeviceDxe/VirtioPciFunctions.c index 4597095deb78..86f752e1651f 100644 --- a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c +++ b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciFunctions.c @@ -183,11 +183,14 @@ EFI_STATUS EFIAPI VirtioPciSetQueueAddress ( IN VIRTIO_DEVICE_PROTOCOL *This, - IN VRING *Ring + IN VRING *Ring, + IN UINT64 RingBaseShift ) { VIRTIO_PCI_DEVICE *Dev; =20 + ASSERT (RingBaseShift =3D=3D 0); + Dev =3D VIRTIO_PCI_DEVICE_FROM_VIRTIO_DEVICE (This); =20 return VirtioPciIoWrite (Dev, VIRTIO_PCI_OFFSET_QUEUE_ADDRESS, sizeof (U= INT32), diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/Virtio= Rng.c index e20602ac7225..0abca488e6cd 100644 --- a/OvmfPkg/VirtioRngDxe/VirtioRng.c +++ b/OvmfPkg/VirtioRngDxe/VirtioRng.c @@ -298,7 +298,7 @@ VirtioRngInit ( // // step 4c -- Report GPFN (guest-physical frame number) of queue. // - Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, &Dev->Ring); + Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, &Dev->Ring, 0); if (EFI_ERROR (Status)) { goto ReleaseQueue; } diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/Vir= tioScsi.c index c2f6f412ff40..a983b3df7b9c 100644 --- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c +++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c @@ -855,7 +855,7 @@ VirtioScsiInit ( // // step 4c -- Report GPFN (guest-physical frame number) of queue. // - Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, &Dev->Ring); + Status =3D Dev->VirtIo->SetQueueAddress (Dev->VirtIo, &Dev->Ring, 0); if (EFI_ERROR (Status)) { goto ReleaseQueue; } --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel