From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0046.outbound.protection.outlook.com [104.47.32.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 EAAAD21B06E91 for ; Tue, 25 Jul 2017 16:40:26 -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=Yeum59wl69ju8BnJybOIwNnryxqvRTdVZpZb2tTBfQ0=; b=bhE0d02f2g0asfl2h2xTH+aT4VGnaiArYXZ4eHKFE6k/6WAQtjN8R8ZLW4UimfhoPrlA8ZmUKs6xxWGfKWEnCoNvX8iLVBC9mk8RlppESq5mcuYWZDtkVuSW7qHT1EF5uP2J8EgTCZI8hQP+ocT/0tb8aP9gci924NpyskRuwio= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [10.236.136.62] (165.204.77.1) by CY1PR12MB0149.namprd12.prod.outlook.com (10.161.173.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10; Tue, 25 Jul 2017 23:42:25 +0000 Cc: brijesh.singh@amd.com, Tom Lendacky , Jordan Justen , Jason Wang , "Michael S . Tsirkin" , Gerd Hoffmann , Ard Biesheuvel To: Laszlo Ersek , edk2-devel@lists.01.org References: <1500502151-13508-1-git-send-email-brijesh.singh@amd.com> <841bec5f-6f6e-8b1f-25ba-0fd37a915b72@redhat.com> From: Brijesh Singh Message-ID: <4e7e2808-318e-90a2-6c15-a75e59086640@amd.com> Date: Tue, 25 Jul 2017 18:42:21 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <841bec5f-6f6e-8b1f-25ba-0fd37a915b72@redhat.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR14CA0002.namprd14.prod.outlook.com (10.173.157.140) To CY1PR12MB0149.namprd12.prod.outlook.com (10.161.173.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df0ec102-0fb2-4715-92b4-08d4d3b6ceb7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR12MB0149; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 3:kZ9vSkrMQuXRvGgPXjnGoUyYj43FnyDuo2Dzdo9cLXzIoLCJigafDb+6Qv7fkwo3hRTiZzjl5/4Qlbu1HIDL9jzbTjdzAaUn0YiWau22dbWDySg1ou+U8f34IWdX2dtrq3F3q1ZAw/dWm7vrj3+0Wq0e0/uaRWcD6c9WJBxgeF1WDWb9iYJPyKYAc1UYIC4mxthwDamJWFc078gN4/y/Bzc/7ctdm6VZgNRqYUZVsrQYoN8ahZaeX/f8KAJ5qoUPMfdaO6a4MGNpK4j7/8opObjyL6o4GEJaJYujUUu5EIbdIun4P5oSE5ibkKCex74ym9y0oWhzmVHlQbw7LgABcWlIxsBlpeTYJfy2yw396QaXBtdeY6A8/PqNRP1HAoug2spG7YVieWBWP1mgOZvitmPjbsbD1KNX5l57FjfrLGpdELiItnceAiGxfTAM6LgRwvmJ4fS+ctmZLSLpYtXm3uKp1ZQAJZUDqwXJBODsKvtFxRBQOLfZ703CgkobJaBdFekVPgdI1xYT1U/+lIpqJ4hej8sDXmwRADIQbZYiRMzeY1ZiFHuSNVvUu+I1HB5OgcFxqsSJLXZTMxSNqjcGaz0xhZqgmGpLdV8dlK6oG42n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R5je3ldDwLo7m75NnbvhH2mdLovh8pTKJfhSY0gkE+4d852Z3gX1XO9kOSMhZbIpZIq1X/UC5cOsdvxbucgzCbA0CX3P3gxk= X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 31:SqiC8gg7AeaRDnrciYbrHaTH21w68xvPPphEnp3yFvD9OwcUG35yMHBFHrKoBuTDdmGzvtjII0NRtACVisONKOM5lw51H2fb/obWW0AY2m64seiAcRoVlsNkD2mjxqvbU5bqoPzijJQls7jMLgrH9rqTAJplCrAAnskwCrbLfQK+8L3PU1BF3Gr23UU/NEKpzrYb0m4bbwTeVh6cAfN8F1qWQFDWZq4pkIHacQMhjVkhA0670+U6/dpyzlcXvhjKAKQfvqElNSnOtXjOZY51JJSISrwjfFCk0z8SCqFqTdhBrdnThl/OcaUchw7Ew2L+dHxkyTNqfgj4dNFNcBTweQitkie6ESUo8d/p/KTPKR/OtTL1gSbQhykDSwH76z3iNI8RN5/zQbsthRkEvLWQRf0JK6d3y0B8H3tkFW58G0WYVCzNJ9SyAGWNjtqdZUAycs0x0AzleNjgjuUUKU/qvWMqhr4zkgVgzlaYX7lkDJOcGE7d85oCuOcNoOzYtnPWzjs3HhkbktFFfKQJjCelxjUet4tEUA7YLZxOwkkfShJ4FrtQHShAcdIlRECaGBClbCELfM1KDvCbNURaELWNXyDt1N0P2OeaXxLxdlL/nHpo+0IYSzzZVUoDnP7ehSp/5J82fWjl66fwaknkQjYVhqJ4xqh/KI32kc/sxVxpLHy5YqvoOvwbVBd3RO8s5jqOALOq3OCsF3e0X4CMmuNdzQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0149; 20:kljGu1vYXyVoQHhakU5WYdh+lFyum+dpErrRuSCWPPLcK8/u77fqD1oFaRA5q5pdL4dE4rhsC05IfXMp797Gpf/3+soyGUzI+EuRckgJhgYKHWxAz/brlYuGSxgMG3VyPGLPvi9TVmDSWy04/UtzskopB8sRiWR/mFjDS8gVxMUprDs5WiTiwAFSrhqZabB8Vpbje0qYb9hQ5B31Dpxhc9fYsBOL+ODmQ+Yl4Loyfo+F5sgYEKXR9fWL9F6M6WJnH1Rc+OguyXfDU/H/3ODpz03wgWKjcFfeOSdkaF43g1dQ9vcZ1TYtgW4Kwlubqcv5ZyqUdPeZZQUqcWZb4lzVwIxg7xwuT5E9OS3pdOOgITMtKdePaLfOiQFfHC9LemZTZtfVlUMWlGAmAFp6WjAO+G2OZyptoQRazpuaQAsgPTbZZOqqwJB1EU2wSogOXC5KL4TtJ6K88RiMDNGnRTdWxjMnq1CDg5BPqNuQWvNYVOwapFZkVdvBvLcVD7KMgOr3 X-Exchange-Antispam-Report-Test: UriScan:(35073007944872)(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)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR12MB0149; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR12MB0149; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjEyTUIwMTQ5OzQ6aTVNZlJXT3dDRTVPV1FGSjZhMUdhWVlDVFF0?= =?utf-8?B?LzE1UWVYb1I2Z24ydFMzdHhtaVZlZFdoTENGbVB3bHJIS0IwR0RWYlM0UmJl?= =?utf-8?B?NktMN2hrWTQvWjBNRitIVnFQZWJXeXhTWlh6K0txMTZ0bkpNeGRmWEc5Y0Jq?= =?utf-8?B?aUlZTjcxYjJCVDdFUmVnQUI2RUpQTi9qTmsrTi83RkVWajh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qeStrWEhXaW9LcUVKby9kV3V2ZG4xL2x5?= =?utf-8?B?anpHTE5TYmI1Rk1ubHZvYi9oa0RnSVl3ZVNNN3k0NERBTkN0em5HMThJSHNm?= =?utf-8?B?L1FHcjlBWUFmNXpWTkpzR1pLc3c2TVU5NSs3NG5zaTRhYjZNVGNUaWY3SjNB?= =?utf-8?B?bG1ZdXRreVBQVm03Q3Y4Q04wb2NqTDNkNk1jVmQ4T2MvNkkzTUNBdnJZK25a?= =?utf-8?B?Y1NqeHh3bE5xTEhBMUtkNU5tR1BKcHh5N2RrNDFCNGRXNlJVNGRDMTU0MVI4?= =?utf-8?B?V0JWdHRZdVNEbThwa1VrVUFTVlVqZyt1Tm1paktOczJ4T2g4OTBVS1JtOHZp?= =?utf-8?B?NktjYUw3UktOME5zSHJtYXVURy93M0txSGNDOE15NHZITUVMbFJZM3JQaTRN?= =?utf-8?B?Nk9HaGlOYnhMb0N6QnhEL1NKbmRnTmdSN0RDVlRjQkJiSjQzNE1GRlNsZGRt?= =?utf-8?B?Z3RRaWNKQTNNV3ZraDY1ZmF1c0l5cmZSQkt4a0tIdUhHUGNjZ3ErTUdaMlB2?= =?utf-8?B?SmRJTXJUVVJZdkZ4V3JHTzdpeFZWL2J2MTcwbGw0ZW9kRzh0UHF1cG82OEg0?= =?utf-8?Q?vSvvVfNpmspnCPgSjf0hpYxTjpqXblIYzuDC5S?= X-Forefront-PRVS: 03793408BA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(6049001)(39860400002)(39410400002)(39850400002)(39400400002)(39450400003)(39840400002)(51694002)(377454003)(199003)(377424004)(24454002)(189002)(86362001)(97736004)(36756003)(53936002)(83506001)(106356001)(64126003)(189998001)(53546010)(4001350100001)(31696002)(77096006)(65956001)(50466002)(65806001)(66066001)(229853002)(23676002)(50986999)(76176999)(101416001)(81156014)(7350300001)(3846002)(81166006)(6116002)(6486002)(4326008)(8676002)(54356999)(2906002)(25786009)(42186005)(966005)(54906002)(68736007)(5660300001)(31686004)(38730400002)(6246003)(230700001)(110136004)(33646002)(6666003)(47776003)(6306002)(65826007)(305945005)(478600001)(7736002)(90366009)(2950100002)(105586002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0149; H:[10.236.136.62]; 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: =?utf-8?B?MTtDWTFQUjEyTUIwMTQ5OzIzOk91MTg5K2YvMVRMMHducGVZRGE4QTM4MFFo?= =?utf-8?B?U1Y5eDdnYWo2MmFIYmJWN2U5VzQ2QlZnVVZOZE5SQjlHdlJ3SlI5UDJGTlVt?= =?utf-8?B?ZG5TakxrWmh2SjNZV1hVeTViQUs3dUR0RXVkTXRETTY4V0EzY0RIeGZ3Q0xp?= =?utf-8?B?ODU5cDdBYTU3WTU3TFg2cE1Xa2lkUnlaVlJYekxkMTNtaHR4cWpoK0cxbkZ2?= =?utf-8?B?S3BSVXVsMzF2QmtaeGk2UWpzUlk3R2ZuMTVKWXNoUVZURzhJNUJ2ZW01TVFh?= =?utf-8?B?ZFA4MTZiWGwrUmVseWJWVlFxWlVKZ0p4bU5JNnVrRWt6SkcvYUF5REtqYW1W?= =?utf-8?B?R3AzelRkRUpkY3pJTTNOOHdlYk1jc2VlUGRmZktJVWxwdFN0aTRtRVppcThu?= =?utf-8?B?eUVvdTFGam04VTB0UGhvYmRyUXV2YlV2K05IYUVycHUyR0VyUmIxekFaODBu?= =?utf-8?B?RTBHZ2VWNjJYOGkwSmk3UG9QV1hXZXRUMDBrUi94OEg5ell3VTAvY29mMDU1?= =?utf-8?B?NHRtZ2dmVERWUVlhTXVoNXBMdk5UTWRQV2J4MmlTM3VPMWVIMVZpUWMxNDFu?= =?utf-8?B?NmczYnNsek9vSXZDa2docnBQZDdRZEFYazRTL3Iwd3hTVkpuY1EvOWo3dnA5?= =?utf-8?B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pEk8dsbSjC7cfqMLLOUVKsZo1En2wP+voiHh70pEWR7tjM5e7uQ1TWzEmL9tPTpkB2RzwitVZPTaSN54Z0bgX2AMjSwMVTRUG6Ywif59HSRZ1qtWa4vQ68wZcjQ3AwyQNdrxsl8aepMRGKv3HbiN6Ms X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2017 23:42:25.7978 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0149 Subject: Re: [RFC v1 0/3] Add VIRTIO_F_IOMMU_PLATFORM support 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: Tue, 25 Jul 2017 23:40:27 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Laszlo, On 07/25/2017 01:17 PM, Laszlo Ersek wrote: > Adding Ard > > On 07/20/17 00:09, Brijesh Singh wrote: >> I have found that OVMF fails to detect the disk when iommu_platform is set from >> qemu cli. The failure occurs during the feature bit negotiation. >> >> Recently, EDKII introduced IOMMU protocol d1fddc4533bf. SEV patch series introduced >> a IoMmu protocol driver f9d129e68a45 to set a DMA access attribute and methods to >> allocate, free, map and unmap the DMA memory for the master bus devices >> >> In this patch series, I have tried to enable the IOMMU_PLATFORM feature for >> VirtioBlkDevice. I am sending this as RFC to seek feedback before I extend the support >> for other Virtio devices. The patch has been tested in SEV guest - mainly because >> IoMmuDxe driver installs the IOMMU protocol for SEV guest only. If needed, I can >> extend the IoMmuDxe driver to install IOMMU protocol for non SEV guests. >> >> qemu cli used for testing: >> >> # $QEMU \ >> ... >> -drive file=${HDA_FILE},if=none,id=disk0,format=qcow2 \ >> -device virtio-blk-pci,drive=disk0,disable-legacy=on,iommu_platform=true,disable-modern=off,scsi=off >> ... >> >> Cc: Jordan Justen >> Cc: Laszlo Ersek >> Cc: Jason Wang >> Cc: Michael S. Tsirkin >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Brijesh Singh >> >> Brijesh Singh (3): >> OvmfPkg/Include/Virtio10: Define VIRTIO_F_IOMMU_PLATFORM feature bit >> OvmfPkg/VirtioLib: Add IOMMU_PLATFORM support >> OvmfPkg/VirtioBlkDxe: Add VIRITO_F_IOMMU_PLATFORM support > > In the course of processing my post-PTO email backlog, yesterday I > skimmed this topic very quickly, and thought about it for an hour or so > (while away for the computer). Here's my take on it. > > > (1) The closest to any formal language that I found for > VIRTIO_F_IOMMU_PLATFORM are: > > https://issues.oasis-open.org/browse/VIRTIO-154 > https://lists.oasis-open.org/archives/virtio-dev/201610/msg00121.html > > Are these references up-to-date? The ticket also references SVN r587 as > the resolution, but that link is dead. > > > (2) A few weeks back I saw Jason's SeaBIOS patch (also pointed out to me > more recently by Brijesh, in private): > > [SeaBIOS] [PATCH] virtio: IOMMU support > > I don't understand this patch. (I also don't understand the > "iommu_platform" device property on the QEMU command line.) According to > the spec language quoted from the mailing list above, we have four cases: > > (2.1) device does not offer VIRITO_F_IOMMU_PLATFORM --> everything works > like before > > (2.2) device offers VIRITO_F_IOMMU_PLATFORM, but the driver does not > negotiate it --> device is allowed to reject functioning > > * device offers VIRITO_F_IOMMU_PLATFORM and the driver negotiates it: > there are two possibilities: > (2.3) the driver *disables* the IOMMU, and works like before > (2.4) the driver *configures* the IOMMU and works accordingly > > The SeaBIOS patch negotiates VIRITO_F_IOMMU_PLATFORM, but it *neither* > disables *nor* configures the IOMMU. It simply *ignores* the IOMMU. I > don't see how that is any different *in effect* from simply not > negotiating VIRITO_F_IOMMU_PLATFORM -- case (2.2) --, and I don't > understand why QEMU tolerates "ignoring the IOMMU" differently from "not > negotiating the flag". > > > (3) *If* we indeed just wanted to follow the SeaBIOS patch, then > VIRTIO_F_IOMMU_PLATFORM should be treated in OVMF *precisely* in > parallel with VIRTIO_F_VERSION_1. > > > (4) I'm confused by the intersection of the SEV and > VIRTIO_F_IOMMU_PLATFORM use cases. The IoMmu DXE driver added in edk2 > commit f9d129e68a45 ("OvmfPkg: Add IoMmuDxe driver", 2017-07-06) is > specific to SEV. > > In SEV-less guests, the IoMmu DXE driver will not install the IOMMU > protocol, but the QEMU command line may still contain the > "iommu_platform=true" property. For example, as far as I recall, DPDK > guest payloads use an emulated "viommu" device. For this OVMF, would > have to provide a separate IOMMU DXE driver, one that could actually > interact with the "viommu" device. And there should be some coordination > that exactly one instance of gEdkiiIoMmuProtocolGuid OR > gIoMmuAbsentProtocolGuid be installed. > > I see that the SEV references are only in the blurb of the patch set; no > actual commit message refers to SEV. That's OK; I just think the blurb > is confusing. > I was trying to figure out why setting iommu_platform fails to detect the HDD in OVMF. Since SEV IOMMU work was still fresh in my mind hence I thought we simply need to update the Virtio drivers to consume IOMMU protocol directly. But your explanation on how things work makes sense; thanks for explaining it in great detail. I will follow your recommendation, and look into extending VIRTIO_DEVICE_PROTOCOL with necessary functions and delegate the work to EFI_PCI_IO_PROTOCOL (which will use IOMMU driver if available). Thanks Brijesh > > (5) Now I'm coming to my main point. The virtio device drivers in > OvmfPkg are UEFI_DRIVER modules that conform to the UEFI driver model. > They consume our home-grown the VIRTIO_DEVICE_PROTOCOL, and produce > whatever UEFI protocol is appropriate on top (for example, > EFI_BLOCK_IO_PROTOCOL in VirtioBlkDxe). > > Such a driver has no business talking to the platform's IOMMU protocol > directly (even if there is one). Instead: > > > (5.1) The VIRTIO_DEVICE_PROTOCOL has to be extended with the necessary > > AllocateSharedPages, FreeSharedPages, MapSharedPages, UnmapSharedPages > > functions. > > > (5.2) All top-level virtio driver code, including VirtioLib, has to be > rebased to the new VIRTIO_DEVICE_PROTOCOL member functions. This covers > the ring memory itself, the memory pointed-to by the descriptors placed > on the ring(s) -- i.e., the device specific requests --, and all further > memory that is referenced by those device specific requests. > > This will result in a larger memory footprint, as all current pool > allocations will be turned into page allocations, but I guess that is > tolerable. > > > (5.3) All virtio driver code should treat VIRTIO_F_IOMMU_PLATFORM simply > in parallel with VIRTIO_F_VERSION_1, and don't act upon > VIRTIO_F_IOMMU_PLATFORM in any special shape or form. So basically this > is just my point (3) from above. > > > (5.4) There are three VIRTIO_DEVICE_PROTOCOL implementations in edk2: > > - "OvmfPkg/VirtioPciDeviceDxe" binds legacy-only and transitional > virtio-pci devices, and offers virtio 0.9.5 semantics. > > - "ArmVirtPkg/VirtioFdtDxe" (via "OvmfPkg/Library/VirtioMmioDeviceLib") > binds virtio-mmio devices, and offers virtio 0.9.5 semantics. > > - "OvmfPkg/Virtio10Dxe" binds modern-only virtio-pci devices, and offers > virtio 1.0.0 semantics. > > The first two drivers should implement the AllocateSharedPages() and > FreeSharedPages() member functions simply with the corresponding > MemoryAllocationLib functions (using BootServicesData type memory), and > implement the MapSharedPages() and UnmapSharedPages() member functions > as no-ops (return the input addresses transparently). > > The third driver should implement all four new member functions by > respectively delegating the job to: > - EFI_PCI_IO_PROTOCOL.AllocateBuffer() -- with BootServicesData -- > - EFI_PCI_IO_PROTOCOL.FreeBuffer() > - EFI_PCI_IO_PROTOCOL.Map() -- with BusMasterCommonBuffer64 -- > - EFI_PCI_IO_PROTOCOL.Unmap() > > The EFI_PCI_IO_PROTOCOL implementation will delegate these calls to the > platform-specific PCI host bridge / root bridge driver, and *that* > driver in turn is allowed to talk to an IOMMU protocol (if any). > > (This last step is already covered by the following edk2 commits: > - generally, c15da8eb3587 ("MdeModulePkg/PciHostBridge: Add IOMMU > support.", 2017-04-29), > - specifically for SEV in OVMF, c6ab9aecb71b ("OvmfPkg: update > PciHostBridgeDxe to use PlatformHasIoMmuLib", 2017-07-06).) > > > (5.5) There's a delicate question that has to be considered with care; > namely the ExitBootServices() callbacks in the virtio drivers. > > Currently these functions perform virtio resets. They cause the devices > to forget all their configuration (including guest RAM references). > Aborting in-flight DMA (e.g. in VirtioNetDxe) is a practice that is > specifically recommended in the UEFI Driver Writers' Guide; plus at some > point the guest kernel will reclaim and overwrite BootServicesData type > memory. If at that point QEMU is still looking at some (originally > firmware-allocated) areas as virtio rings, the results won't be amusing. > (Speaking from experience.) Hence the resetting of virtio devices upon > ExitBootServices(). > > Now, remember that ExitBootServices() callbacks *must not* change the > UEFI memory map, so *no* memory allocations *must* be released in the > callbacks. The virtio resets performed in the callbacks are surgical for > this reason; nothing else is being done. The memory will be reclaimed by > the OS, later. > > With an IOMMU in the picture, further actions become necessary: *after* > the virtio reset, any buffers previously in use (including rings, device > specific requests pointed-to by descriptors, and any further memory > referenced by those requests) must be *unmapped*, but *not freed*. > > (Speaking in SEV terms, this will result in those memory areas seeing > their C bits restored, without changing the UEFI memmap.) > > This means that: > - the new VIRTIO_DEVICE_PROTOCOL.UnmapSharedPages() function has to be > called judiciously from these callbacks, after the virtio reset, > - *and* that the *entire* call chain originating from > UnmapSharedPages(), through PciIo, through PciRootBridgeIo, to > EdkiiIoMmu, *must* not call gBS->FreePool() or gBS->FreePages() (or the > equivalent MemoryAllocationLib functions). > > Note that if the last requirement is currently violated (outside of > OvmfPkg), then that is a general problem for physical platforms as well > -- IMO, a physical NIC driver too should be able to abort DMA in its > exit-boot-services callback and then unmap any relevant IOMMU mappings > (via PciIo->Unmap().) > > Thanks > Laszlo >