From nobody Thu Dec 26 14:17: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 1505132257714398.06440982842173; Mon, 11 Sep 2017 05:17:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7501921CEB0ED; Mon, 11 Sep 2017 05:14:24 -0700 (PDT) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0053.outbound.protection.outlook.com [104.47.38.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7B0BC21CEB0F8 for ; Mon, 11 Sep 2017 05:14:19 -0700 (PDT) Received: from ubuntu-010236106000.amd.com (165.204.78.1) by SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Mon, 11 Sep 2017 12:17:13 +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=Ws6upEF9ywhj2AWGMUI+5HYT4EfhHOy7VrsU+78UqvE=; b=VTt6gwSk+1TbsmWivnPMY4kGfIAo0BqE/95q3uq1f0DT4tTN7UjXOKXftIvjr74J0hMwcdQ7Cj/l1LDlyQplZ+A+KPn38WeJHIMbXf5Lpq7/jfZEIh3Mxwwx1LaThHgH11YCm5qHPSa6Gt4blkYdS5ytR4vGc3LBqN2FZDYg8e4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Mon, 11 Sep 2017 07:16:57 -0500 Message-Id: <20170911121657.34992-9-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170911121657.34992-1-brijesh.singh@amd.com> References: <20170911121657.34992-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM3PR12CA0047.namprd12.prod.outlook.com (10.161.151.15) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ccc8a7f-a8a7-41ee-ecda-08d4f90f08f2 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:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:iARHBWImX0q/SbSUBIobupzu6PBPF8uxQVpE5x/Qr8ShPIRGM70vCxn2b8D9cxKjhT96d9/uoYuJwVuGO/HLRT0CVpCyioqhz15iz9S6NchxIkx6H2mxhsFi/XOhYHrUQniIqqdS0MRo4NK7bqOyOk8c7rezANsFl4uUwlMQjILFd4NcXkN7Iw6IL3uD9VaDpctqMQbC0LY3X8fdsZRi+/GE0gBxHcsjgwjBAIQyqsI/xwxX+IccUiMAC+I773tX; 25:jYMQh/qGX/jYKBABlqyH++9fbGbrPa5iv4gWdb8DE3Et3D1s2JuX1ovv+NPCMi5y768Smzm/Q/XPGu4vqLqGjn4L7rLx/aDGZfwQlYfZ+lcb4gNNMGBVqcIm0o0fWFByg0GG7EMSaGxFGx6grNXefRRmdFTu9ro3TaITx6cACMAcHimMHLsuy8i1u8rvheUDUGx58uV5VGrA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5fAKGSRf3LDtQteKFL5KGXxFkvRxtLsrGOkJXlawu7Vnubl4LeX+jIGC3MIjdEc46VU65tNe7TuY2r1sHhdSUof98iOfi2YLGTlTywBvp2koc0F+Z3oGV9lGDktE8NVhOPZMXzwFNeDE58JSfzsQZQ1ZoqY1sWNK1rK0jl2SJyoso95TfvsbAu6c8TsJxzHDMA9lC/YVk1QXI5+Or2bGvu/s1C8spp3t/F0A== 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)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0158; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0158; X-Forefront-PRVS: 04270EF89C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(199003)(110136004)(106356001)(7736002)(105586002)(101416001)(4326008)(53416004)(1076002)(2361001)(2906002)(305945005)(2351001)(5660300001)(189998001)(25786009)(33646002)(50986999)(76176999)(3846002)(6116002)(68736007)(8676002)(478600001)(81156014)(81166006)(42186005)(50466002)(54906002)(6666003)(50226002)(97736004)(48376002)(36756003)(6916009)(2950100002)(8936002)(66066001)(47776003)(86362001)(5003940100001)(6486002)(53936002)(344415003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:ubuntu-010236106000.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; SN1PR12MB0158; 23:jl3Swse7Q5SXwJ877C/dGUxxWSwEcdJpenpDbs0WU?= =?us-ascii?Q?ZC5P1ANJ4qHkxJ+cHu3r/xbkXsNjqSAAeRDh8VRBX6uZ4K5lOwOaO1fH8Pu/?= =?us-ascii?Q?5oxcwKIhswfPTGUf6MVi3YDciIM1PNls0olI8ZNWkJQqsD1Djx7ugNUzZTqK?= =?us-ascii?Q?+aAb4EiUQJ0oQt0qYNIiVw+/cIWBtVYMl8vZ4SPDhZnT5Q81akWArq4zBF8l?= =?us-ascii?Q?T60oUsvzQJsVdKUmJm39HG2AZ5oD1zJsYOiFyDEK38PiDw545U7TVEyAWE5K?= =?us-ascii?Q?EtuGW2djJW+mXWQI3RyM8/j1JPKyoiBcATPwK34O1WGM+RoEviyCZESY/jHJ?= =?us-ascii?Q?Of/1EHYFw+Qq/AkdVpn60AW89cDbSS7N5HiDwOuGp8GKWhBMDI76ggKRJ/nw?= =?us-ascii?Q?M9JPJZw1oAt0jIyxvT9a71q1c9H9QeoYRwln/Px7rKPZLCxUwdkqWAUpHwgh?= =?us-ascii?Q?dENzjEtkeUpHTh8DzJzn+2PpYEtm7PhDA+/H0vrGTrV7FmN2TmBV5wEkXUfH?= =?us-ascii?Q?8eRzRBt3GzByHtdIIgzr1osTBKUOt3uAT8Jnx3Y/QF2y5559XFzCU4ta0VRW?= =?us-ascii?Q?kPNYmgaK8ODiAOta1nIbsLr2Gn2qa+9EFthQFwSE5KTwes2vwq9y+E/WCLaL?= =?us-ascii?Q?/XoVV/vOr8eh2sCr6puuTsrrbGYJVRbIvRmfWb0rDBBb0fvT+bS+p8Dj5a2M?= =?us-ascii?Q?hoXeslx31odbN6N07h2tnymIlGu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KXviZMoj6aYBwbdgnxq6CYYvqGlsQDP57fOWg6Paxhz6FU=; 7:U8AQ5dc1F0KVdqtv0gxdHLKd1U1LFNz7Y8RIqYbeC6djjHOmG+U/ZaTLd39M6IksbUu5A3mLcNx6H7LY8IQvUUlp9xjgqG1LZcVnESHfOdzBADgkQZg3S4BMKP7uFaiqt4+QSWlKGn+XpVkPdXq9Rz9tQlUkIUwdGgeHz/yxGNO+jsqW6IVt89Q0VXquZdnUvV/AOwlIlYSZFLj6100xAGnQLuKmA/8wdiE47drmvKA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:vLgoADEiDRXHXtTBJ9LhamVapxyN0eGADc9HrJ/y7W+504+NzfD8/PjToI/N96ykzuomDqnxzEXGsqNQFrLZloZy08Z547m1poB6Se0eCH7BzOWxttDmZRFGLKptoSSOrN8nMmIeAmt75pdG7Rbpmb/VNkvoXqxADJTOYuA9VxXERxYPYAw5nOSDfJEe5HgZNXzUZgH9T6XLHb56fsxeR2P4U6Nz5YQCR7MemN2gxPtj/qiXiVMmecLiUjgz1pZe X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2017 12:17:13.2296 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 Subject: [edk2] [PATCH v2 8/8] OvmfPkg/VirtioNetDxe: negotiate VIRTIO_F_IOMMU_PLATFORM 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 , Brijesh Singh , 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" VirtioNetDxe driver has been updated to use IOMMU-like member functions from VIRTIO_DEVICE_PROTOCOL to translate the system physical address to device address. We do not need to do anything special when VIRTIO_F_IOMMU_PLATFORM bit is present hence treat it in parallel with VIRTIO_F_VERSION_1. 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/VirtioNetDxe/SnpInitialize.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioNetDxe/SnpInitialize.c b/OvmfPkg/VirtioNetDxe/Sn= pInitialize.c index a8ffb9a8a7b1..4885aa73be15 100644 --- a/OvmfPkg/VirtioNetDxe/SnpInitialize.c +++ b/OvmfPkg/VirtioNetDxe/SnpInitialize.c @@ -560,7 +560,8 @@ VirtioNetInitialize ( ASSERT (Dev->Snm.MediaPresentSupported =3D=3D !!(Features & VIRTIO_NET_F_STATUS)); =20 - Features &=3D VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | VIRTIO_F_VERSION_= 1; + Features &=3D VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | VIRTIO_F_VERSION_= 1 | + VIRTIO_F_IOMMU_PLATFORM; =20 // // In virtio-1.0, feature negotiation is expected to complete before que= ue @@ -600,7 +601,7 @@ VirtioNetInitialize ( // step 5 -- keep only the features we want // if (Dev->VirtIo->Revision < VIRTIO_SPEC_REVISION (1, 0, 0)) { - Features &=3D ~(UINT64)VIRTIO_F_VERSION_1; + Features &=3D ~(UINT64)(VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM); Status =3D Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features); if (EFI_ERROR (Status)) { goto ReleaseTxRing; --=20 2.9.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel