Re: [PATCH] KVM: arm/arm64: Revert to old way of checking for device mapping in stage2_flush_ptes().

2015-12-04 Thread Ard Biesheuvel
On 4 December 2015 at 02:58, Ben Hutchings wrote: > On Wed, 2015-12-02 at 18:41 +0100, Ard Biesheuvel wrote: >> Hi Pavel, >> >> Thanks for getting to the bottom of this. >> >> On 1 December 2015 at 14:03, Pavel Fedin wrote: >> > This function takes st

Re: [PATCH] KVM: arm/arm64: Revert to old way of checking for device mapping in stage2_flush_ptes().

2015-12-03 Thread Ard Biesheuvel
On 3 December 2015 at 08:14, Pavel Fedin wrote: > Hello! > >> > diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c >> > index 7dace90..51ad98f 100644 >> > --- a/arch/arm/kvm/mmu.c >> > +++ b/arch/arm/kvm/mmu.c >> > @@ -310,7 +310,8 @@ static void stage2_flush_ptes(struct kvm *kvm, pmd_t >> > *

Re: [PATCH] KVM: arm/arm64: Revert to old way of checking for device mapping in stage2_flush_ptes().

2015-12-02 Thread Ard Biesheuvel
On 2 December 2015 at 19:50, Christoffer Dall wrote: > On Tue, Dec 01, 2015 at 04:03:52PM +0300, Pavel Fedin wrote: >> This function takes stage-II physical addresses (A.K.A. IPA), on input, not >> real physical addresses. This causes kvm_is_device_pfn() to return wrong >> values, depending on how

Re: [PATCH] KVM: arm/arm64: Revert to old way of checking for device mapping in stage2_flush_ptes().

2015-12-02 Thread Ard Biesheuvel
Hi Pavel, Thanks for getting to the bottom of this. On 1 December 2015 at 14:03, Pavel Fedin wrote: > This function takes stage-II physical addresses (A.K.A. IPA), on input, not > real physical addresses. This causes kvm_is_device_pfn() to return wrong > values, depending on how much guest and h

Re: [PATCH 15/21] arm64: KVM: Add panic handling

2015-11-16 Thread Ard Biesheuvel
On 16 November 2015 at 14:11, Marc Zyngier wrote: > Add the panic handler, together with the small bits of assembly > code to call the kernel's panic implementation. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/hyp/hyp-entry.S | 11 ++- > arch/arm64/kvm/hyp/hyp.h | 1 + >

Re: [PATCH 2/2] arm: kvm: Fix STRICT_MM_TYPECHECK errors

2015-11-13 Thread Ard Biesheuvel
On 11 November 2015 at 03:03, Laura Abbott wrote: > > PAGE_S2_DEVICE is a pgprot val and needs to be accessed using the proper > accessors. Switch to these accessors to avoid errors with > STRICT_MM_TYPECHECK. > > Signed-off-by: Laura Abbott > --- > Found in the course of other work Already fixe

[PATCH v2 resend] ARM/arm64: KVM: test properly for a PTE's uncachedness

2015-11-10 Thread Ard Biesheuvel
deal with host physical addresses, we can simply check whether the mapping is backed by memory that is managed by the host kernel, and only perform the D-cache maintenance if this is the case. Signed-off-by: Ard Biesheuvel Tested-by: Pavel Fedin Reviewed-by: Christoffer Dall --- Resending sin

Re: [PATCH v2] ARM/arm64: KVM: test properly for a PTE's uncachedness

2015-11-10 Thread Ard Biesheuvel
On 10 November 2015 at 14:40, Christoffer Dall wrote: > On Tue, Nov 10, 2015 at 02:15:45PM +0100, Ard Biesheuvel wrote: >> On 10 November 2015 at 13:22, Christoffer Dall >> wrote: >> > On Tue, Nov 10, 2015 at 10:45:37AM +0100, Ard Biesheuvel wrote: >> >> Hi al

Re: [PATCH v2] ARM/arm64: KVM: test properly for a PTE's uncachedness

2015-11-10 Thread Ard Biesheuvel
On 10 November 2015 at 13:22, Christoffer Dall wrote: > On Tue, Nov 10, 2015 at 10:45:37AM +0100, Ard Biesheuvel wrote: >> Hi all, >> >> I wonder if this is a better way to address the problem. It looks at >> the nature of the memory rather than the nature of the mapp

Re: [PATCH v2] ARM/arm64: KVM: test properly for a PTE's uncachedness

2015-11-10 Thread Ard Biesheuvel
(adding lists) On 10 November 2015 at 10:45, Ard Biesheuvel wrote: > Hi all, > > I wonder if this is a better way to address the problem. It looks at > the nature of the memory rather than the nature of the mapping, which > is probably a more reliable indicator of whether cache

Re: [PATCH] KVM/arm: kernel low level debug support for ARM32 virtual platforms

2015-11-04 Thread Ard Biesheuvel
On 4 November 2015 at 19:49, Christopher Covington wrote: > On 11/04/2015 08:31 AM, Christoffer Dall wrote: >> On Tue, Nov 03, 2015 at 01:39:44PM -0600, Rob Herring wrote: >>> On Tue, Nov 3, 2015 at 1:17 PM, Mario Smarduch >>> wrote: On 11/3/2015 9:55 AM, Will Deacon wrote: > On Tue, No

Re: [PATCH 09/15] arm64: Add page size to the kernel image header

2015-10-05 Thread Ard Biesheuvel
On 5 October 2015 at 14:02, Suzuki K. Poulose wrote: > On 02/10/15 16:49, Catalin Marinas wrote: >> >> On Tue, Sep 15, 2015 at 04:41:18PM +0100, Suzuki K. Poulose wrote: >>> >>> From: Ard Biesheuvel >>> >>> This patch adds the page size to the

Re: [PATCH 12/14] arm64: Check for selected granule support

2015-09-02 Thread Ard Biesheuvel
On 2 September 2015 at 11:48, Ard Biesheuvel wrote: > On 13 August 2015 at 19:29, Catalin Marinas wrote: >> On Thu, Aug 13, 2015 at 03:45:07PM +0100, Suzuki K. Poulose wrote: >>> On 13/08/15 13:28, Steve Capper wrote: >>> >On 13 August 2015 at 12:34,

Re: [PATCH 02/14] arm64: Handle section maps for swapper/idmap

2015-09-02 Thread Ard Biesheuvel
On 2 September 2015 at 11:42, Suzuki K. Poulose wrote: > On 02/09/15 10:38, Ard Biesheuvel wrote: >> >> On 13 August 2015 at 13:33, Suzuki K. Poulose >> wrote: >>> >>> From: "Suzuki K. Poulose" >>> >>> We use section maps with

Re: [PATCH 00/14] arm64: 16K translation granule support

2015-09-02 Thread Ard Biesheuvel
, and everything seems to work fine. (I tested 2-level and 3-level) I didn't test the KVM changes, so for all patches except those: Reviewed-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Regards, Ard. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the

Re: [PATCH 12/14] arm64: Check for selected granule support

2015-09-02 Thread Ard Biesheuvel
On 13 August 2015 at 19:29, Catalin Marinas wrote: > On Thu, Aug 13, 2015 at 03:45:07PM +0100, Suzuki K. Poulose wrote: >> On 13/08/15 13:28, Steve Capper wrote: >> >On 13 August 2015 at 12:34, Suzuki K. Poulose >> >wrote: >> >> __enable_mmu: >> >>+ mrs x1, ID_AA64MMFR0_EL1 >> >>+

Re: [PATCH 02/14] arm64: Handle section maps for swapper/idmap

2015-09-02 Thread Ard Biesheuvel
ymbol to make it clear those cases. > That sentence does not make sense. > Cc: Ard Biesheuvel > Cc: Mark Rutland > Cc: Catalin Marinas > Cc: Will Deacon > Signed-off-by: Suzuki K. Poulose > --- > arch/arm64/include/asm/kernel-pgtable.h | 31 +---

Re: [PATCH 9/9] arm/arm64: KVM: arch timer: Reset CNTV_CTL to 0

2015-08-31 Thread Ard Biesheuvel
On 31 August 2015 at 10:57, Christoffer Dall wrote: > On Mon, Aug 31, 2015 at 10:46:59AM +0200, Ard Biesheuvel wrote: >> On 30 August 2015 at 15:54, Christoffer Dall >> wrote: >> > Provide a better quality of implementation and be architecture compliant >> > on A

Re: [PATCH 9/9] arm/arm64: KVM: arch timer: Reset CNTV_CTL to 0

2015-08-31 Thread Ard Biesheuvel
ng the timer output is not asserted after, for example, a > PSCI system reset. > > This change alone fixes the UEFI reset issue reported by Laszlo back in > February. > Do you have a link to that report? I can't quite remember the details ... > Cc: Laszlo Ersek > Cc:

Re: ARM: KVM/XEN: how should we support virt-what?

2015-03-26 Thread Ard Biesheuvel
On 26 March 2015 at 19:49, Ard Biesheuvel wrote: > On 26 March 2015 at 19:45, Stefano Stabellini > wrote: >> On Thu, 26 Mar 2015, Andrew Jones wrote: >>> On Wed, Mar 25, 2015 at 10:44:42AM +0100, Andrew Jones wrote: >>> > Hello ARM virt maintainers, >>&

Re: ARM: KVM/XEN: how should we support virt-what?

2015-03-26 Thread Ard Biesheuvel
On 26 March 2015 at 19:45, Stefano Stabellini wrote: > On Thu, 26 Mar 2015, Andrew Jones wrote: >> On Wed, Mar 25, 2015 at 10:44:42AM +0100, Andrew Jones wrote: >> > Hello ARM virt maintainers, >> > >> > I'd like to start a discussion about supporting virt-what[1]. virt-what >> > allows userspace

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-05 Thread Ard Biesheuvel
On 5 March 2015 at 15:58, Catalin Marinas wrote: > On Thu, Mar 05, 2015 at 01:26:39PM +0100, Paolo Bonzini wrote: >> On 05/03/2015 13:03, Catalin Marinas wrote: >> >> > I'd hate to have to do that. PCI should be entirely probeable >> >> > given that we tell the guest where the host bridge is, that

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-04 Thread Ard Biesheuvel
On 4 March 2015 at 13:29, Catalin Marinas wrote: > On Wed, Mar 04, 2015 at 12:50:57PM +0100, Ard Biesheuvel wrote: >> On 4 March 2015 at 12:35, Catalin Marinas wrote: >> > On Mon, Mar 02, 2015 at 06:20:19PM -0800, Mario Smarduch wrote: >> >> On 03/02/2015 08

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-03-04 Thread Ard Biesheuvel
On 4 March 2015 at 12:35, Catalin Marinas wrote: > (please try to avoid top-posting) > > On Mon, Mar 02, 2015 at 06:20:19PM -0800, Mario Smarduch wrote: >> On 03/02/2015 08:31 AM, Christoffer Dall wrote: >> > However, my concern with these patches are on two points: >> > >> > 1. It's not a fix-all

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-02-24 Thread Ard Biesheuvel
On 24 February 2015 at 14:55, Andrew Jones wrote: > On Fri, Feb 20, 2015 at 04:36:26PM +0100, Andrew Jones wrote: >> On Fri, Feb 20, 2015 at 02:37:25PM +0000, Ard Biesheuvel wrote: >> > On 20 February 2015 at 14:29, Andrew Jones wrote: >> > > So looks like the

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-02-20 Thread Ard Biesheuvel
On 20 February 2015 at 14:29, Andrew Jones wrote: > On Thu, Feb 19, 2015 at 06:57:24PM +0100, Paolo Bonzini wrote: >> >> >> On 19/02/2015 18:55, Andrew Jones wrote: >> >> > > (I don't have an exact number for how many times it went to EL1 >> >> > > because >> >> > > access_mair() doesn't have a

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-02-19 Thread Ard Biesheuvel
> On 19 feb. 2015, at 17:55, Andrew Jones wrote: > >> On Thu, Feb 19, 2015 at 05:19:35PM +, Ard Biesheuvel wrote: >>> On 19 February 2015 at 16:57, Andrew Jones wrote: >>>> On Thu, Feb 19, 2015 at 10:54:43AM +, Ard Biesheuvel wrote: >>>>

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-02-19 Thread Ard Biesheuvel
On 19 February 2015 at 16:57, Andrew Jones wrote: > On Thu, Feb 19, 2015 at 10:54:43AM +0000, Ard Biesheuvel wrote: >> This is a 0th order approximation of how we could potentially force the guest >> to avoid uncached mappings, at least from the moment the MMU is on. (Before

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-02-19 Thread Ard Biesheuvel
On 19 February 2015 at 15:27, Alexander Graf wrote: > > > On 19.02.15 15:56, Ard Biesheuvel wrote: >> On 19 February 2015 at 14:50, Alexander Graf wrote: >>> >>> >>> On 19.02.15 11:54, Ard Biesheuvel wrote: >>>> This is a 0th order approxima

Re: [RFC/RFT PATCH 3/3] arm64: KVM: keep trapping of VM sysreg writes enabled

2015-02-19 Thread Ard Biesheuvel
On 19 February 2015 at 15:19, Marc Zyngier wrote: > On 19/02/15 13:44, Ard Biesheuvel wrote: >> On 19 February 2015 at 13:40, Marc Zyngier wrote: >>> On 19/02/15 10:54, Ard Biesheuvel wrote: >>>> --- >>>> arch/arm/kvm/mmu.c | 2 +-

Re: [RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-02-19 Thread Ard Biesheuvel
On 19 February 2015 at 14:50, Alexander Graf wrote: > > > On 19.02.15 11:54, Ard Biesheuvel wrote: >> This is a 0th order approximation of how we could potentially force the guest >> to avoid uncached mappings, at least from the moment the MMU is on. (Before >> that,

Re: [RFC/RFT PATCH 3/3] arm64: KVM: keep trapping of VM sysreg writes enabled

2015-02-19 Thread Ard Biesheuvel
On 19 February 2015 at 13:40, Marc Zyngier wrote: > On 19/02/15 10:54, Ard Biesheuvel wrote: >> --- >> arch/arm/kvm/mmu.c | 2 +- >> arch/arm64/include/asm/kvm_arm.h | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --

[RFC/RFT PATCH 2/3] arm64: KVM: mangle MAIR register to prevent uncached guest mappings

2015-02-19 Thread Ard Biesheuvel
. Signed-off-by: Ard Biesheuvel --- arch/arm64/kvm/sys_regs.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 1e170eab6603..bde2b49a7cd8 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch

[RFC/RFT PATCH 1/3] arm64: KVM: handle some sysreg writes in EL2

2015-02-19 Thread Ard Biesheuvel
asons. Signed-off-by: Ard Biesheuvel --- arch/arm64/kvm/hyp.S | 101 ++ arch/arm64/kvm/sys_regs.c | 28 - 2 files changed, 120 insertions(+), 9 deletions(-) diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index c3ca89c

[RFC/RFT PATCH 3/3] arm64: KVM: keep trapping of VM sysreg writes enabled

2015-02-19 Thread Ard Biesheuvel
--- arch/arm/kvm/mmu.c | 2 +- arch/arm64/include/asm/kvm_arm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index 136662547ca6..fa8ec55220ea 100644 --- a/arch/arm/kvm/mmu.c +++ b/arch/arm/kvm/mmu.c @@ -1530,7 +1530,7

[RFC/RFT PATCH 0/3] arm64: KVM: work around incoherency with uncached guest mappings

2015-02-19 Thread Ard Biesheuvel
introduces a fast path for EL2 to perform trivial sysreg writes on behalf of the guest, without the need for a full world switch to the host and back. The main purpose of these patches is to quantify the performance hit, and verify whether the MAIR_EL1 handling works correctly. Ard Biesheuvel (3

Re: [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()

2014-12-09 Thread Ard Biesheuvel
On 9 December 2014 at 13:38, Christoffer Dall wrote: > On Tue, Dec 09, 2014 at 01:29:52PM +0100, Ard Biesheuvel wrote: >> On 9 December 2014 at 12:26, Christoffer Dall >> wrote: >> > From: Ard Biesheuvel >> > >> > Instead of using kvm_is_mmio_pfn() to d

Re: [GIT PULL 2/9] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()

2014-12-09 Thread Ard Biesheuvel
On 9 December 2014 at 12:26, Christoffer Dall wrote: > From: Ard Biesheuvel > > Instead of using kvm_is_mmio_pfn() to decide whether a host region > should be stage 2 mapped with device attributes, add a new static > function kvm_is_device_pfn() that disregards RAM pages with the

Re: [PATCH 1/2] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()

2014-12-01 Thread Ard Biesheuvel
On 21 November 2014 at 12:24, Christoffer Dall wrote: > On Mon, Nov 10, 2014 at 09:33:55AM +0100, Ard Biesheuvel wrote: >> Instead of using kvm_is_mmio_pfn() to decide whether a host region >> should be stage 2 mapped with device attributes, add a new static >> function kvm

Re: [PATCH 2/2] kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()

2014-11-21 Thread Ard Biesheuvel
On 10 November 2014 09:33, Ard Biesheuvel wrote: > This reverts commit 85c8555ff0 ("KVM: check for !is_zero_pfn() in > kvm_is_mmio_pfn()") and renames the function to kvm_is_reserved_pfn. > > The problem being addressed by the patch above was that some ARM code >

Re: [PATCH 3/3] arm, arm64: KVM: handle potential incoherency of readonly memslots

2014-11-19 Thread Ard Biesheuvel
On 17 November 2014 15:58, Ard Biesheuvel wrote: > Readonly memslots are often used to implement emulation of ROMs and > NOR flashes, in which case the guest may legally map these regions as > uncached. > To deal with the incoherency associated with uncached guest mappings, > tre

[PATCH 2/3] arm, arm64: KVM: allow forced dcache flush on page faults

2014-11-17 Thread Ard Biesheuvel
-off-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel --- arch/arm/include/asm/kvm_mmu.h | 5 +++-- arch/arm/kvm/mmu.c | 9 +++-- arch/arm64/include/asm/kvm_mmu.h | 5 +++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/arch/arm/include/asm/kvm_mmu.h b/arch/

[PATCH 3/3] arm, arm64: KVM: handle potential incoherency of readonly memslots

2014-11-17 Thread Ard Biesheuvel
regions tagged as such are flushed to DRAM before being passed to the guest. Signed-off-by: Ard Biesheuvel --- arch/arm/kvm/mmu.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index cb924c6d56a6..f2a9874ff5cb

[PATCH 1/3] kvm: add a memslot flag for incoherent memory regions

2014-11-17 Thread Ard Biesheuvel
Memory regions may be incoherent with the caches, typically when the guest has mapped a host system RAM backed memory region as uncached. Add a flag KVM_MEMSLOT_INCOHERENT so that we can tag these memslots and handle them appropriately when mapping them. Signed-off-by: Ard Biesheuvel

Re: [PATCH 1/2] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()

2014-11-10 Thread Ard Biesheuvel
On 10 November 2014 11:57, Christoffer Dall wrote: > On Mon, Nov 10, 2014 at 09:33:55AM +0100, Ard Biesheuvel wrote: >> Instead of using kvm_is_mmio_pfn() to decide whether a host region >> should be stage 2 mapped with device attributes, add a new static >> function kvm

Re: [PATCH 2/2] kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()

2014-11-10 Thread Ard Biesheuvel
On 10 November 2014 11:53, Christoffer Dall wrote: > Hi Ard, > > On Mon, Nov 10, 2014 at 09:33:56AM +0100, Ard Biesheuvel wrote: >> This reverts commit 85c8555ff0 ("KVM: check for !is_zero_pfn() in >> kvm_is_mmio_pfn()") and renames the function to kvm_is_reserv

[PATCH 2/2] kvm: fix kvm_is_mmio_pfn() and rename to kvm_is_reserved_pfn()

2014-11-10 Thread Ard Biesheuvel
' from the beginning, e.g., whether or not to call get_page/put_page on it etc. This means that returning false for the zero page is a mistake and the patch above should be reverted. Signed-off-by: Ard Biesheuvel --- arch/ia64/kvm/kvm-ia64.c | 2 +- arch/x86/kvm/mmu.c | 6 +++--- incl

[PATCH 1/2] arm/arm64: kvm: drop inappropriate use of kvm_is_mmio_pfn()

2014-11-10 Thread Ard Biesheuvel
Instead of using kvm_is_mmio_pfn() to decide whether a host region should be stage 2 mapped with device attributes, add a new static function kvm_is_device_pfn() that disregards RAM pages with the reserved bit set, as those should usually not be mapped as device memory. Signed-off-by: Ard

Re: [edk2] [Qemu-devel] [INVITE] OVMF BoF session at the KVM Forum 2014

2014-09-19 Thread Ard Biesheuvel
On 19 September 2014 10:03, Paolo Bonzini wrote: > Il 19/09/2014 16:17, Ard Biesheuvel ha scritto: >> >>> > (**) Ard's patches for the upstream host kernel (== KVM) have been... >>> > ugh, not sure... applied to a maintainer tree? Ard? :) >>> >

Re: [Qemu-devel] [INVITE] OVMF BoF session at the KVM Forum 2014

2014-09-19 Thread Ard Biesheuvel
On 18 September 2014 05:18, Laszlo Ersek wrote: > On 09/18/14 13:44, Andreas Färber wrote: >> Hello Laszlo, >> >> Am 18.09.2014 um 10:23 schrieb Laszlo Ersek: >>> I've been made an offer that I couldn't refuse :) to "organize" a Birds >>> of a Feather session concerning OVMF at the KVM Forum 2014.

Re: [PATCH] mm: export symbol dependencies of is_zero_pfn()

2014-09-12 Thread Ard Biesheuvel
On 12 September 2014 23:14, Andrew Morton wrote: > On Fri, 12 Sep 2014 22:17:23 +0200 Ard Biesheuvel > wrote: > >> In order to make the static inline function is_zero_pfn() callable by >> modules, export its symbol dependencies 'zero_pfn' and (for s390 and &g

[PATCH] mm: export symbol dependencies of is_zero_pfn()

2014-09-12 Thread Ard Biesheuvel
ing a pfn whether it refers to the zero page is required to correctly distinguish the zero page from other special RAM ranges that may also have the PG_reserved bit set, but need to be treated as MMIO memory. Signed-off-by: Ard Biesheuvel --- arch/mips/mm/init.c | 1 + arch/s390/mm/init.

Re: [kvm:master 11/11] ERROR: "zero_pfn" [arch/powerpc/kvm/kvm.ko] undefined!

2014-09-12 Thread Ard Biesheuvel
On 12 September 2014 19:25, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/virt/kvm/kvm.git master > head: e20e1bde3bb158cd3d08b9d94a90d3cabf1ba7cb > commit: e20e1bde3bb158cd3d08b9d94a90d3cabf1ba7cb [11/11] KVM: check for > !is_zero_pfn() in kvm_is_mmio_pfn() > config: powerpc-

[PATCH] KVM: check for !is_zero_pfn() in kvm_is_mmio_pfn()

2014-09-12 Thread Ard Biesheuvel
Read-only memory ranges may be backed by the zero page, so avoid misidentifying it a a MMIO pfn. Signed-off-by: Ard Biesheuvel Fixes: b88657674d39 ("ARM: KVM: user_mem_abort: support stage 2 MMIO page mapping") --- This fixes another issue I identified when testing QEMU+KVM_UEFI, wh

[PATCH v2] ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault()

2014-09-09 Thread Ard Biesheuvel
unconditionally. Instead of fixing both implementations of kvm_is_write_fault() in place, reimplement it just once using kvm_vcpu_dabt_iswrite(), which already does the right thing with respect to the WnR bit. Also fix up the callers to pass 'vcpu' Acked-by: Laszlo Ersek Signed-off-by: Ard

Re: [PATCH] ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault()

2014-09-09 Thread Ard Biesheuvel
On 9 September 2014 11:35, Marc Zyngier wrote: > Hi Ard, > > > On 2014-09-08 21:29, Ard Biesheuvel wrote: >> >> The ISS encoding for an exception from a Data Abort has a WnR >> bit[6] that indicates whether the Data Abort was caused by a >> read or a write

[PATCH] ARM/arm64: KVM: fix use of WnR bit in kvm_is_write_fault()

2014-09-08 Thread Ard Biesheuvel
unconditionally. Signed-off-by: Ard Biesheuvel --- This fixes an issue I observed with UEFI running under QEMU/KVM using NOR flash emulation and the upcoming KVM_CAP_READONLY_MEM support, where NOR flash reads were mistaken for NOR flash writes, resulting in all read accesses to go through the MMIO

Re: [PATCH v3 2/2] arm/arm64: KVM: Support KVM_CAP_READONLY_MEM

2014-09-07 Thread Ard Biesheuvel
a UEFI blob loaded with the -bios option in QEMU. > > Note that the MMIO exit on writes to a read-only memory is ABI and can > be used to emulate block-erase style flash devices. > > Cc: Ard Biesheuvel > Signed-off-by: Christoffer Dall Tested-by: Ard Biesheuvel