From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85913C433DB for ; Fri, 12 Mar 2021 15:44:46 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id EEA3B64FEE for ; Fri, 12 Mar 2021 15:44:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEA3B64FEE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 764CE4B364; Fri, 12 Mar 2021 10:44:45 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YdoUVOnmhJWI; Fri, 12 Mar 2021 10:44:44 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 6AF574B419; Fri, 12 Mar 2021 10:44:44 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A2E044B36A for ; Fri, 12 Mar 2021 10:44:43 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hYdHtr1HTbOD for ; Fri, 12 Mar 2021 10:44:42 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id BB2964B364 for ; Fri, 12 Mar 2021 10:44:42 -0500 (EST) 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 BF86864FDC; Fri, 12 Mar 2021 15:44:40 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lKjxu-001Fuj-NY; Fri, 12 Mar 2021 15:44:38 +0000 MIME-Version: 1.0 Date: Fri, 12 Mar 2021 15:44:38 +0000 From: Marc Zyngier To: Andrew Jones Subject: Re: [PATCH v3 2/2] KVM: arm64: Fix exclusive limit for IPA size In-Reply-To: <20210311111500.uqy4lolxtp7t4xd4@kamzik.brq.redhat.com> References: <20210311100016.3830038-1-maz@kernel.org> <20210311100016.3830038-3-maz@kernel.org> <20210311111500.uqy4lolxtp7t4xd4@kamzik.brq.redhat.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <7ce8f57d2bcc19a77993fc01845ac6cb@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: drjones@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, will@kernel.org, eric.auger@redhat.com, alexandru.elisei@arm.com, kernel-team@android.com, stable@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 Cc: kernel-team@android.com, kvm@vger.kernel.org, stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon , kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 2021-03-11 11:15, Andrew Jones wrote: > On Thu, Mar 11, 2021 at 10:00:16AM +0000, Marc Zyngier wrote: >> When registering a memslot, we check the size and location of that >> memslot against the IPA size to ensure that we can provide guest >> access to the whole of the memory. >> >> Unfortunately, this check rejects memslot that end-up at the exact >> limit of the addressing capability for a given IPA size. For example, >> it refuses the creation of a 2GB memslot at 0x8000000 with a 32bit >> IPA space. >> >> Fix it by relaxing the check to accept a memslot reaching the >> limit of the IPA space. >> >> Fixes: e55cac5bf2a9 ("kvm: arm/arm64: Prepare for VM specific stage2 >> translations") > > Isn't this actually fixing commit c3058d5da222 ("arm/arm64: KVM: Ensure > memslots are within KVM_PHYS_SIZE") ? Ah, yes, that's indeed better (more backport work... ;-) Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AA52C433E0 for ; Fri, 12 Mar 2021 15:46:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6B0064FDD for ; Fri, 12 Mar 2021 15:46:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6B0064FDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0/nNRFvcsgVm1igcKjVVSGSiqlKjMj1VaDiD5a5Fn9w=; b=AQmWBRzKwovL2McNrLZeba0Tj cKuLuyiXVgQRSIv5vsiUzg/Wj6gOkbfQQGUBVSds7csZN3N5Mgu7bLduQsZiAtm49h2RrPH+XTrdi HBoLud5mlKPzmdq7uGbJdALtJyKLLquNHZLYLHMrcs5nyPNexcW2WryM4PeECSupHRjNMqD1FlKIx ULbjjD43J7KfsPfnnVjYEQ2jN2QicSugBK3eAzt5z2iBF6DEJyARS5iijF1N5ris1wAet2vW9QwgP bUUSm4MVotPW9lP8KQMLquXXlGBBeFN+Yn8CZ/89bpX0VjdGqeBnDEsfiANANOGpVG/ma4HtyGdmI 2wONMuUSg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKjy9-00BqtV-HZ; Fri, 12 Mar 2021 15:44:53 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKjxy-00Bqpn-Di for linux-arm-kernel@lists.infradead.org; Fri, 12 Mar 2021 15:44:46 +0000 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 BF86864FDC; Fri, 12 Mar 2021 15:44:40 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lKjxu-001Fuj-NY; Fri, 12 Mar 2021 15:44:38 +0000 MIME-Version: 1.0 Date: Fri, 12 Mar 2021 15:44:38 +0000 From: Marc Zyngier To: Andrew Jones Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Eric Auger , Alexandru Elisei , kernel-team@android.com, stable@vger.kernel.org Subject: Re: [PATCH v3 2/2] KVM: arm64: Fix exclusive limit for IPA size In-Reply-To: <20210311111500.uqy4lolxtp7t4xd4@kamzik.brq.redhat.com> References: <20210311100016.3830038-1-maz@kernel.org> <20210311100016.3830038-3-maz@kernel.org> <20210311111500.uqy4lolxtp7t4xd4@kamzik.brq.redhat.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <7ce8f57d2bcc19a77993fc01845ac6cb@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: drjones@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, will@kernel.org, eric.auger@redhat.com, alexandru.elisei@arm.com, kernel-team@android.com, stable@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210312_154444_484837_345B9958 X-CRM114-Status: GOOD ( 13.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-03-11 11:15, Andrew Jones wrote: > On Thu, Mar 11, 2021 at 10:00:16AM +0000, Marc Zyngier wrote: >> When registering a memslot, we check the size and location of that >> memslot against the IPA size to ensure that we can provide guest >> access to the whole of the memory. >> >> Unfortunately, this check rejects memslot that end-up at the exact >> limit of the addressing capability for a given IPA size. For example, >> it refuses the creation of a 2GB memslot at 0x8000000 with a 32bit >> IPA space. >> >> Fix it by relaxing the check to accept a memslot reaching the >> limit of the IPA space. >> >> Fixes: e55cac5bf2a9 ("kvm: arm/arm64: Prepare for VM specific stage2 >> translations") > > Isn't this actually fixing commit c3058d5da222 ("arm/arm64: KVM: Ensure > memslots are within KVM_PHYS_SIZE") ? Ah, yes, that's indeed better (more backport work... ;-) Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2449AC433E9 for ; Fri, 12 Mar 2021 15:45:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DACB765021 for ; Fri, 12 Mar 2021 15:45:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232389AbhCLPpK (ORCPT ); Fri, 12 Mar 2021 10:45:10 -0500 Received: from mail.kernel.org ([198.145.29.99]:59146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232665AbhCLPol (ORCPT ); Fri, 12 Mar 2021 10:44:41 -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 BF86864FDC; Fri, 12 Mar 2021 15:44:40 +0000 (UTC) Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1lKjxu-001Fuj-NY; Fri, 12 Mar 2021 15:44:38 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 12 Mar 2021 15:44:38 +0000 From: Marc Zyngier To: Andrew Jones Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Eric Auger , Alexandru Elisei , kernel-team@android.com, stable@vger.kernel.org Subject: Re: [PATCH v3 2/2] KVM: arm64: Fix exclusive limit for IPA size In-Reply-To: <20210311111500.uqy4lolxtp7t4xd4@kamzik.brq.redhat.com> References: <20210311100016.3830038-1-maz@kernel.org> <20210311100016.3830038-3-maz@kernel.org> <20210311111500.uqy4lolxtp7t4xd4@kamzik.brq.redhat.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <7ce8f57d2bcc19a77993fc01845ac6cb@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: drjones@redhat.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, will@kernel.org, eric.auger@redhat.com, alexandru.elisei@arm.com, kernel-team@android.com, stable@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 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 2021-03-11 11:15, Andrew Jones wrote: > On Thu, Mar 11, 2021 at 10:00:16AM +0000, Marc Zyngier wrote: >> When registering a memslot, we check the size and location of that >> memslot against the IPA size to ensure that we can provide guest >> access to the whole of the memory. >> >> Unfortunately, this check rejects memslot that end-up at the exact >> limit of the addressing capability for a given IPA size. For example, >> it refuses the creation of a 2GB memslot at 0x8000000 with a 32bit >> IPA space. >> >> Fix it by relaxing the check to accept a memslot reaching the >> limit of the IPA space. >> >> Fixes: e55cac5bf2a9 ("kvm: arm/arm64: Prepare for VM specific stage2 >> translations") > > Isn't this actually fixing commit c3058d5da222 ("arm/arm64: KVM: Ensure > memslots are within KVM_PHYS_SIZE") ? Ah, yes, that's indeed better (more backport work... ;-) Thanks, M. -- Jazz is not dead. It just smells funny...