From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Fedin Subject: RE: [PATCH] KVM: arm: Fix crash in free_hyp_pgds() if timer initialization fails Date: Fri, 06 Nov 2015 17:06:07 +0300 Message-ID: <008801d1189c$48dbe370$da93aa50$@samsung.com> References: <1445931608-8824-1-git-send-email-p.fedin@samsung.com> <20151105152440.GF5819@cbox> <002601d11876$1bc3cf40$534b6dc0$@samsung.com> <20151106114223.GI5819@cbox> <006d01d11899$2f7932f0$8e6b98d0$@samsung.com> <563CB012.3090705@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org To: 'Marc Zyngier' , 'Christoffer Dall' Return-path: Received: from mailout3.w1.samsung.com ([210.118.77.13]:9932 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161212AbbKFOGL (ORCPT ); Fri, 6 Nov 2015 09:06:11 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NXE00HILCI9F210@mailout3.w1.samsung.com> for kvm@vger.kernel.org; Fri, 06 Nov 2015 14:06:09 +0000 (GMT) In-reply-to: <563CB012.3090705@arm.com> Content-language: ru Sender: kvm-owner@vger.kernel.org List-ID: 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? > > > > Yes, this is exactly what i think. If DEVICE bit is set, then it's somehow > > device memory and it doesn't need flashing. > > > > Or, in order to be 200% sure, we could modify the whole unmapping logic to carry > > over a flag, telling whether we are removing normal or HYP mappings. But wouldn't > > this be much more complicated? > > We could do without that complexity. Also, the test itself is wrong (see > Ard's patch that was posted this morning for the real fix). Good. Saw it, will test it on monday. Indeed, this is better than my approach, and this is what i actually wanted to do but didn't study the thing deeply enough to implement. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia