From patchwork Tue Dec 20 14:56:22 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: 635473 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2961440pvb; Tue, 20 Dec 2022 06:58:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4SH+GaCx8W2Izppqb+njTg+6yrIYmxLyh//KTe1LT3OZYW4BqY3w5clp5/zCw04zlpeFPp X-Received: by 2002:a05:622a:1743:b0:3a7:e570:8275 with SMTP id l3-20020a05622a174300b003a7e5708275mr83883345qtk.27.1671548280285; 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=ZEFm2BNu/177oOInUCPPOnBNV0SyXkz9pW56bsoGqBZ0PSWqEBkPD8jAna+iCoMx2R EEv2RHG0Iu+7p3WD5mVoTUNYsEvwwPLII7+WoOlFR2UiYOuhIYd48EbN+R9M+vUfvf8m ql44qUR5QGyUvYr6OEea7B0YTj+xHkBCwEpSr7cUbGnBJnMFGqVyumouhgcRj8V3pk3i 6TtrC9MqHtmkMqwUmA9OwvT4qlexOwOx+ypXgu+iVLIHa4mMdJ8CIsKTtkLzgqK00liH oNkJtkQFSNbYaGX9k4G4Qf9+Fp/8l0uJMGm9wQVx5gZy0R+8UZ1ncgv6WJgQ5/xloe0v a3aw== 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=+t/6/U4dDtWFou9lNwrmgxL5oJxAfHUoXJOlrPFl4Zg=; b=EuJYMh8gNEj9VZft2t2/9LqkrSLaiXi4+EgdOLmpEYsovbbFyYnd9/o5qkMWhnbJ8X 1btd1gK79kL2Q7qFmrmHDo4hCm4SKi6s9g4dhGEHu3qO6o0xJ+oWlbeDc0g72sNwMg3J bPm0yHK6Fe+16DomesGtGsQGnEQGrWV9t2jFWQf3aiq87gnBO6k0COaMpU64Vxnpn1ly hynejqZP0gJZHusqiJ0mOOGqyBOM/LdBk4fmJXA1UZmWIAYJMicytcedVdBUtcw1HyfD WSCHJz0paotcF82yG2TGORni6OPmsERH/Se2qvpoCt3ts0wqOjLuqKMjwd8u1Bj3Mn6q 3IeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nwDkckVm; 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 m9-20020ac84449000000b003a81f5be2b9si5166420qtn.293.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=nwDkckVm; 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 1p7e2u-0006hb-LN; Tue, 20 Dec 2022 09:56:44 -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 1p7e2t-0006gI-Ux for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:56:43 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7e2r-0004ie-Ve for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:56:43 -0500 Received: by mail-wr1-x42d.google.com with SMTP id bx10so12037428wrb.0 for ; Tue, 20 Dec 2022 06:56:41 -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=+t/6/U4dDtWFou9lNwrmgxL5oJxAfHUoXJOlrPFl4Zg=; b=nwDkckVmD/YA+j56y9O39Fz2zj1rWbTrGEBLH1RkjSbaQpjmGdQ+A2wKaOTyzhVnPK pYhA1Me7ltB797WF4FGEXvYxTVrtRywUXkvUfsULBqncuzVrh0sAovaz2YIctjvgDlWU lFohIeEaTqXOrtQ8xMGgjiAm8jLJsLPmOEU/n/vicVuMboHdqX9z7SwPL+DnyFKZoq7W z7+oxG92lXyemCLp85AX1n2T8kVd5N/1ys54JLUVobhOuqoRC1vsSMoMa6o5F/MHhLmo JmwTHExg550b90Nu/X9UfT8Mx1vnvAmQCFs80A3tqyU2d/29oG3PJzqNm7MOWGahDshB g8Yg== 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=+t/6/U4dDtWFou9lNwrmgxL5oJxAfHUoXJOlrPFl4Zg=; b=gF13gOU7NaNhC/5O938hqR0izIaUX3ah9QV60HgTraNWMVdPwhrLdkS8wkX9iF7EUz aL68uXVvvpAF59mRYnNVFaPIY/hqeJ5d+kBWhDLrth3ABt5dL4uH9oxXmy0vMIkFB5G5 E39qv7s3IX01TPWAaw4GQUFhlFONjnQSAgSnq5ROma9jjreuMKkTSfbGMHwuo80xX3xX kJxcMb8WHW/MFFJPb/fez15b25if264BN2hjiUmGj1EwqbJ5sk5Y9BruxFabBBVKjOdZ a+JqRcCx3K9GQdgC4ADzcjjFTNFYovEHtpAYm/BfdTeHqJQjGWbFs/38MuxubjOj5QIy xW0w== X-Gm-Message-State: ANoB5pmcKyY/olE5NEgyJnb4T0VrpwNm/0IZsAy3oDqlpaaa6XGK5c2X gSUh1VNIQ4LO6rb6Jv3yWkGjr7M1MAArWGVR7zk= X-Received: by 2002:a05:6000:795:b0:242:7676:689d with SMTP id bu21-20020a056000079500b002427676689dmr26472968wrb.19.1671548200362; Tue, 20 Dec 2022 06:56:40 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b4-20020a5d4d84000000b002423a5d7cb1sm12795546wru.113.2022.12.20.06.56.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Dec 2022 06:56:39 -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 2/5] target/i386: Restrict sysemu/reset.h to system emulation Date: Tue, 20 Dec 2022 15:56:22 +0100 Message-Id: <20221220145625.26392-3-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::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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é --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 435980dd3a..91961359c7 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -24,7 +24,6 @@ #include "qemu/hw-version.h" #include "cpu.h" #include "tcg/helper-tcg.h" -#include "sysemu/reset.h" #include "sysemu/hvf.h" #include "kvm/kvm_i386.h" #include "sev.h" @@ -37,6 +36,7 @@ #ifndef CONFIG_USER_ONLY #include "qapi/qapi-commands-machine-target.h" #include "exec/address-spaces.h" +#include "sysemu/reset.h" #include "hw/boards.h" #include "hw/i386/sgx-epc.h" #endif