From patchwork Thu Apr 13 20:31:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 672842 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp1082600wrx; Thu, 13 Apr 2023 13:38:36 -0700 (PDT) X-Google-Smtp-Source: AKy350ZUtxhc4kXe+k8rGndCfZPtkFm2+rudXBkJuwGFZ+D71KzYiQspo7rGDRrK8oETbQk0t0Z3 X-Received: by 2002:ad4:5749:0:b0:5b1:a698:43c6 with SMTP id q9-20020ad45749000000b005b1a69843c6mr5677842qvx.18.1681418315931; Thu, 13 Apr 2023 13:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681418315; cv=none; d=google.com; s=arc-20160816; b=0k2OSdAQixYzTkPH7RvWI5GSeRljPlQArgjyAix9XaZAZMyNFsxDz8v6+TNYyqxRQP uV7Pk0vzuXPE6Q8ktafxO6rykaWHwy1/IfhW4KRAcmPYWLmGJndBWj4NiucS4MQHwsDO jeHLzzMGjLI3sOuFinz1utHNY4Y6OVH8ZLmkK4powBfcx7j7XVz179hORE16vYm3rFDt t1LbU/Ag5CMA3uvn2boZU8GXHME9UvDjZ++VmfhfFcAhGeWyeWZ9PYBUCCV5moFHDeKg FDhuSZfHbjQki3Mtd1TjVAd8gTtA/AoszmGbAVvuQiNm+rQv0vN0rWROIxzFGwDlbIKu hOBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Kkt6YoU5LK9nyBJn79PnmjsMW4TAK91NH/i08vXuB9c=; b=skcXtcnw2aWiARQxKwEfK5nlSokqZ7H/eT5yNGRGgNHtxKVGRiWR/d3kqsbJnt+Yau FAK1tXr5KqLV0YCprDm3CFrAtn2xF68YnUCrNGL0BiuqkDaglj8RDjjSKvTG2CTmds6/ YX31hZeui8PfSTo7yu/uZCMsYsvYjMyo6Ftz2wrqrw1gMOTgR+IDTDyQ2KwoiGOS6bKF LkRlaed67/dstcAlrNDWNey+wL8WhswQPj++cnxHkM6QKiBU0X7rnBr2P4eVmDe+OuzF +Isu0HvvMnKc6zN3PFAD1QrUwzexCYy1yQKB6pxvAlcXDFXxQA49a8DFA/GNfP6Knwd5 KyEw== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jz15-20020a0562140e6f00b0056ec0727a45si1458464qvb.285.2023.04.13.13.38.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Apr 2023 13:38:35 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pn3c6-0003mu-8m; Thu, 13 Apr 2023 16:32:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3bv-0003gc-Ld; Thu, 13 Apr 2023 16:32:05 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3bs-0003jh-Ix; Thu, 13 Apr 2023 16:32:03 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B882840132; Thu, 13 Apr 2023 23:31:55 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 5047795; Thu, 13 Apr 2023 23:31:54 +0300 (MSK) Received: (nullmailer pid 2344343 invoked by uid 1000); Thu, 13 Apr 2023 20:31:54 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Tokarev Subject: [PATCH 07/21] target/s390x: Split out gen_ri2 Date: Thu, 13 Apr 2023 23:31:19 +0300 Message-Id: <20230413203143.2344250-7-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230413203051.2344192-1-mjt@tls.msk.ru> References: <20230413203051.2344192-1-mjt@tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 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 From: Richard Henderson Use tcg_constant_i64. Adjust in2_mri2_* to allocate a new temporary for the output, using gen_ri2 for the address. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit bdbc87e323ee417735141ed2b11dab0091b57593) Signed-off-by: Michael Tokarev --- target/s390x/tcg/translate.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 9c3ee5ed72..ab60b51e31 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -5962,9 +5962,14 @@ static void in2_a2(DisasContext *s, DisasOps *o) } #define SPEC_in2_a2 0 +static TCGv gen_ri2(DisasContext *s) +{ + return tcg_constant_i64(s->base.pc_next + (int64_t)get_field(s, i2) * 2); +} + static void in2_ri2(DisasContext *s, DisasOps *o) { - o->in2 = tcg_const_i64(s->base.pc_next + (int64_t)get_field(s, i2) * 2); + o->in2 = gen_ri2(s); } #define SPEC_in2_ri2 0 @@ -6059,29 +6064,29 @@ static void in2_mri2_16s(DisasContext *s, DisasOps *o) static void in2_mri2_16u(DisasContext *s, DisasOps *o) { - in2_ri2(s, o); - tcg_gen_qemu_ld16u(o->in2, o->in2, get_mem_index(s)); + o->in2 = tcg_temp_new_i64(); + tcg_gen_qemu_ld16u(o->in2, gen_ri2(s), get_mem_index(s)); } #define SPEC_in2_mri2_16u 0 static void in2_mri2_32s(DisasContext *s, DisasOps *o) { - in2_ri2(s, o); - tcg_gen_qemu_ld32s(o->in2, o->in2, get_mem_index(s)); + o->in2 = tcg_temp_new_i64(); + tcg_gen_qemu_ld32s(o->in2, gen_ri2(s), get_mem_index(s)); } #define SPEC_in2_mri2_32s 0 static void in2_mri2_32u(DisasContext *s, DisasOps *o) { - in2_ri2(s, o); - tcg_gen_qemu_ld32u(o->in2, o->in2, get_mem_index(s)); + o->in2 = tcg_temp_new_i64(); + tcg_gen_qemu_ld32u(o->in2, gen_ri2(s), get_mem_index(s)); } #define SPEC_in2_mri2_32u 0 static void in2_mri2_64(DisasContext *s, DisasOps *o) { - in2_ri2(s, o); - tcg_gen_qemu_ld64(o->in2, o->in2, get_mem_index(s)); + o->in2 = tcg_temp_new_i64(); + tcg_gen_qemu_ld64(o->in2, gen_ri2(s), get_mem_index(s)); } #define SPEC_in2_mri2_64 0 From patchwork Thu Apr 13 20:31:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 672840 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp1081434wrx; Thu, 13 Apr 2023 13:35:13 -0700 (PDT) X-Google-Smtp-Source: AKy350ZQChlVNa2woeAqwLNUpeVlsC1xZsFXyf7sBzCpru/AsTaPC1aWG9wiR63GEAVS8vwejvzh X-Received: by 2002:a05:6214:2624:b0:5e6:ceb5:7981 with SMTP id gv4-20020a056214262400b005e6ceb57981mr5668156qvb.51.1681418112849; Thu, 13 Apr 2023 13:35:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681418112; cv=none; d=google.com; s=arc-20160816; b=EdPTq0iekXaSaBDEMwD40TPLH1XPHXxxC/5GGdF7rCZkJ/8y8b2DNoa5i+nt5mQePg uTBaTMdVYLBpjnlaM3pslQtn+NIkXDR5rQtbWjRLJMCvSIoM5rFirNBi4N/uYSbsuRIA RpjfzSOS3YE3g19H2wYXP+8TlxWqNmoZ6iLptMsOobPptLn4gECjEYLs53uS47GTE/3Y DWXnMcJ0PMVqw76Y5SDiTN/AaeJUzf7GGbu1JsuvndYz34RrMy81oUw/UrYJX5fe65dz Nz+n02mXFLW/944kVEvU2vc0R6EDrql3SA3cC2ZJ+TYtm3+A+wLkQ6BQoMGVBlZ0LFvh tJyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=sxiOXNp8p4nD145rIAdAmBQMjZwxFTHqStYZkGZ4LsM=; b=nNjw2n5qABJojiiiiZMSV+j5Hqdq5ERejGXen1JvoBxR15DHA1Y5mbFM5vjnmby/ir KY6RCaz0wKetYOIUvYG5kLSdMXrpxvQ+q2ig/icKKF4yPdKynovJ2lgNCXh/w4uF900X Widyf1wX7BmAZqFbqn08xvJYQiSI7bgs8HKoqqZl9QWIPHZQH3RBrfVgncj/J8MVXSy4 9vN4yykSF05WU1dI8T+/rUcFPOdNdbuie//lbXdV4kA9SIQacs+jZ2Mp8yjJtYyJ9M4j XFY5ijP4POO3DUTxRU1QRvfdvHce6hqZQCDlFpUj24vTEdEU+xte/Zt7mAtKgVTENxv/ CjHw== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jm6-20020ad45ec6000000b00571a3b77862si1520963qvb.238.2023.04.13.13.35.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Apr 2023 13:35:12 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pn3cR-0003s0-JU; Thu, 13 Apr 2023 16:32:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3cP-0003qQ-ET; Thu, 13 Apr 2023 16:32:33 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3cF-0003kM-0T; Thu, 13 Apr 2023 16:32:33 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id EA00140139; Thu, 13 Apr 2023 23:31:56 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 6E24A95; Thu, 13 Apr 2023 23:31:55 +0300 (MSK) Received: (nullmailer pid 2344355 invoked by uid 1000); Thu, 13 Apr 2023 20:31:54 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Pierrick Bouvier , Konstantin Kostiuk , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Kostiantyn Kostiuk , Michael Tokarev Subject: [PATCH 12/21] qga/vss-win32: fix warning for clang++-15 Date: Thu, 13 Apr 2023 23:31:24 +0300 Message-Id: <20230413203143.2344250-12-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230413203051.2344192-1-mjt@tls.msk.ru> References: <20230413203051.2344192-1-mjt@tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 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 From: Pierrick Bouvier Reported when compiling with clang-windows-arm64. ../qga/vss-win32/install.cpp:537:9: error: variable 'hr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!(ControlService(service, SERVICE_CONTROL_STOP, NULL))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../qga/vss-win32/install.cpp:545:12: note: uninitialized use occurs here return hr; ^~ Signed-off-by: Pierrick Bouvier Fixes: 917ebcb170 ("qga-win: Fix QGA VSS Provider service stop failure") Reviewed-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Kostiantyn Kostiuk (cherry picked from commit 0fcd574b025fccdf14d5140687cafe2bc30b634f) Signed-off-by: Michael Tokarev --- qga/vss-win32/install.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index b57508fbe0..b8087e5baa 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -518,7 +518,7 @@ namespace _com_util /* Stop QGA VSS provider service using Winsvc API */ STDAPI StopService(void) { - HRESULT hr; + HRESULT hr = S_OK; SC_HANDLE manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); SC_HANDLE service = NULL; From patchwork Thu Apr 13 20:31:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 672841 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:184:0:0:0:0 with SMTP id p4csp1081840wrx; Thu, 13 Apr 2023 13:36:18 -0700 (PDT) X-Google-Smtp-Source: AKy350aXPJDz7auv9jSSJQj6S6XPUsl5s9uUfj70nlss1K5NOB9CnVyu32rd4gqINdb+MRZ7LpKg X-Received: by 2002:ac8:7dd0:0:b0:3e4:e14f:dc3c with SMTP id c16-20020ac87dd0000000b003e4e14fdc3cmr5930768qte.11.1681418178557; Thu, 13 Apr 2023 13:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681418178; cv=none; d=google.com; s=arc-20160816; b=B+AN4s/d4acUUWokpEH1TptnTVSoBzXXonFxneR864CAWpDDc7Xegyz4gPQzxnQLem hzGIbfYvVQ5/4GkMcFevWicBs2Kl3dAAZM0Ikb/6XhDVhFbQWZz0tRgGZm7ZPyrNa5cM Txkl8NLgTMV2kxcH2wGta3ORVRCRfYeYhlmnvpQD1RD/dUsKjK65J6dF8Vmm/L0xxeK8 Z6eatYLdQCJ2tHdec/sbQXuS2C5NaasCA4ZZxfD05aB+KCQFZ346xmhAZug5Kr4KJ9j/ vYzO0r83i/B7mKoxWD4WfZbvWoLqDfpPz69bYrjBbMCwM9dwcnPxj7Y04OnyaIIcBXjC MmoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=0uS+eDylZJsJKVdmPSEFgd1p/Um23vwAm/j4TpHg8Fw=; b=DZq+vtOrUk9c7DUZ+hoAs7Ht6py3nCPm0ehsSFc8jD06sP4KGA1YVIwv6NTc04/9lY V2XF1KsnmtPyCqdq8TQM04gfX5RAoMjYrAYA7ciBUJHfEOcgVKUY8efiKmtWI6L+dY+S 879dc0al7/+VMoM0Xs1ruUrAF19hRDLM9XBjC9CJMYxn6Sqc8J2VQKQmmwuQDK0XyRpr Y4AZ3K/Cfzzb5DKBWiJoB60UVhJ2wGnrHmxrEVkXaw3m3RAkQnnSePhTk2tX0Iq9nNi6 4QRIgX0tcuXJ6+AiEMM3O5pxxJ3BYh52TrB702tgtrtN9vw3SVIPD6NSTHq4jmthceOU IFTQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t19-20020a05620a451300b0074adf0d8894si377664qkp.226.2023.04.13.13.36.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Apr 2023 13:36:18 -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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pn3cq-00045M-Ib; Thu, 13 Apr 2023 16:33:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3cS-0003tT-MF; Thu, 13 Apr 2023 16:32:36 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pn3cG-0003lE-TB; Thu, 13 Apr 2023 16:32:36 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id DFD1B40142; Thu, 13 Apr 2023 23:31:57 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 66CAB223; Thu, 13 Apr 2023 23:31:56 +0300 (MSK) Received: (nullmailer pid 2344367 invoked by uid 1000); Thu, 13 Apr 2023 20:31:54 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Richard Henderson , Peter Maydell , Michael Tokarev Subject: [PATCH 18/21] target/arm: Handle m-profile in arm_is_secure Date: Thu, 13 Apr 2023 23:31:30 +0300 Message-Id: <20230413203143.2344250-18-mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230413203051.2344192-1-mjt@tls.msk.ru> References: <20230413203051.2344192-1-mjt@tls.msk.ru> MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: 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 From: Richard Henderson Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1421 Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20230227225832.816605-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell (cherry picked from commit 9094f9551df849f68d40236092d8af3ed869d093) Signed-off-by: Michael Tokarev --- target/arm/cpu.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 9aeed3c848..a9cd7178f8 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2407,6 +2407,9 @@ static inline bool arm_is_el3_or_mon(CPUARMState *env) /* Return true if the processor is in secure state */ static inline bool arm_is_secure(CPUARMState *env) { + if (arm_feature(env, ARM_FEATURE_M)) { + return env->v7m.secure; + } if (arm_is_el3_or_mon(env)) { return true; }