From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH] arm/arm64: KVM: Support KVM_CAP_READONLY_MEM Date: Mon, 4 Aug 2014 12:36:24 +0200 Message-ID: <20140804103624.GA32684@cbox> References: <1405003351-12973-1-git-send-email-christoffer.dall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Peter Maydell , michael.casadevall@linaro.org, alex.bennee@linaro.org, Marc Zyngier To: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Return-path: Received: from mail-lb0-f169.google.com ([209.85.217.169]:38287 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751409AbaHDKgT (ORCPT ); Mon, 4 Aug 2014 06:36:19 -0400 Received: by mail-lb0-f169.google.com with SMTP id s7so5187491lbd.14 for ; Mon, 04 Aug 2014 03:36:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1405003351-12973-1-git-send-email-christoffer.dall@linaro.org> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jul 10, 2014 at 07:42:31AM -0700, Christoffer Dall wrote: > When userspace loads code and data in a read-only memory regions, KVM > needs to be able to handle this on arm and arm64. Specifically this is > used when running code directly from a read-only flash device; the > common scenario is a UEFI blob loaded with the -bios option in QEMU. > > To avoid looking through the memslots twice and to reuse the hva error > checking of gfn_to_hva_prot(), add a new gfn_to_hva_memslot_prot() > function and refactor gfn_to_hva_prot() to use this function. > > Signed-off-by: Christoffer Dall > --- > Note that if you want to test this with QEMU, you need to update the > uapi headers. You can also grab the branch below from my qemu git tree > with the temporary update headers patch applied on top of Peter > Maydell's -bios in -M virt support patches: > > git://git.linaro.org/people/christoffer.dall/qemu-arm.git virt-for-uefi > Ping? -Christoffer