From patchwork Thu Nov 23 18:32:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 119541 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp1173227edl; Thu, 23 Nov 2017 10:34:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMY9WMbsO1TbVI62qjKEd6w13NJ5rl5s3wOYPLsfWvDasHfdfNMZy0pR3i6YiocQOxrgCGUG X-Received: by 10.36.6.142 with SMTP id 136mr12439444itv.121.1511462068772; Thu, 23 Nov 2017 10:34:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511462068; cv=none; d=google.com; s=arc-20160816; b=aUQalmEoEbZ4YIqlz6ewv4vLB7A+mq3Fqo8Csc3yK9WTEHPz2bylS5/wLIpu3fS1Z/ 4BiOgnuScuHutk4Y8Ah3zER2neaxc+Y6DRLadomr5vPNmFWUVgZG+8HIXOeipTxqqdDX HML7jnEoT3kgoM3yHngZEH7xiyDQUNUJOvfzrVDs0Y2mVU2zyMo4/BtUoZTS4pv8+zxN mxT4pKD1QwEtIqTs2YS0SL2YRhA9uyDRLMFHG2bcepewYlEUSwDDilOIq0W8EltoDWop jM7GPRb9h9zPugNI3YuI2Ok1ijL3LSmH2xc5/e7IFA1krll1pQN0iSn70Eys2k0A2yQW qWkQ== 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 :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=6LhMJKC/wcBToDppIdKP1iR8KY/UfLD1z560tWD8dYU=; b=AFNSWqObpoB14oV0kqSkVhi6gXp+gr/V5X0Fq16bKYWGBBBtUhdrU1f0v1utF3UfhA Mmbwv9JA4XwhN3DOtVnJSUxNPJbKkruUVVDIGHmHpy+ZoWRlspf0D4r0CiPCfJA2lhNC GcVxPgctFa3xMzThEcuK0R5AKP5LLmYhedc9zLhtRlLZZErFgXRT4wc6qRFtJKvlC1Ev k3dwjmXJ7fsiqaoAir64TgYKFFsX+EYYOuS0EGk7yJpBpz7X537ruuGjgkeINOOGqX5m nYyDqqQ/zV23FaTpjnaymlbF2M+ILoQM/o5Kf+F9bgkGS0ZsybB5zpUnvw0VLL4Ciu6w tMpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WjB3uVav; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id m128si14679951ioa.343.2017.11.23.10.34.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 10:34:28 -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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WjB3uVav; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHwIY-0005On-NM; Thu, 23 Nov 2017 18:32:30 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHwIX-0005Ll-LF for xen-devel@lists.xen.org; Thu, 23 Nov 2017 18:32:29 +0000 Received: from [85.158.143.35] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-4.bemta-6.messagelabs.com id 65/B8-08078-D34171A5; Thu, 23 Nov 2017 18:32:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFIsWRWlGSWpSXmKPExsVyMbThsK6NiHi Uwe6lMhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8avm+dZC16LVExe/IypgXGXQBcjF4eQwARG iTf7Z7GAOCwC85glWt5fYQJxJAT6WSXaPy9j7WLkBHLyJB5M6WSDsNMkNl08yAJhV0uc+PKQv YuRA2iUmsSaN1EgYSGBPiaJ81srQcJsAjoS62bUgoRFBKQlrn2+zAhiMwvESzyeeh1sorBAqM S/HXMYQcpZBFQlNjyrBAnzCthKzOpfxgyxSF5iV9tFsGM4geJHD3xghlhqI/H5s+IERsEFjAy rGDWKU4vKUot0jQz0kooy0zNKchMzc3QNDcz0clOLixPTU3MSk4r1kvNzNzECQ40BCHYw/loW cIhRkoNJSZRX5pdYlBBfUn5KZUZicUZ8UWlOavEhRhkODiUJ3iQh8SghwaLU9NSKtMwcYNDDp CU4eJREeLeDpHmLCxJzizPTIVKnGO05Lty59IeJ48CeW0Dy2czXDcwc0662NjELseTl56VKif NuBmkTAGnLKM2DGwqL0kuMslLCvIxAZwrxFKQW5WaWoMq/YhTnYFQS5t0EMoUnM68EbvcroLO YgM76eVwY5KySRISUVAPj6v1rfvXMWP+05Nvlw1yVimLTCxc7LFc6u33lvaL6nI5o766y24se PNpqxpK3iz/nTFhUip7mrO3bcxRbn32Sf112zrzwkTFbzI9OCz7d6Q+3ya9eV1z5QaKx75IOt 3lT/RaBe+53vyfMyZxmkMu34/7+3MAv9is965Tm7V4ttpjpDJu/aqytEktxRqKhFnNRcSIAN9 NKhc0CAAA= X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-14.tower-21.messagelabs.com!1511461948!76719303!1 X-Originating-IP: [209.85.128.195] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 35568 invoked from network); 23 Nov 2017 18:32:28 -0000 Received: from mail-wr0-f195.google.com (HELO mail-wr0-f195.google.com) (209.85.128.195) by server-14.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 23 Nov 2017 18:32:28 -0000 Received: by mail-wr0-f195.google.com with SMTP id 55so2039884wrx.0 for ; Thu, 23 Nov 2017 10:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fSagf4D63ts2OU9nYBVJZgUUAL8mdkjoXuy9Ln/jkC8=; b=WjB3uVavVv8tmv9AfDds9b5mHqce9m/UPbihyyIx836jkYHRX9PY/cHSo+xkQ3VJh+ M4wW+1goVydgllBsRiXYMh2CVik54gyOxkH4fRgAsnQ8cW2x9xilch+4PIBBRfxZqgJU 1OT9FDF9/1JZ+ownI/wbpnwu184XpI0ttkwH4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fSagf4D63ts2OU9nYBVJZgUUAL8mdkjoXuy9Ln/jkC8=; b=h04T5jqLEgLUjWUNqyaz+6KdEiMXkod2YIaJjuhmn9SSARwLtaKZQ5bJFqI62ttynN sHPnbVvRNDDeCWUNi4BR2+auF6kvWf7clA5A4XZ/q3X3IuuqrWootwDy7oRop7DutEQf HJc8viw0Zqbsh6T2iu4dcjfnWdx8Xb7kRoloiG+7jQ9oz6j8rNi1PNkdHzivX5BJbNpH h9NxnBD9NNV3f/RmDQ6Igqlf8hNv2J/yP8zga2BI0xvqA/dLcF68rjEUvt2UR2auUK4P DUrZB/fata0dOqkWMb+xZau8W/DpawcHrxmnBEBxdyCaRbnDJHiqQYLUFdKwEfy7dOUC CQmg== X-Gm-Message-State: AJaThX41ryefJw+hNRSkCekv2MEU6a1n46hll2kAeCNhcCsArjmryhMQ 9p/7hFD625kBpu6SdZN1QiXv/VHo+RM= X-Received: by 10.223.154.244 with SMTP id a107mr20957315wrc.8.1511461947898; Thu, 23 Nov 2017 10:32:27 -0800 (PST) Received: from e108454-lin.cambridge.arm.com ([2001:41d0:1:6c23::1]) by smtp.gmail.com with ESMTPSA id n32sm41412950wrb.62.2017.11.23.10.32.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Nov 2017 10:32:27 -0800 (PST) From: Julien Grall To: xen-devel@lists.xen.org Date: Thu, 23 Nov 2017 18:32:08 +0000 Message-Id: <20171123183210.12045-15-julien.grall@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171123183210.12045-1-julien.grall@linaro.org> References: <20171123183210.12045-1-julien.grall@linaro.org> Cc: sstabellini@kernel.org, Julien Grall , andre.przywara@linaro.org Subject: [Xen-devel] [PATCH for-next 14/16] xen/arm: traps: Remove the field gva from mmio_info_t X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" mmio_info_t is used to gather information in order do emulation a region. Guest virtual address is unlikely to be a useful information and not currently used. So remove the field gva from mmio_info_t and replace by a local variable. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/traps.c | 13 +++++++------ xen/include/asm-arm/mmio.h | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index f6f6de3691..e30dd9b7e2 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2001,6 +2001,7 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs, { const struct hsr_dabt dabt = hsr.dabt; int rc; + vaddr_t gva; mmio_info_t info; uint8_t fsc = hsr.dabt.dfsc & ~FSC_LL_MASK; mfn_t mfn; @@ -2014,13 +2015,13 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs, info.dabt = dabt; - info.gva = get_hfar(true /* is_data */); + gva = get_hfar(true /* is_data */); if ( hpfar_is_valid(dabt.s1ptw, fsc) ) - info.gpa = get_faulting_ipa(info.gva); + info.gpa = get_faulting_ipa(gva); else { - rc = gva_to_ipa(info.gva, &info.gpa, GV2M_READ); + rc = gva_to_ipa(gva, &info.gpa, GV2M_READ); /* * We may not be able to translate because someone is * playing with the Stage-2 page table of the domain. @@ -2041,7 +2042,7 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs, .kind = dabt.s1ptw ? npfec_kind_in_gpt : npfec_kind_with_gla }; - p2m_mem_access_check(info.gpa, info.gva, npfec); + p2m_mem_access_check(info.gpa, gva, npfec); /* * The only way to get here right now is because of mem_access, * thus reinjecting the exception to the guest is never required. @@ -2078,8 +2079,8 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs, } gdprintk(XENLOG_DEBUG, "HSR=0x%x pc=%#"PRIregister" gva=%#"PRIvaddr - " gpa=%#"PRIpaddr"\n", hsr.bits, regs->pc, info.gva, info.gpa); - inject_dabt_exception(regs, info.gva, hsr.len); + " gpa=%#"PRIpaddr"\n", hsr.bits, regs->pc, gva, info.gpa); + inject_dabt_exception(regs, gva, hsr.len); } static void enter_hypervisor_head(struct cpu_user_regs *regs) diff --git a/xen/include/asm-arm/mmio.h b/xen/include/asm-arm/mmio.h index c620eed4cd..37e2b7a707 100644 --- a/xen/include/asm-arm/mmio.h +++ b/xen/include/asm-arm/mmio.h @@ -29,7 +29,6 @@ typedef struct { struct hsr_dabt dabt; - vaddr_t gva; paddr_t gpa; } mmio_info_t;