Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp717119oof; Tue, 25 Sep 2018 03:49:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV62xCNWHTB3HsSr0b4h5415f1u/NoTi2xgLrs2wLaQbdx9pZ0J9a/siGqlmlSaNbu+UlBaVP X-Received: by 2002:a63:1d5f:: with SMTP id d31-v6mr501339pgm.180.1537872545360; Tue, 25 Sep 2018 03:49:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537872545; cv=none; d=google.com; s=arc-20160816; b=o56mju/yTsbddvIgiNdyEObha/uReLfs907dhyycfoeQpZCGDIPxnsvriY875/bnXC 7BgwA0qtTA5Vn19RXLi5q1XOM5cqGrDysu78RZTDt90DuSo7NgNBUmFFAJgf5b/e8TVM QWVzjDHXM4DKorRSoL1BCGOyUcqo4Ucs52EcBBb3DaTbkfF4w9CPcGKXCx2qjOq8loca tfk4juVtMQEDyfzYUkc8+kowwx2BIOnoD1Bwa8q0nRJDytu9LBEbSKOHVAHEKzg4o7hd 2GkcWqhdF8/a4w85+iRFf9ErkOhATJ/zjryiadk798OudsuwHW+lnVtieX/iUoUKVIEY QiKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=DKUPcYuxXZQslxOAL/Mm8lu0Iw6Xo2a12GlJZQUF2nc=; b=wpPKjWimQDBCiVssLIfhQz5vMiPKXGuvAByNjissQT24Fq+edxPk5N9Xc9bPcEuBJg JjBr7AQ/scoKxGTavnX16wkrLTVRwpYtMzvnB1CUHnjI5vhJOh2Rt6zRhWHLXzlvmuRD 1iwc8jfiVXHCMe87vxPCekqUnTYW/j/ussWZSAipY24igv3D68lj76dK9/lyrPj/Kl8k bkTaTbz9zSlftJO7elURGuHk1ae4Kl3FN0bDE0nFkQIZZX8dUm6GCFx/EDb38q/tVO65 bNKvASKP/q1rO5L0xN3rggXeGEY1YpcDSwAKIjjVye3OI2ez77/G/2kPczZjGFhzNvzc +yVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6-v6si2074528pgi.506.2018.09.25.03.48.49; Tue, 25 Sep 2018 03:49:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728887AbeIYQzU (ORCPT + 99 others); Tue, 25 Sep 2018 12:55:20 -0400 Received: from foss.arm.com ([217.140.101.70]:48896 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727570AbeIYQzU (ORCPT ); Tue, 25 Sep 2018 12:55:20 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3D35EED1; Tue, 25 Sep 2018 03:48:23 -0700 (PDT) Received: from [10.37.9.1] (unknown [10.37.9.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C91D53F5B7; Tue, 25 Sep 2018 03:48:19 -0700 (PDT) Subject: Re: [PATCH v5 14/18] vgic: Add support for 52bit guest physical address To: Auger Eric , linux-arm-kernel@lists.infradead.org Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, marc.zyngier@arm.com, cdall@kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com, will.deacon@arm.com, catalin.marinas@arm.com, james.morse@arm.com, dave.martin@arm.com, julien.grall@arm.com, linux-kernel@vger.kernel.org, Kristina Martsenko References: <20180917104144.19188-1-suzuki.poulose@arm.com> <20180917104144.19188-15-suzuki.poulose@arm.com> From: Suzuki K Poulose Message-ID: <79adfcd4-cab0-cc29-5c12-ffcad325be70@arm.com> Date: Tue, 25 Sep 2018 11:49:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Eric On 09/21/2018 03:57 PM, Auger Eric wrote: > Hi Suzuki, > > On 9/17/18 12:41 PM, Suzuki K Poulose wrote: >> From: Kristina Martsenko >> >> Add support for handling 52bit guest physical address to the >> VGIC layer. So far we have limited the guest physical address >> to 48bits, by explicitly masking the upper bits. This patch >> removes the restriction. We do not have to check if the host >> supports 52bit as the gpa is always validated during an access. >> (e.g, kvm_{read/write}_guest, kvm_is_visible_gfn()). >> Also, the ITS table save-restore is also not affected with >> the enhancement. The DTE entries already store the bits[51:8] >> of the ITT_addr (with a 256byte alignment). >> >> Cc: Marc Zyngier >> Cc: Christoffer Dall >> Signed-off-by: Kristina Martsenko >> [ Macro clean ups, fix PROPBASER and PENDBASER accesses ] >> Signed-off-by: Suzuki K Poulose >> --- >> include/linux/irqchip/arm-gic-v3.h | 5 +++++ >> virt/kvm/arm/vgic/vgic-its.c | 36 +++++++++--------------------- >> virt/kvm/arm/vgic/vgic-mmio-v3.c | 2 -- >> 3 files changed, 15 insertions(+), 28 deletions(-) >> >> diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h >> index 8bdbb5f29494..e961f40992d7 100644 >> --- a/include/linux/irqchip/arm-gic-v3.h >> +++ b/include/linux/irqchip/arm-gic-v3.h >> @@ -357,6 +357,8 @@ >> #define GITS_CBASER_RaWaWt GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, RaWaWt) >> #define GITS_CBASER_RaWaWb GIC_BASER_CACHEABILITY(GITS_CBASER, INNER, RaWaWb) >> >> +#define GITS_CBASER_ADDRESS(cbaser) ((cbaser) & GENMASK_ULL(52, 12)) > nit GENMASK_ULL(51, 12), bit 52 is RES0 I will fix this. >> diff --git a/virt/kvm/arm/vgic/vgic-mmio-v3.c b/virt/kvm/arm/vgic/vgic-mmio-v3.c >> index a2a175b08b17..b3d1f0985117 100644 >> --- a/virt/kvm/arm/vgic/vgic-mmio-v3.c >> +++ b/virt/kvm/arm/vgic/vgic-mmio-v3.c >> @@ -364,7 +364,6 @@ static u64 vgic_sanitise_pendbaser(u64 reg) >> vgic_sanitise_outer_an); >> >> reg &= ~PENDBASER_RES0_MASK; >> - reg &= ~GENMASK_ULL(51, 48); >> >> return reg; >> } >> @@ -382,7 +381,6 @@ static u64 vgic_sanitise_propbaser(u64 reg) >> vgic_sanitise_outer_cacheability); >> >> reg &= ~PROPBASER_RES0_MASK; >> - reg &= ~GENMASK_ULL(51, 48); >> return reg; >> } >> >> > Besides looks good to me. > Reviewed-by: Eric Auger Thanks Suzuki