From patchwork Tue Dec 20 14:56:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 635472 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2961441pvb; Tue, 20 Dec 2022 06:58:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXtatznuXlrqVx5BJebmjrjRd5pUaDEgAAy7jcJqFedKugP7BXo9ztjceBjMYJPtAeT6M9ZF X-Received: by 2002:a05:6214:3188:b0:4c7:1a90:2297 with SMTP id lb8-20020a056214318800b004c71a902297mr16255371qvb.41.1671548280333; Tue, 20 Dec 2022 06:58:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671548280; cv=none; d=google.com; s=arc-20160816; b=ygfTH/gcIiX9G3g+UcYgZq7AMrW2d0raM8w2J/9HP35Kkg7CQGLl+q+/sxrKpXBhp6 iprXyRNMxEhfubYBTZhb/CtPR9SXTN5EGDMjwV23ROeldLwbbEeiQDzx7FNffFYp+zE/ 0eXy1fgdAiQieZwhOpbgFdJoExi2ZZDPOHjW1GpLu6TNe1Z7500RMb5D6q4e2+sFueFp 1KEBFjwZof3DgVn57dxqfIs47W8ThpaUk1TkcbEc2vTpi4poNFsujMmot7swnqucXgke KDVqe7UhmBQqJlo+GOzm6GC2gpf5T+Rv8IisRoGVEAvmLYUifipHLekqSuzgflenzoNG 4PhA== 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:dkim-signature; bh=TWYX+bkDoAyS5D4KoXYEloAhrykg6/BssqVR4T1fIB4=; b=ewpGREHhCCS0Q4LmSlUDCF0dcMwUT/gqjv1ONp6uP2D7wWxJqTDjG1+1/edxjRM6wj jpX0y3afiMk9heagvNHEA8tlEFVIzQtZI+HrWO+4uz16QuvJqespJw2m2Q8W9VnZPcz0 Bsnc5QWTIBjSbw8ht369FTH0W/NwCRRvFP5wkq/nsMyfRlm+lLi4F/IWi3SbLQg5GTV2 HX98gvJRunTtrDpAlyTG62JXU2JChDOUdZBMqZ9IRSmuXstejVvY2o7LyjcbhUH3OrEi dEzCCY1zpWs9Lr7ntNkoLT+g+e4qsriMbr3jIfRxgnXEgshAfujxJuxcHvH64ntHDfOb I56Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BWYUpPKX; 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=pass (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 ed15-20020ad44eaf000000b0052086f65de0si163169qvb.220.2022.12.20.06.58.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Dec 2022 06:58:00 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=BWYUpPKX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7e39-0006sz-O5; Tue, 20 Dec 2022 09:56:59 -0500 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 1p7e35-0006qo-Ll for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:56:55 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7e33-0004kB-Jg for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:56:54 -0500 Received: by mail-wr1-x431.google.com with SMTP id w15so11968362wrl.9 for ; Tue, 20 Dec 2022 06:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TWYX+bkDoAyS5D4KoXYEloAhrykg6/BssqVR4T1fIB4=; b=BWYUpPKXnvShEs0Oxzgi4gu5/EkBNtF4QGPbo9bocTcyBeRykHKTzEd1jJtKMG4T5Y eA3akbqhPFUS26BXPHvNrGv1y8Sz/ukl2XAtEAurmvMGy3F5rEY2PWFpLY9OqUQQ/WdU iOWn+cXUcI1omJfkQWuwPjE/u+W4A639SOg0Uu22Z4eSJQtD9071uB01PJyurDBnJiRs FgDonSF97cI/TE8ntMgvbBOC15ICHf/1f7Benf86373c7w2b1uxkAq9J6L7J9EonXNfu HQ9/nDg583oKC3HsYJZG54Yp/OWKAt88Wt6H4l8lUst0lW5aDTiBZRdFG5myTb2GNWgd IJaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TWYX+bkDoAyS5D4KoXYEloAhrykg6/BssqVR4T1fIB4=; b=mqBaRAFDrgWRCSPG3w1njdiJK7HOmIYt2s9IeY5KQ0HZugDpQHC69KAD8AhVV6HBfw 317tPKG+s7tib0A09VsAc+Kz1Fp813GFs8kUFz8uEXQByargadJGYsJdiAuEkDs8+lSp umRdHoIisdQrATon6mD9kvE+BmQyrXmL0Gc2cqorh2zqBCF8eFynHrVjOkSfyBdaHCh4 T2SyAEFVLQ5UJcWvnIZ/4Ln/6uoND6DCBGfM1BO9UO7dQNocIJwMYtCmINA128/VQk18 oLqM4HbLxEkFz/GAsQOIl+TdWli8VEGHg+b0rq5Ou7pqpOEZtLftkGGz2aQGNM3Q4s+x latg== X-Gm-Message-State: AFqh2kpi3clcUMoqk1ILnqAGmYIwUOLc2s6nsgmg9MCe+0bQYD0QGzUC +iA+IkGzl/b9ZFqY0kaH2K0ihLo70cytCLWJZiE= X-Received: by 2002:a05:6000:1f1c:b0:261:d8be:3046 with SMTP id bv28-20020a0560001f1c00b00261d8be3046mr4608817wrb.0.1671548212133; Tue, 20 Dec 2022 06:56:52 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id by14-20020a056000098e00b002366f9bd717sm15348269wrb.45.2022.12.20.06.56.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Dec 2022 06:56:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Ilya Leoshkevich , Eduardo Habkost , qemu-s390x@nongnu.org, Song Gao , Richard Henderson , David Hildenbrand , Xiaojuan Yang , Thomas Huth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 4/5] target/s390x: Restrict sysemu/reset.h to system emulation Date: Tue, 20 Dec 2022 15:56:24 +0100 Message-Id: <20221220145625.26392-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220145625.26392-1-philmd@linaro.org> References: <20221220145625.26392-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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 In user emulation, threads -- implemented as CPU -- are created/destroyed, but never reset. There is no point in allowing the user emulation access the sysemu/reset API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- target/s390x/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 96562c516d..b10a8541ff 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -26,7 +26,6 @@ #include "s390x-internal.h" #include "kvm/kvm_s390x.h" #include "sysemu/kvm.h" -#include "sysemu/reset.h" #include "qemu/module.h" #include "trace.h" #include "qapi/qapi-types-machine.h" @@ -35,6 +34,9 @@ #include "fpu/softfloat-helpers.h" #include "disas/capstone.h" #include "sysemu/tcg.h" +#ifndef CONFIG_USER_ONLY +#include "sysemu/reset.h" +#endif #define CR0_RESET 0xE0UL #define CR14_RESET 0xC2000000UL;