From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 D56C321A143F5 for ; Tue, 22 Aug 2017 09:55:00 -0700 (PDT) Received: by mail-wm0-x232.google.com with SMTP id z132so2119035wmg.1 for ; Tue, 22 Aug 2017 09:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rjW/0ULuV8/aYl9i6rQuSEjslmA+ZnhnxpWn9vBqOOM=; b=dKrRPirc1onVT0jtfAOGDqTYcDJTUTgl1RBZ7cbrJIyoH0VTUwB4lbEfuMINE2Liwe 2qa+E/3/nvefS7J1Id9lZgGa7PusHwGx7ZVE+dikxfukBZNS/w/j25G8MQWuG7Pmy9xH rePat0gC+MIvgCHqCrf7m7OXJhqJyRvh3KC7Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rjW/0ULuV8/aYl9i6rQuSEjslmA+ZnhnxpWn9vBqOOM=; b=ulyeI+IbW/Jw89/DhYpSk5jPAE0YUHROhGgmxpNJEXMfg7buNIAB1uEKOBC/xVTRk+ gn0gIOa4zuizZiTf/3C6MzcKmp0kSdrfi/xfxB5zT8R3wD70XwaaIlbq5cRJh7XQpMGV O67pjZsQ+sVTeCX0X6hLkwzOVcnlttmemdcmctRDeuzEnk/YVUuNdUmJeq/pPveuT/qU hTvd+mMRGmbQ7L/cQuUY3XtoY3/KN5TurznUGGHaUh87MSlISUrp0SIEVJ2l5GgEeLpv Ue/1pbPTgdMzwk+AnA+HQpfCE7sPBR9p9SVh+8Sgcb41r1UsQg2q9S8oxBLqL87iwkdW 9phg== X-Gm-Message-State: AHYfb5jJwjtkf5MYmcUKttOL+jPuVLwnf1vW54rWxdhSwHytAtTPbmJh Z5HAVMKG3Zt+J1Lf X-Received: by 10.28.39.70 with SMTP id n67mr179147wmn.163.1503421052132; Tue, 22 Aug 2017 09:57:32 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id o6sm7567272wro.45.2017.08.22.09.57.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2017 09:57:31 -0700 (PDT) Date: Tue, 22 Aug 2017 17:57:29 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, lersek@redhat.com, jordan.l.justen@intel.com Message-ID: <20170822165729.dj2uha24dtq2oqlf@bivouac.eciton.net> References: <20170822163013.12233-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170822163013.12233-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) 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 16:55:01 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. GRUB certainly looks like it's using FrameBufferBase. Maybe that isn't the most important use-case, but it's certainly not invalid. / Leif > 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 >