From patchwork Mon Sep 1 11:55:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 384795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 215501401B5 for ; Mon, 1 Sep 2014 21:56:33 +1000 (EST) Received: from localhost ([::1]:59672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOQDn-00064x-Bq for incoming@patchwork.ozlabs.org; Mon, 01 Sep 2014 07:56:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOQD7-0004zl-K7 for qemu-devel@nongnu.org; Mon, 01 Sep 2014 07:55:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOQD1-0001hR-2Z for qemu-devel@nongnu.org; Mon, 01 Sep 2014 07:55:49 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:53902) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOQD0-0001hA-NB for qemu-devel@nongnu.org; Mon, 01 Sep 2014 07:55:42 -0400 Received: by mail-wi0-f176.google.com with SMTP id bs8so12422198wib.15 for ; Mon, 01 Sep 2014 04:55:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c0zMotP6hYRgOiVVP8fuTid6cyypfGALnav1xUERjvo=; b=CkSUoAEgKn1Q+4eFwW+TMxEhlG53BjQCarzzRE48isMJcl417DYr6XNpuve1L9gr+1 oxDC+kl+sSds2n7hatH+PObyzsaFTLexWdEDYXzoPWXQMTJPAyecrL/HZYb6aFWdrrX1 Ifw+HcbjJFDJ/1KHCgVblPw47Gca6o4H/vLdJ9xAlbOT66A1pfjwuSVSzqe4/x5XYqKH Ja2J5743YeuHlvPZJAIq2s7TR0Y8YJB8nrFWRWD9gmTgCYHWWNQ3anFVOY0TWpmKt/gA maGv7a86W3ozBvib6wWQUMKD9TF8JNtKSk0xCm39WJpgj/f/KpgFXLpGQ9921lVlQB1Y tnWw== X-Gm-Message-State: ALoCoQk8FOUncR/91gurQHdENdM6BpRwHboRF0Fy9lENoWpuFAb9EqDP/EiQEDB5/CiNZXfzS61G X-Received: by 10.180.21.101 with SMTP id u5mr20821197wie.68.1409572541975; Mon, 01 Sep 2014 04:55:41 -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 mz16sm23997986wic.13.2014.09.01.04.55.40 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Sep 2014 04:55:41 -0700 (PDT) From: Ard Biesheuvel To: qemu-devel@nongnu.org, peter.maydell@linaro.org, rob.herring@linaro.org Date: Mon, 1 Sep 2014 13:55:26 +0200 Message-Id: <1409572529-14897-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1409572529-14897-1-git-send-email-ard.biesheuvel@linaro.org> References: <1409572529-14897-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: 209.85.212.176 Cc: Ard Biesheuvel Subject: [Qemu-devel] [PATCH v2 2/5] 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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