From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0046.outbound.protection.outlook.com [104.47.34.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0592421E7492D for ; Fri, 1 Sep 2017 04:21:48 -0700 (PDT) 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=BeqRE7ZmS0syXPzrI2D8bJdZxBd3ewkOXDaytC+2O+g=; b=GOXCbYueRnujM4eLThWYKCVGOId7RRGt58nfI/uBDKgoSl9t0G3dXmYXV3n09gaiah7JIKBkYzr1uf4y6s5Sy0CtZRUViAcQU4h/2ebh90wzPBTBbrW7WpmZldGQ5fJaWJLqL3/MB3yvD6QpI5kaWffzXezebs2e2RUpr3gD7TA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; 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:30 +0000 From: Brijesh Singh To: edk2-devel@lists.01.org Cc: Brijesh Singh , Ard Biesheuvel , Jordan Justen , Tom Lendacky , Laszlo Ersek Date: Fri, 1 Sep 2017 07:24:05 -0400 Message-Id: <1504265045-19008-6-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: 9b2029ce-053e-4ca7-ffed-08d4f12c042e 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:/09JBJNnNhL28Bkuwq4+gzWg2DMbdmWhuT4iYHlbUhcYxSeAcCrNZT5HzZmT8tOWSOWZwOp1tjbQLrlkAfDv8NOtOR1QWW1suGBcvBX1EuHtQpzUkYYoDJoqHngYUYdLLWBz4YSxjsvjijsxZA9C88NzuaZxQkTUB1p8Am/oY/UFfzSGkvQxzzCKXPyyrUXxGbTkj28a8yQfNnsId2AMLbTh3IamXYs8dzTfh4hpYrns8SwLuCLvqbA6zSmPLqhb; 25:u7AIs10ZOEjEOZhyH9PjgLhuGUwFNiKfDHwFLjbS9HM4z7l7aKhT00Z2sSo47DE5oXdrjE+t/gLvbd28HlSCvwHT/vc7fQcDuuMKDlB+h0ud/S2z0Rkaw0RnW9Ldh9TrcU0IdzbfXrG1JNLCoyvTuQ3+UI5k8gIiNtDJt03gMSIrHRBviZ6Cxrb2DCSOAyYAzIDfyp0MrIAx/VR/fRVlsawBKlJnjt2XA2RX+sHnekuBBVKO0y3vvNVuXlQv6hR5zQak/1kIF0zpMGVNIv2LuNlbQijtpZN/i1uJMarXwgnqTrBtrjHQaF8g/lqSOMW6qwEZ7fxEAQiuxol/nBpQYQ==; 31:aW+0WQoEqIdrFiHRDmTUySIMgXuAiUGNWRdSlBjXdMQxEVLBNy1wERtWkcL4jOia7LVCJR4NcDgO4ZAwdekVDZS8Dy+yUzrVtw09WqzPa/NPr5VPeg6bWM4kPws1Y50PugerCS5+mOC1HJd1+BKKzWlrLbKzZqUEzRwVgad6df4l4BGMqWuzsXYxTCft2Hu4IaSyI/gbvWjPs5KSJJNx9rkNW7s4XcOfKc1U+U3VuUM= X-MS-TrafficTypeDiagnostic: BY2PR12MB0146: X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 20:g1yS/h5lax0Ir/6ZL0sU+nnhTk8J1Y/AWyoTwWu5r2tZEoE6G0rcUgQStaIASJHbLtVD6EwcA/T/nmL1nqp99mPCPXXo7Ty1jPzjCTgOntdkqDq5pASWPsdg/gb0quyvkx8SW9nP7UGdIkOjiiBc1OsFgs5M2Bz0NwWXItqfjrnI/8t1AhVbZFSExunxgmNMxz9jHIZL+kVQSfrmcJ433l1SWuo4n2YCU1Di2JetNUa+Xf7/t17XbhA91U1dMh/XAgkhtJVpdhxusSaD+Df1g5l7rrT5D/MNkJxb4Kg2ZY+48XQDW2opBd2w3K/bQ00zPyZXRxWsvrFk7fezw1Y8n1tO+jiTKjV9ug7uajWL/f4vlYTXAh9BIObZgzjYPkK6rRfXDPtAchcfiFSRFCLDx2nQjwRckiyofijYYdBBwGq8g0bfcIr7M/EvTgoBxV5VNBLeyBxCjUyz0XHeYXnJKAxyLHviABBUFoLLkq/FITb3VTW4BB98W7YYPjfWQICS; 4:he6akHbfngXxS7/fBuapdGWH67ffAAK3a4wLBlhh5RtT0S20NrbSgFpE85ULGxS91WJpovY0Kj9LBXsd5dwempG//k1sLHCesCafCzCWWsWCLL2eZAQcilCzg3o6UeAO8jHuOmo3/VUHhv7prITyx0vBQTThBjCxFSBhqS1kvxu6mbGBC9034vvzdSRccq6teCqXB098RbshS8/GW8+Ms5QGL5nBRUyrRpDajlKmFiNeFeOvT0bcXHYcPaA93JO5lK8lVDAkJ2q2bUSe4fuY++tZnxcx8gi/U4AcC1F8OnQmRjetnHMkCWfPGfKTjO2upOrPevExgNy2UToyF/6dhQ== 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)(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)(6009001)(39860400002)(199003)(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)(344415003); 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 (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR12MB0146; 23:jQuZLtyhKnt3HE20BM7W7RBxttiu8RX3J7/sMO/kW?= =?us-ascii?Q?saT/4c+XXxMiT0i7WPVUGSztYigYjpkm9DTPJDJxt6sMH3cgl8DfiTP1d+Gy?= =?us-ascii?Q?pQsUn7T2EbpvrVRaohURweWsl1jsMu71JOrjZbiCDqHyA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:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 20:Nf3lN80fsoLDLW3z11RPRBQrcomkdP8/VbcfMmpiI+zOoVhDMDvc8pOxFIgBD4yAK1E6HQQ3Kq99YvqFwyccMNiNJ1OnZzhsR7XL/kaqt4XawKoCbWuTyAEoXR4ZKAAD6hH2vgLcogGmUz0Ed7fSXwToXgToE0nEOxgx/nBjeJIwLRqBRpfij7IldwvC4uwZqugYQY9ghdokT/Vqttv/YTOtXJBH5zbIQRuKkSc2hNNzYjuTTPq7FdVh/mVep+AY X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2017 11:24:30.7907 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0146 Subject: [PATCH 5/5] 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: , X-List-Received-Date: Fri, 01 Sep 2017 11:21:48 -0000 Content-Type: text/plain 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 --- OvmfPkg/VirtioNetDxe/SnpInitialize.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioNetDxe/SnpInitialize.c b/OvmfPkg/VirtioNetDxe/SnpInitialize.c index 551820e30f36..dded19b25dd2 100644 --- a/OvmfPkg/VirtioNetDxe/SnpInitialize.c +++ b/OvmfPkg/VirtioNetDxe/SnpInitialize.c @@ -550,7 +550,8 @@ VirtioNetInitialize ( ASSERT (Dev->Snm.MediaPresentSupported == !!(Features & VIRTIO_NET_F_STATUS)); - Features &= VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | VIRTIO_F_VERSION_1; + Features &= VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | VIRTIO_F_VERSION_1 | + VIRTIO_F_IOMMU_PLATFORM; // // In virtio-1.0, feature negotiation is expected to complete before queue @@ -590,7 +591,7 @@ VirtioNetInitialize ( // step 5 -- keep only the features we want // if (Dev->VirtIo->Revision < VIRTIO_SPEC_REVISION (1, 0, 0)) { - Features &= ~(UINT64)VIRTIO_F_VERSION_1; + Features &= ~(UINT64)(VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM); Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features); if (EFI_ERROR (Status)) { goto ReleaseTxRing; -- 2.7.4