Message ID | 1526635630-18917-1-git-send-email-hejianet@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D9E7D602CB for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 May 2018 09:28:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8CBF2842A for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 May 2018 09:28:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD5EE28528; Fri, 18 May 2018 09:28:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B8BA2842A for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 18 May 2018 09:28:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=twdcfx/nSluge7y7XO+audtgbn7muSFsO7n7R1Lmo6U=; b=uZd GlqOfP7dQbgdc1yQJCD3mmPxGXoJkmOCZ9lMz8TZQDuj7AQgjRrz/PHImeGXy6BTXGHriPejzI+t0 9Z25gHhOqLK+C5z5CP++cAvmNesItNctRFmFxvyLuxAysaFoyBxvbqcglBlTTzvE9zXXQvVbtZKZx WZ6qVIkaO0wYdZPGr2Pf0AWTUmEqaTQfC0OxfJO8zM97VFTbvUsC6muUhSs3I3Qxh7xNakpeoC/kE GtUW8o9dALN98ZiDlgH8WEQrQlHBt4ny6W7JC0Aez/nVyYTvW0nLckUtsrbcJCTjHWO0+t3S8eQdP dTxBcVjhqzaEveNKn8gN5pTvweB2iow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJbgA-0008I2-VF; Fri, 18 May 2018 09:28:02 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJbg5-00085r-I5 for linux-arm-kernel@lists.infradead.org; Fri, 18 May 2018 09:28:01 +0000 Received: by mail-pl0-x241.google.com with SMTP id c41-v6so4248977plj.10 for <linux-arm-kernel@lists.infradead.org>; Fri, 18 May 2018 02:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3Rm3ObuFoVhjXkjbOpMsa/q2R5YfUNleyYpv/8/gWUU=; b=b6Rpqxwc5qh4FGzTrkLioNYaxn4t3UmkjSKIp042LI4O0KwAjPWME2k3ERdVTokADC 19VevBaOZAdfgqDW0AE4K/Lon2PEf0yvaGzQ8cWsIczw8FeYsBEi4sP5LcqzM+La0kD5 KlKv0HnjA+U9AZLrTE0WYayjJoz6A92D7xHDL1MVqDRkxw0MByH4Ibm9TvErbCko22mU sFvsvSwBZMEj2j1gyJV4tQ78lg/mrltRCSWRHZv07lfKuCeIyS2pUeHqu4o8klYQvp9D 5rMxrIghfXiMceYabPdYgAemuDDsjTAxbggVgnMSoB846lAwTqNtbg6chSVs/TEGPSpj ZtsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3Rm3ObuFoVhjXkjbOpMsa/q2R5YfUNleyYpv/8/gWUU=; b=dD5Gsi+wzAsbyQHrdBV++HjSgDc+pFlKJdYt+R+9SHe58F6/zTiUEsnjINxw/cKCO4 kaIU8kGTEOR9/jDMSZ8fu0J0OuZY1ACHrScZahnv34rDGcY5ZtzJQkD2G4pU5a3WxEFF S36xo1DT6xidpgZbHDlS3Q4EKTYYanihoi5H0B7jlwKX1cUbVqcRSCM883/5Zr6Bv4NE cDNnNynx96hEtr7I7kKv1kLMwHqzr+Fy2Oh0Qu3BmXJx+ifBoTiej94Ahh6z/wMUykgy yinSoHrkJGJj7+0hlCNIJZxV/g5+/N9ySyDar0VHQy1ivxZHsx466QYYpKF21xsvhFjn 5tTg== X-Gm-Message-State: ALKqPwcDKC/TlxdvgoLVWFwWpekLH3q1SG3rz2k+0eZkHz7hqxtrzRYt 84e3LHhP8bmgT2R9ap56cp8= X-Google-Smtp-Source: AB8JxZqJYU6NgqIVIeUxLTT9Ot6CugJbwjlwr69vsBYXKymeIfICnHdpY7vkoCb5JgosPNtaNphqGQ== X-Received: by 2002:a17:902:bd82:: with SMTP id q2-v6mr8716407pls.77.1526635666741; Fri, 18 May 2018 02:27:46 -0700 (PDT) Received: from ct7host.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id o10-v6sm9162338pgp.30.2018.05.18.02.27.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 02:27:46 -0700 (PDT) From: Jia He <hejianet@gmail.com> To: Christoffer Dall <christoffer.dall@arm.com>, Marc Zyngier <marc.zyngier@arm.com>, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH v2 1/2] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range Date: Fri, 18 May 2018 17:27:09 +0800 Message-Id: <1526635630-18917-1-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180518_022757_638496_7EC9AD61 X-CRM114-Status: GOOD ( 11.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: jia.he@hxt-semitech.com, Jia He <hejianet@gmail.com>, linux-kernel@vger.kernel.org, Suzuki.Poulose@arm.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c index 7f6a944..8dac311 100644 --- a/virt/kvm/arm/mmu.c +++ b/virt/kvm/arm/mmu.c @@ -297,6 +297,8 @@ static void unmap_stage2_range(struct kvm *kvm, phys_addr_t start, u64 size) phys_addr_t next; assert_spin_locked(&kvm->mmu_lock); + WARN_ON(size & ~PAGE_MASK); + pgd = kvm->arch.pgd + stage2_pgd_index(addr); do { /*