linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH v2 0/2] efi: add support for cacheable efifb mappings
Date: Fri, 22 Jun 2018 07:52:48 +0000	[thread overview]
Message-ID: <20180622075250.14075-1-ard.biesheuvel@linaro.org> (raw)

KVM guests on ARM have special requirements when it comes to mapping
framebuffers: given that the host [emulating the framebuffer] uses
cacheable accesses to read from the framebuffer region, the guest
should uses cacheable accesses as well, or coherency is lost, i.e.,
the host does not see what the guest writes.

Modifying PCI drivers to take this into account just for KVM on ARM is
unreasonable, given that mapping BARs cacheable and still expecting
side effects does not make any sense. However, doing the same for
regions of system memory does make sense, since a framebuffer in DRAM
could be accessed via DMA by a coherent master, and so it makes sense
to take the memory attributes described by the UEFI memory map into
account if it covers the efifb region.

Patch #2 implements this. Patch #1 is a preparatory patch that makes
efi_mem_desc_lookup() usable for us in #2.

Changes since v1:
- fix Peter's email address in CC tag (#1)
- add Laszlo's tested-by

Bartlomiej, could we please take this through the EFI tree? (with your ack)

Cc: linux-fbdev@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Peter Jones <pjones@redhat.com>

Ard Biesheuvel (2):
  efi: drop type and attribute checks in efi_mem_desc_lookup()
  fbdev/efifb: honour UEFI memory map attributes when mapping the fb

 arch/x86/platform/efi/quirks.c |  3 +-
 drivers/firmware/efi/efi.c     |  8 +--
 drivers/firmware/efi/esrt.c    |  5 +-
 drivers/video/fbdev/efifb.c    | 52 ++++++++++++++++----
 4 files changed, 49 insertions(+), 19 deletions(-)

-- 
2.17.1


                 reply	other threads:[~2018-06-22  7:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180622075250.14075-1-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).