From patchwork Fri Sep 5 12:24:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 36840 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1C06C202A1 for ; Fri, 5 Sep 2014 12:26:20 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id id10sf32904876vcb.1 for ; Fri, 05 Sep 2014 05:26:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=c0zMotP6hYRgOiVVP8fuTid6cyypfGALnav1xUERjvo=; b=X/eXE1cYhnF5JJzolPJlsFYxQGLEGWpI0EWcycpeYnlJySdCRrrnKOblimGGQtMsNL x+Vg6GwtnC8dvNla8WTt0D6dU0m/ntzaTzL2RzW7uwgp3HSvM/nMS3qCKcQMtRyfbLfP N4aa1k/W262wF4KDQ9/20xJdsm77Mhw3wwMQr84SOzuRHUBSVfD32w+RHsQs66206lrO Aj13tALi6aCNWryy/Kldp20GgMvT5crP2xf86XsWEqAX4NQS+zPctxGuaXQSqVrqTKop g4pTkfikgOkAJkpfRh+qBk1YK1laFgf/FnA7yiIVyMzCvFXkUFPs7YnANDeOIPcJw2RP SFCA== X-Gm-Message-State: ALoCoQlHhKI0Il0ZD7CgiyMsRmIljSoh0sSdl3qZl8xfh+D5fh88fZhePsBjlKJF128LRvNWN5JP X-Received: by 10.52.170.204 with SMTP id ao12mr6680063vdc.2.1409919979868; Fri, 05 Sep 2014 05:26:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.18 with SMTP id z18ls775910qge.0.gmail; Fri, 05 Sep 2014 05:26:19 -0700 (PDT) X-Received: by 10.221.61.5 with SMTP id wu5mr9928172vcb.13.1409919979719; Fri, 05 Sep 2014 05:26:19 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id vv5si391422vcb.57.2014.09.05.05.26.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 05:26:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id hy4so12036453vcb.5 for ; Fri, 05 Sep 2014 05:26:19 -0700 (PDT) X-Received: by 10.52.119.229 with SMTP id kx5mr970614vdb.40.1409919979607; Fri, 05 Sep 2014 05:26:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp74812vcb; Fri, 5 Sep 2014 05:26:19 -0700 (PDT) X-Received: by 10.224.11.212 with SMTP id u20mr8554217qau.82.1409919978738; Fri, 05 Sep 2014 05:26:18 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f33si1413278qgd.22.2014.09.05.05.26.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 05:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:57477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsan-0000Xb-FU for patch@linaro.org; Fri, 05 Sep 2014 08:26:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsZi-0008F9-JB for qemu-devel@nongnu.org; Fri, 05 Sep 2014 08:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPsZc-0006GP-IJ for qemu-devel@nongnu.org; Fri, 05 Sep 2014 08:25:10 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]:51062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPsZc-0006Eu-C6 for qemu-devel@nongnu.org; Fri, 05 Sep 2014 08:25:04 -0400 Received: by mail-we0-f182.google.com with SMTP id w62so11735786wes.41 for ; Fri, 05 Sep 2014 05:25:03 -0700 (PDT) X-Received: by 10.194.209.205 with SMTP id mo13mr14422709wjc.122.1409919903513; Fri, 05 Sep 2014 05:25:03 -0700 (PDT) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id mv14sm1807558wic.20.2014.09.05.05.25.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 05:25:02 -0700 (PDT) From: Ard Biesheuvel To: peter.maydell@linaro.org, christoffer.dall@linaro.org, qemu-devel@nongnu.org Date: Fri, 5 Sep 2014 14:24:53 +0200 Message-Id: <1409919897-360-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1409919897-360-1-git-send-email-ard.biesheuvel@linaro.org> References: <1409919897-360-1-git-send-email-ard.biesheuvel@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.182 Cc: Rob Herring , Ard Biesheuvel Subject: [Qemu-devel] [PATCH v3 2/6] target-arm: do not set do_interrupt handler for AArch64 user mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Rob Herring User mode emulation should never get interrupts and thus should not use the system emulation exception handler function. Remove the reference, and '#ifndef USER_MODE_ONLY' the function itself as well, so that we can add system mode only functionality to it. Signed-off-by: Rob Herring Signed-off-by: Ard Biesheuvel --- target-arm/cpu64.c | 2 ++ target-arm/helper-a64.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/target-arm/cpu64.c b/target-arm/cpu64.c index aa42803959be..9f88b9f4eea0 100644 --- a/target-arm/cpu64.c +++ b/target-arm/cpu64.c @@ -196,7 +196,9 @@ static void aarch64_cpu_class_init(ObjectClass *oc, void *data) { CPUClass *cc = CPU_CLASS(oc); +#if !defined(CONFIG_USER_ONLY) cc->do_interrupt = aarch64_cpu_do_interrupt; +#endif cc->set_pc = aarch64_cpu_set_pc; cc->gdb_read_register = aarch64_cpu_gdb_read_register; cc->gdb_write_register = aarch64_cpu_gdb_write_register; diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index 2e9ef64786ae..89b913ee9396 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -438,6 +438,8 @@ uint64_t HELPER(crc32c_64)(uint64_t acc, uint64_t val, uint32_t bytes) return crc32c(acc, buf, bytes) ^ 0xffffffff; } +#if !defined(CONFIG_USER_ONLY) + /* Handle a CPU exception. */ void aarch64_cpu_do_interrupt(CPUState *cs) { @@ -512,3 +514,4 @@ void aarch64_cpu_do_interrupt(CPUState *cs) env->pc = addr; cs->interrupt_request |= CPU_INTERRUPT_EXITTB; } +#endif