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=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 C9FACC47096 for ; Sun, 6 Jun 2021 10:31:27 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 306AF6141E for ; Sun, 6 Jun 2021 10:31:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 306AF6141E 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 BF8A0405A9; Sun, 6 Jun 2021 06:31:26 -0400 (EDT) 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 Z-B9Hzug2s3G; Sun, 6 Jun 2021 06:31:25 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AFB4749F5D; Sun, 6 Jun 2021 06:31:25 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1390740799 for ; Sun, 6 Jun 2021 06:31:25 -0400 (EDT) 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 dL2TQ+U8dHbQ for ; Sun, 6 Jun 2021 06:31:24 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 08D3B405A9 for ; Sun, 6 Jun 2021 06:31:24 -0400 (EDT) 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 01CE4613EF; Sun, 6 Jun 2021 10:31:23 +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.2) (envelope-from ) id 1lpq3s-005kHi-V4; Sun, 06 Jun 2021 11:31:21 +0100 MIME-Version: 1.0 Date: Sun, 06 Jun 2021 11:31:20 +0100 From: Marc Zyngier To: Quentin Perret Subject: Re: [PATCH v2 4/7] KVM: arm64: Unify MMIO and mem host stage-2 pools In-Reply-To: <20210602094347.3730846-5-qperret@google.com> References: <20210602094347.3730846-1-qperret@google.com> <20210602094347.3730846-5-qperret@google.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: qperret@google.com, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com, linux-kernel@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, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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-06-02 10:43, Quentin Perret wrote: > We currently maintain two separate memory pools for the host stage-2, > one for pages used in the page-table when mapping memory regions, and > the other to map MMIO regions. The former is large enough to map all of > memory with page granularity and the latter can cover an arbitrary > portion of IPA space, but allows to 'recycle' pages. > > However, this split makes accounting difficult to manage as pages at > intermediate levels of the page-table may be used to map both memory > and > MMIO regions. Simplify the scheme by merging both pools into one. This > means we can now hit the -ENOMEM case in the memory abort path, but > we're still guaranteed forward-progress in the worst case by unmapping > MMIO regions. On the plus side this also means we can usually map a lot > more MMIO space at once if memory ranges happen to be mapped with block > mappings. > > Signed-off-by: Quentin Perret This patch fails to apply on top of -rc4. Did you use some more exotic base or, as I suspect, a development tree? Please check and respin the series if necessary. 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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham 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 C06FBC47096 for ; Sun, 6 Jun 2021 10:33:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 80EB4613EF for ; Sun, 6 Jun 2021 10:33:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80EB4613EF 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=bombadil.20210309; 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=tf3HmYwRJ1aqrCjwOoYYvQlAIxLsmhhYCx0cX+EliG8=; b=FgL/c877x51bORI5jjIlaWGhET 4iTMludscf8VePkuvSukHtP5i7z10cjs5UZ+RVaJjlmS15gow28wNfnk7oQVLSUifRLhFN0kR1pnT FMZlqbIq5ayml2RliZmCzqizJwXuUigr28tEXz1KzdHS8fcuXSa0h7VhLUAXDu0S2n8s2tFl2IvlS Vih2A/T8lv8eYUojqJaaeXt4OkG1NzOH516HFfJq56SoYht1NQRgsBXfHdAaT4CBNxlvpo3vKK68D Je+4mEYE9i8AXWYTAc+adoOjSss2+6lyPsqP8cg20WBGHQM2hN/WGuH8jGgMKwZdf7MB0ayNm8Hv1 cP+aeqEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpq3z-0007nd-2p; Sun, 06 Jun 2021 10:31:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpq3w-0007nJ-38 for linux-arm-kernel@lists.infradead.org; Sun, 06 Jun 2021 10:31:25 +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 01CE4613EF; Sun, 6 Jun 2021 10:31:23 +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.2) (envelope-from ) id 1lpq3s-005kHi-V4; Sun, 06 Jun 2021 11:31:21 +0100 MIME-Version: 1.0 Date: Sun, 06 Jun 2021 11:31:20 +0100 From: Marc Zyngier To: Quentin Perret Cc: will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/7] KVM: arm64: Unify MMIO and mem host stage-2 pools In-Reply-To: <20210602094347.3730846-5-qperret@google.com> References: <20210602094347.3730846-1-qperret@google.com> <20210602094347.3730846-5-qperret@google.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: qperret@google.com, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com, linux-kernel@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-20210606_033124_186846_994085B6 X-CRM114-Status: GOOD ( 16.00 ) 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-06-02 10:43, Quentin Perret wrote: > We currently maintain two separate memory pools for the host stage-2, > one for pages used in the page-table when mapping memory regions, and > the other to map MMIO regions. The former is large enough to map all of > memory with page granularity and the latter can cover an arbitrary > portion of IPA space, but allows to 'recycle' pages. > > However, this split makes accounting difficult to manage as pages at > intermediate levels of the page-table may be used to map both memory > and > MMIO regions. Simplify the scheme by merging both pools into one. This > means we can now hit the -ENOMEM case in the memory abort path, but > we're still guaranteed forward-progress in the worst case by unmapping > MMIO regions. On the plus side this also means we can usually map a lot > more MMIO space at once if memory ranges happen to be mapped with block > mappings. > > Signed-off-by: Quentin Perret This patch fails to apply on top of -rc4. Did you use some more exotic base or, as I suspect, a development tree? Please check and respin the series if necessary. 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=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 70F65C48BC2 for ; Sun, 6 Jun 2021 10:37:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44711613F3 for ; Sun, 6 Jun 2021 10:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbhFFKdN (ORCPT ); Sun, 6 Jun 2021 06:33:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:47302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229465AbhFFKdM (ORCPT ); Sun, 6 Jun 2021 06:33:12 -0400 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 01CE4613EF; Sun, 6 Jun 2021 10:31:23 +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.2) (envelope-from ) id 1lpq3s-005kHi-V4; Sun, 06 Jun 2021 11:31:21 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 06 Jun 2021 11:31:20 +0100 From: Marc Zyngier To: Quentin Perret Cc: will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/7] KVM: arm64: Unify MMIO and mem host stage-2 pools In-Reply-To: <20210602094347.3730846-5-qperret@google.com> References: <20210602094347.3730846-1-qperret@google.com> <20210602094347.3730846-5-qperret@google.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: qperret@google.com, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com, linux-kernel@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: linux-kernel@vger.kernel.org On 2021-06-02 10:43, Quentin Perret wrote: > We currently maintain two separate memory pools for the host stage-2, > one for pages used in the page-table when mapping memory regions, and > the other to map MMIO regions. The former is large enough to map all of > memory with page granularity and the latter can cover an arbitrary > portion of IPA space, but allows to 'recycle' pages. > > However, this split makes accounting difficult to manage as pages at > intermediate levels of the page-table may be used to map both memory > and > MMIO regions. Simplify the scheme by merging both pools into one. This > means we can now hit the -ENOMEM case in the memory abort path, but > we're still guaranteed forward-progress in the worst case by unmapping > MMIO regions. On the plus side this also means we can usually map a lot > more MMIO space at once if memory ranges happen to be mapped with block > mappings. > > Signed-off-by: Quentin Perret This patch fails to apply on top of -rc4. Did you use some more exotic base or, as I suspect, a development tree? Please check and respin the series if necessary. M. -- Jazz is not dead. It just smells funny...