Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1627202/?format=api
{ "id": 1627202, "url": "http://patchwork.ozlabs.org/api/patches/1627202/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20220505184938.351866-16-danielhb413@gmail.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20220505184938.351866-16-danielhb413@gmail.com>", "list_archive_url": null, "date": "2022-05-05T18:49:23", "name": "[PULL,15/30] target/ppc: Remove msr_ee macro", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2e34cc0d08832a631959baeee1ad9201c828c2a4", "submitter": { "id": 74265, "url": "http://patchwork.ozlabs.org/api/people/74265/?format=api", "name": "Daniel Henrique Barboza", "email": "danielhb413@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20220505184938.351866-16-danielhb413@gmail.com/mbox/", "series": [ { "id": 298671, "url": "http://patchwork.ozlabs.org/api/series/298671/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=298671", "date": "2022-05-05T18:49:09", "name": "[PULL,01/30] target/ppc: initialize 'val' union in kvm_get_one_spr()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/298671/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1627202/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1627202/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "bilbo.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20210112 header.b=kMJqNReZ;\n\tdkim-atps=neutral", "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=<UNKNOWN>)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id 4KvPMx0xLhz9sBF\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 6 May 2022 05:46:37 +1000 (AEST)", "from localhost ([::1]:48680 helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1nmhQo-0005hY-VP\n\tfor incoming@patchwork.ozlabs.org; Thu, 05 May 2022 15:46:35 -0400", "from eggs.gnu.org ([2001:470:142:3::10]:47850)\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <danielhb413@gmail.com>)\n id 1nmgYy-0003NN-LC; Thu, 05 May 2022 14:50:58 -0400", "from mail-oa1-x35.google.com ([2001:4860:4864:20::35]:39024)\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <danielhb413@gmail.com>)\n id 1nmgYw-0004gQ-Cd; Thu, 05 May 2022 14:50:55 -0400", "by mail-oa1-x35.google.com with SMTP id\n 586e51a60fabf-deb9295679so5095870fac.6;\n Thu, 05 May 2022 11:50:53 -0700 (PDT)", "from balboa.ibmuc.com (201-1-57-208.dsl.telesp.net.br.\n [201.1.57.208]) by smtp.gmail.com with ESMTPSA id\n n67-20020aca4046000000b00325cda1ff94sm917146oia.19.2022.05.05.11.50.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 05 May 2022 11:50:52 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=LBvah20Eci3anubbX1lkWP5DpEOBOGPp6xUC6Vi6VcY=;\n b=kMJqNReZ1jdUl5lLAOQtD6YIb55tm41bA+xstrxB39h9M2PknwOPatfYhWE08JCSZ4\n n/ZSU3wEIs6m8sZjHfMuozwBFJsKiqVIjOA1yDQmkUKRJFED3bi6PfyUYovRky3m3mg7\n c3pVBd+/7h5FUhGZ58xYliXJCtmZueq0Coc2tCq3VVWljDE5W3Keh5Dfg84eUVZV6qNK\n aD946r17wpCCB1gfHaBhZmHjne4aTW0lkIcT8q28VeLDI8vsEj1ftGuP5wuypHbxVNYZ\n +UpPRjSPbZVjGn7RrP1FTDA0xzAtNKtvvNm1W4RXeaKjAsC7NqBinXbMvLXvQUXPB/Sw\n SabA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=LBvah20Eci3anubbX1lkWP5DpEOBOGPp6xUC6Vi6VcY=;\n b=ow0/jkFw2JzuAlri377vlO14Oce+6pXtyksuZvfUNhA3XRbvF8vmlVexJ8zPQeyXjW\n D0x1qi/DVOZbqlf1l0kSY587HZw6KMH3vPbkUm1b+xvIym8jwaShfkV5smg1c3sw+8vg\n 76KTwpZWFpBuf5BiqBZwhL/OUI8PRbZ8STJj1dXqc/h08vUQn53Zx0L2OWjNRRyzZbiZ\n 07UA52acov10ZlMbJSB2SDS8k5QOLsBoO5m+67kMX7SbUqyWCdZNexwTjbozCY0ohKy5\n pXZd5vhavEfiBk+6eYA9HyF3zOaKDPJaNmhDb/7To5eqrJkQ+HFjgHOyhJaG4FG7smPd\n zL4w==", "X-Gm-Message-State": "AOAM533W5cQlch69oMaCgBX6Hb4u/ckTTk0oI7ffuHonCWlqE+1iKuOv\n fcQ69tpu+XFy3URsKXiLDCmp1WFvOwc=", "X-Google-Smtp-Source": "\n ABdhPJzeQCipv83ojnzIU4DoOKTQcrGa5DBXG22nHGFCMqZ8TjvNc3NpouTTjBjNkMDuXbOsRpCnhQ==", "X-Received": "by 2002:a05:6870:15d0:b0:e9:8787:60c2 with SMTP id\n k16-20020a05687015d000b000e9878760c2mr2994952oad.294.1651776652807;\n Thu, 05 May 2022 11:50:52 -0700 (PDT)", "From": "Daniel Henrique Barboza <danielhb413@gmail.com>", "To": "qemu-devel@nongnu.org", "Cc": "qemu-ppc@nongnu.org, danielhb413@gmail.com, peter.maydell@linaro.org,\n richard.henderson@linaro.org,\n =?utf-8?q?V=C3=ADctor_Colombo?= <victor.colombo@eldorado.org.br>", "Subject": "[PULL 15/30] target/ppc: Remove msr_ee macro", "Date": "Thu, 5 May 2022 15:49:23 -0300", "Message-Id": "<20220505184938.351866-16-danielhb413@gmail.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20220505184938.351866-1-danielhb413@gmail.com>", "References": "<20220505184938.351866-1-danielhb413@gmail.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2001:4860:4864:20::35;\n envelope-from=danielhb413@gmail.com; helo=mail-oa1-x35.google.com", "X-Spam_score_int": "-18", "X-Spam_score": "-1.9", "X-Spam_bar": "-", "X-Spam_report": "(-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,\n T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "From: Víctor Colombo <victor.colombo@eldorado.org.br>\n\nmsr_ee macro hides the usage of env->msr, which is a bad behavior\nSubstitute it with FIELD_EX64 calls that explicitly use env->msr\nas a parameter.\n\nSuggested-by: Richard Henderson <richard.henderson@linaro.org>\nSigned-off-by: Víctor Colombo <victor.colombo@eldorado.org.br>\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nMessage-Id: <20220504210541.115256-8-victor.colombo@eldorado.org.br>\nSigned-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>\n---\n target/ppc/cpu.h | 2 +-\n target/ppc/cpu_init.c | 15 ++++++++++-----\n target/ppc/excp_helper.c | 2 +-\n target/ppc/kvm.c | 3 ++-\n 4 files changed, 14 insertions(+), 8 deletions(-)", "diff": "diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h\nindex 0d5a850794..06667c2c60 100644\n--- a/target/ppc/cpu.h\n+++ b/target/ppc/cpu.h\n@@ -355,6 +355,7 @@ typedef enum {\n #define MSR_LE 0 /* Little-endian mode 1 hflags */\n \n FIELD(MSR, ILE, MSR_ILE, 1)\n+FIELD(MSR, EE, MSR_EE, 1)\n FIELD(MSR, PR, MSR_PR, 1)\n FIELD(MSR, DS, MSR_DS, 1)\n FIELD(MSR, LE, MSR_LE, 1)\n@@ -478,7 +479,6 @@ FIELD(MSR, LE, MSR_LE, 1)\n #define msr_gs ((env->msr >> MSR_GS) & 1)\n #define msr_pow ((env->msr >> MSR_POW) & 1)\n #define msr_ce ((env->msr >> MSR_CE) & 1)\n-#define msr_ee ((env->msr >> MSR_EE) & 1)\n #define msr_fp ((env->msr >> MSR_FP) & 1)\n #define msr_me ((env->msr >> MSR_ME) & 1)\n #define msr_fe0 ((env->msr >> MSR_FE0) & 1)\ndiff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c\nindex 0c6b83406e..10e7c41bc9 100644\n--- a/target/ppc/cpu_init.c\n+++ b/target/ppc/cpu_init.c\n@@ -5949,7 +5949,8 @@ static bool cpu_has_work_POWER7(CPUState *cs)\n }\n return false;\n } else {\n- return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);\n+ return FIELD_EX64(env->msr, MSR, EE) &&\n+ (cs->interrupt_request & CPU_INTERRUPT_HARD);\n }\n }\n \n@@ -6120,7 +6121,8 @@ static bool cpu_has_work_POWER8(CPUState *cs)\n }\n return false;\n } else {\n- return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);\n+ return FIELD_EX64(env->msr, MSR, EE) &&\n+ (cs->interrupt_request & CPU_INTERRUPT_HARD);\n }\n }\n \n@@ -6337,7 +6339,8 @@ static bool cpu_has_work_POWER9(CPUState *cs)\n }\n return false;\n } else {\n- return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);\n+ return FIELD_EX64(env->msr, MSR, EE) &&\n+ (cs->interrupt_request & CPU_INTERRUPT_HARD);\n }\n }\n \n@@ -6551,7 +6554,8 @@ static bool cpu_has_work_POWER10(CPUState *cs)\n }\n return false;\n } else {\n- return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);\n+ return FIELD_EX64(env->msr, MSR, EE) &&\n+ (cs->interrupt_request & CPU_INTERRUPT_HARD);\n }\n }\n \n@@ -7119,7 +7123,8 @@ static bool ppc_cpu_has_work(CPUState *cs)\n PowerPCCPU *cpu = POWERPC_CPU(cs);\n CPUPPCState *env = &cpu->env;\n \n- return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD);\n+ return FIELD_EX64(env->msr, MSR, EE) &&\n+ (cs->interrupt_request & CPU_INTERRUPT_HARD);\n }\n \n static void ppc_cpu_reset(DeviceState *dev)\ndiff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c\nindex 7e8e34ef06..4c206ba209 100644\n--- a/target/ppc/excp_helper.c\n+++ b/target/ppc/excp_helper.c\n@@ -1709,7 +1709,7 @@ static void ppc_hw_interrupt(CPUPPCState *env)\n * clear when coming out of some power management states (in order\n * for them to become a 0x100).\n */\n- async_deliver = (msr_ee != 0) || env->resume_as_sreset;\n+ async_deliver = FIELD_EX64(env->msr, MSR, EE) || env->resume_as_sreset;\n \n /* Hypervisor decrementer exception */\n if (env->pending_interrupts & (1 << PPC_INTERRUPT_HDECR)) {\ndiff --git a/target/ppc/kvm.c b/target/ppc/kvm.c\nindex 7a777a4d0c..db3a92869c 100644\n--- a/target/ppc/kvm.c\n+++ b/target/ppc/kvm.c\n@@ -1352,7 +1352,8 @@ static int kvmppc_handle_halt(PowerPCCPU *cpu)\n CPUState *cs = CPU(cpu);\n CPUPPCState *env = &cpu->env;\n \n- if (!(cs->interrupt_request & CPU_INTERRUPT_HARD) && (msr_ee)) {\n+ if (!(cs->interrupt_request & CPU_INTERRUPT_HARD) &&\n+ FIELD_EX64(env->msr, MSR, EE)) {\n cs->halted = 1;\n cs->exception_index = EXCP_HLT;\n }\n", "prefixes": [ "PULL", "15/30" ] }