From patchwork Thu Mar 26 19:31:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foley X-Patchwork-Id: 184913 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp473316ilr; Thu, 26 Mar 2020 13:06:12 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsbzLeCE245oT04/2INjcwe0kkqBQ8YKyZ0b1Ltv1m4UBe8iRUQlMrDtEUiFmhGO2xylYRT X-Received: by 2002:ac8:3f62:: with SMTP id w31mr10337460qtk.171.1585253171888; Thu, 26 Mar 2020 13:06:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585253171; cv=none; d=google.com; s=arc-20160816; b=YJ52zOC3AD6jor6UzXluyQiB8RCA8hUvCw4brrL+pPjoq0DfLNLS7NoZErWo3hz1y3 gudd34o82GFCkUZCz52p4JqYs0jRjmNcHsugCD9sbsgwwe6KkduGvAzjCWlc2j0+C3ZQ WZP+L9c4TdicwkAi/gohIyDBm7MA997e7+2EIM+WLQjGtcrrQayXvWM1JlpaVKV0Mec1 7qQDRyePnL5sS8aTugEq397bDGEzQqtYyc3sR26b+o20jQHKp9urQ6hgNNx/VhmqlyQU xcRyEr6sVb+TvAeEr7vEcCHo0cetL2ws6A/6+VSFq1nSqDz1Eu4TAqjXV9hpbVxuQ7dm TCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=/LwMHVS2K3ViBvzIzyA4NKWMVEXcm6p526cQcn7ef0M=; b=hs8DPrggjyBZ8yj3+Z0Fh135ULTyJWnbjVh9on0W4tTbtaSomz/PGRQKr2jlFJ6Fiu Y9CVejauhou4lhLE8P24Ol0rL1skvGn+9uuDvjVSjeZECGt2ILdj3cM42Dbz0kQFbYWI bIxOghapL7SbCUqOCzZ/lWyR4Tiay8BWClpGcRBc9UyF31Texxuwe0k6Ti/MeRPJCRzo CuUhsokj3Vn0yn90UXpCMXqbjudO6BF/VZbPhGg9uTGfnFF0sq0aNZa0OX2hPOgNBmoc xOLBuMGhcbcHXfHPt6gFYRDhXYKE0/I6mnFdNw8rtFhtBl/DrVlkDB4ubOf99tvtPvxn cQKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FmlNXFd0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e25si2261273qtm.138.2020.03.26.13.06.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Mar 2020 13:06:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FmlNXFd0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHYlX-0007lj-CX for patch@linaro.org; Thu, 26 Mar 2020 16:06:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59065) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHYKs-0007Mb-D0 for qemu-devel@nongnu.org; Thu, 26 Mar 2020 15:38:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHYKq-0001wV-O6 for qemu-devel@nongnu.org; Thu, 26 Mar 2020 15:38:38 -0400 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:34757) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHYKq-0001wH-Kp for qemu-devel@nongnu.org; Thu, 26 Mar 2020 15:38:36 -0400 Received: by mail-qt1-x832.google.com with SMTP id 10so6558545qtp.1 for ; Thu, 26 Mar 2020 12:38:36 -0700 (PDT) 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=/LwMHVS2K3ViBvzIzyA4NKWMVEXcm6p526cQcn7ef0M=; b=FmlNXFd0SRVVZ7i48swP8G9E1xRBrUv8TX+A48RWqR47+YC6OasE2cYR5AkNjID8U5 o9F50p9UavJKZ/4zkL4LO/uFZqSgm6yIt1er0hduU/J0iO35vTUNsFBce1L3Ey6nxUaQ Xo5GfgcKe8bI0c/606VnIVenNrALl7Iko4RttX6ToT0WpAJp9rAbmAi4KJA1Vwc4wH4i Ks9j57Oiu197EOIx+WeKEJo7Sq+DOFrC7W/LaK8ZF0GJic8YbWZMpOPD+XY0IEcThrvx BQZOB3Deh3g5iJKf0PtMr11Oh24D+eTff2wSDeheS7RcQhSe1cF4iNi6BrwugKWYAdIK nLHA== 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=/LwMHVS2K3ViBvzIzyA4NKWMVEXcm6p526cQcn7ef0M=; b=KqKCInl3+5J6+dJ1J34R3rP2DyOKutEUNQaQuwKgyxd8Q+v7k/wCA7h5KyEAT3NHpt zu11wzRhUFNFo0mTKDxGSqyzHbQZCukFT4dAg3zqyNJXwHIZAJ31tydV9tbl9i43dxFX +MFTzLRxNvFKATmePTbMs64uuP3laygaSJXAfSZz6AfLt/hSb+7antHiql/dHyjCvmmw wo4iRkSFuLcjkYhzurC+vp7GZaxxDEibxm9X590hUeD14ePNrA7HfBDUrZ56Hp5tYjvP g7p88wmc+0kNRfJlgVGuFAootwm7YVc9bjfKIqRgJc3V/Z+qqmLjtpprjyIbdUL7/NJh L/gw== X-Gm-Message-State: ANhLgQ2ENRQBNFrCHWXhlyRhUUvht8J67qnmPrQ8mD0nrQBATruc6fi1 4oDfm1QqmL564u14HaKwGeJEvnM+28C71Q== X-Received: by 2002:ac8:6991:: with SMTP id o17mr10042670qtq.292.1585251515732; Thu, 26 Mar 2020 12:38:35 -0700 (PDT) Received: from Rfoley-MA01.hsd1.ma.comcast.net ([2601:199:4480:60c0:fd55:4e67:1038:8302]) by smtp.gmail.com with ESMTPSA id u51sm2161916qth.46.2020.03.26.12.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 12:38:35 -0700 (PDT) From: Robert Foley To: qemu-devel@nongnu.org Subject: [PATCH v8 45/74] ppc: convert to cpu_interrupt_request Date: Thu, 26 Mar 2020 15:31:27 -0400 Message-Id: <20200326193156.4322-46-robert.foley@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200326193156.4322-1-robert.foley@linaro.org> References: <20200326193156.4322-1-robert.foley@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::832 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, richard.henderson@linaro.org, "Emilio G. Cota" , qemu-ppc@nongnu.org, peter.puhov@linaro.org, alex.bennee@linaro.org, David Gibson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Cc: David Gibson Cc: qemu-ppc@nongnu.org Reviewed-by: Richard Henderson Acked-by: David Gibson Signed-off-by: Emilio G. Cota [RF: Minor adjustment for new code in hvf_inject_interrupts] Signed-off-by: Robert Foley --- hw/ppc/ppc.c | 2 +- target/i386/hvf/x86hvf.c | 1 - target/ppc/kvm.c | 2 +- target/ppc/translate_init.inc.c | 14 +++++++------- 4 files changed, 9 insertions(+), 10 deletions(-) -- 2.17.1 diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 0e7386ff88..89f92c4a88 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -89,7 +89,7 @@ void ppc_set_irq(PowerPCCPU *cpu, int n_IRQ, int level) LOG_IRQ("%s: %p n_IRQ %d level %d => pending %08" PRIx32 "req %08x\n", __func__, env, n_IRQ, level, - env->pending_interrupts, CPU(cpu)->interrupt_request); + env->pending_interrupts, cpu_interrupt_request(CPU(cpu))); if (locked) { qemu_mutex_unlock_iothread(); diff --git a/target/i386/hvf/x86hvf.c b/target/i386/hvf/x86hvf.c index 892ae0e99a..68175074e4 100644 --- a/target/i386/hvf/x86hvf.c +++ b/target/i386/hvf/x86hvf.c @@ -352,7 +352,6 @@ bool hvf_inject_interrupts(CPUState *cpu_state) uint8_t vector; uint64_t intr_type; - uint32_t interrupt_request; bool have_event = true; if (env->interrupt_injected != -1) { vector = env->interrupt_injected; diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 13c6626ca7..c737b19242 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -1348,7 +1348,7 @@ static int kvmppc_handle_halt(PowerPCCPU *cpu) CPUState *cs = CPU(cpu); CPUPPCState *env = &cpu->env; - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD) && (msr_ee)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) && (msr_ee)) { cpu_halted_set(cs, 1); cs->exception_index = EXCP_HLT; } diff --git a/target/ppc/translate_init.inc.c b/target/ppc/translate_init.inc.c index 5c2f8ffa4a..8d2e668ac5 100644 --- a/target/ppc/translate_init.inc.c +++ b/target/ppc/translate_init.inc.c @@ -8540,7 +8540,7 @@ static bool cpu_has_work_POWER7(CPUState *cs) CPUPPCState *env = &cpu->env; if (cpu_halted(cs)) { - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD)) { return false; } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_EXT)) && @@ -8564,7 +8564,7 @@ static bool cpu_has_work_POWER7(CPUState *cs) } return false; } else { - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } } @@ -8702,7 +8702,7 @@ static bool cpu_has_work_POWER8(CPUState *cs) CPUPPCState *env = &cpu->env; if (cpu_halted(cs)) { - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD)) { return false; } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_EXT)) && @@ -8734,7 +8734,7 @@ static bool cpu_has_work_POWER8(CPUState *cs) } return false; } else { - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } } @@ -8904,7 +8904,7 @@ static bool cpu_has_work_POWER9(CPUState *cs) if (cpu_halted(cs)) { uint64_t psscr = env->spr[SPR_PSSCR]; - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + if (!(cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD)) { return false; } @@ -8950,7 +8950,7 @@ static bool cpu_has_work_POWER9(CPUState *cs) } return false; } else { - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } } @@ -10660,7 +10660,7 @@ static bool ppc_cpu_has_work(CPUState *cs) PowerPCCPU *cpu = POWERPC_CPU(cs); CPUPPCState *env = &cpu->env; - return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); + return msr_ee && (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD); } static void ppc_cpu_reset(DeviceState *dev)