From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::230; helo=mail-wr0-x230.google.com; envelope-from=paolo.bonzini@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x230.google.com (mail-wr0-x230.google.com [IPv6:2a00:1450:400c:c0c::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9E926220C1C2F for ; Thu, 23 Nov 2017 15:57:07 -0800 (PST) Received: by mail-wr0-x230.google.com with SMTP id z75so17527915wrc.5 for ; Thu, 23 Nov 2017 16:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8M0ELtMO5H5z6O6FNVikAALaxi6ROi/BVRXjeX0B/ts=; b=qxoAsEn5whmaWbsN6NkKKURu4qEAC4/sJZpRy4LIqwrIiIN9yd0q2ZH67sXTd5x//h xjXqG9yVOQEKzlPD8tCpZQCOHvJn5KTOI8VUXArLOcdpcVud0MVXn980TvS3VzzvUDRq ENVau+Kpjq8zCr5VPrdXuwDfDBz/y85lrMaJNJdiHAbcgU3c71QznKAfQspowI7Xa+Sx UHK1bHnwvcySk5BlO5t1mFE7k5OK/aJ53Saxv31C3dKe/5E31uYRbeHqzaFzFnZpBHc1 gbHlr1PDOMBVTZkgp9lMNQcgJ5AZzX+P8bztmDNVPLHibjaDvbN0ZIl/1L2Nl1iiv5Ds tJ/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8M0ELtMO5H5z6O6FNVikAALaxi6ROi/BVRXjeX0B/ts=; b=nRm7pNbzp2gJncevgDNKDgBbCOExVT9dftUrCMMbL7P53de4OJK7LwZnhfTTWRirE3 U0fs9NnBoFilIRR2nTKbx7ogTVk2+2rk0NuWuN8bUqU1fMCFlD2kuo1fyXkos3M6EGra 7uGhFeNqr8dhFvgdy6ZU6B4KxS91Tkq7rORKX5mPKkzCFMuyv/xUZWY0P8s38vIhyhD8 ebA3PmcBWIvMIX1NdTn4M1W3Ruk3vkA4Ibxo2+QpdOGJcfKUrRU6FNS/NhVRlCWsCxJu gswJNKDY32OXQcBD1UkDbaEUXvOmOeLTgcMTp33PND27pRAQEMEbAstZD3XjNVsEGfua DNjQ== X-Gm-Message-State: AJaThX6AEn0msErPGethL4Ohoj2Qp2jKv3f5DLKWhsFuQfk9ay+nCx4Q Ymomgp/BluCkJIBBDjRNwtQ= X-Google-Smtp-Source: AGs4zMZ2yDkzRPDgPu5QRUIBmePFlOA7ph1DgYAK2eydJnytYk2TEn5NxzQTEUknoEuPVOnC5HsMJg== X-Received: by 10.223.166.51 with SMTP id k48mr22275265wrc.125.1511481683671; Thu, 23 Nov 2017 16:01:23 -0800 (PST) Received: from [192.168.10.165] (dynamic-adsl-78-12-251-125.clienti.tiscali.it. [78.12.251.125]) by smtp.googlemail.com with ESMTPSA id m198sm9612551wmg.20.2017.11.23.16.01.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 16:01:22 -0800 (PST) Sender: Paolo Bonzini To: Laszlo Ersek , "Ni, Ruiyu" , "Zeng, Star" , edk2-devel-01 Cc: Dann Frazier , "Dong, Eric" , Ard Biesheuvel References: <20171026154819.20865-1-lersek@redhat.com> <734D49CCEBEEF84792F5B80ED585239D5BACC0A1@SHSMSX104.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B9BABBA@shsmsx102.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BACDEC2@SHSMSX104.ccr.corp.intel.com> From: Paolo Bonzini Message-ID: <831b3082-2554-8196-5f79-d018e6d4ce37@redhat.com> Date: Fri, 24 Nov 2017 01:01:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH] MdeModulePkg/AtaAtapiPassThru: disable only BM-DMA at ExitBootServices() 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: Thu, 23 Nov 2017 23:57:08 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 23/11/2017 14:08, Laszlo Ersek wrote: > On 11/23/17 03:20, Ni, Ruiyu wrote: >> I cannot explain precisely why the S4 resume fails. >> I can just guess: Windows might have some assumptions on the BM bit. > Can we make this configurable on the platform level somehow? > > On one hand, I certainly don't want to break Windows 10, even in case > this issue ultimately turns out to be a Windows 10 bug. > > On the other hand, OVMF does not support S4, and disabling BMDMA at > ExitBootServices() in PCI drivers is specifically what the Driver > Writers' Guide recommends. Otherwise pending DMA could corrupt OS memory. S4 can be done by the OS even if firmware says it doesn't support it. Once hibernation is done, it is merely a "courtesy" for the OSPM to turn off the computer using the _S4 ACPI object rather than _S5. Paolo