From nobody Fri Dec 27 02:22:05 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 150365749063926.506266091902148; Fri, 25 Aug 2017 03:38:10 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3A4D32095AE41; Fri, 25 Aug 2017 03:35:30 -0700 (PDT) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0061.outbound.protection.outlook.com [104.47.36.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A790D21D1E2FB for ; Fri, 25 Aug 2017 03:35:27 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1362.18; Fri, 25 Aug 2017 10:38:02 +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=nlWUXr79BXcJ08JeosFjbnEPpLcAIZhv+Dtg5rd0op0=; b=23mCe2XqKs8iGz2dqMIPBZR04vjlrEsynyR6dGYi0TmZVvY8Bav8nnyFtc7HokLyl1g9i4rp9jdqodyjXq602Wl1V0np5Hi+I2KoEwL2ed4Gb2C+okqUgOQtoFrrlShsNJ41Ygz/Hu//WqqHuD5OwJ7To4EbbqjH+iz99RvHMMI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Fri, 25 Aug 2017 06:37:47 -0400 Message-Id: <1503657467-21375-3-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503657467-21375-1-git-send-email-brijesh.singh@amd.com> References: <1503657467-21375-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR12CA0046.namprd12.prod.outlook.com (2603:10b6:301:2::32) To DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95a39592-362b-4c4b-79e3-08d4eba55d18 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR12MB0156; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 3:yMKXSXTH/xS2BUpRZ5uh26660pxxKvm/Sk0hjUCzEavM0A/hZi6yecHroLXyhThtSQrdFST9cFYBEC3v7LlBrdY4uCq8+J7uBANC25uhehNuM3/SEgChNp3i4AF7GKtHJKEp+gqk3kzkOzy/72ze9BeOkm3L6A8NBsj1LEz4zS/9Ou3dhfCWOTDj9QvwIhLwHRLGLGlCzYb/pGb042LFMj3hwR1s3PEEJPy+wKWnDIdIRKz5bM/f377SBqVnEfmU; 25:8ff2PRnvZjdEr8Lbxab8Sp904+m+jQd2GZB70MYVmTJhsi1syk9SUnwZbgx1HntNy5darAenu81b03Bqp2a9tbfQN5zaXjWqEMOGjSQSSHTmL04gIHfhyziOBvBQFPUXcB1inSul20zVYdTRJzHnrm6RHIu4JzQNnhM7MF64wSWnUd3HjztuoS/DExnNvdicsHJ/X2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aNNINeU09l77MyT4rP7v5WgaGeR1I6ZtCc2XZMdfCIZgM3eS27nNQkNdQP1R0h0DzfU8UKrcCHam+EbWlGnMVrzpcdbPGLRZa7LMEMFyb+sVbK9eoV/P7Aa7YEy/+Grvl2sBJ+QXFjR6IJKXPvwNBShYCDRvpjSX9NOKgDl1mqcDR6e1Jy0QKt8yuzIyWxE90zm2W1JqPOX5zjCsQi1vvv8GiJ9LjD4zzA== 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)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123560025)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR12MB0156; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR12MB0156; X-Forefront-PRVS: 041032FF37 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39860400002)(199003)(189002)(54906002)(97736004)(86362001)(5660300001)(47776003)(305945005)(110136004)(4326008)(48376002)(7736002)(7350300001)(53936002)(68736007)(50466002)(105586002)(5003940100001)(6486002)(2950100002)(8676002)(101416001)(76176999)(6116002)(6666003)(50986999)(66066001)(478600001)(106356001)(2906002)(3846002)(53416004)(81156014)(42186005)(25786009)(33646002)(50226002)(81166006)(36756003)(189998001)(6916009)(2351001)(2361001)(344415003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0156; 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; DM2PR12MB0156; 23:MKyWjciEZYWcxAgy5xEJb1hPn/pNY+ilXuKr/zwaD?= =?us-ascii?Q?XWAW56Fj/8gtrnmM0QkhvrXS9o7V5w5fwpe70w8f7DxMC/x4CnsU9d16D040?= =?us-ascii?Q?t3g8IgYGvWlh7ZeQ9U6XKkL9fcQC98Ax98uJPdtzhIDtdheRvOXHeTnB6Dvh?= =?us-ascii?Q?9rWnHAe7PIZMT0i0+8q4tVZ5DujsOcnbqNYccu+YkW4aHV24k1Tcw4D7gN4Q?= =?us-ascii?Q?+l+IUiG20+d5Q5ZE31oecyIkZs1Hqzs5LRbCurFuXZ3o5Tsqq890xKKSjDAc?= =?us-ascii?Q?29H22JhmJdrIlrkdJf7npVlBUauy36DE4BevZYWpXEp8wgD7vz1NUoVAZrzW?= =?us-ascii?Q?nz2HOtxlUT3Lz8g9LbltoGyxG+IgEWbB/X7lMNWihudPkULEGWyBwf5uKG+C?= =?us-ascii?Q?Cfmpf2WiZ+VTqY1oTGbsYXGdGL29VCidp8awl/+O6mjEE83jGGbFfeQwGUjd?= =?us-ascii?Q?b6DlOPMYRQTXs4lPrPZyjMjKZNn2x1Iqi0Ocwun7RtBnfZHnJ4nHxPDxvhpt?= =?us-ascii?Q?RmfTTE4KuUdWoMa9HNQsLFva0urGs2mZnDkG/+Qtql3jHBJLE0TXG5bWBvHC?= =?us-ascii?Q?0/116qXyMHWTOHRQywRGgcVqptj8tdU6xf4zz01eqcbWIGeWcnOpwG8hZavB?= =?us-ascii?Q?s/bMsVlp2VoNnY2EGUjU5ZbTZ0+hq4c/a7JSCMq4Nw57h9/lk6SA9nkex89i?= =?us-ascii?Q?g8p8b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6jGI6UsCXa4nmphEXkqeSpGvV69NK4BCJe2C0Fy+c5ACrRMKf36+eNfBLij7d2r+FA==; 24:vs0ZWtBWbEAEEXH/3EZm0ea8eGXxzblhlej3W1KPC0Ec/fJflNeowlr/PEVDqC3yr54sPQ45ILdrkNTezpYTJnau63TKnt2/z18IuLzAVOs=; 7:Jz+o/3830aZWI5xka8b4DcsswQLuxYIbyCMfHCaWMDyPb4iuA/VMaxuqQ0clQph1RNesEGNdSnJSZ7ZiBBROxw5Ag1LLZAc7wMOajy6jaoI7vCs+aGStKXrJmxYDslDxL73lUOtkkqTj+uexGCgJccSlx3lSmnluzXog4FbF6sFX2+pB3yAalBL1O7d8RJ3A6YUTMfZGfFwBeUq3+sWYwJH8yL0cv/Nk2IuZTH2QMck= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 20:gQ0HzZ2LlwTWe0HzLDT389yD/T2we8pJZVJpEkskCF0vmraTA8ck29BKbrs37DxO4khJpmthyBwOpg55ptHfpwtJhHf6SJvsbztUsoM+V/k3h+k9B1KFtX4xanO80StQt2u08GIZf0vQli4WNfqqYpzoOmK5QA7yKYmMcoLJG5ZHpfwHXcX7bF3DsOXYPvya5JtJeVQONs9QgofOmxl6wa/hWKCQEGSo/5VqOnZ10+x0RH6gmp5jpkxJtp2GOVON X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 10:38:02.2911 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0156 Subject: [edk2] [PATCH 2/2] OvmfPkg/VirtioRngDxe: 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 , 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" VirtioRngDxe 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/VirtioRngDxe/VirtioRng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/Virtio= Rng.c index 4e6799788105..80380bcdf8bf 100644 --- a/OvmfPkg/VirtioRngDxe/VirtioRng.c +++ b/OvmfPkg/VirtioRngDxe/VirtioRng.c @@ -279,7 +279,7 @@ VirtioRngInit ( goto Failed; } =20 - Features &=3D VIRTIO_F_VERSION_1; + Features &=3D VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM; =20 // // In virtio-1.0, feature negotiation is expected to complete before que= ue @@ -360,7 +360,7 @@ VirtioRngInit ( // step 5 -- Report understood features and guest-tuneables. // 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 UnmapQueue; --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel