RE: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails

2015-11-06 Thread Pavel Fedin
Hello! > > diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c > > index 7b42012..839dd970 100644 > > --- a/arch/arm/kvm/mmu.c > > +++ b/arch/arm/kvm/mmu.c > > @@ -213,7 +213,10 @@ static void unmap_ptes(struct kvm *kvm, pmd_t *pmd, > > kvm_tlb_flush_vmid_ipa(kvm, addr); > >

RE: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails

2015-11-06 Thread Pavel Fedin
Hello! > > > Did you check if PAGE_HYP_DEVICE can mean something sane on a stage-2 > > > page table entry and vice verse? > > > > I tried to, the chain of macros and variables is complicated enough not to > > get 200% sure, but anyway PAGE_HYP_DEVICE (as well as PAGE_S2_DEVICE) > > includes

RE: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails

2015-11-06 Thread Pavel Fedin
Hello! > >> The thing I want to avoid is PAGE_HYP_DEVICE covering some normal S2 > >> mapping, which we *should* flush but that we now end up ignoring? That > >> doesn't sound like it can be the case because the device bit is the same > >> bit for both types of page tables, correct? > > > >

Re: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails

2015-11-06 Thread Marc Zyngier
On 06/11/15 13:43, Pavel Fedin wrote: > Hello! > Did you check if PAGE_HYP_DEVICE can mean something sane on a stage-2 page table entry and vice verse? >>> >>> I tried to, the chain of macros and variables is complicated enough not to >>> get 200% sure, but anyway PAGE_HYP_DEVICE (as

Re: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails

2015-11-06 Thread Christoffer Dall
On Fri, Nov 06, 2015 at 12:32:51PM +0300, Pavel Fedin wrote: > Hello! > > > > diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c > > > index 7b42012..839dd970 100644 > > > --- a/arch/arm/kvm/mmu.c > > > +++ b/arch/arm/kvm/mmu.c > > > @@ -213,7 +213,10 @@ static void unmap_ptes(struct kvm *kvm,

Re: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails

2015-11-05 Thread Christoffer Dall
Hi Pavel, On Tue, Oct 27, 2015 at 10:40:08AM +0300, Pavel Fedin wrote: > After vGIC initialization succeeded, and timer initialization failed, > the following crash can be observed on ARM32: > > kvm [1]: interrupt-controller@10484000 IRQ57 > kvm [1]: kvm_arch_timer: can't find DT node > Unable