Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753256AbaDCRHf (ORCPT ); Thu, 3 Apr 2014 13:07:35 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:45588 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752941AbaDCRHc (ORCPT ); Thu, 3 Apr 2014 13:07:32 -0400 MIME-Version: 1.0 In-Reply-To: <533D7D8B.2030806@arm.com> References: <1396538266-13245-1-git-send-email-eric.auger@linaro.org> <533D7D8B.2030806@arm.com> Date: Thu, 3 Apr 2014 10:07:30 -0700 Message-ID: Subject: Re: [PATCH] ARM: KVM: Handle IPA unmapping on memory region deletion From: Christoffer Dall To: Marc Zyngier Cc: Eric Auger , "eric.auger@st.com" , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "patches@linaro.org" , "christophe.barnichon@st.com" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3 April 2014 08:26, Marc Zyngier wrote: > Hi Eric, > > On 03/04/14 16:17, Eric Auger wrote: >> Currently when a KVM region is removed using >> kvm_vm_ioctl_set_memory_region (with memory region size equal to 0), the >> corresponding intermediate physical memory is not unmapped. >> >> This patch unmaps the region's IPA range in >> kvm_arch_commit_memory_region using unmap_stage2_range. >> >> The patch was tested on QEMU VFIO based use case where RAM memory region >> creation/deletion frequently happens for IRQ handling. >> >> Notes: >> - the KVM_MR_MOVE case shall request some similar addition but I cannot test >> this currently > > I think you should try to handle it anyway. I'm sure you could hack QEMU > to do this test it, but even if you don't, better plug that hole right now. > I don't think we want untested code in the kernel if we can avoid it, so I would say, either test it somehow (kvm-unit-tests ?) or print a warning...? -Christoffer -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/