From patchwork Sat Oct 1 10:05:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9359127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 839E86075E for ; Sat, 1 Oct 2016 10:17:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BE002984D for ; Sat, 1 Oct 2016 10:17:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C07D29851; Sat, 1 Oct 2016 10:17:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD3062984D for ; Sat, 1 Oct 2016 10:17:08 +0000 (UTC) Received: from localhost ([::1]:54967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHLv-0005Zc-TA for patchwork-qemu-devel@patchwork.kernel.org; Sat, 01 Oct 2016 06:17:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCQ-00067w-6d for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqHCP-0007dp-8X for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:18 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:32823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCP-0007dJ-1t for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:17 -0400 Received: by mail-wm0-x243.google.com with SMTP id p138so6757973wmb.0 for ; Sat, 01 Oct 2016 03:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ta0YY8zH0vzs3siaDb7w5dhfF+3lwu7yLJBoboKte+s=; b=XLGM6wfq6I8f3t4O31ximC0jUd8mzm2OyAFH5hpUElALK4GjkZQcflHTv+HIDDvxIp RV0Cpq5OSC7Ehumg61hufE3CFC5WvVvbNr2RjC0n2t8kJd6F30L4y/KUaztw0p86h3YP cfaC6fQYEqeiQhEpBTU8UtX8K+JzUCt9bpcoaw8nsOVvh7QVVcA1tJyQC65amT97Qxne xUiueroaiWY9skrzcHYH1WvtVyfLPWEbpakjzh6r12Dm7tY3weViYHaowl41B7xM9jfo D910/SxFoUARS8HsSfSCRkvI55F99IycAZlx9gA1me61UvSFSrc874JRnksGp4ofhPG/ X+1A== 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=Ta0YY8zH0vzs3siaDb7w5dhfF+3lwu7yLJBoboKte+s=; b=TbJBFyf6EbjDg98/MgGUTVXYwNMmqEyTJSlkP01KsjpJ/8QY0dxJNrrJSjlx7hXkQJ pBS6ULEtgI3lUDmU3Adb6QtELkwlOhrQEcNxsoC0uFIxLeig/K3q/OCgMWyaboKiVYd7 cA+1A9q3FCiwQf8EbhK/I7PraN2gTdsJlr6/JVcdYvnSD0jTdiCZp1aAAbu/78Ld3YQP p9YOvaViuDfttjxRuRijiSMS3/HTIdDtVZc/Qhgl7bmgCrs38vW7Qtn/LNb2/Go5N05A Q4agFUXhh5q3LA3gQP0NtAM0K2ep0PjNyeoOS+P4N+CzxdW6qO9DTjaoiln2bbZ3qGRd uMWg== X-Gm-Message-State: AA6/9RneVfXZHkRQ/C8hikdSTX82r3UElLZPsGVqP5D5HHcDVNhoY44tWpQPLqqwrm3UZw== X-Received: by 10.194.112.68 with SMTP id io4mr9597317wjb.1.1475316436515; Sat, 01 Oct 2016 03:07:16 -0700 (PDT) Received: from localhost (x55b4da19.dyn.telefonica.de. [85.180.218.25]) by smtp.gmail.com with ESMTPSA id a5sm23989605wjd.9.2016.10.01.03.07.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Oct 2016 03:07:15 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Sat, 1 Oct 2016 12:05:13 +0200 Message-Id: <1475316333-9776-10-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH 09/29] target-sparc: hypervisor mode takes over nucleus mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Artyom Tarasenko --- target-sparc/cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 0b5c79f..fbeb8d7 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -699,10 +699,10 @@ static inline int cpu_mmu_index(CPUSPARCState *env1, bool ifetch) #elif !defined(TARGET_SPARC64) return env1->psrs; #else - if (env1->tl > 0) { - return MMU_NUCLEUS_IDX; - } else if (cpu_hypervisor_mode(env1)) { + if (cpu_hypervisor_mode(env1)) { return MMU_HYPV_IDX; + } else if (env1->tl > 0) { + return MMU_NUCLEUS_IDX; } else if (cpu_supervisor_mode(env1)) { return MMU_KERNEL_IDX; } else {