From patchwork Tue Dec 4 20:26:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 152855 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp8503437ljp; Tue, 4 Dec 2018 12:29:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/UwLwE8IiP8Gx93NLF1hNpMLEqtjg381X8an60DP05f/Uh1FDZ5oCGdNnPXvUUH0I5NHNsL X-Received: by 2002:a81:a0d2:: with SMTP id x201mr20975633ywg.421.1543955369178; Tue, 04 Dec 2018 12:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543955369; cv=none; d=google.com; s=arc-20160816; b=CJ3jTGiZpX2AjMelDDMXvr9GP/PUSUsAZNvfciijmEsX4Rd2Oo8RwPfXq6z5FGn4Zv CAK8440xggzZecW2jIE8rIfRI95l/piCoL25QtKUrIwIe7DPsjMuaqatKAiQXG33K6i3 aJsgYUm3A1hXIZYDF6fwMXHZOIgAqZTqIF+X5s4AH74xCYX9e8nZSokwoYrHGV4/IRe2 e209ejfumkB5pOknn7J5uS93se1uv3mx8m2eNIM1pxjxNvB9frw84EXCTNk5spl58SB7 3okvg+Y4EUXmizk+zByZy3IQd2gxlA2AzsbwdXYFTVXG0R8JpNA00fWH+JibxgctTlbM VEjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=78FJDKqks3TGQ8WayPKS0oPLTuP2kKKGxnH/VkGyk3M=; b=VDlVYQ5NMGTATTCeKhXZ7ZmcYzRk9Z+rXD64Qcs+gUsydXt5VxYZmh6PJNCkeu5GqU YOfsPncnRiCNuHqezIoP39xqAzYCbJOYAgXIZux0TyXubPyKCGOp0AYtWkmkjinS5WMd KuXgD4uKvdJ3xnk2iNdilPnhV+HBloUdncQXO8qY2B52SORIW1nfP4BIB92YJc5aMsJR NNSnkV2CVXfzOdia0kNTP5VWKa3du/zEVZ1rHMDyBztSV6NRNps3DisUBWE89hFoAue3 cFEjV8ITa+C5w2JBOc7Z3csJES0O78NoCTPGoIajwa7F7wSVqcqgDisU50xn2CqBQiYT BdqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id l37si12319048ywh.242.2018.12.04.12.29.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Dec 2018 12:29:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gUHI6-0008EF-H3; Tue, 04 Dec 2018 20:27:34 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1gUHI5-0008Ch-A2 for xen-devel@lists.xenproject.org; Tue, 04 Dec 2018 20:27:33 +0000 X-Inumbo-ID: 07414fe6-f803-11e8-bf5e-d79027609bf2 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 07414fe6-f803-11e8-bf5e-d79027609bf2; Tue, 04 Dec 2018 20:27:32 +0000 (UTC) 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 6D2A915BE; Tue, 4 Dec 2018 12:27:32 -0800 (PST) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A4C423F614; Tue, 4 Dec 2018 12:27:31 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 4 Dec 2018 20:26:48 +0000 Message-Id: <20181204202651.8836-15-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181204202651.8836-1-julien.grall@arm.com> References: <20181204202651.8836-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH for-4.12 v2 14/17] xen/arm: domctl: Use typesafe gfn in XEN_DOMCTL_cacheflush X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Julien Grall , sstabellini@kernel.org MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This will make changes in a follow-up patch easier. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Changes in v2: - Patch added --- xen/arch/arm/domctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c index c10f568aad..20691528a6 100644 --- a/xen/arch/arm/domctl.c +++ b/xen/arch/arm/domctl.c @@ -52,16 +52,16 @@ long arch_do_domctl(struct xen_domctl *domctl, struct domain *d, { case XEN_DOMCTL_cacheflush: { - unsigned long s = domctl->u.cacheflush.start_pfn; - unsigned long e = s + domctl->u.cacheflush.nr_pfns; + gfn_t s = _gfn(domctl->u.cacheflush.start_pfn); + gfn_t e = gfn_add(s, domctl->u.cacheflush.nr_pfns); if ( domctl->u.cacheflush.nr_pfns > (1U<