From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3566C21E49BA5 for ; Tue, 22 Aug 2017 10:35:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF6C8806A6; Tue, 22 Aug 2017 17:38:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com AF6C8806A6 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-92.phx2.redhat.com [10.3.116.92]) by smtp.corp.redhat.com (Postfix) with ESMTP id 570D45D765; Tue, 22 Aug 2017 17:38:04 +0000 (UTC) To: Leif Lindholm , Ard Biesheuvel Cc: edk2-devel@lists.01.org, jordan.l.justen@intel.com, Alexander Graf References: <20170822163013.12233-1-ard.biesheuvel@linaro.org> <20170822165729.dj2uha24dtq2oqlf@bivouac.eciton.net> From: Laszlo Ersek Message-ID: Date: Tue, 22 Aug 2017 19:38:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170822165729.dj2uha24dtq2oqlf@bivouac.eciton.net> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 22 Aug 2017 17:38:05 +0000 (UTC) Subject: Re: [PATCH] ArmVirtPkg: remove QemuVideoDxe from ArmVirtQemu and ArmVirtQemuKernel 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, 22 Aug 2017 17:35:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/22/17 18:57, Leif Lindholm wrote: > On Tue, Aug 22, 2017 at 05:30:13PM +0100, Ard Biesheuvel wrote: >> One of the reasons for introducing virtio-gpu support to OvmfPkg and >> ArmVirtpkg was the fact that under KVM virtualization on ARM, the >> legacy VGA cannot be used reliably. This is due to an implementation >> detail of QEMU+KVM, which remaps cached host memory into the guest >> address space as a framebuffer behind a PCI BAR. Given that the purpose >> of a memory mapped framebuffer is its side effects, such BARs should >> never be mapped cacheable in the guest, and the mismatched attributes >> between host and guest result in a loss of coherency, visible as >> corruption in the framebuffer image. >> >> This issue does not occur under TCG emulation, nor did we expect it to >> actually bring down the guest under KVM, and so it was deemed harmless >> to keep support for the VGA device as well. However, as it turns out, >> the fact that the framebuffer BAR is mapped using device semantics by >> default may result in unalignment faults when we use the ordinary string >> copy routines on the contents. In theory, we could work around this by >> remapping the BAR as write combining, but it appears the generic PCI >> bus driver does not actually implement this. >> >> So let's remove the QemuVideoDxe driver altogether. This may result >> in loss of functionality for use cases that rely on the framebuffer >> to be directly addressable (such as EFIFB), but given that this never >> worked reliably under KVM in the first place, let's not let that stop >> us from dropping support for it. > > For the record, this would most likely mean we would not be able to > test graphical installers on QEMU. Hmmm, RHEL-7.3+ (and Fedora 2x+, for some "x" I don't recall), for Aarch64, definitely install in GUI mode, on virtio-gpu-pci, *including* a perfectly working grub2. I'd been obsessed with this (i.e., a fully graphical installation in aarch64/KVM guests). I also have GUI-enabled openSUSE Tumbleweed and Ubuntu guests on my Mustang. I've booted them just now, and their grub2's work flawlessly. These guests are not new, the installer ISO names are: - openSUSE-Tumbleweed-DVD-aarch64-Snapshot20161031-Media.iso - ubuntu-16.04.2-server-arm64.iso I remember that for the Ubuntu installation, I had to pick the "HWE kernel" from the grub menu. I've uploaded a few screenshots here: https://people.redhat.com/lersek/aarch64-vgpu-screenshots-7c6bb412-923d-468b-8cfa-5894abd90b40/ > GRUB certainly looks like it's > using FrameBufferBase. Please see this (quite small) grub2 patch: . (See also the responses from phcoder.) > Maybe that isn't the most important use-case, > but it's certainly not invalid. To me personally, the use case you describe is extremely important (see above). My impression has been that this has been sorted out for ages. At least Alex Graf posted the grub2 patch in Feb 2017 (CC'ing him now). ... FWIW, as far as I can see, Fedora and RHEL do *not* carry Alex's grub2 patch. Yet grub2 works just fine with virtio-gpu-pci (BLT only). Not sure about the grub2 details, but I consider this problem (graphical GNU/Linux installers in aarch64 guests, using virtio-gpu-pci) solved; cross-distro. Thanks, Laszlo >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> ArmVirtPkg/ArmVirtQemu.dsc | 2 -- >> ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 1 - >> ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 -- >> 3 files changed, 5 deletions(-) >> >> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc >> index e23a6d17bc44..2e6e76224987 100644 >> --- a/ArmVirtPkg/ArmVirtQemu.dsc >> +++ b/ArmVirtPkg/ArmVirtQemu.dsc >> @@ -57,7 +57,6 @@ >> BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf >> PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf >> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf >> - FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf >> QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf >> FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf >> PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf >> @@ -357,7 +356,6 @@ >> # >> # Video support >> # >> - OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf >> OvmfPkg/VirtioGpuDxe/VirtioGpu.inf >> OvmfPkg/PlatformDxe/Platform.inf >> >> diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc >> index 237b2d03a714..3194aa3edc8e 100644 >> --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc >> +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc >> @@ -167,7 +167,6 @@ READ_LOCK_STATUS = TRUE >> # >> # Video support >> # >> - INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf >> INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf >> INF OvmfPkg/PlatformDxe/Platform.inf >> >> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc >> index aa01debfda69..69de887277cb 100644 >> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc >> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc >> @@ -57,7 +57,6 @@ >> BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf >> PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf >> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf >> - FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf >> QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf >> FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf >> PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf >> @@ -348,7 +347,6 @@ >> # >> # Video support >> # >> - OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf >> OvmfPkg/VirtioGpuDxe/VirtioGpu.inf >> OvmfPkg/PlatformDxe/Platform.inf >> >> -- >> 2.11.0 >>