Message ID | 20200130132558.10201-3-maz@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=dXSl=3T=vger.kernel.org=kvm-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE88D159A for <patchwork-kvm@patchwork.kernel.org>; Thu, 30 Jan 2020 13:26:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCDEF2253D for <patchwork-kvm@patchwork.kernel.org>; Thu, 30 Jan 2020 13:26:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580390773; bh=2maXhHpvHeXGT6VCr6i2o40Sa2UBf9PlCCMOh4sQSGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VgJiMuwWDKB7G5S+6iKFG+j4J6ycFAy+xRC/hB+pNodI21h9qgu5aVtycyRtG8pJa fJpnHectwHyKX6cEbUvdK2X9wMEz09asTAR9G5qEdxamHGScS7cRmwzGxL7Gpzc6tm YtbT6Csnvb9HMj0TRYzrBSNp9g9iUUtl67rZvnOk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727302AbgA3N0M (ORCPT <rfc822;patchwork-kvm@patchwork.kernel.org>); Thu, 30 Jan 2020 08:26:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:45576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbgA3N0M (ORCPT <rfc822;kvm@vger.kernel.org>); Thu, 30 Jan 2020 08:26:12 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1EF07214AF; Thu, 30 Jan 2020 13:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580390771; bh=2maXhHpvHeXGT6VCr6i2o40Sa2UBf9PlCCMOh4sQSGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=paDcUnlu5wrAO1hSeJSE3y51rYHGmDAFmBFT/2HolYFk3v5e/JHujvzyBLkp67fUn 2GXRmRuNoI1SDopDqFSJYhEW91RxC9+GCfvqF4oL9npttHjvfEY59NK+D7hKDv5kUy ZpjtHboTmX4g/kLDGvEMPszpxRKRjq/fLd6JarRs= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <maz@kernel.org>) id 1ix9ph-002BmW-FD; Thu, 30 Jan 2020 13:26:09 +0000 From: Marc Zyngier <maz@kernel.org> To: Paolo Bonzini <pbonzini@redhat.com> Cc: Alexandru Elisei <alexandru.elisei@arm.com>, Andrew Jones <drjones@redhat.com>, Andrew Murray <andrew.murray@arm.com>, Beata Michalska <beata.michalska@linaro.org>, Christoffer Dall <christoffer.dall@arm.com>, Eric Auger <eric.auger@redhat.com>, Gavin Shan <gshan@redhat.com>, Haibin Wang <wanghaibin.wang@huawei.com>, James Morse <james.morse@arm.com>, Mark Brown <broonie@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Russell King <rmk+kernel@armlinux.org.uk>, Shannon Zhao <shannon.zhao@linux.alibaba.com>, Steven Price <steven.price@arm.com>, Will Deacon <will@kernel.org>, YueHaibing <yuehaibing@huawei.com>, Zenghui Yu <yuzenghui@huawei.com>, Julien Thierry <julien.thierry.kdev@gmail.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH 02/23] KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections Date: Thu, 30 Jan 2020 13:25:37 +0000 Message-Id: <20200130132558.10201-3-maz@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200130132558.10201-1-maz@kernel.org> References: <20200130132558.10201-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: pbonzini@redhat.com, alexandru.elisei@arm.com, drjones@redhat.com, andrew.murray@arm.com, beata.michalska@linaro.org, christoffer.dall@arm.com, eric.auger@redhat.com, gshan@redhat.com, wanghaibin.wang@huawei.com, james.morse@arm.com, broonie@kernel.org, mark.rutland@arm.com, rmk+kernel@armlinux.org.uk, shannon.zhao@linux.alibaba.com, steven.price@arm.com, will@kernel.org, yuehaibing@huawei.com, yuzenghui@huawei.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org |
Series |
[01/23] KVM: arm64: Only sign-extend MMIO up to register width
|
expand
|
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c index 98c7360d9fb7..17920d1b350a 100644 --- a/virt/kvm/arm/vgic/vgic-its.c +++ b/virt/kvm/arm/vgic/vgic-its.c @@ -2475,7 +2475,8 @@ static int vgic_its_restore_cte(struct vgic_its *its, gpa_t gpa, int esz) target_addr = (u32)(val >> KVM_ITS_CTE_RDBASE_SHIFT); coll_id = val & KVM_ITS_CTE_ICID_MASK; - if (target_addr >= atomic_read(&kvm->online_vcpus)) + if (target_addr != COLLECTION_NOT_MAPPED && + target_addr >= atomic_read(&kvm->online_vcpus)) return -EINVAL; collection = find_collection(its, coll_id);